diff --git a/.github/workflows/fake-pr-tests.yml b/.github/workflows/fake-pr-tests.yml deleted file mode 100644 index 2274166..0000000 --- a/.github/workflows/fake-pr-tests.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: PR tests -on: - pull_request: - types: [auto_merge_enabled] - workflow_dispatch: - -jobs: - skip: - name: Report fake success for PR tests - runs-on: ubuntu-latest - permissions: - checks: write - steps: - - uses: LouisBrunner/checks-action@v2.0.0 - with: - name: Run PR tests (Plugins) (Plugins) - conclusion: success - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..449691b --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +save-exact=true \ No newline at end of file diff --git a/adapter/0.1.14.json b/adapter/0.1.14.json index 556e563..91fdb0a 100644 --- a/adapter/0.1.14.json +++ b/adapter/0.1.14.json @@ -47,4 +47,4 @@ "delete": { "model": ["dbId"] } -} \ No newline at end of file +} diff --git a/adapter/0.1.20.json b/adapter/0.1.20.json index 194344c..d474198 100644 --- a/adapter/0.1.20.json +++ b/adapter/0.1.20.json @@ -40,7 +40,7 @@ * } */ - { +{ "modify": { "container": [ ["convertPathToFieldLink", ["partitionKey"]], @@ -48,4 +48,4 @@ ["convertCosmosDbIndexes"] ] } -} \ No newline at end of file +} diff --git a/adapter/0.1.27.json b/adapter/0.1.27.json index e349505..f838888 100644 --- a/adapter/0.1.27.json +++ b/adapter/0.1.27.json @@ -2,10 +2,10 @@ * Copyright © 2016-2018 by IntegrIT S.A. dba Hackolade. All rights reserved. * * The copyright to the computer software herein is the property of IntegrIT S.A. - * The software may be used and/or copied only with the written permission of - * IntegrIT S.A. or in accordance with the terms and conditions stipulated in - * the agreement/contract under which the software has been supplied. - * + * The software may be used and/or copied only with the written permission of + * IntegrIT S.A. or in accordance with the terms and conditions stipulated in + * the agreement/contract under which the software has been supplied. + * * { * "add": { * "entity": [], @@ -39,7 +39,7 @@ * }, * } */ - { +{ "add": { "container": [ { @@ -60,4 +60,4 @@ } ] } -} \ No newline at end of file +} diff --git a/adapter/0.1.30.json b/adapter/0.1.30.json index 876d5b9..34b096b 100644 --- a/adapter/0.1.30.json +++ b/adapter/0.1.30.json @@ -2,10 +2,10 @@ * Copyright © 2016-2018 by IntegrIT S.A. dba Hackolade. All rights reserved. * * The copyright to the computer software herein is the property of IntegrIT S.A. - * The software may be used and/or copied only with the written permission of - * IntegrIT S.A. or in accordance with the terms and conditions stipulated in - * the agreement/contract under which the software has been supplied. - * + * The software may be used and/or copied only with the written permission of + * IntegrIT S.A. or in accordance with the terms and conditions stipulated in + * the agreement/contract under which the software has been supplied. + * * { * "add": { * "entity": [], @@ -39,8 +39,8 @@ * }, * } */ - { +{ "add": { "container": ["capacityMode"] } -} \ No newline at end of file +} diff --git a/central_pane/dtdAbbreviation.json b/central_pane/dtdAbbreviation.json index 6f6b7a3..8717cca 100644 --- a/central_pane/dtdAbbreviation.json +++ b/central_pane/dtdAbbreviation.json @@ -1,12 +1,12 @@ /* -* Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. -* -* The copyright to the computer software herein is the property of IntegrIT S.A. -* The software may be used and/or copied only with the written permission of -* IntegrIT S.A. or in accordance with the terms and conditions stipulated in -* the agreement/contract under which the software has been supplied. -* -*/ + * Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. + * + * The copyright to the computer software herein is the property of IntegrIT S.A. + * The software may be used and/or copied only with the written permission of + * IntegrIT S.A. or in accordance with the terms and conditions stipulated in + * the agreement/contract under which the software has been supplied. + * + */ { "map": "{...}", "list": "[...]", @@ -15,4 +15,4 @@ "bool": "{0/1}", "bytes": "{BYTES}", "null": "{null}" -} \ No newline at end of file +} diff --git a/forward_engineering/api.js b/forward_engineering/api.js index 227ac5d..75e9ac4 100644 --- a/forward_engineering/api.js +++ b/forward_engineering/api.js @@ -1,143 +1,98 @@ -const applyToInstanceHelper = require('./applyToInstance'); -const getIndexPolicyScript = require('./helpers/getIndexPolicyScript'); -const { getUniqueKeyPolicyScript } = require('./helpers/getUniqueKeyPolicyScript'); -const { buildAzureCLIScript } = require('./helpers/azureCLIScriptHelpers/buildAzureCLIScript'); -const getPartitionKey = require('./helpers/getPartitionKey'); - -module.exports = { - generateContainerScript(data, logger, callback, app) { - try { - const _ = app.require('lodash'); - const insertSamplesOption = - _.get(data, 'options.additionalOptions', []).find(option => option.id === 'INCLUDE_SAMPLES') || {}; - const withSamples = data.options.origin !== 'ui'; - const samples = data.entities.map(entityId => - updateSample( - JSON.parse(data.jsonData[entityId]), - data.containerData[0], - (data.entityData[entityId] || [])[0] || {}, - ), - ); - if (data.options.targetScriptOptions && data.options.targetScriptOptions.keyword === 'containerSettingsJson') { - const uniqueKeys = _.get(data.containerData, '[0].uniqueKey', []); - const scriptData = { - partitionKey: getPartitionKey(_)(data.containerData), - ...(uniqueKeys.length && getUniqueKeyPolicyScript(uniqueKeys)), - indexingPolicy: getIndexPolicyScript(_)(data.containerData), - ...(withSamples && { sample: samples }), - ...addItems(_)(data.containerData), - }; - const script = JSON.stringify(scriptData, null, 2); - if (withSamples || !insertSamplesOption.value) { - return callback(null, script); - } - - return callback(null, [ - { title: 'CosmosDB script', script }, - { title: 'Sample data', script: JSON.stringify(samples, null, 2) }, - ]); - } - - const script = buildAzureCLIScript(_)({ - ...data, - shellName: data.options.targetScriptOptions.keyword.split('azureCli')[1].toLowerCase(), - }); - - if (withSamples || !insertSamplesOption.value) { - return callback(null, script); - } - - return callback(null, [ - { title: 'Azure CLI script', script }, - { title: 'Sample data', script: JSON.stringify(samples, null, 2) }, - ]); - } catch (e) { - const error = { message: e.message, stack: e.stack }; - logger.log('error', error, 'CosmosDB w\\ SQL API forward engineering error'); - callback(error); - } - }, - generateScript(data, logger, callback, app) { - try { - const _ = app.require('lodash'); - const uniqueKeys = _.get(data.containerData, '[0].uniqueKey', []); - - const script = { - partitionKey: getPartitionKey(_)(data.containerData), - indexingPolicy: getIndexPolicyScript(_)(data.containerData), - ...(uniqueKeys.length && getUniqueKeyPolicyScript(uniqueKeys)), - sample: updateSample(JSON.parse(data.jsonData), data.containerData[0], data.entityData[0]), - ...addItems(_)(data.containerData), - }; - return callback(null, JSON.stringify(script, null, 2)); - } catch (e) { - const error = { message: e.message, stack: e.stack }; - logger.log('error', error, 'CosmosDB w\\ SQL API forward engineering error'); - callback(error); - } - }, - applyToInstance: applyToInstanceHelper.applyToInstance, - - testConnection: applyToInstanceHelper.testConnection, -}; - -const updateSample = (sample, containerData, entityData) => { - const docType = containerData?.docTypeName; - - if (!docType) { - return sample; - } - - return { - ...sample, - [docType]: entityData.code || entityData.collectionName, - }; -}; - -const add = (key, items, mapper) => script => { - if (!items.length) { - return script; - } - - return { - ...script, - [key]: mapper(items), - }; -}; - -const addItems = _ => containerData => { - return _.flow( - add('Stored Procedures', _.get(containerData, '[2].storedProcs', []), mapStoredProcs), - add('User Defined Functions', _.get(containerData, '[4].udfs', []), mapUDFs), - add('Triggers', _.get(containerData, '[3].triggers', []), mapTriggers), - )(); -}; - -const mapUDFs = udfs => { - return udfs.map(udf => { - return { - id: udf.udfID, - body: udf.udfFunction, - }; - }); -}; - -const mapTriggers = triggers => { - return triggers.map(trigger => { - return { - id: trigger.triggerID, - body: trigger.triggerFunction, - triggerOperation: trigger.triggerOperation, - triggerType: trigger.prePostTrigger === 'Pre-Trigger' ? 'Pre' : 'Post', - }; - }); -}; - -const mapStoredProcs = storedProcs => { - return storedProcs.map(proc => { - return { - id: proc.storedProcID, - body: proc.storedProcFunction, - }; - }); -}; +"use strict";var eL=Object.create;var oa=Object.defineProperty;var tL=Object.getOwnPropertyDescriptor;var nL=Object.getOwnPropertyNames;var rL=Object.getPrototypeOf,iL=Object.prototype.hasOwnProperty;var s=(t,e)=>oa(t,"name",{value:e,configurable:!0});var ut=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lv=(t,e)=>{for(var n in e)oa(t,n,{get:e[n],enumerable:!0})},pv=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of nL(e))!iL.call(t,o)&&o!==n&&oa(t,o,{get:()=>e[o],enumerable:!(r=tL(e,o))||r.enumerable});return t};var Cp=(t,e,n)=>(n=t!=null?eL(rL(t)):{},pv(e||!t||!t.__esModule?oa(n,"default",{value:t,enumerable:!0}):n,t)),zr=t=>pv(oa({},"__esModule",{value:!0}),t);function aa(){return ec>tc.length-16&&(dv.default.randomFillSync(tc),ec=0),tc.slice(ec,ec+=16)}var dv,tc,ec,Op=ut(()=>{dv=Cp(require("crypto")),tc=new Uint8Array(256),ec=tc.length;s(aa,"rng")});var fv,hv=ut(()=>{fv=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function oL(t){return typeof t=="string"&&fv.test(t)}var lr,sa=ut(()=>{hv();s(oL,"validate");lr=oL});function aL(t,e=0){let n=(rt[t[e+0]]+rt[t[e+1]]+rt[t[e+2]]+rt[t[e+3]]+"-"+rt[t[e+4]]+rt[t[e+5]]+"-"+rt[t[e+6]]+rt[t[e+7]]+"-"+rt[t[e+8]]+rt[t[e+9]]+"-"+rt[t[e+10]]+rt[t[e+11]]+rt[t[e+12]]+rt[t[e+13]]+rt[t[e+14]]+rt[t[e+15]]).toLowerCase();if(!lr(n))throw TypeError("Stringified UUID is invalid");return n}var rt,pr,ca=ut(()=>{sa();rt=[];for(let t=0;t<256;++t)rt.push((t+256).toString(16).substr(1));s(aL,"stringify");pr=aL});function sL(t,e,n){let r=e&&n||0,o=e||new Array(16);t=t||{};let c=t.node||mv,u=t.clockseq!==void 0?t.clockseq:Ip;if(c==null||u==null){let v=t.random||(t.rng||aa)();c==null&&(c=mv=[v[0]|1,v[1],v[2],v[3],v[4],v[5]]),u==null&&(u=Ip=(v[6]<<8|v[7])&16383)}let p=t.msecs!==void 0?t.msecs:Date.now(),d=t.nsecs!==void 0?t.nsecs:Lp+1,m=p-Dp+(d-Lp)/1e4;if(m<0&&t.clockseq===void 0&&(u=u+1&16383),(m<0||p>Dp)&&t.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Dp=p,Lp=d,Ip=u,p+=122192928e5;let h=((p&268435455)*1e4+d)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=h&255;let y=p/4294967296*1e4&268435455;o[r++]=y>>>8&255,o[r++]=y&255,o[r++]=y>>>24&15|16,o[r++]=y>>>16&255,o[r++]=u>>>8|128,o[r++]=u&255;for(let v=0;v<6;++v)o[r+v]=c[v];return e||pr(o)}var mv,Ip,Dp,Lp,gv,yv=ut(()=>{Op();ca();Dp=0,Lp=0;s(sL,"v1");gv=sL});function cL(t){if(!lr(t))throw TypeError("Invalid UUID");let e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=e&255,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=e&255,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=e&255,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=e&255,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=e&255,n}var nc,Mp=ut(()=>{sa();s(cL,"parse");nc=cL});function uL(t){t=unescape(encodeURIComponent(t));let e=[];for(let n=0;n{ca();Mp();s(uL,"stringToBytes");lL="6ba7b810-9dad-11d1-80b4-00c04fd430c8",pL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";s(ua,"default")});function dL(t){return Array.isArray(t)?t=Buffer.from(t):typeof t=="string"&&(t=Buffer.from(t,"utf8")),xv.default.createHash("md5").update(t).digest()}var xv,vv,bv=ut(()=>{xv=Cp(require("crypto"));s(dL,"md5");vv=dL});var fL,wv,_v=ut(()=>{Np();bv();fL=ua("v3",48,vv),wv=fL});function hL(t,e,n){t=t||{};let r=t.random||(t.rng||aa)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=r[o];return e}return pr(r)}var Rv,Tv=ut(()=>{Op();ca();s(hL,"v4");Rv=hL});function mL(t){return Array.isArray(t)?t=Buffer.from(t):typeof t=="string"&&(t=Buffer.from(t,"utf8")),Sv.default.createHash("sha1").update(t).digest()}var Sv,Ev,Pv=ut(()=>{Sv=Cp(require("crypto"));s(mL,"sha1");Ev=mL});var gL,Av,Cv=ut(()=>{Np();Pv();gL=ua("v5",80,Ev),Av=gL});var Ov,Iv=ut(()=>{Ov="00000000-0000-0000-0000-000000000000"});function yL(t){if(!lr(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}var Dv,Lv=ut(()=>{sa();s(yL,"version");Dv=yL});var Mv={};lv(Mv,{NIL:()=>Ov,parse:()=>nc,stringify:()=>pr,v1:()=>gv,v3:()=>wv,v4:()=>Rv,v5:()=>Av,validate:()=>lr,version:()=>Dv});var Nv=ut(()=>{yv();_v();Tv();Cv();Iv();Lv();sa();ca();Mp()});var $r={};lv($r,{__addDisposableResource:()=>nb,__assign:()=>rc,__asyncDelegator:()=>Qv,__asyncGenerator:()=>Gv,__asyncValues:()=>Vv,__await:()=>Bi,__awaiter:()=>Uv,__classPrivateFieldGet:()=>Zv,__classPrivateFieldIn:()=>tb,__classPrivateFieldSet:()=>eb,__createBinding:()=>oc,__decorate:()=>Fv,__disposeResources:()=>rb,__esDecorate:()=>xL,__exportStar:()=>zv,__extends:()=>kv,__generator:()=>Hv,__importDefault:()=>Xv,__importStar:()=>Yv,__makeTemplateObject:()=>Jv,__metadata:()=>jv,__param:()=>Bv,__propKey:()=>bL,__read:()=>qp,__rest:()=>qv,__runInitializers:()=>vL,__setFunctionName:()=>wL,__spread:()=>$v,__spreadArray:()=>Kv,__spreadArrays:()=>Wv,__values:()=>ic,default:()=>TL});function kv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");kp(t,e);function n(){this.constructor=t}s(n,"__"),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function qv(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o=0;p--)(u=t[p])&&(c=(o<3?u(c):o>3?u(e,n,c):u(e,n))||c);return o>3&&c&&Object.defineProperty(e,n,c),c}function Bv(t,e){return function(n,r){e(n,r,t)}}function xL(t,e,n,r,o,c){function u(N){if(N!==void 0&&typeof N!="function")throw new TypeError("Function expected");return N}s(u,"accept");for(var p=r.kind,d=p==="getter"?"get":p==="setter"?"set":"value",m=!e&&t?r.static?t:t.prototype:null,h=e||(m?Object.getOwnPropertyDescriptor(m,r.name):{}),y,v=!1,P=n.length-1;P>=0;P--){var _={};for(var T in r)_[T]=T==="access"?{}:r[T];for(var T in r.access)_.access[T]=r.access[T];_.addInitializer=function(N){if(v)throw new TypeError("Cannot add initializers after decoration has completed");c.push(u(N||null))};var I=(0,n[P])(p==="accessor"?{get:h.get,set:h.set}:h[d],_);if(p==="accessor"){if(I===void 0)continue;if(I===null||typeof I!="object")throw new TypeError("Object expected");(y=u(I.get))&&(h.get=y),(y=u(I.set))&&(h.set=y),(y=u(I.init))&&o.unshift(y)}else(y=u(I))&&(p==="field"?o.unshift(y):h[d]=y)}m&&Object.defineProperty(m,r.name,h),v=!0}function vL(t,e,n){for(var r=arguments.length>2,o=0;o0&&c[c.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!c||m[1]>c[0]&&m[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function qp(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,c=[],u;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)c.push(o.value)}catch(p){u={error:p}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return c}function $v(){for(var t=[],e=0;e1||p(v,P)})})}function p(v,P){try{d(r[v](P))}catch(_){y(c[0][3],_)}}function d(v){v.value instanceof Bi?Promise.resolve(v.value.v).then(m,h):y(c[0][2],v)}function m(v){p("next",v)}function h(v){p("throw",v)}function y(v,P){v(P),c.shift(),c.length&&p(c[0][0],c[0][1])}}function Qv(t){var e,n;return e={},r("next"),r("throw",function(o){throw o}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(o,c){e[o]=t[o]?function(u){return(n=!n)?{value:Bi(t[o](u)),done:!1}:c?c(u):u}:c}}function Vv(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof ic=="function"?ic(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(c){n[c]=t[c]&&function(u){return new Promise(function(p,d){u=t[c](u),o(p,d,u.done,u.value)})}}function o(c,u,p,d){Promise.resolve(d).then(function(m){c({value:m,done:p})},u)}}function Jv(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Yv(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&oc(e,t,n);return _L(e,t),e}function Xv(t){return t&&t.__esModule?t:{default:t}}function Zv(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function eb(t,e,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(t,n):o?o.value=n:e.set(t,n),n}function tb(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function nb(t,e,n){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}function rb(t){function e(r){t.error=t.hasError?new RL(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}s(e,"fail");function n(){for(;t.stack.length;){var r=t.stack.pop();try{var o=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(o).then(n,function(c){return e(c),n()})}catch(c){e(c)}}if(t.hasError)throw t.error}return s(n,"next"),n()}var kp,rc,oc,_L,RL,TL,Wr=ut(()=>{kp=s(function(t,e){return kp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},kp(t,e)},"extendStatics");s(kv,"__extends");rc=s(function(){return rc=Object.assign||s(function(e){for(var n,r=1,o=arguments.length;r{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.log=void 0;var ib=(Wr(),zr($r)),SL=require("node:os"),EL=ib.__importDefault(require("node:util")),PL=ib.__importStar(require("node:process"));function AL(t,...e){PL.stderr.write(`${EL.default.format(t,...e)}${SL.EOL}`)}s(AL,"log");ac.log=AL});var lb=L(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});var CL=ob(),ab=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,sb,Fp=[],Bp=[],sc=[];ab&&jp(ab);var cb=Object.assign(t=>ub(t),{enable:jp,enabled:Up,disable:OL,log:CL.log});function jp(t){sb=t,Fp=[],Bp=[];let e=/\*/g,n=t.split(",").map(r=>r.trim().replace(e,".*?"));for(let r of n)r.startsWith("-")?Bp.push(new RegExp(`^${r.substr(1)}$`)):Fp.push(new RegExp(`^${r}$`));for(let r of sc)r.enabled=Up(r.namespace)}s(jp,"enable");function Up(t){if(t.endsWith("*"))return!0;for(let e of Bp)if(e.test(t))return!1;for(let e of Fp)if(e.test(t))return!0;return!1}s(Up,"enabled");function OL(){let t=sb||"";return jp(""),t}s(OL,"disable");function ub(t){let e=Object.assign(n,{enabled:Up(t),destroy:IL,log:cb.log,namespace:t,extend:DL});function n(...r){e.enabled&&(r.length>0&&(r[0]=`${t} ${r[0]}`),e.log(...r))}return s(n,"debug"),sc.push(e),e}s(ub,"createDebugger");function IL(){let t=sc.indexOf(this);return t>=0?(sc.splice(t,1),!0):!1}s(IL,"destroy");function DL(t){let e=ub(`${this.namespace}:${t}`);return e.log=this.log,e}s(DL,"extend");Hp.default=cb});var pc=L(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.createClientLogger=kt.getLogLevel=kt.setLogLevel=kt.AzureLogger=void 0;var LL=(Wr(),zr($r)),la=LL.__importDefault(lb()),db=new Set,cc=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,lc;kt.AzureLogger=(0,la.default)("azure");kt.AzureLogger.log=(...t)=>{la.default.log(...t)};var zp=["verbose","info","warning","error"];cc&&(gb(cc)?fb(cc):console.error(`AZURE_LOG_LEVEL set to unknown log level '${cc}'; logging is not enabled. Acceptable values: ${zp.join(", ")}.`));function fb(t){if(t&&!gb(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${zp.join(",")}`);lc=t;let e=[];for(let n of db)mb(n)&&e.push(n.namespace);la.default.enable(e.join(","))}s(fb,"setLogLevel");kt.setLogLevel=fb;function ML(){return lc}s(ML,"getLogLevel");kt.getLogLevel=ML;var pb={verbose:400,info:300,warning:200,error:100};function NL(t){let e=kt.AzureLogger.extend(t);return hb(kt.AzureLogger,e),{error:uc(e,"error"),warning:uc(e,"warning"),info:uc(e,"info"),verbose:uc(e,"verbose")}}s(NL,"createClientLogger");kt.createClientLogger=NL;function hb(t,e){e.log=(...n)=>{t.log(...n)}}s(hb,"patchLogMethod");function uc(t,e){let n=Object.assign(t.extend(e),{level:e});if(hb(t,n),mb(n)){let r=la.default.disable();la.default.enable(r+","+n.namespace)}return db.add(n),n}s(uc,"createLogger");function mb(t){return!!(lc&&pb[t.level]<=pb[lc])}s(mb,"shouldEnable");function gb(t){return zp.includes(t)}s(gb,"isAzureLogLevel")});var xb=L((R4,yb)=>{"use strict";yb.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var n=typeof e.cycles=="boolean"?e.cycles:!1,r=e.cmp&&function(c){return function(u){return function(p,d){var m={key:p,value:u[p]},h={key:d,value:u[d]};return c(m,h)}}}(e.cmp),o=[];return s(function c(u){if(u&&u.toJSON&&typeof u.toJSON=="function"&&(u=u.toJSON()),u!==void 0){if(typeof u=="number")return isFinite(u)?""+u:"null";if(typeof u!="object")return JSON.stringify(u);var p,d;if(Array.isArray(u)){for(d="[",p=0;p{vb.exports=fn;function fn(t){this._comparator=t||fn.DEFAULT_COMPARATOR,this._elements=[]}s(fn,"PriorityQueue");fn.DEFAULT_COMPARATOR=function(t,e){return typeof t=="number"&&typeof e=="number"?t-e:(t=t.toString(),e=e.toString(),t==e?0:t>e?1:-1)};fn.prototype.isEmpty=function(){return this.size()===0};fn.prototype.peek=function(){if(this.isEmpty())throw new Error("PriorityQueue is empty");return this._elements[0]};fn.prototype.deq=function(){var t=this.peek(),e=this._elements.pop(),n=this.size();if(n===0)return t;this._elements[0]=e;for(var r=0;r=0&&(o=c),u=0&&(o=u),o===r)break;this._swap(o,r),r=o}return t};fn.prototype.enq=function(t){for(var e=this._elements.push(t),n=e-1;n>0;){var r=Math.floor((n-1)/2);if(this._compare(n,r)<=0)break;this._swap(r,n),n=r}return e};fn.prototype.size=function(){return this._elements.length};fn.prototype.forEach=function(t){return this._elements.forEach(t)};fn.prototype._compare=function(t,e){return this._comparator(this._elements[t],this._elements[e])};fn.prototype._swap=function(t,e){var n=this._elements[t];this._elements[t]=this._elements[e],this._elements[e]=n}});var _b=L(($p,wb)=>{(function(t){"use strict";var e=s(function(r){setTimeout(r,0)},"nextTick");typeof process<"u"&&process&&typeof process.nextTick=="function"&&(e=process.nextTick);function n(r){var o={capacity:r||1,current:0,queue:[],firstHere:!1,take:function(){if(o.firstHere===!1){o.current++,o.firstHere=!0;var c=1}else var c=0;var u={n:1};typeof arguments[0]=="function"?u.task=arguments[0]:u.n=arguments[0],arguments.length>=2&&(typeof arguments[1]=="function"?u.task=arguments[1]:u.n=arguments[1]);var p=u.task;if(u.task=function(){p(o.leave)},o.current+u.n-c>o.capacity)return c===1&&(o.current--,o.firstHere=!1),o.queue.push(u);o.current+=u.n-c,u.task(o.leave),c===1&&(o.firstHere=!1)},leave:function(c){if(c=c||1,o.current-=c,!o.queue.length){if(o.current<0)throw new Error("leave called too many times.");return}var u=o.queue[0];u.n+o.current>o.capacity||(o.queue.shift(),o.current+=u.n,e(u.task))},available:function(c){return c=c||1,o.current+c<=o.capacity}};return o}s(n,"semaphore"),typeof $p=="object"?wb.exports=n:typeof define=="function"&&define.amd?define(function(){return n}):t.semaphore=n})($p)});var Kp=L(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.createEmptyPipeline=void 0;var Rb=new Set(["Deserialize","Serialize","Retry","Sign"]),pa=class pa{constructor(e){var n;this._policies=[],this._policies=(n=e==null?void 0:e.slice(0))!==null&&n!==void 0?n:[],this._orderedPolicies=void 0}addPolicy(e,n={}){if(n.phase&&n.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(n.phase&&!Rb.has(n.phase))throw new Error(`Invalid phase name: ${n.phase}`);if(n.afterPhase&&!Rb.has(n.afterPhase))throw new Error(`Invalid afterPhase name: ${n.afterPhase}`);this._policies.push({policy:e,options:n}),this._orderedPolicies=void 0}removePolicy(e){let n=[];return this._policies=this._policies.filter(r=>e.name&&r.policy.name===e.name||e.phase&&r.options.phase===e.phase?(n.push(r.policy),!1):!0),this._orderedPolicies=void 0,n}sendRequest(e,n){return this.getOrderedPolicies().reduceRight((c,u)=>p=>u.sendRequest(p,c),c=>e.sendRequest(c))(n)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new pa(this._policies)}static create(){return new pa}orderPolicies(){let e=[],n=new Map;function r(_){return{name:_,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}s(r,"createPhase");let o=r("Serialize"),c=r("None"),u=r("Deserialize"),p=r("Retry"),d=r("Sign"),m=[o,c,u,p,d];function h(_){return _==="Retry"?p:_==="Serialize"?o:_==="Deserialize"?u:_==="Sign"?d:c}s(h,"getPhase");for(let _ of this._policies){let T=_.policy,I=_.options,N=T.name;if(n.has(N))throw new Error("Duplicate policy names not allowed in pipeline");let H={policy:T,dependsOn:new Set,dependants:new Set};I.afterPhase&&(H.afterPhase=h(I.afterPhase),H.afterPhase.hasAfterPolicies=!0),n.set(N,H),h(I.phase).policies.add(H)}for(let _ of this._policies){let{policy:T,options:I}=_,N=T.name,H=n.get(N);if(!H)throw new Error(`Missing node for policy ${N}`);if(I.afterPolicies)for(let j of I.afterPolicies){let G=n.get(j);G&&(H.dependsOn.add(G),G.dependants.add(H))}if(I.beforePolicies)for(let j of I.beforePolicies){let G=n.get(j);G&&(G.dependsOn.add(H),H.dependants.add(G))}}function y(_){_.hasRun=!0;for(let T of _.policies)if(!(T.afterPhase&&(!T.afterPhase.hasRun||T.afterPhase.policies.size))&&T.dependsOn.size===0){e.push(T.policy);for(let I of T.dependants)I.dependsOn.delete(T);n.delete(T.policy.name),_.policies.delete(T)}}s(y,"walkPhase");function v(){for(let _ of m){if(y(_),_.policies.size>0&&_!==c){c.hasRun||y(c);return}_.hasAfterPolicies&&y(c)}}s(v,"walkPhases");let P=0;for(;n.size>0;){P++;let _=e.length;if(v(),e.length<=_&&P>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};s(pa,"HttpPipeline");var Wp=pa;function kL(){return Wp.create()}s(kL,"createEmptyPipeline");dc.createEmptyPipeline=kL});var Kr=L(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.logger=void 0;var qL=pc();fc.logger=(0,qL.createClientLogger)("core-rest-pipeline")});var Tb=L(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.AbortError=void 0;var Qp=class Qp extends Error{constructor(e){super(e),this.name="AbortError"}};s(Qp,"AbortError");var Gp=Qp;hc.AbortError=Gp});var Sb=L(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.AbortError=void 0;var FL=Tb();Object.defineProperty(mc,"AbortError",{enumerable:!0,get:function(){return FL.AbortError}})});var Vp=L(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.createAbortablePromise=void 0;var BL=Sb();function jL(t,e){let{cleanupBeforeAbort:n,abortSignal:r,abortErrorMsg:o}=e??{};return new Promise((c,u)=>{function p(){u(new BL.AbortError(o??"The operation was aborted."))}s(p,"rejectOnAbort");function d(){r==null||r.removeEventListener("abort",m)}s(d,"removeListeners");function m(){n==null||n(),d(),p()}if(s(m,"onAbort"),r!=null&&r.aborted)return p();try{t(h=>{d(),c(h)},h=>{d(),u(h)})}catch(h){u(h)}r==null||r.addEventListener("abort",m)})}s(jL,"createAbortablePromise");gc.createAbortablePromise=jL});var Eb=L(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.delay=void 0;var UL=Vp(),HL="The delay was aborted.";function zL(t,e){let n,{abortSignal:r,abortErrorMsg:o}=e??{};return(0,UL.createAbortablePromise)(c=>{n=setTimeout(c,t)},{cleanupBeforeAbort:()=>clearTimeout(n),abortSignal:r,abortErrorMsg:o??HL})}s(zL,"delay");yc.delay=zL});var Pb=L(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.cancelablePromiseRace=void 0;async function $L(t,e){var n,r;let o=new AbortController;function c(){o.abort()}s(c,"abortHandler"),(n=e==null?void 0:e.abortSignal)===null||n===void 0||n.addEventListener("abort",c);try{return await Promise.race(t.map(u=>u({abortSignal:o.signal})))}finally{o.abort(),(r=e==null?void 0:e.abortSignal)===null||r===void 0||r.removeEventListener("abort",c)}}s($L,"cancelablePromiseRace");xc.cancelablePromiseRace=$L});var Ab=L(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.getRandomIntegerInclusive=void 0;function WL(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}s(WL,"getRandomIntegerInclusive");vc.getRandomIntegerInclusive=WL});var Jp=L(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.isObject=void 0;function KL(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}s(KL,"isObject");bc.isObject=KL});var Ob=L(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.getErrorMessage=ji.isError=void 0;var GL=Jp();function Cb(t){if((0,GL.isObject)(t)){let e=typeof t.name=="string",n=typeof t.message=="string";return e&&n}return!1}s(Cb,"isError");ji.isError=Cb;function QL(t){if(Cb(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}s(QL,"getErrorMessage");ji.getErrorMessage=QL});var Db=L(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.computeSha256Hash=Ui.computeSha256Hmac=void 0;var Ib=require("crypto");async function VL(t,e,n){let r=Buffer.from(t,"base64");return(0,Ib.createHmac)("sha256",r).update(e).digest(n)}s(VL,"computeSha256Hmac");Ui.computeSha256Hmac=VL;async function JL(t,e){return(0,Ib.createHash)("sha256").update(t).digest(e)}s(JL,"computeSha256Hash");Ui.computeSha256Hash=JL});var Mb=L(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.objectHasProperty=dr.isObjectWithProperties=dr.isDefined=void 0;function Yp(t){return typeof t<"u"&&t!==null}s(Yp,"isDefined");dr.isDefined=Yp;function YL(t,e){if(!Yp(t)||typeof t!="object")return!1;for(let n of e)if(!Lb(t,n))return!1;return!0}s(YL,"isObjectWithProperties");dr.isObjectWithProperties=YL;function Lb(t,e){return Yp(t)&&typeof t=="object"&&e in t}s(Lb,"objectHasProperty");dr.objectHasProperty=Lb});var Nb=L(wc=>{"use strict";var Xp;Object.defineProperty(wc,"__esModule",{value:!0});wc.randomUUID=void 0;var XL=require("crypto"),ZL=typeof((Xp=globalThis==null?void 0:globalThis.crypto)===null||Xp===void 0?void 0:Xp.randomUUID)=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):XL.randomUUID;function eM(){return ZL()}s(eM,"randomUUID");wc.randomUUID=eM});var kb=L(Ne=>{"use strict";var Zp,ed,td,nd;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.isReactNative=Ne.isNodeRuntime=Ne.isNode=Ne.isNodeLike=Ne.isBun=Ne.isDeno=Ne.isWebWorker=Ne.isBrowser=void 0;Ne.isBrowser=typeof window<"u"&&typeof window.document<"u";Ne.isWebWorker=typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((Zp=self.constructor)===null||Zp===void 0?void 0:Zp.name)==="DedicatedWorkerGlobalScope"||((ed=self.constructor)===null||ed===void 0?void 0:ed.name)==="ServiceWorkerGlobalScope"||((td=self.constructor)===null||td===void 0?void 0:td.name)==="SharedWorkerGlobalScope");Ne.isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";Ne.isBun=typeof Bun<"u"&&typeof Bun.version<"u";Ne.isNodeLike=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!(!((nd=globalThis.process.versions)===null||nd===void 0)&&nd.node);Ne.isNode=Ne.isNodeLike;Ne.isNodeRuntime=Ne.isNodeLike&&!Ne.isBun&&!Ne.isDeno;Ne.isReactNative=typeof navigator<"u"&&(navigator==null?void 0:navigator.product)==="ReactNative"});var qb=L(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.stringToUint8Array=Hi.uint8ArrayToString=void 0;function tM(t,e){return Buffer.from(t).toString(e)}s(tM,"uint8ArrayToString");Hi.uint8ArrayToString=tM;function nM(t,e){return Buffer.from(t,e)}s(nM,"stringToUint8Array");Hi.stringToUint8Array=nM});var En=L(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.stringToUint8Array=ne.uint8ArrayToString=ne.isWebWorker=ne.isReactNative=ne.isDeno=ne.isNodeRuntime=ne.isNodeLike=ne.isNode=ne.isBun=ne.isBrowser=ne.randomUUID=ne.objectHasProperty=ne.isObjectWithProperties=ne.isDefined=ne.computeSha256Hmac=ne.computeSha256Hash=ne.getErrorMessage=ne.isError=ne.isObject=ne.getRandomIntegerInclusive=ne.createAbortablePromise=ne.cancelablePromiseRace=ne.delay=void 0;var rM=Eb();Object.defineProperty(ne,"delay",{enumerable:!0,get:function(){return rM.delay}});var iM=Pb();Object.defineProperty(ne,"cancelablePromiseRace",{enumerable:!0,get:function(){return iM.cancelablePromiseRace}});var oM=Vp();Object.defineProperty(ne,"createAbortablePromise",{enumerable:!0,get:function(){return oM.createAbortablePromise}});var aM=Ab();Object.defineProperty(ne,"getRandomIntegerInclusive",{enumerable:!0,get:function(){return aM.getRandomIntegerInclusive}});var sM=Jp();Object.defineProperty(ne,"isObject",{enumerable:!0,get:function(){return sM.isObject}});var Fb=Ob();Object.defineProperty(ne,"isError",{enumerable:!0,get:function(){return Fb.isError}});Object.defineProperty(ne,"getErrorMessage",{enumerable:!0,get:function(){return Fb.getErrorMessage}});var Bb=Db();Object.defineProperty(ne,"computeSha256Hash",{enumerable:!0,get:function(){return Bb.computeSha256Hash}});Object.defineProperty(ne,"computeSha256Hmac",{enumerable:!0,get:function(){return Bb.computeSha256Hmac}});var rd=Mb();Object.defineProperty(ne,"isDefined",{enumerable:!0,get:function(){return rd.isDefined}});Object.defineProperty(ne,"isObjectWithProperties",{enumerable:!0,get:function(){return rd.isObjectWithProperties}});Object.defineProperty(ne,"objectHasProperty",{enumerable:!0,get:function(){return rd.objectHasProperty}});var cM=Nb();Object.defineProperty(ne,"randomUUID",{enumerable:!0,get:function(){return cM.randomUUID}});var fr=kb();Object.defineProperty(ne,"isBrowser",{enumerable:!0,get:function(){return fr.isBrowser}});Object.defineProperty(ne,"isBun",{enumerable:!0,get:function(){return fr.isBun}});Object.defineProperty(ne,"isNode",{enumerable:!0,get:function(){return fr.isNode}});Object.defineProperty(ne,"isNodeLike",{enumerable:!0,get:function(){return fr.isNodeLike}});Object.defineProperty(ne,"isNodeRuntime",{enumerable:!0,get:function(){return fr.isNodeRuntime}});Object.defineProperty(ne,"isDeno",{enumerable:!0,get:function(){return fr.isDeno}});Object.defineProperty(ne,"isReactNative",{enumerable:!0,get:function(){return fr.isReactNative}});Object.defineProperty(ne,"isWebWorker",{enumerable:!0,get:function(){return fr.isWebWorker}});var jb=qb();Object.defineProperty(ne,"uint8ArrayToString",{enumerable:!0,get:function(){return jb.uint8ArrayToString}});Object.defineProperty(ne,"stringToUint8Array",{enumerable:!0,get:function(){return jb.stringToUint8Array}})});var sd=L(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.Sanitizer=void 0;var uM=En(),id="REDACTED",lM=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],pM=["api-version"],ad=class ad{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:n=[]}={}){e=lM.concat(e),n=pM.concat(n),this.allowedHeaderNames=new Set(e.map(r=>r.toLowerCase())),this.allowedQueryParameters=new Set(n.map(r=>r.toLowerCase()))}sanitize(e){let n=new Set;return JSON.stringify(e,(r,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(r==="headers")return this.sanitizeHeaders(o);if(r==="url")return this.sanitizeUrl(o);if(r==="query")return this.sanitizeQuery(o);if(r==="body")return;if(r==="response")return;if(r==="operationSpec")return;if(Array.isArray(o)||(0,uM.isObject)(o)){if(n.has(o))return"[Circular]";n.add(o)}return o},2)}sanitizeHeaders(e){let n={};for(let r of Object.keys(e))this.allowedHeaderNames.has(r.toLowerCase())?n[r]=e[r]:n[r]=id;return n}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let n={};for(let r of Object.keys(e))this.allowedQueryParameters.has(r.toLowerCase())?n[r]=e[r]:n[r]=id;return n}sanitizeUrl(e){if(typeof e!="string"||e===null)return e;let n=new URL(e);if(!n.search)return e;for(let[r]of n.searchParams)this.allowedQueryParameters.has(r.toLowerCase())||n.searchParams.set(r,id);return n.toString()}};s(ad,"Sanitizer");var od=ad;_c.Sanitizer=od});var cd=L(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.logPolicy=Gr.logPolicyName=void 0;var dM=Kr(),fM=sd();Gr.logPolicyName="logPolicy";function hM(t={}){var e;let n=(e=t.logger)!==null&&e!==void 0?e:dM.logger.info,r=new fM.Sanitizer({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:Gr.logPolicyName,async sendRequest(o,c){if(!n.enabled)return c(o);n(`Request: ${r.sanitize(o)}`);let u=await c(o);return n(`Response status code: ${u.status}`),n(`Headers: ${r.sanitize(u.headers)}`),u}}}s(hM,"logPolicy");Gr.logPolicy=hM});var ud=L(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.redirectPolicy=Qr.redirectPolicyName=void 0;Qr.redirectPolicyName="redirectPolicy";var Ub=["GET","HEAD"];function mM(t={}){let{maxRetries:e=20}=t;return{name:Qr.redirectPolicyName,async sendRequest(n,r){let o=await r(n);return Hb(r,o,e)}}}s(mM,"redirectPolicy");Qr.redirectPolicy=mM;async function Hb(t,e,n,r=0){let{request:o,status:c,headers:u}=e,p=u.get("location");if(p&&(c===300||c===301&&Ub.includes(o.method)||c===302&&Ub.includes(o.method)||c===303&&o.method==="POST"||c===307)&&r{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.setPlatformSpecificData=zi.getHeaderName=void 0;var zb=(Wr(),zr($r)),ld=zb.__importStar(require("node:os")),gM=zb.__importStar(require("node:process"));function yM(){return"User-Agent"}s(yM,"getHeaderName");zi.getHeaderName=yM;function xM(t){let e=gM.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node),t.set("OS",`(${ld.arch()}-${ld.type()}-${ld.release()})`)}s(xM,"setPlatformSpecificData");zi.setPlatformSpecificData=xM});var hr=L($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.DEFAULT_RETRY_POLICY_COUNT=$i.SDK_VERSION=void 0;$i.SDK_VERSION="1.16.0";$i.DEFAULT_RETRY_POLICY_COUNT=3});var pd=L(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.getUserAgentValue=Wi.getUserAgentHeaderName=void 0;var Wb=$b(),vM=hr();function bM(t){let e=[];for(let[n,r]of t){let o=r?`${n}/${r}`:n;e.push(o)}return e.join(" ")}s(bM,"getUserAgentString");function wM(){return(0,Wb.getHeaderName)()}s(wM,"getUserAgentHeaderName");Wi.getUserAgentHeaderName=wM;function _M(t){let e=new Map;e.set("core-rest-pipeline",vM.SDK_VERSION),(0,Wb.setPlatformSpecificData)(e);let n=bM(e);return t?`${t} ${n}`:n}s(_M,"getUserAgentValue");Wi.getUserAgentValue=_M});var dd=L(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.userAgentPolicy=Vr.userAgentPolicyName=void 0;var Gb=pd(),Kb=(0,Gb.getUserAgentHeaderName)();Vr.userAgentPolicyName="userAgentPolicy";function RM(t={}){let e=(0,Gb.getUserAgentValue)(t.userAgentPrefix);return{name:Vr.userAgentPolicyName,async sendRequest(n,r){return n.headers.has(Kb)||n.headers.set(Kb,e),r(n)}}}s(RM,"userAgentPolicy");Vr.userAgentPolicy=RM});var Rc=L(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.isBlob=Pn.isReadableStream=Pn.isWebReadableStream=Pn.isNodeReadableStream=void 0;function Qb(t){return!!(t&&typeof t.pipe=="function")}s(Qb,"isNodeReadableStream");Pn.isNodeReadableStream=Qb;function Vb(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}s(Vb,"isWebReadableStream");Pn.isWebReadableStream=Vb;function TM(t){return Qb(t)||Vb(t)}s(TM,"isReadableStream");Pn.isReadableStream=TM;function SM(t){return typeof t.stream=="function"}s(SM,"isBlob");Pn.isBlob=SM});var fd=L(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.createFile=mr.createFileFromStream=mr.getRawContent=void 0;var EM=En(),PM=Rc(),Jb={arrayBuffer:()=>{throw new Error("Not implemented")},slice:()=>{throw new Error("Not implemented")},text:()=>{throw new Error("Not implemented")}},Tc=Symbol("rawContent");function AM(t){return typeof t[Tc]=="function"}s(AM,"hasRawContent");function CM(t){return AM(t)?t[Tc]():t.stream()}s(CM,"getRawContent");mr.getRawContent=CM;function OM(t,e,n={}){var r,o,c,u;return Object.assign(Object.assign({},Jb),{type:(r=n.type)!==null&&r!==void 0?r:"",lastModified:(o=n.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(c=n.webkitRelativePath)!==null&&c!==void 0?c:"",size:(u=n.size)!==null&&u!==void 0?u:-1,name:e,stream:()=>{let p=t();if((0,PM.isNodeReadableStream)(p))throw new Error("Not supported: a Node stream was provided as input to createFileFromStream.");return p},[Tc]:t})}s(OM,"createFileFromStream");mr.createFileFromStream=OM;function IM(t,e,n={}){var r,o,c;return EM.isNodeLike?Object.assign(Object.assign({},Jb),{type:(r=n.type)!==null&&r!==void 0?r:"",lastModified:(o=n.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(c=n.webkitRelativePath)!==null&&c!==void 0?c:"",size:t.byteLength,name:e,arrayBuffer:async()=>t.buffer,stream:()=>new Blob([t]).stream(),[Tc]:()=>t}):new File([t],e,n)}s(IM,"createFile");mr.createFile=IM});var Zb=L(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.concat=void 0;var Vn=(Wr(),zr($r)),hd=require("node:stream"),DM=Rc(),LM=fd();function Yb(){return Vn.__asyncGenerator(this,arguments,s(function*(){let e=this.getReader();try{for(;;){let{done:n,value:r}=yield Vn.__await(e.read());if(n)return yield Vn.__await(void 0);yield yield Vn.__await(r)}}finally{e.releaseLock()}},"streamAsyncIterator_1"))}s(Yb,"streamAsyncIterator");function MM(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=Yb.bind(t)),t.values||(t.values=Yb.bind(t))}s(MM,"makeAsyncIterable");function NM(t){return t instanceof ReadableStream?(MM(t),hd.Readable.fromWeb(t)):t}s(NM,"ensureNodeStream");function Xb(t){return t instanceof Uint8Array?hd.Readable.from(Buffer.from(t)):(0,DM.isBlob)(t)?Xb((0,LM.getRawContent)(t)):NM(t)}s(Xb,"toStream");async function kM(t){return function(){let e=t.map(n=>typeof n=="function"?n():n).map(Xb);return hd.Readable.from(function(){return Vn.__asyncGenerator(this,arguments,function*(){var n,r,o,c;for(let m of e)try{for(var u=!0,p=(r=void 0,Vn.__asyncValues(m)),d;d=yield Vn.__await(p.next()),n=d.done,!n;u=!0){c=d.value,u=!1;let h=c;yield yield Vn.__await(h)}}catch(h){r={error:h}}finally{try{!u&&!n&&(o=p.return)&&(yield Vn.__await(o.call(p)))}finally{if(r)throw r.error}}})}())}}s(kM,"concat");Sc.concat=kM});var md=L(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.multipartPolicy=Yr.multipartPolicyName=void 0;var Jr=En(),qM=Zb(),FM=Rc();function BM(){return`----AzSDKFormBoundary${(0,Jr.randomUUID)()}`}s(BM,"generateBoundary");function jM(t){let e="";for(let[n,r]of t)e+=`${n}: ${r}\r +`;return e}s(jM,"encodeHeaders");function UM(t){return t instanceof Uint8Array?t.byteLength:(0,FM.isBlob)(t)?t.size===-1?void 0:t.size:void 0}s(UM,"getLength");function HM(t){let e=0;for(let n of t){let r=UM(n);if(r===void 0)return;e+=r}return e}s(HM,"getTotalLength");async function zM(t,e,n){let r=[(0,Jr.stringToUint8Array)(`--${n}`,"utf-8"),...e.flatMap(c=>[(0,Jr.stringToUint8Array)(`\r +`,"utf-8"),(0,Jr.stringToUint8Array)(jM(c.headers),"utf-8"),(0,Jr.stringToUint8Array)(`\r +`,"utf-8"),c.body,(0,Jr.stringToUint8Array)(`\r +--${n}`,"utf-8")]),(0,Jr.stringToUint8Array)(`--\r +\r +`,"utf-8")],o=HM(r);o&&t.headers.set("Content-Length",o),t.body=await(0,qM.concat)(r)}s(zM,"buildRequestBody");Yr.multipartPolicyName="multipartPolicy";var $M=70,WM=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function KM(t){if(t.length>$M)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!WM.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}s(KM,"assertValidBoundary");function GM(){return{name:Yr.multipartPolicyName,async sendRequest(t,e){var n;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,o=(n=t.headers.get("Content-Type"))!==null&&n!==void 0?n:"multipart/mixed",c=o.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!c)throw new Error(`Got multipart request body, but content-type header was not multipart: ${o}`);let[,u,p]=c;if(p&&r&&p!==r)throw new Error(`Multipart boundary was specified as ${p} in the header, but got ${r} in the request body`);return r??(r=p),r?KM(r):r=BM(),t.headers.set("Content-Type",`${u}; boundary=${r}`),await zM(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}s(GM,"multipartPolicy");Yr.multipartPolicy=GM});var gd=L(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.decompressResponsePolicy=Xr.decompressResponsePolicyName=void 0;Xr.decompressResponsePolicyName="decompressResponsePolicy";function QM(){return{name:Xr.decompressResponsePolicyName,async sendRequest(t,e){return t.method!=="HEAD"&&t.headers.set("Accept-Encoding","gzip,deflate"),e(t)}}}s(QM,"decompressResponsePolicy");Xr.decompressResponsePolicy=QM});var e0=L(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.AbortError=void 0;var xd=class xd extends Error{constructor(e){super(e),this.name="AbortError"}};s(xd,"AbortError");var yd=xd;Ec.AbortError=yd});var Ac=L(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.AbortError=void 0;var VM=e0();Object.defineProperty(Pc,"AbortError",{enumerable:!0,get:function(){return VM.AbortError}})});var Cc=L(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.parseHeaderValueAsNumber=Ki.delay=void 0;var JM=Ac(),YM="The operation was aborted.";function XM(t,e,n){return new Promise((r,o)=>{let c,u,p=s(()=>o(new JM.AbortError(n!=null&&n.abortErrorMsg?n==null?void 0:n.abortErrorMsg:YM)),"rejectOnAbort"),d=s(()=>{n!=null&&n.abortSignal&&u&&n.abortSignal.removeEventListener("abort",u)},"removeListeners");if(u=s(()=>(c&&clearTimeout(c),d(),p()),"onAborted"),n!=null&&n.abortSignal&&n.abortSignal.aborted)return p();c=setTimeout(()=>{d(),r(e)},t),n!=null&&n.abortSignal&&n.abortSignal.addEventListener("abort",u)})}s(XM,"delay");Ki.delay=XM;function ZM(t,e){let n=t.headers.get(e);if(!n)return;let r=Number(n);if(!Number.isNaN(r))return r}s(ZM,"parseHeaderValueAsNumber");Ki.parseHeaderValueAsNumber=ZM});var Oc=L(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.throttlingRetryStrategy=Gi.isThrottlingRetryResponse=void 0;var eN=Cc(),vd="Retry-After",tN=["retry-after-ms","x-ms-retry-after-ms",vd];function t0(t){if(t&&[429,503].includes(t.status))try{for(let o of tN){let c=(0,eN.parseHeaderValueAsNumber)(t,o);if(c===0||c)return c*(o===vd?1e3:1)}let e=t.headers.get(vd);if(!e)return;let r=Date.parse(e)-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0}catch{return}}s(t0,"getRetryAfterInMs");function nN(t){return Number.isFinite(t0(t))}s(nN,"isThrottlingRetryResponse");Gi.isThrottlingRetryResponse=nN;function rN(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=t0(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}s(rN,"throttlingRetryStrategy");Gi.throttlingRetryStrategy=rN});var Ic=L(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.isSystemError=gr.isExponentialRetryResponse=gr.exponentialRetryStrategy=void 0;var iN=En(),oN=Oc(),aN=1e3,sN=1e3*64;function cN(t={}){var e,n;let r=(e=t.retryDelayInMs)!==null&&e!==void 0?e:aN,o=(n=t.maxRetryDelayInMs)!==null&&n!==void 0?n:sN,c=r;return{name:"exponentialRetryStrategy",retry({retryCount:u,response:p,responseError:d}){let m=r0(d),h=m&&t.ignoreSystemErrors,y=n0(p),v=y&&t.ignoreHttpStatusCodes;if(p&&((0,oN.isThrottlingRetryResponse)(p)||!y)||v||h)return{skipStrategy:!0};if(d&&!m&&!y)return{errorToThrow:d};let _=c*Math.pow(2,u),T=Math.min(o,_);return c=T/2+(0,iN.getRandomIntegerInclusive)(0,T/2),{retryAfterInMs:c}}}}s(cN,"exponentialRetryStrategy");gr.exponentialRetryStrategy=cN;function n0(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}s(n0,"isExponentialRetryResponse");gr.isExponentialRetryResponse=n0;function r0(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}s(r0,"isSystemError");gr.isSystemError=r0});var Qi=L(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.retryPolicy=void 0;var uN=Cc(),lN=pc(),pN=Ac(),i0=hr(),o0=(0,lN.createClientLogger)("core-rest-pipeline retryPolicy"),dN="retryPolicy";function fN(t,e={maxRetries:i0.DEFAULT_RETRY_POLICY_COUNT}){let n=e.logger||o0;return{name:dN,async sendRequest(r,o){var c,u;let p,d,m=-1;e:for(;;){m+=1,p=void 0,d=void 0;try{n.info(`Retry ${m}: Attempting to send request`,r.requestId),p=await o(r),n.info(`Retry ${m}: Received a response from request`,r.requestId)}catch(h){if(n.error(`Retry ${m}: Received an error from request`,r.requestId),d=h,!h||d.name!=="RestError")throw h;p=d.response}if(!((c=r.abortSignal)===null||c===void 0)&&c.aborted)throw n.error(`Retry ${m}: Request aborted.`),new pN.AbortError;if(m>=((u=e.maxRetries)!==null&&u!==void 0?u:i0.DEFAULT_RETRY_POLICY_COUNT)){if(n.info(`Retry ${m}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),d)throw d;if(p)return p;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${m}: Processing ${t.length} retry strategies.`);t:for(let h of t){let y=h.logger||o0;y.info(`Retry ${m}: Processing retry strategy ${h.name}.`);let v=h.retry({retryCount:m,response:p,responseError:d});if(v.skipStrategy){y.info(`Retry ${m}: Skipped.`);continue t}let{errorToThrow:P,retryAfterInMs:_,redirectTo:T}=v;if(P)throw y.error(`Retry ${m}: Retry strategy ${h.name} throws error:`,P),P;if(_||_===0){y.info(`Retry ${m}: Retry strategy ${h.name} retries after ${_}`),await(0,uN.delay)(_,void 0,{abortSignal:r.abortSignal});continue e}if(T){y.info(`Retry ${m}: Retry strategy ${h.name} redirects to ${T}`),r.url=T;continue e}}if(d)throw n.info("None of the retry strategies could work with the received error. Throwing it."),d;if(p)return n.info("None of the retry strategies could work with the received response. Returning it."),p}}}}s(fN,"retryPolicy");Dc.retryPolicy=fN});var bd=L(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.defaultRetryPolicy=Zr.defaultRetryPolicyName=void 0;var hN=Ic(),mN=Oc(),gN=Qi(),yN=hr();Zr.defaultRetryPolicyName="defaultRetryPolicy";function xN(t={}){var e;return{name:Zr.defaultRetryPolicyName,sendRequest:(0,gN.retryPolicy)([(0,mN.throttlingRetryStrategy)(),(0,hN.exponentialRetryStrategy)(t)],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:yN.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}s(xN,"defaultRetryPolicy");Zr.defaultRetryPolicy=xN});var da=L(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.createHttpHeaders=void 0;function Lc(t){return t.toLowerCase()}s(Lc,"normalizeName");function*vN(t){for(let e of t.values())yield[e.name,e.value]}s(vN,"headerIterator");var _d=class _d{constructor(e){if(this._headersMap=new Map,e)for(let n of Object.keys(e))this.set(n,e[n])}set(e,n){this._headersMap.set(Lc(e),{name:e,value:String(n).trim()})}get(e){var n;return(n=this._headersMap.get(Lc(e)))===null||n===void 0?void 0:n.value}has(e){return this._headersMap.has(Lc(e))}delete(e){this._headersMap.delete(Lc(e))}toJSON(e={}){let n={};if(e.preserveCase)for(let r of this._headersMap.values())n[r.name]=r.value;else for(let[r,o]of this._headersMap)n[r]=o.value;return n}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return vN(this._headersMap)}};s(_d,"HttpHeadersImpl");var wd=_d;function bN(t){return new wd(t)}s(bN,"createHttpHeaders");Mc.createHttpHeaders=bN});var Rd=L(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.formDataPolicy=ei.formDataPolicyName=void 0;var s0=En(),a0=da();ei.formDataPolicyName="formDataPolicy";function wN(t){var e;let n={};for(let[r,o]of t.entries())(e=n[r])!==null&&e!==void 0||(n[r]=[]),n[r].push(o);return n}s(wN,"formDataToFormDataMap");function _N(){return{name:ei.formDataPolicyName,async sendRequest(t,e){if(s0.isNodeLike&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=wN(t.body),t.body=void 0),t.formData){let n=t.headers.get("Content-Type");n&&n.indexOf("application/x-www-form-urlencoded")!==-1?t.body=RN(t.formData):await TN(t.formData,t),t.formData=void 0}return e(t)}}}s(_N,"formDataPolicy");ei.formDataPolicy=_N;function RN(t){let e=new URLSearchParams;for(let[n,r]of Object.entries(t))if(Array.isArray(r))for(let o of r)e.append(n,o.toString());else e.append(n,r.toString());return e.toString()}s(RN,"wwwFormUrlEncode");async function TN(t,e){let n=e.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",n??"multipart/form-data");let r=[];for(let[o,c]of Object.entries(t))for(let u of Array.isArray(c)?c:[c])if(typeof u=="string")r.push({headers:(0,a0.createHttpHeaders)({"Content-Disposition":`form-data; name="${o}"`}),body:(0,s0.stringToUint8Array)(u,"utf-8")});else{if(u==null||typeof u!="object")throw new Error(`Unexpected value for key ${o}: ${u}. Value should be serialized to string first.`);{let p=u.name||"blob",d=(0,a0.createHttpHeaders)();d.set("Content-Disposition",`form-data; name="${o}"; filename="${p}"`),d.set("Content-Type",u.type||"application/octet-stream"),r.push({headers:d,body:u})}}e.multipartBody={parts:r}}s(TN,"prepareFormData")});var u0=L((H8,c0)=>{var Vi=1e3,Ji=Vi*60,Yi=Ji*60,ti=Yi*24,SN=ti*7,EN=ti*365.25;c0.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return PN(t);if(n==="number"&&isFinite(t))return e.long?CN(t):AN(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function PN(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*EN;case"weeks":case"week":case"w":return n*SN;case"days":case"day":case"d":return n*ti;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Yi;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ji;case"seconds":case"second":case"secs":case"sec":case"s":return n*Vi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}s(PN,"parse");function AN(t){var e=Math.abs(t);return e>=ti?Math.round(t/ti)+"d":e>=Yi?Math.round(t/Yi)+"h":e>=Ji?Math.round(t/Ji)+"m":e>=Vi?Math.round(t/Vi)+"s":t+"ms"}s(AN,"fmtShort");function CN(t){var e=Math.abs(t);return e>=ti?Nc(t,e,ti,"day"):e>=Yi?Nc(t,e,Yi,"hour"):e>=Ji?Nc(t,e,Ji,"minute"):e>=Vi?Nc(t,e,Vi,"second"):t+" ms"}s(CN,"fmtLong");function Nc(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}s(Nc,"plural")});var Td=L(($8,l0)=>{function ON(t){n.debug=n,n.default=n,n.coerce=d,n.disable=c,n.enable=o,n.enabled=u,n.humanize=u0(),n.destroy=m,Object.keys(t).forEach(h=>{n[h]=t[h]}),n.names=[],n.skips=[],n.formatters={};function e(h){let y=0;for(let v=0;v{if(Ee==="%%")return"%";G++;let Ke=n.formatters[Ie];if(typeof Ke=="function"){let Ge=I[G];Ee=Ke.call(N,Ge),I.splice(G,1),G--}return Ee}),n.formatArgs.call(N,I),(N.log||n.log).apply(N,I)}return s(T,"debug"),T.namespace=h,T.useColors=n.useColors(),T.color=n.selectColor(h),T.extend=r,T.destroy=n.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>v!==null?v:(P!==n.namespaces&&(P=n.namespaces,_=n.enabled(h)),_),set:I=>{v=I}}),typeof n.init=="function"&&n.init(T),T}s(n,"createDebug");function r(h,y){let v=n(this.namespace+(typeof y>"u"?":":y)+h);return v.log=this.log,v}s(r,"extend");function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y,v=(typeof h=="string"?h:"").split(/[\s,]+/),P=v.length;for(y=0;y"-"+y)].join(",");return n.enable(""),h}s(c,"disable");function u(h){if(h[h.length-1]==="*")return!0;let y,v;for(y=0,v=n.skips.length;y{qt.formatArgs=DN;qt.save=LN;qt.load=MN;qt.useColors=IN;qt.storage=NN();qt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function IN(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(IN,"useColors");function DN(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+kc.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}s(DN,"formatArgs");qt.log=console.debug||console.log||(()=>{});function LN(t){try{t?qt.storage.setItem("debug",t):qt.storage.removeItem("debug")}catch{}}s(LN,"save");function MN(){let t;try{t=qt.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}s(MN,"load");function NN(){try{return localStorage}catch{}}s(NN,"localstorage");kc.exports=Td()(qt);var{formatters:kN}=kc.exports;kN.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var f0=L((G8,d0)=>{"use strict";d0.exports=(t,e=process.argv)=>{let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),o=e.indexOf("--");return r!==-1&&(o===-1||r{"use strict";var qN=require("os"),h0=require("tty"),Vt=f0(),{env:Je}=process,yr;Vt("no-color")||Vt("no-colors")||Vt("color=false")||Vt("color=never")?yr=0:(Vt("color")||Vt("colors")||Vt("color=true")||Vt("color=always"))&&(yr=1);"FORCE_COLOR"in Je&&(Je.FORCE_COLOR==="true"?yr=1:Je.FORCE_COLOR==="false"?yr=0:yr=Je.FORCE_COLOR.length===0?1:Math.min(parseInt(Je.FORCE_COLOR,10),3));function Sd(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}s(Sd,"translateLevel");function Ed(t,e){if(yr===0)return 0;if(Vt("color=16m")||Vt("color=full")||Vt("color=truecolor"))return 3;if(Vt("color=256"))return 2;if(t&&!e&&yr===void 0)return 0;let n=yr||0;if(Je.TERM==="dumb")return n;if(process.platform==="win32"){let r=qN.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Je)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Je)||Je.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Je)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Je.TEAMCITY_VERSION)?1:0;if(Je.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Je){let r=parseInt((Je.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Je.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Je.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Je.TERM)||"COLORTERM"in Je?1:n}s(Ed,"supportsColor");function FN(t){let e=Ed(t,t&&t.isTTY);return Sd(e)}s(FN,"getSupportLevel");m0.exports={supportsColor:FN,stdout:Sd(Ed(!0,h0.isatty(1))),stderr:Sd(Ed(!0,h0.isatty(2)))}});var x0=L((it,Fc)=>{var BN=require("tty"),qc=require("util");it.init=KN;it.log=zN;it.formatArgs=UN;it.save=$N;it.load=WN;it.useColors=jN;it.destroy=qc.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");it.colors=[6,2,3,4,5,1];try{let t=g0();t&&(t.stderr||t).level>=2&&(it.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}it.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let n=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,c)=>c.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),t[n]=r,t},{});function jN(){return"colors"in it.inspectOpts?!!it.inspectOpts.colors:BN.isatty(process.stderr.fd)}s(jN,"useColors");function UN(t){let{namespace:e,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),c=` ${o};1m${e} \x1B[0m`;t[0]=c+t[0].split(` +`).join(` +`+c),t.push(o+"m+"+Fc.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=HN()+e+" "+t[0]}s(UN,"formatArgs");function HN(){return it.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(HN,"getDate");function zN(...t){return process.stderr.write(qc.format(...t)+` +`)}s(zN,"log");function $N(t){t?process.env.DEBUG=t:delete process.env.DEBUG}s($N,"save");function WN(){return process.env.DEBUG}s(WN,"load");function KN(t){t.inspectOpts={};let e=Object.keys(it.inspectOpts);for(let n=0;ne.trim()).join(" ")};y0.O=function(t){return this.inspectOpts.colors=this.useColors,qc.inspect(t,this.inspectOpts)}});var fa=L((Y8,Pd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Pd.exports=p0():Pd.exports=x0()});var w0=L(Tt=>{"use strict";var GN=Tt&&Tt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),QN=Tt&&Tt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),v0=Tt&&Tt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&GN(e,t,n);return QN(e,t),e};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.req=Tt.json=Tt.toBuffer=void 0;var VN=v0(require("http")),JN=v0(require("https"));async function b0(t){let e=0,n=[];for await(let r of t)e+=r.length,n.push(r);return Buffer.concat(n,e)}s(b0,"toBuffer");Tt.toBuffer=b0;async function YN(t){let n=(await b0(t)).toString("utf8");try{return JSON.parse(n)}catch(r){let o=r;throw o.message+=` (input: ${n})`,o}}s(YN,"json");Tt.json=YN;function XN(t,e={}){let r=((typeof t=="string"?t:t.href).startsWith("https:")?JN:VN).request(t,e),o=new Promise((c,u)=>{r.once("response",c).once("error",u).end()});return r.then=o.then.bind(o),r}s(XN,"req");Tt.req=XN});var Od=L(Ft=>{"use strict";var R0=Ft&&Ft.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ZN=Ft&&Ft.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),T0=Ft&&Ft.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&R0(e,t,n);return ZN(e,t),e},e2=Ft&&Ft.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&R0(e,t,n)};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.Agent=void 0;var t2=T0(require("net")),_0=T0(require("http")),n2=require("https");e2(w0(),Ft);var An=Symbol("AgentBaseInternalState"),Cd=class Cd extends _0.Agent{constructor(e){super(e),this[An]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` +`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let n=new t2.Socket({writable:!1});return this.sockets[e].push(n),this.totalSocketCount++,n}decrementSockets(e,n){if(!this.sockets[e]||n===null)return;let r=this.sockets[e],o=r.indexOf(n);o!==-1&&(r.splice(o,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?n2.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)},c=this.getName(o),u=this.incrementSockets(c);Promise.resolve().then(()=>this.connect(e,o)).then(p=>{if(this.decrementSockets(c,u),p instanceof _0.Agent)return p.addRequest(e,o);this[An].currentSocket=p,super.createSocket(e,n,r)},p=>{this.decrementSockets(c,u),r(p)})}createConnection(){let e=this[An].currentSocket;if(this[An].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[An].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[An]&&(this[An].defaultPort=e)}get protocol(){return this[An].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[An]&&(this[An].protocol=e)}};s(Cd,"Agent");var Ad=Cd;Ft.Agent=Ad});var S0=L(Xi=>{"use strict";var r2=Xi&&Xi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.parseProxyResponse=void 0;var i2=r2(fa()),Bc=(0,i2.default)("https-proxy-agent:parse-proxy-response");function o2(t){return new Promise((e,n)=>{let r=0,o=[];function c(){let h=t.read();h?m(h):t.once("readable",c)}s(c,"read");function u(){t.removeListener("end",p),t.removeListener("error",d),t.removeListener("readable",c)}s(u,"cleanup");function p(){u(),Bc("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}s(p,"onend");function d(h){u(),Bc("onerror %o",h),n(h)}s(d,"onerror");function m(h){o.push(h),r+=h.length;let y=Buffer.concat(o,r),v=y.indexOf(`\r +\r +`);if(v===-1){Bc("have not received end of HTTP headers yet..."),c();return}let P=y.slice(0,v).toString("ascii").split(`\r +`),_=P.shift();if(!_)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let T=_.split(" "),I=+T[1],N=T.slice(2).join(" "),H={};for(let j of P){if(!j)continue;let G=j.indexOf(":");if(G===-1)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${j}"`));let te=j.slice(0,G).toLowerCase(),Ee=j.slice(G+1).trimStart(),Ie=H[te];typeof Ie=="string"?H[te]=[Ie,Ee]:Array.isArray(Ie)?Ie.push(Ee):H[te]=Ee}Bc("got proxy server response: %o %o",_,H),u(),e({connect:{statusCode:I,statusText:N,headers:H},buffered:y})}s(m,"ondata"),t.on("error",d),t.on("end",p),c()})}s(o2,"parseProxyResponse");Xi.parseProxyResponse=o2});var O0=L(Jt=>{"use strict";var a2=Jt&&Jt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),s2=Jt&&Jt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),A0=Jt&&Jt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&a2(e,t,n);return s2(e,t),e},C0=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.HttpsProxyAgent=void 0;var ha=A0(require("net")),E0=A0(require("tls")),c2=C0(require("assert")),u2=C0(fa()),l2=Od(),p2=require("url"),d2=S0(),ma=(0,u2.default)("https-proxy-agent"),Id=class Id extends l2.Agent{constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new p2.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},ma("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?P0(n,"headers"):null,host:r,port:o}}async connect(e,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;if(r.protocol==="https:"){ma("Creating `tls.Socket`: %o",this.connectOpts);let v=this.connectOpts.servername||this.connectOpts.host;o=E0.connect({...this.connectOpts,servername:v&&ha.isIP(v)?void 0:v})}else ma("Creating `net.Socket`: %o",this.connectOpts),o=ha.connect(this.connectOpts);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},u=ha.isIPv6(n.host)?`[${n.host}]`:n.host,p=`CONNECT ${u}:${n.port} HTTP/1.1\r +`;if(r.username||r.password){let v=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(v).toString("base64")}`}c.Host=`${u}:${n.port}`,c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let v of Object.keys(c))p+=`${v}: ${c[v]}\r +`;let d=(0,d2.parseProxyResponse)(o);o.write(`${p}\r +`);let{connect:m,buffered:h}=await d;if(e.emit("proxyConnect",m),this.emit("proxyConnect",m,e),m.statusCode===200){if(e.once("socket",f2),n.secureEndpoint){ma("Upgrading socket connection to TLS");let v=n.servername||n.host;return E0.connect({...P0(n,"host","path","port"),socket:o,servername:ha.isIP(v)?void 0:v})}return o}o.destroy();let y=new ha.Socket({writable:!1});return y.readable=!0,e.once("socket",v=>{ma("Replaying proxy buffer for failed request"),(0,c2.default)(v.listenerCount("data")>0),v.push(h),v.push(null)}),y}};s(Id,"HttpsProxyAgent");var jc=Id;jc.protocols=["http","https"];Jt.HttpsProxyAgent=jc;function f2(t){t.resume()}s(f2,"resume");function P0(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}s(P0,"omit")});var L0=L(Yt=>{"use strict";var h2=Yt&&Yt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),m2=Yt&&Yt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),D0=Yt&&Yt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&h2(e,t,n);return m2(e,t),e},g2=Yt&&Yt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.HttpProxyAgent=void 0;var y2=D0(require("net")),x2=D0(require("tls")),v2=g2(fa()),b2=require("events"),w2=Od(),I0=require("url"),Zi=(0,v2.default)("http-proxy-agent"),Dd=class Dd extends w2.Agent{constructor(e,n){super(n),this.proxy=typeof e=="string"?new I0.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},Zi("Creating new HttpProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...n?_2(n,"headers"):null,host:r,port:o}}addRequest(e,n){e._header=null,this.setRequestProps(e,n),super.addRequest(e,n)}setRequestProps(e,n){let{proxy:r}=this,o=n.secureEndpoint?"https:":"http:",c=e.getHeader("host")||"localhost",u=`${o}//${c}`,p=new I0.URL(e.path,u);n.port!==80&&(p.port=String(n.port)),e.path=String(p);let d=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(r.username||r.password){let m=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;d["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}d["Proxy-Connection"]||(d["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(d)){let h=d[m];h&&e.setHeader(m,h)}}async connect(e,n){e._header=null,e.path.includes("://")||this.setRequestProps(e,n);let r,o;Zi("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Zi("Patching connection write() output buffer with updated header"),r=e.outputData[0].data,o=r.indexOf(`\r +\r +`)+4,e.outputData[0].data=e._header+r.substring(o),Zi("Output buffer: %o",e.outputData[0].data));let c;return this.proxy.protocol==="https:"?(Zi("Creating `tls.Socket`: %o",this.connectOpts),c=x2.connect(this.connectOpts)):(Zi("Creating `net.Socket`: %o",this.connectOpts),c=y2.connect(this.connectOpts)),await(0,b2.once)(c,"connect"),c}};s(Dd,"HttpProxyAgent");var Uc=Dd;Uc.protocols=["http","https"];Yt.HttpProxyAgent=Uc;function _2(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}s(_2,"omit")});var Ld=L(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.proxyPolicy=gt.getDefaultProxySettings=gt.loadNoProxy=gt.globalNoProxyList=gt.proxyPolicyName=void 0;var R2=O0(),T2=L0(),S2=Kr(),E2="HTTPS_PROXY",P2="HTTP_PROXY",A2="ALL_PROXY",C2="NO_PROXY";gt.proxyPolicyName="proxyPolicy";gt.globalNoProxyList=[];var k0=!1,O2=new Map;function Hc(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}s(Hc,"getEnvironmentValue");function q0(){if(!process)return;let t=Hc(E2),e=Hc(A2),n=Hc(P2);return t||e||n}s(q0,"loadEnvironmentProxyValue");function I2(t,e,n){if(e.length===0)return!1;let r=new URL(t).hostname;if(n!=null&&n.has(r))return n.get(r);let o=!1;for(let c of e)c[0]==="."?(r.endsWith(c)||r.length===c.length-1&&r===c.slice(1))&&(o=!0):r===c&&(o=!0);return n==null||n.set(r,o),o}s(I2,"isBypassed");function F0(){let t=Hc(C2);return k0=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}s(F0,"loadNoProxy");gt.loadNoProxy=F0;function D2(t){if(!t&&(t=q0(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}s(D2,"getDefaultProxySettings");gt.getDefaultProxySettings=D2;function L2(){let t=q0();return t?new URL(t):void 0}s(L2,"getDefaultProxySettingsInternal");function M0(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}s(M0,"getUrlFromProxySettings");function N0(t,e,n){if(t.agent)return;let o=new URL(t.url).protocol!=="https:";t.tlsSettings&&S2.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let c=t.headers.toJSON();o?(e.httpProxyAgent||(e.httpProxyAgent=new T2.HttpProxyAgent(n,{headers:c})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new R2.HttpsProxyAgent(n,{headers:c})),t.agent=e.httpsProxyAgent)}s(N0,"setProxyAgentOnRequest");function M2(t,e){k0||gt.globalNoProxyList.push(...F0());let n=t?M0(t):L2(),r={};return{name:gt.proxyPolicyName,async sendRequest(o,c){var u;return!o.proxySettings&&n&&!I2(o.url,(u=e==null?void 0:e.customNoProxyList)!==null&&u!==void 0?u:gt.globalNoProxyList,e!=null&&e.customNoProxyList?void 0:O2)?N0(o,r,n):o.proxySettings&&N0(o,r,M0(o.proxySettings)),c(o)}}}s(M2,"proxyPolicy");gt.proxyPolicy=M2});var Md=L(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.setClientRequestIdPolicy=ni.setClientRequestIdPolicyName=void 0;ni.setClientRequestIdPolicyName="setClientRequestIdPolicy";function N2(t="x-ms-client-request-id"){return{name:ni.setClientRequestIdPolicyName,async sendRequest(e,n){return e.headers.has(t)||e.headers.set(t,e.requestId),n(e)}}}s(N2,"setClientRequestIdPolicy");ni.setClientRequestIdPolicy=N2});var Nd=L(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.tlsPolicy=ri.tlsPolicyName=void 0;ri.tlsPolicyName="tlsPolicy";function k2(t){return{name:ri.tlsPolicyName,sendRequest:async(e,n)=>(e.tlsSettings||(e.tlsSettings=t),n(e))}}s(k2,"tlsPolicy");ri.tlsPolicy=k2});var kd=L(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.TracingContextImpl=Cn.createTracingContext=Cn.knownContextKeys=void 0;Cn.knownContextKeys={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function q2(t={}){let e=new zc(t.parentContext);return t.span&&(e=e.setValue(Cn.knownContextKeys.span,t.span)),t.namespace&&(e=e.setValue(Cn.knownContextKeys.namespace,t.namespace)),e}s(q2,"createTracingContext");Cn.createTracingContext=q2;var eo=class eo{constructor(e){this._contextMap=e instanceof eo?new Map(e._contextMap):new Map}setValue(e,n){let r=new eo(this);return r._contextMap.set(e,n),r}getValue(e){return this._contextMap.get(e)}deleteValue(e){let n=new eo(this);return n._contextMap.delete(e),n}};s(eo,"TracingContextImpl");var zc=eo;Cn.TracingContextImpl=zc});var B0=L($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.state=void 0;$c.state={instrumenterImplementation:void 0}});var qd=L(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.getInstrumenter=On.useInstrumenter=On.createDefaultInstrumenter=On.createDefaultTracingSpan=void 0;var F2=kd(),Wc=B0();function j0(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}}}s(j0,"createDefaultTracingSpan");On.createDefaultTracingSpan=j0;function U0(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:j0(),tracingContext:(0,F2.createTracingContext)({parentContext:e.tracingContext})}),withContext(t,e,...n){return e(...n)}}}s(U0,"createDefaultInstrumenter");On.createDefaultInstrumenter=U0;function B2(t){Wc.state.instrumenterImplementation=t}s(B2,"useInstrumenter");On.useInstrumenter=B2;function j2(){return Wc.state.instrumenterImplementation||(Wc.state.instrumenterImplementation=U0()),Wc.state.instrumenterImplementation}s(j2,"getInstrumenter");On.getInstrumenter=j2});var H0=L(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.createTracingClient=void 0;var Kc=qd(),Fd=kd();function U2(t){let{namespace:e,packageName:n,packageVersion:r}=t;function o(m,h,y){var v;let P=(0,Kc.getInstrumenter)().startSpan(m,Object.assign(Object.assign({},y),{packageName:n,packageVersion:r,tracingContext:(v=h==null?void 0:h.tracingOptions)===null||v===void 0?void 0:v.tracingContext})),_=P.tracingContext,T=P.span;_.getValue(Fd.knownContextKeys.namespace)||(_=_.setValue(Fd.knownContextKeys.namespace,e)),T.setAttribute("az.namespace",_.getValue(Fd.knownContextKeys.namespace));let I=Object.assign({},h,{tracingOptions:Object.assign(Object.assign({},h==null?void 0:h.tracingOptions),{tracingContext:_})});return{span:T,updatedOptions:I}}s(o,"startSpan");async function c(m,h,y,v){let{span:P,updatedOptions:_}=o(m,h,v);try{let T=await u(_.tracingOptions.tracingContext,()=>Promise.resolve(y(_,P)));return P.setStatus({status:"success"}),T}catch(T){throw P.setStatus({status:"error",error:T}),T}finally{P.end()}}s(c,"withSpan");function u(m,h,...y){return(0,Kc.getInstrumenter)().withContext(m,h,...y)}s(u,"withContext");function p(m){return(0,Kc.getInstrumenter)().parseTraceparentHeader(m)}s(p,"parseTraceparentHeader");function d(m){return(0,Kc.getInstrumenter)().createRequestHeaders(m)}return s(d,"createRequestHeaders"),{startSpan:o,withSpan:c,withContext:u,parseTraceparentHeader:p,createRequestHeaders:d}}s(U2,"createTracingClient");Gc.createTracingClient=U2});var z0=L(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.createTracingClient=to.useInstrumenter=void 0;var H2=qd();Object.defineProperty(to,"useInstrumenter",{enumerable:!0,get:function(){return H2.useInstrumenter}});var z2=H0();Object.defineProperty(to,"createTracingClient",{enumerable:!0,get:function(){return z2.createTracingClient}})});var $0=L(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.custom=void 0;var $2=require("node:util");Qc.custom=$2.inspect.custom});var Jc=L(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.isRestError=ro.RestError=void 0;var W2=En(),K2=$0(),G2=sd(),Q2=new G2.Sanitizer,Vc=class Vc extends Error{constructor(e,n={}){super(e),this.name="RestError",this.code=n.code,this.statusCode=n.statusCode,this.request=n.request,this.response=n.response,Object.setPrototypeOf(this,Vc.prototype)}[K2.custom](){return`RestError: ${this.message} + ${Q2.sanitize(this)}`}};s(Vc,"RestError");var no=Vc;ro.RestError=no;no.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";no.PARSE_ERROR="PARSE_ERROR";function V2(t){return t instanceof no?!0:(0,W2.isError)(t)&&t.name==="RestError"}s(V2,"isRestError");ro.isRestError=V2});var Bd=L(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.tracingPolicy=ii.tracingPolicyName=void 0;var J2=z0(),Y2=hr(),X2=pd(),Yc=Kr(),ga=En(),Z2=Jc();ii.tracingPolicyName="tracingPolicy";function ek(t={}){let e=(0,X2.getUserAgentValue)(t.userAgentPrefix),n=tk();return{name:ii.tracingPolicyName,async sendRequest(r,o){var c,u;if(!n||!(!((c=r.tracingOptions)===null||c===void 0)&&c.tracingContext))return o(r);let{span:p,tracingContext:d}=(u=nk(n,r,e))!==null&&u!==void 0?u:{};if(!p||!d)return o(r);try{let m=await n.withContext(d,o,r);return ik(p,m),m}catch(m){throw rk(p,m),m}}}}s(ek,"tracingPolicy");ii.tracingPolicy=ek;function tk(){try{return(0,J2.createTracingClient)({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:Y2.SDK_VERSION})}catch(t){Yc.logger.warning(`Error when creating the TracingClient: ${(0,ga.getErrorMessage)(t)}`);return}}s(tk,"tryCreateTracingClient");function nk(t,e,n){try{let{span:r,updatedOptions:o}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":e.method,"http.url":e.url,requestId:e.requestId}});if(!r.isRecording()){r.end();return}n&&r.setAttribute("http.user_agent",n);let c=t.createRequestHeaders(o.tracingOptions.tracingContext);for(let[u,p]of Object.entries(c))e.headers.set(u,p);return{span:r,tracingContext:o.tracingOptions.tracingContext}}catch(r){Yc.logger.warning(`Skipping creating a tracing span due to an error: ${(0,ga.getErrorMessage)(r)}`);return}}s(nk,"tryCreateSpan");function rk(t,e){try{t.setStatus({status:"error",error:(0,ga.isError)(e)?e:void 0}),(0,Z2.isRestError)(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(n){Yc.logger.warning(`Skipping tracing span processing due to an error: ${(0,ga.getErrorMessage)(n)}`)}}s(rk,"tryProcessError");function ik(t,e){try{t.setAttribute("http.status_code",e.status);let n=e.headers.get("x-ms-request-id");n&&t.setAttribute("serviceRequestId",n),t.setStatus({status:"success"}),t.end()}catch(n){Yc.logger.warning(`Skipping tracing span processing due to an error: ${(0,ga.getErrorMessage)(n)}`)}}s(ik,"tryProcessResponse")});var G0=L(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.createPipelineFromOptions=void 0;var ok=cd(),ak=Kp(),sk=ud(),ck=dd(),W0=md(),uk=gd(),lk=bd(),pk=Rd(),K0=En(),dk=Ld(),fk=Md(),hk=Nd(),mk=Bd();function gk(t){var e;let n=(0,ak.createEmptyPipeline)();return K0.isNodeLike&&(t.tlsOptions&&n.addPolicy((0,hk.tlsPolicy)(t.tlsOptions)),n.addPolicy((0,dk.proxyPolicy)(t.proxyOptions)),n.addPolicy((0,uk.decompressResponsePolicy)())),n.addPolicy((0,pk.formDataPolicy)(),{beforePolicies:[W0.multipartPolicyName]}),n.addPolicy((0,ck.userAgentPolicy)(t.userAgentOptions)),n.addPolicy((0,fk.setClientRequestIdPolicy)((e=t.telemetryOptions)===null||e===void 0?void 0:e.clientRequestIdHeaderName)),n.addPolicy((0,W0.multipartPolicy)(),{afterPhase:"Deserialize"}),n.addPolicy((0,lk.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),n.addPolicy((0,mk.tracingPolicy)(t.userAgentOptions),{afterPhase:"Retry"}),K0.isNodeLike&&n.addPolicy((0,sk.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),n.addPolicy((0,ok.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),n}s(gk,"createPipelineFromOptions");Xc.createPipelineFromOptions=gk});var Z0=L(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.createNodeHttpClient=io.getBodyLength=void 0;var zd=(Wr(),zr($r)),jd=zd.__importStar(require("node:http")),Ud=zd.__importStar(require("node:https")),Q0=zd.__importStar(require("node:zlib")),yk=require("node:stream"),V0=Ac(),xk=da(),va=Jc(),ya=Kr(),vk={};function xa(t){return t&&typeof t.pipe=="function"}s(xa,"isReadableStream");function J0(t){return new Promise(e=>{t.on("close",e),t.on("end",e),t.on("error",e)})}s(J0,"isStreamComplete");function Y0(t){return t&&typeof t.byteLength=="number"}s(Y0,"isArrayBuffer");var $d=class $d extends yk.Transform{_transform(e,n,r){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),r()}catch(o){r(o)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}};s($d,"ReportTransform");var Zc=$d,Wd=class Wd{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var n,r,o;let c=new AbortController,u;if(e.abortSignal){if(e.abortSignal.aborted)throw new V0.AbortError("The operation was aborted.");u=s(y=>{y.type==="abort"&&c.abort()},"abortListener"),e.abortSignal.addEventListener("abort",u)}e.timeout>0&&setTimeout(()=>{c.abort()},e.timeout);let p=e.headers.get("Accept-Encoding"),d=(p==null?void 0:p.includes("gzip"))||(p==null?void 0:p.includes("deflate")),m=typeof e.body=="function"?e.body():e.body;if(m&&!e.headers.has("Content-Length")){let y=X0(m);y!==null&&e.headers.set("Content-Length",y)}let h;try{if(m&&e.onUploadProgress){let I=e.onUploadProgress,N=new Zc(I);N.on("error",H=>{ya.logger.error("Error in upload progress",H)}),xa(m)?m.pipe(N):N.end(m),m=N}let y=await this.makeRequest(e,c,m),v=bk(y),_={status:(n=y.statusCode)!==null&&n!==void 0?n:0,headers:v,request:e};if(e.method==="HEAD")return y.resume(),_;h=d?wk(y,v):y;let T=e.onDownloadProgress;if(T){let I=new Zc(T);I.on("error",N=>{ya.logger.error("Error in download progress",N)}),h.pipe(I),h=I}return!((r=e.streamResponseStatusCodes)===null||r===void 0)&&r.has(Number.POSITIVE_INFINITY)||!((o=e.streamResponseStatusCodes)===null||o===void 0)&&o.has(_.status)?_.readableStreamBody=h:_.bodyAsText=await _k(h),_}finally{if(e.abortSignal&&u){let y=Promise.resolve();xa(m)&&(y=J0(m));let v=Promise.resolve();xa(h)&&(v=J0(h)),Promise.all([y,v]).then(()=>{var P;u&&((P=e.abortSignal)===null||P===void 0||P.removeEventListener("abort",u))}).catch(P=>{ya.logger.warning("Error when cleaning up abortListener on httpRequest",P)})}}}makeRequest(e,n,r){var o;let c=new URL(e.url),u=c.protocol!=="https:";if(u&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let d={agent:(o=e.agent)!==null&&o!==void 0?o:this.getOrCreateAgent(e,u),hostname:c.hostname,path:`${c.pathname}${c.search}`,port:c.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise((m,h)=>{let y=u?jd.request(d,m):Ud.request(d,m);y.once("error",v=>{var P;h(new va.RestError(v.message,{code:(P=v.code)!==null&&P!==void 0?P:va.RestError.REQUEST_SEND_ERROR,request:e}))}),n.signal.addEventListener("abort",()=>{let v=new V0.AbortError("The operation was aborted.");y.destroy(v),h(v)}),r&&xa(r)?r.pipe(y):r?typeof r=="string"||Buffer.isBuffer(r)?y.end(r):Y0(r)?y.end(ArrayBuffer.isView(r)?Buffer.from(r.buffer):Buffer.from(r)):(ya.logger.error("Unrecognized body type",r),h(new va.RestError("Unrecognized body type"))):y.end()})}getOrCreateAgent(e,n){var r;let o=e.disableKeepAlive;if(n)return o?jd.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new jd.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(o&&!e.tlsSettings)return Ud.globalAgent;let c=(r=e.tlsSettings)!==null&&r!==void 0?r:vk,u=this.cachedHttpsAgents.get(c);return u&&u.options.keepAlive===!o||(ya.logger.info("No cached TLS Agent exist, creating a new Agent"),u=new Ud.Agent(Object.assign({keepAlive:!o},c)),this.cachedHttpsAgents.set(c,u)),u}}};s(Wd,"NodeHttpClient");var Hd=Wd;function bk(t){let e=(0,xk.createHttpHeaders)();for(let n of Object.keys(t.headers)){let r=t.headers[n];Array.isArray(r)?r.length>0&&e.set(n,r[0]):r&&e.set(n,r)}return e}s(bk,"getResponseHeaders");function wk(t,e){let n=e.get("Content-Encoding");if(n==="gzip"){let r=Q0.createGunzip();return t.pipe(r),r}else if(n==="deflate"){let r=Q0.createInflate();return t.pipe(r),r}return t}s(wk,"getDecodedResponseStream");function _k(t){return new Promise((e,n)=>{let r=[];t.on("data",o=>{Buffer.isBuffer(o)?r.push(o):r.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(r).toString("utf8"))}),t.on("error",o=>{o&&(o==null?void 0:o.name)==="AbortError"?n(o):n(new va.RestError(`Error reading response as text: ${o.message}`,{code:va.RestError.PARSE_ERROR}))})})}s(_k,"streamToText");function X0(t){return t?Buffer.isBuffer(t)?t.length:xa(t)?null:Y0(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}s(X0,"getBodyLength");io.getBodyLength=X0;function Rk(){return new Hd}s(Rk,"createNodeHttpClient");io.createNodeHttpClient=Rk});var ew=L(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.createDefaultHttpClient=void 0;var Tk=Z0();function Sk(){return(0,Tk.createNodeHttpClient)()}s(Sk,"createDefaultHttpClient");eu.createDefaultHttpClient=Sk});var tw=L(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.createPipelineRequest=void 0;var Ek=da(),Pk=En(),Gd=class Gd{constructor(e){var n,r,o,c,u,p,d;this.url=e.url,this.body=e.body,this.headers=(n=e.headers)!==null&&n!==void 0?n:(0,Ek.createHttpHeaders)(),this.method=(r=e.method)!==null&&r!==void 0?r:"GET",this.timeout=(o=e.timeout)!==null&&o!==void 0?o:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=(c=e.disableKeepAlive)!==null&&c!==void 0?c:!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=(u=e.withCredentials)!==null&&u!==void 0?u:!1,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||(0,Pk.randomUUID)(),this.allowInsecureConnection=(p=e.allowInsecureConnection)!==null&&p!==void 0?p:!1,this.enableBrowserStreams=(d=e.enableBrowserStreams)!==null&&d!==void 0?d:!1}};s(Gd,"PipelineRequestImpl");var Kd=Gd;function Ak(t){return new Kd(t)}s(Ak,"createPipelineRequest");tu.createPipelineRequest=Ak});var nw=L(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.exponentialRetryPolicy=oo.exponentialRetryPolicyName=void 0;var Ck=Ic(),Ok=Qi(),Ik=hr();oo.exponentialRetryPolicyName="exponentialRetryPolicy";function Dk(t={}){var e;return(0,Ok.retryPolicy)([(0,Ck.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreSystemErrors:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:Ik.DEFAULT_RETRY_POLICY_COUNT})}s(Dk,"exponentialRetryPolicy");oo.exponentialRetryPolicy=Dk});var rw=L(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.systemErrorRetryPolicy=oi.systemErrorRetryPolicyName=void 0;var Lk=Ic(),Mk=Qi(),Nk=hr();oi.systemErrorRetryPolicyName="systemErrorRetryPolicy";function kk(t={}){var e;return{name:oi.systemErrorRetryPolicyName,sendRequest:(0,Mk.retryPolicy)([(0,Lk.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreHttpStatusCodes:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:Nk.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}s(kk,"systemErrorRetryPolicy");oi.systemErrorRetryPolicy=kk});var iw=L(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.throttlingRetryPolicy=ai.throttlingRetryPolicyName=void 0;var qk=Oc(),Fk=Qi(),Bk=hr();ai.throttlingRetryPolicyName="throttlingRetryPolicy";function jk(t={}){var e;return{name:ai.throttlingRetryPolicyName,sendRequest:(0,Fk.retryPolicy)([(0,qk.throttlingRetryStrategy)()],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:Bk.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}s(jk,"throttlingRetryPolicy");ai.throttlingRetryPolicy=jk});var Qd=L(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.createTokenCycler=si.DEFAULT_CYCLER_OPTIONS=void 0;var Uk=Cc();si.DEFAULT_CYCLER_OPTIONS={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function Hk(t,e,n){async function r(){if(Date.now()t.getToken(d,m),"tryGetAccessToken"),c.retryIntervalInMs,(h=r==null?void 0:r.expiresOnTimestamp)!==null&&h!==void 0?h:Date.now()).then(v=>(n=null,r=v,o=m.tenantId,r)).catch(v=>{throw n=null,r=null,o=void 0,v})),n}return s(p,"refresh"),async(d,m)=>o!==m.tenantId||!!m.claims||u.mustRefresh?p(d,m):(u.shouldRefresh&&p(d,m),r)}s(zk,"createTokenCycler");si.createTokenCycler=zk});var ow=L(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.bearerTokenAuthenticationPolicy=ci.bearerTokenAuthenticationPolicyName=void 0;var $k=Qd(),Wk=Kr();ci.bearerTokenAuthenticationPolicyName="bearerTokenAuthenticationPolicy";async function Kk(t){let{scopes:e,getAccessToken:n,request:r}=t,o={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},c=await n(e,o);c&&t.request.headers.set("Authorization",`Bearer ${c.token}`)}s(Kk,"defaultAuthorizeRequest");function Gk(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}s(Gk,"getChallenge");function Qk(t){var e;let{credential:n,scopes:r,challengeCallbacks:o}=t,c=t.logger||Wk.logger,u=Object.assign({authorizeRequest:(e=o==null?void 0:o.authorizeRequest)!==null&&e!==void 0?e:Kk,authorizeRequestOnChallenge:o==null?void 0:o.authorizeRequestOnChallenge},o),p=n?(0,$k.createTokenCycler)(n):()=>Promise.resolve(null);return{name:ci.bearerTokenAuthenticationPolicyName,async sendRequest(d,m){if(!d.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await u.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:d,getAccessToken:p,logger:c});let h,y;try{h=await m(d)}catch(v){y=v,h=v.response}if(u.authorizeRequestOnChallenge&&(h==null?void 0:h.status)===401&&Gk(h)&&await u.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:d,response:h,getAccessToken:p,logger:c}))return m(d);if(y)throw y;return h}}}s(Qk,"bearerTokenAuthenticationPolicy");ci.bearerTokenAuthenticationPolicy=Qk});var aw=L(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.ndJsonPolicy=ui.ndJsonPolicyName=void 0;ui.ndJsonPolicyName="ndJsonPolicy";function Vk(){return{name:ui.ndJsonPolicyName,async sendRequest(t,e){if(typeof t.body=="string"&&t.body.startsWith("[")){let n=JSON.parse(t.body);Array.isArray(n)&&(t.body=n.map(r=>JSON.stringify(r)+` +`).join(""))}return e(t)}}}s(Vk,"ndJsonPolicy");ui.ndJsonPolicy=Vk});var cw=L(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.auxiliaryAuthenticationHeaderPolicy=xr.auxiliaryAuthenticationHeaderPolicyName=void 0;var Jk=Qd(),Yk=Kr();xr.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var sw="x-ms-authorization-auxiliary";async function Xk(t){var e,n;let{scopes:r,getAccessToken:o,request:c}=t,u={abortSignal:c.abortSignal,tracingOptions:c.tracingOptions};return(n=(e=await o(r,u))===null||e===void 0?void 0:e.token)!==null&&n!==void 0?n:""}s(Xk,"sendAuthorizeRequest");function Zk(t){let{credentials:e,scopes:n}=t,r=t.logger||Yk.logger,o=new WeakMap;return{name:xr.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(c,u){if(!c.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return r.info(`${xr.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),u(c);let p=[];for(let m of e){let h=o.get(m);h||(h=(0,Jk.createTokenCycler)(m),o.set(m,h)),p.push(Xk({scopes:Array.isArray(n)?n:[n],request:c,getAccessToken:h,logger:r}))}let d=(await Promise.all(p)).filter(m=>!!m);return d.length===0?(r.warning(`None of the auxiliary tokens are valid. ${sw} header will not be set.`),u(c)):(c.headers.set(sw,d.map(m=>`Bearer ${m}`).join(", ")),u(c))}}}s(Zk,"auxiliaryAuthenticationHeaderPolicy");xr.auxiliaryAuthenticationHeaderPolicy=Zk});var Ew=L(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.createFileFromStream=U.createFile=U.auxiliaryAuthenticationHeaderPolicyName=U.auxiliaryAuthenticationHeaderPolicy=U.ndJsonPolicyName=U.ndJsonPolicy=U.bearerTokenAuthenticationPolicyName=U.bearerTokenAuthenticationPolicy=U.formDataPolicyName=U.formDataPolicy=U.tlsPolicyName=U.tlsPolicy=U.userAgentPolicyName=U.userAgentPolicy=U.defaultRetryPolicy=U.tracingPolicyName=U.tracingPolicy=U.retryPolicy=U.throttlingRetryPolicyName=U.throttlingRetryPolicy=U.systemErrorRetryPolicyName=U.systemErrorRetryPolicy=U.redirectPolicyName=U.redirectPolicy=U.getDefaultProxySettings=U.proxyPolicyName=U.proxyPolicy=U.multipartPolicyName=U.multipartPolicy=U.logPolicyName=U.logPolicy=U.setClientRequestIdPolicyName=U.setClientRequestIdPolicy=U.exponentialRetryPolicyName=U.exponentialRetryPolicy=U.decompressResponsePolicyName=U.decompressResponsePolicy=U.isRestError=U.RestError=U.createPipelineRequest=U.createHttpHeaders=U.createDefaultHttpClient=U.createPipelineFromOptions=U.createEmptyPipeline=void 0;var e3=Kp();Object.defineProperty(U,"createEmptyPipeline",{enumerable:!0,get:function(){return e3.createEmptyPipeline}});var t3=G0();Object.defineProperty(U,"createPipelineFromOptions",{enumerable:!0,get:function(){return t3.createPipelineFromOptions}});var n3=ew();Object.defineProperty(U,"createDefaultHttpClient",{enumerable:!0,get:function(){return n3.createDefaultHttpClient}});var r3=da();Object.defineProperty(U,"createHttpHeaders",{enumerable:!0,get:function(){return r3.createHttpHeaders}});var i3=tw();Object.defineProperty(U,"createPipelineRequest",{enumerable:!0,get:function(){return i3.createPipelineRequest}});var uw=Jc();Object.defineProperty(U,"RestError",{enumerable:!0,get:function(){return uw.RestError}});Object.defineProperty(U,"isRestError",{enumerable:!0,get:function(){return uw.isRestError}});var lw=gd();Object.defineProperty(U,"decompressResponsePolicy",{enumerable:!0,get:function(){return lw.decompressResponsePolicy}});Object.defineProperty(U,"decompressResponsePolicyName",{enumerable:!0,get:function(){return lw.decompressResponsePolicyName}});var pw=nw();Object.defineProperty(U,"exponentialRetryPolicy",{enumerable:!0,get:function(){return pw.exponentialRetryPolicy}});Object.defineProperty(U,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return pw.exponentialRetryPolicyName}});var dw=Md();Object.defineProperty(U,"setClientRequestIdPolicy",{enumerable:!0,get:function(){return dw.setClientRequestIdPolicy}});Object.defineProperty(U,"setClientRequestIdPolicyName",{enumerable:!0,get:function(){return dw.setClientRequestIdPolicyName}});var fw=cd();Object.defineProperty(U,"logPolicy",{enumerable:!0,get:function(){return fw.logPolicy}});Object.defineProperty(U,"logPolicyName",{enumerable:!0,get:function(){return fw.logPolicyName}});var hw=md();Object.defineProperty(U,"multipartPolicy",{enumerable:!0,get:function(){return hw.multipartPolicy}});Object.defineProperty(U,"multipartPolicyName",{enumerable:!0,get:function(){return hw.multipartPolicyName}});var Vd=Ld();Object.defineProperty(U,"proxyPolicy",{enumerable:!0,get:function(){return Vd.proxyPolicy}});Object.defineProperty(U,"proxyPolicyName",{enumerable:!0,get:function(){return Vd.proxyPolicyName}});Object.defineProperty(U,"getDefaultProxySettings",{enumerable:!0,get:function(){return Vd.getDefaultProxySettings}});var mw=ud();Object.defineProperty(U,"redirectPolicy",{enumerable:!0,get:function(){return mw.redirectPolicy}});Object.defineProperty(U,"redirectPolicyName",{enumerable:!0,get:function(){return mw.redirectPolicyName}});var gw=rw();Object.defineProperty(U,"systemErrorRetryPolicy",{enumerable:!0,get:function(){return gw.systemErrorRetryPolicy}});Object.defineProperty(U,"systemErrorRetryPolicyName",{enumerable:!0,get:function(){return gw.systemErrorRetryPolicyName}});var yw=iw();Object.defineProperty(U,"throttlingRetryPolicy",{enumerable:!0,get:function(){return yw.throttlingRetryPolicy}});Object.defineProperty(U,"throttlingRetryPolicyName",{enumerable:!0,get:function(){return yw.throttlingRetryPolicyName}});var o3=Qi();Object.defineProperty(U,"retryPolicy",{enumerable:!0,get:function(){return o3.retryPolicy}});var xw=Bd();Object.defineProperty(U,"tracingPolicy",{enumerable:!0,get:function(){return xw.tracingPolicy}});Object.defineProperty(U,"tracingPolicyName",{enumerable:!0,get:function(){return xw.tracingPolicyName}});var a3=bd();Object.defineProperty(U,"defaultRetryPolicy",{enumerable:!0,get:function(){return a3.defaultRetryPolicy}});var vw=dd();Object.defineProperty(U,"userAgentPolicy",{enumerable:!0,get:function(){return vw.userAgentPolicy}});Object.defineProperty(U,"userAgentPolicyName",{enumerable:!0,get:function(){return vw.userAgentPolicyName}});var bw=Nd();Object.defineProperty(U,"tlsPolicy",{enumerable:!0,get:function(){return bw.tlsPolicy}});Object.defineProperty(U,"tlsPolicyName",{enumerable:!0,get:function(){return bw.tlsPolicyName}});var ww=Rd();Object.defineProperty(U,"formDataPolicy",{enumerable:!0,get:function(){return ww.formDataPolicy}});Object.defineProperty(U,"formDataPolicyName",{enumerable:!0,get:function(){return ww.formDataPolicyName}});var _w=ow();Object.defineProperty(U,"bearerTokenAuthenticationPolicy",{enumerable:!0,get:function(){return _w.bearerTokenAuthenticationPolicy}});Object.defineProperty(U,"bearerTokenAuthenticationPolicyName",{enumerable:!0,get:function(){return _w.bearerTokenAuthenticationPolicyName}});var Rw=aw();Object.defineProperty(U,"ndJsonPolicy",{enumerable:!0,get:function(){return Rw.ndJsonPolicy}});Object.defineProperty(U,"ndJsonPolicyName",{enumerable:!0,get:function(){return Rw.ndJsonPolicyName}});var Tw=cw();Object.defineProperty(U,"auxiliaryAuthenticationHeaderPolicy",{enumerable:!0,get:function(){return Tw.auxiliaryAuthenticationHeaderPolicy}});Object.defineProperty(U,"auxiliaryAuthenticationHeaderPolicyName",{enumerable:!0,get:function(){return Tw.auxiliaryAuthenticationHeaderPolicyName}});var Sw=fd();Object.defineProperty(U,"createFile",{enumerable:!0,get:function(){return Sw.createFile}});Object.defineProperty(U,"createFileFromStream",{enumerable:!0,get:function(){return Sw.createFileFromStream}})});var Aw=L((J$,Pw)=>{var{EventEmitter:s3}=require("events"),Jd=class Jd{constructor(){this.eventEmitter=new s3,this.onabort=null,this.aborted=!1,this.reason=void 0}toString(){return"[object AbortSignal]"}get[Symbol.toStringTag](){return"AbortSignal"}removeEventListener(e,n){this.eventEmitter.removeListener(e,n)}addEventListener(e,n){this.eventEmitter.on(e,n)}dispatchEvent(e){let n={type:e,target:this},r=`on${e}`;typeof this[r]=="function"&&this[r](n),this.eventEmitter.emit(e,n)}throwIfAborted(){if(this.aborted)throw this.reason}static abort(e){let n=new ba;return n.abort(),n.signal}static timeout(e){let n=new ba;return setTimeout(()=>n.abort(new Error("TimeoutError")),e),n.signal}};s(Jd,"AbortSignal");var nu=Jd,Yd=class Yd{constructor(){this.signal=new nu}abort(e){this.signal.aborted||(this.signal.aborted=!0,e?this.signal.reason=e:this.signal.reason=new Error("AbortError"),this.signal.dispatchEvent("abort"))}toString(){return"[object AbortController]"}get[Symbol.toStringTag](){return"AbortController"}};s(Yd,"AbortController");var ba=Yd;Pw.exports={AbortController:ba,AbortSignal:nu}});var Cw=L(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});function c3(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:""}s(c3,"getUserAgent");Xd.getUserAgent=c3});var Iw=L((e5,Ow)=>{"use strict";var R=class R extends Array{constructor(e,n){if(super(e),this.sign=n,e>R.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(e){var n=Math.floor,r=Number.isFinite;if(typeof e=="number"){if(e===0)return R.__zero();if(R.__isOneDigitInt(e))return 0>e?R.__oneDigit(-e,!0):R.__oneDigit(e,!1);if(!r(e)||n(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return R.__fromDouble(e)}if(typeof e=="string"){let o=R.__fromString(e);if(o===null)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return o}if(typeof e=="boolean")return e===!0?R.__oneDigit(1,!1):R.__zero();if(typeof e=="object"){if(e.constructor===R)return e;let o=R.__toPrimitive(e);return R.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){let e=["BigInt["];for(let n of this)e.push((n&&(n>>>0).toString(16))+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36>>=12;let y=m-12,v=12<=m?0:p<<20+m,P=20+m;for(0>>30-y,v=p<>>30-P,P-=30;let _=R.__decideRounding(e,P,d,p);if((_===1||_===0&&(1&v)==1)&&(v=v+1>>>0,v===0&&(h++,h>>>20!=0&&(h=0,u++,1023=R.__kMaxLengthBits)throw new RangeError("BigInt too big");if(e.length===1&&e.__digit(0)===2){let u=1+(0|r/30),p=e.sign&&(1&r)!=0,d=new R(u,p);d.__initializeDigits();let m=1<>=1;r!==0;r>>=1)c=R.multiply(c,c),1&r&&(o===null?o=c:o=R.multiply(o,c));return o}static multiply(e,n){if(e.length===0)return e;if(n.length===0)return n;let r=e.length+n.length;30<=e.__clzmsd()+n.__clzmsd()&&r--;let o=new R(r,e.sign!==n.sign);o.__initializeDigits();for(let c=0;cR.__absoluteCompare(e,n))return R.__zero();let r=e.sign!==n.sign,o=n.__unsignedDigit(0),c;if(n.length===1&&32767>=o){if(o===1)return r===e.sign?e:R.unaryMinus(e);c=R.__absoluteDivSmall(e,o,null)}else c=R.__absoluteDivLarge(e,n,!0,!1);return c.sign=r,c.__trim()}static remainder(e,n){if(n.length===0)throw new RangeError("Division by zero");if(0>R.__absoluteCompare(e,n))return e;let r=n.__unsignedDigit(0);if(n.length===1&&32767>=r){if(r===1)return R.__zero();let c=R.__absoluteModSmall(e,r);return c===0?R.__zero():R.__oneDigit(c,e.sign)}let o=R.__absoluteDivLarge(e,n,!1,!0);return o.sign=e.sign,o.__trim()}static add(e,n){let r=e.sign;return r===n.sign?R.__absoluteAdd(e,n,r):0<=R.__absoluteCompare(e,n)?R.__absoluteSub(e,n,r):R.__absoluteSub(n,e,!r)}static subtract(e,n){let r=e.sign;return r===n.sign?0<=R.__absoluteCompare(e,n)?R.__absoluteSub(e,n,r):R.__absoluteSub(n,e,!r):R.__absoluteAdd(e,n,r)}static leftShift(e,n){return n.length===0||e.length===0?e:n.sign?R.__rightShiftByAbsolute(e,n):R.__leftShiftByAbsolute(e,n)}static signedRightShift(e,n){return n.length===0||e.length===0?e:n.sign?R.__leftShiftByAbsolute(e,n):R.__rightShiftByAbsolute(e,n)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,n){return 0>R.__compareToBigInt(e,n)}static lessThanOrEqual(e,n){return 0>=R.__compareToBigInt(e,n)}static greaterThan(e,n){return 0e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return R.__zero();if(e>=R.__kMaxLengthBits)return n;let o=0|(e+29)/30;if(n.lengthe)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return R.__zero();if(n.sign){if(e>R.__kMaxLengthBits)throw new RangeError("BigInt too big");return R.__truncateAndSubFromPowerOfTwo(e,n,!1)}if(e>=R.__kMaxLengthBits)return n;let o=0|(e+29)/30;if(n.length>>c))?n:R.__truncateToNBits(e,n)}static ADD(e,n){if(e=R.__toPrimitive(e),n=R.__toPrimitive(n),typeof e=="string")return typeof n!="string"&&(n=n.toString()),e+n;if(typeof n=="string")return e.toString()+n;if(e=R.__toNumeric(e),n=R.__toNumeric(n),R.__isBigInt(e)&&R.__isBigInt(n))return R.add(e,n);if(typeof e=="number"&&typeof n=="number")return e+n;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,n){return R.__compare(e,n,0)}static LE(e,n){return R.__compare(e,n,1)}static GT(e,n){return R.__compare(e,n,2)}static GE(e,n){return R.__compare(e,n,3)}static EQ(e,n){for(;;){if(R.__isBigInt(e))return R.__isBigInt(n)?R.equal(e,n):R.EQ(n,e);if(typeof e=="number"){if(R.__isBigInt(n))return R.__equalToNumber(n,e);if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="string"){if(R.__isBigInt(n))return e=R.__fromString(e),e!==null&&R.equal(e,n);if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="boolean"){if(R.__isBigInt(n))return R.__equalToNumber(n,+e);if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="symbol"){if(R.__isBigInt(n))return!1;if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="object"){if(typeof n=="object"&&n.constructor!==R)return e==n;e=R.__toPrimitive(e)}else return e==n}}static NE(e,n){return!R.EQ(e,n)}static __zero(){return new R(0,!1)}static __oneDigit(e,n){let r=new R(1,n);return r.__setDigit(0,e),r}__copy(){let e=new R(this.length,this.sign);for(let n=0;nn)c=-n-1;else{if(r===0)return-1;r--,o=e.__digit(r),c=29}let u=1<>>20,r=n-1023,o=(0|r/30)+1,c=new R(o,0>e),u=1048575&R.__kBitConversionInts[1]|1048576,p=R.__kBitConversionInts[0],d=20,m=r%30,h,y=0;if(m<20){let v=d-m;y=v+32,h=u>>>v,u=u<<32-v|p>>>v,p<<=32-v}else if(m===20)y=32,h=u,u=p,p=0;else{let v=m-d;y=32-v,h=u<>>32-v,u=p<>>2,u=u<<30|p>>>2,p<<=30):h=0,c.__setDigit(v,h);return c.__trim()}static __isWhitespace(e){return 13>=e&&9<=e||(159>=e?e==32:131071>=e?e==160||e==5760:196607>=e?(e&=131071,10>=e||e==40||e==41||e==47||e==95||e==4096):e==65279)}static __fromString(e,n=0){let r=0,o=e.length,c=0;if(c===o)return R.__zero();let u=e.charCodeAt(c);for(;R.__isWhitespace(u);){if(++c===o)return R.__zero();u=e.charCodeAt(c)}if(u===43){if(++c===o)return null;u=e.charCodeAt(c),r=1}else if(u===45){if(++c===o)return null;u=e.charCodeAt(c),r=-1}if(n===0){if(n=10,u===48){if(++c===o)return R.__zero();if(u=e.charCodeAt(c),u===88||u===120){if(n=16,++c===o)return null;u=e.charCodeAt(c)}else if(u===79||u===111){if(n=8,++c===o)return null;u=e.charCodeAt(c)}else if(u===66||u===98){if(n=2,++c===o)return null;u=e.charCodeAt(c)}}}else if(n===16&&u===48){if(++c===o)return R.__zero();if(u=e.charCodeAt(c),u===88||u===120){if(++c===o)return null;u=e.charCodeAt(c)}}if(r!=0&&n!==10)return null;for(;u===48;){if(++c===o)return R.__zero();u=e.charCodeAt(c)}let p=o-c,d=R.__kMaxBitsPerChar[n],m=R.__kBitsPerCharTableMultiplier-1;if(p>1073741824/d)return null;let h=d*p+m>>>R.__kBitsPerCharTableShift,y=new R(0|(h+29)/30,!1),v=10>n?n:10,P=10>>0>>0>>R.__kBitsPerCharTableShift)/30;y.__inplaceMultiplyAdd(N,I,H)}while(!_)}else{d>>=R.__kBitsPerCharTableShift;let _=[],T=[],I=!1;do{let N=0,H=0;for(;;){let j;if(u-48>>>0>>0>>m-u)}if(c!==0){if(o>=e.length)throw new Error("implementation bug");e.__setDigit(o++,c)}for(;o>>1)+(85&o),o=(51&o>>>2)+(51&o),o=(15&o>>>4)+(15&o);let c=o,u=n-1,p=e.__digit(r-1),d=R.__clz30(p),m=0|(30*r-d+c-1)/c;if(e.sign&&m++,268435456>>H,P=30-H;P>=c;)h[y--]=R.__kConversionChars[v&u],v>>>=c,P-=c}let _=(v|p<>>c-P;v!==0;)h[y--]=R.__kConversionChars[v&u],v>>>=c;if(e.sign&&(h[y--]="-"),y!=-1)throw new Error("implementation bug");return h.join("")}static __toStringGeneric(e,n,r){let o=e.length;if(o===0)return"";if(o===1){let T=e.__unsignedDigit(0).toString(n);return r===!1&&e.sign&&(T="-"+T),T}let c=30*o-R.__clz30(e.__digit(o-1)),u=R.__kMaxBitsPerChar[n],p=u-1,d=c*R.__kBitsPerCharTableMultiplier;d+=p-1,d=0|d/p;let m=d+1>>1,h=R.exponentiate(R.__oneDigit(n,!1),R.__oneDigit(m,!1)),y,v,P=h.__unsignedDigit(0);if(h.length===1&&32767>=P){y=new R(e.length,!1),y.__initializeDigits();let T=0;for(let I=2*e.length-1;0<=I;I--){let N=T<<15|e.__halfDigit(I);y.__setHalfDigit(I,0|N/P),T=0|N%P}v=T.toString(n)}else{let T=R.__absoluteDivLarge(e,h,!0,!0);y=T.quotient;let I=T.remainder.__trim();v=R.__toStringGeneric(I,n,!0)}y.__trim();let _=R.__toStringGeneric(y,n,!0);for(;v.lengtho?R.__absoluteLess(r):0}static __compareToNumber(e,n){if(R.__isOneDigitInt(n)){let r=e.sign,o=0>n;if(r!==o)return R.__unequalSign(r);if(e.length===0){if(o)throw new Error("implementation bug");return n===0?0:-1}if(1c?R.__absoluteGreater(r):un)return R.__unequalSign(r);if(n===0)throw new Error("implementation bug: should be handled elsewhere");if(e.length===0)return-1;R.__kBitConversionDouble[0]=n;let o=2047&R.__kBitConversionInts[1]>>>20;if(o==2047)throw new Error("implementation bug: handled elsewhere");let c=o-1023;if(0>c)return R.__absoluteGreater(r);let u=e.length,p=e.__digit(u-1),d=R.__clz30(p),m=30*u-d,h=c+1;if(mh)return R.__absoluteGreater(r);let y=1048576|1048575&R.__kBitConversionInts[1],v=R.__kBitConversionInts[0],P=20,_=29-d;if(_!==(0|(m-1)%30))throw new Error("implementation bug");let T,I=0;if(20>_){let N=P-_;I=N+32,T=y>>>N,y=y<<32-N|v>>>N,v<<=32-N}else if(_===20)I=32,T=y,y=v,v=0;else{let N=_-P;I=32-N,T=y<>>32-N,y=v<>>=0,T>>>=0,p>T)return R.__absoluteGreater(r);if(p>>2,y=y<<30|v>>>2,v<<=30):T=0;let H=e.__unsignedDigit(N);if(H>T)return R.__absoluteGreater(r);if(Hn&&e.__unsignedDigit(0)===r(n):R.__compareToDouble(e,n)===0}static __comparisonResultToBool(e,n){return n===0?0>e:n===1?0>=e:n===2?0n;case 3:return e>=n}if(R.__isBigInt(e)&&typeof n=="string")return n=R.__fromString(n),n!==null&&R.__comparisonResultToBool(R.__compareToBigInt(e,n),r);if(typeof e=="string"&&R.__isBigInt(n))return e=R.__fromString(e),e!==null&&R.__comparisonResultToBool(R.__compareToBigInt(e,n),r);if(e=R.__toNumeric(e),n=R.__toNumeric(n),R.__isBigInt(e)){if(R.__isBigInt(n))return R.__comparisonResultToBool(R.__compareToBigInt(e,n),r);if(typeof n!="number")throw new Error("implementation bug");return R.__comparisonResultToBool(R.__compareToNumber(e,n),r)}if(typeof e!="number")throw new Error("implementation bug");if(R.__isBigInt(n))return R.__comparisonResultToBool(R.__compareToNumber(n,e),2^r);if(typeof n!="number")throw new Error("implementation bug");return r===0?en:r===3?e>=n:void 0}__clzmsd(){return R.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,n,r){if(e.length>>30,c.__setDigit(p,1073741823&d)}for(;p>>30,c.__setDigit(p,1073741823&d)}return p>>30,o.__setDigit(u,1073741823&p)}for(;u>>30,o.__setDigit(u,1073741823&p)}return o.__trim()}static __absoluteAddOne(e,n,r=null){let o=e.length;r===null?r=new R(o,n):r.sign=n;let c=1;for(let u=0;u>>30,r.__setDigit(u,1073741823&p)}return c!=0&&r.__setDigitGrow(o,1),r}static __absoluteSubOne(e,n){let r=e.length;n=n||r;let o=new R(n,!1),c=1;for(let u=0;u>>30,o.__setDigit(u,1073741823&p)}if(c!=0)throw new Error("implementation bug");for(let u=r;uo?0:e.__unsignedDigit(o)>n.__unsignedDigit(o)?1:-1}static __multiplyAccumulate(e,n,r,o){if(n===0)return;let c=32767&n,u=n>>>15,p=0,d=0;for(let m,h=0;h>>15,_=R.__imul(v,c),T=R.__imul(v,u),I=R.__imul(P,c),N=R.__imul(P,u);m+=d+_+p,p=m>>>30,m&=1073741823,m+=((32767&T)<<15)+((32767&I)<<15),p+=m>>>30,d=N+(T>>>15)+(I>>>15),r.__setDigit(o,1073741823&m)}for(;p!=0||d!==0;o++){let m=r.__digit(o);m+=p+d,d=0,p=m>>>30,r.__setDigit(o,1073741823&m)}}static __internalMultiplyAdd(e,n,r,o,c){let u=r,p=0;for(let d=0;d>>15,n),v=h+((32767&y)<<15)+p+u;u=v>>>30,p=y>>>15,c.__setDigit(d,1073741823&v)}if(c.length>o)for(c.__setDigit(o++,u+p);othis.length&&(r=this.length);let o=32767&e,c=e>>>15,u=0,p=n;for(let d=0;d>>15,v=R.__imul(h,o),P=R.__imul(h,c),_=R.__imul(y,o),T=R.__imul(y,c),I=p+v+u;u=I>>>30,I&=1073741823,I+=((32767&P)<<15)+((32767&_)<<15),u+=I>>>30,p=T+(P>>>15)+(_>>>15),this.__setDigit(d,1073741823&I)}if(u!=0||p!==0)throw new Error("implementation bug")}static __absoluteDivSmall(e,n,r=null){r===null&&(r=new R(e.length,!1));let o=0;for(let c,u=2*e.length-1;0<=u;u-=2){c=(o<<15|e.__halfDigit(u))>>>0;let p=0|c/n;o=0|c%n,c=(o<<15|e.__halfDigit(u-1))>>>0;let d=0|c/n;o=0|c%n,r.__setDigit(u>>>1,p<<15|d)}return r}static __absoluteModSmall(e,n){let r=0;for(let o=2*e.length-1;0<=o;o--)r=0|((r<<15|e.__halfDigit(o))>>>0)%n;return r}static __absoluteDivLarge(e,n,r,o){let c=n.__halfDigitLength(),u=n.length,p=e.__halfDigitLength()-c,d=null;r&&(d=new R(p+2>>>1,!1),d.__initializeDigits());let m=new R(c+2>>>1,!1);m.__initializeDigits();let h=R.__clz15(n.__halfDigit(c-1));0>>0;_=0|H/v;let j=0|H%v,G=n.__halfDigit(c-2),te=y.__halfDigit(T+c-2);for(;R.__imul(_,G)>>>0>(j<<16|te)>>>0&&(_--,j+=v,!(32767>>1,P|_))}if(o)return y.__inplaceRightShift(h),r?{quotient:d,remainder:y}:y;if(r)return d;throw new Error("unreachable")}static __clz15(e){return R.__clz30(e)-15}__inplaceAdd(e,n,r){let o=0;for(let c=0;c>>15,this.__setHalfDigit(n+c,32767&u)}return o}__inplaceSub(e,n,r){let o=0;if(1&n){n>>=1;let c=this.__digit(n),u=32767&c,p=0;for(;p>>1;p++){let h=e.__digit(p),y=(c>>>15)-(32767&h)-o;o=1&y>>>15,this.__setDigit(n+p,(32767&y)<<15|32767&u),c=this.__digit(n+p+1),u=(32767&c)-(h>>>15)-o,o=1&u>>>15}let d=e.__digit(p),m=(c>>>15)-(32767&d)-o;if(o=1&m>>>15,this.__setDigit(n+p,(32767&m)<<15|32767&u),n+p+1>=this.length)throw new RangeError("out of bounds");!(1&r)&&(c=this.__digit(n+p+1),u=(32767&c)-(d>>>15)-o,o=1&u>>>15,this.__setDigit(n+e.length,1073709056&c|32767&u))}else{n>>=1;let c=0;for(;c>>15;let P=(h>>>15)-(y>>>15)-o;o=1&P>>>15,this.__setDigit(n+c,(32767&P)<<15|32767&v)}let u=this.__digit(n+c),p=e.__digit(c),d=(32767&u)-(32767&p)-o;o=1&d>>>15;let m=0;!(1&r)&&(m=(u>>>15)-(p>>>15)-o,o=1&m>>>15),this.__setDigit(n+c,(32767&m)<<15|32767&d)}return o}__inplaceRightShift(e){if(e===0)return;let n=this.__digit(0)>>>e,r=this.length-1;for(let o=0;o>>e}this.__setDigit(r,n)}static __specialLeftShift(e,n,r){let o=e.length,c=new R(o+r,!1);if(n===0){for(let p=0;p>>30-n}return 0r)throw new RangeError("BigInt too big");let o=0|r/30,c=r%30,u=e.length,p=c!==0&&e.__digit(u-1)>>>30-c!=0,d=u+o+(p?1:0),m=new R(d,e.sign);if(c===0){let h=0;for(;h>>30-c}if(p)m.__setDigit(u+o,h);else if(h!==0)throw new Error("implementation bug")}return m.__trim()}static __rightShiftByAbsolute(e,n){let r=e.length,o=e.sign,c=R.__toShiftAmount(n);if(0>c)return R.__rightShiftByMaximum(o);let u=0|c/30,p=c%30,d=r-u;if(0>=d)return R.__rightShiftByMaximum(o);let m=!1;if(o){if(e.__digit(u)&(1<>>p,v=r-u-1;for(let P=0;P>>p}h.__setDigit(v,y)}return m&&(h=R.__absoluteAddOne(h,!0,h)),h.__trim()}static __rightShiftByMaximum(e){return e?R.__oneDigit(1,!0):R.__zero()}static __toShiftAmount(e){if(1R.__kMaxLengthBits?-1:n}static __toPrimitive(e,n="default"){if(typeof e!="object"||e.constructor===R)return e;if(typeof Symbol<"u"&&typeof Symbol.toPrimitive=="symbol"){let c=e[Symbol.toPrimitive];if(c){let u=c(n);if(typeof u!="object")return u;throw new TypeError("Cannot convert object to primitive value")}}let r=e.valueOf;if(r){let c=r.call(e);if(typeof c!="object")return c}let o=e.toString;if(o){let c=o.call(e);if(typeof c!="object")return c}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return R.__isBigInt(e)?e:+e}static __isBigInt(e){return typeof e=="object"&&e!==null&&e.constructor===R}static __truncateToNBits(e,n){let r=0|(e+29)/30,o=new R(r,n.sign),c=r-1;for(let p=0;p>>p}return o.__setDigit(c,u),o.__trim()}static __truncateAndSubFromPowerOfTwo(e,n,r){var o=Math.min;let c=0|(e+29)/30,u=new R(c,r),p=0,d=c-1,m=0;for(let P=o(d,n.length);p>>30,u.__setDigit(p,1073741823&_)}for(;p>>P;let _=1<<32-P;v=_-h-m,v&=_-1}return u.__setDigit(d,v),u.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,n){this[e]=0|n}__setDigitGrow(e,n){this[e]=0|n}__halfDigitLength(){let e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,n){let r=e>>>1,o=this.__digit(r),c=1&e?32767&o|n<<15:1073709056&o|32767&n;this.__setDigit(r,c)}static __digitPow(e,n){let r=1;for(;0>>=1,e*=e;return r}static __isOneDigitInt(e){return(1073741823&e)===e}};s(R,"JSBI");var Ye=R;Ye.__kMaxLength=33554432,Ye.__kMaxLengthBits=Ye.__kMaxLength<<5,Ye.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],Ye.__kBitsPerCharTableShift=5,Ye.__kBitsPerCharTableMultiplier=1<>>0)/Math.LN2)},Ye.__imul=Math.imul||function(t,e){return 0|t*e},Ow.exports=Ye});var Lw=L(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var ao=new WeakMap,ru=new WeakMap,iu=class iu{constructor(){this.onabort=null,ao.set(this,[]),ru.set(this,!1)}get aborted(){if(!ru.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return ru.get(this)}static get none(){return new iu}addEventListener(e,n){if(!ao.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");ao.get(this).push(n)}removeEventListener(e,n){if(!ao.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let r=ao.get(this),o=r.indexOf(n);o>-1&&r.splice(o,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};s(iu,"AbortSignal");var wa=iu;function Dw(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=ao.get(t);e&&e.slice().forEach(n=>{n.call(t,{type:"abort"})}),ru.set(t,!0)}s(Dw,"abortSignal");var tf=class tf extends Error{constructor(e){super(e),this.name="AbortError"}};s(tf,"AbortError");var Zd=tf,nf=class nf{constructor(e){if(this._signal=new wa,!!e){Array.isArray(e)||(e=arguments);for(let n of e)n.aborted?this.abort():n.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){Dw(this._signal)}static timeout(e){let n=new wa,r=setTimeout(Dw,e,n);return typeof r.unref=="function"&&r.unref(),n}};s(nf,"AbortController");var ef=nf;_a.AbortController=ef;_a.AbortError=Zd;_a.AbortSignal=wa});var Jh=L(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});var Yw=require("crypto"),Nf=(Nv(),zr(Mv)),ja=pc(),br=(Wr(),zr($r)),u3=xb(),l3=bb(),p3=_b(),yo=Ew(),d3=Aw(),f3=Cw(),h3=Iw(),m3=Lw();function Iu(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}s(Iu,"_interopDefaultLegacy");var g3=Iu(u3),y3=Iu(l3),Mw=Iu(p3),fe=Iu(h3),Xw="/_partitionKey",A={HttpHeaders:{Authorization:"authorization",ETag:"etag",MethodOverride:"X-HTTP-Method",Slug:"Slug",ContentType:"Content-Type",LastModified:"Last-Modified",ContentEncoding:"Content-Encoding",CharacterSet:"CharacterSet",UserAgent:"User-Agent",IfModifiedSince:"If-Modified-Since",IfMatch:"If-Match",IfNoneMatch:"If-None-Match",ContentLength:"Content-Length",AcceptEncoding:"Accept-Encoding",KeepAlive:"Keep-Alive",CacheControl:"Cache-Control",TransferEncoding:"Transfer-Encoding",ContentLanguage:"Content-Language",ContentLocation:"Content-Location",ContentMd5:"Content-Md5",ContentRange:"Content-Range",Accept:"Accept",AcceptCharset:"Accept-Charset",AcceptLanguage:"Accept-Language",IfRange:"If-Range",IfUnmodifiedSince:"If-Unmodified-Since",MaxForwards:"Max-Forwards",ProxyAuthorization:"Proxy-Authorization",AcceptRanges:"Accept-Ranges",ProxyAuthenticate:"Proxy-Authenticate",RetryAfter:"Retry-After",SetCookie:"Set-Cookie",WwwAuthenticate:"Www-Authenticate",Origin:"Origin",Host:"Host",AccessControlAllowOrigin:"Access-Control-Allow-Origin",AccessControlAllowHeaders:"Access-Control-Allow-Headers",KeyValueEncodingFormat:"application/x-www-form-urlencoded",WrapAssertionFormat:"wrap_assertion_format",WrapAssertion:"wrap_assertion",WrapScope:"wrap_scope",SimpleToken:"SWT",HttpDate:"date",Prefer:"Prefer",Location:"Location",Referer:"referer",A_IM:"A-IM",Query:"x-ms-documentdb-query",IsQuery:"x-ms-documentdb-isquery",IsQueryPlan:"x-ms-cosmos-is-query-plan-request",SupportedQueryFeatures:"x-ms-cosmos-supported-query-features",QueryVersion:"x-ms-cosmos-query-version",Continuation:"x-ms-continuation",PageSize:"x-ms-max-item-count",ItemCount:"x-ms-item-count",ActivityId:"x-ms-activity-id",PreTriggerInclude:"x-ms-documentdb-pre-trigger-include",PreTriggerExclude:"x-ms-documentdb-pre-trigger-exclude",PostTriggerInclude:"x-ms-documentdb-post-trigger-include",PostTriggerExclude:"x-ms-documentdb-post-trigger-exclude",IndexingDirective:"x-ms-indexing-directive",SessionToken:"x-ms-session-token",ConsistencyLevel:"x-ms-consistency-level",XDate:"x-ms-date",CollectionPartitionInfo:"x-ms-collection-partition-info",CollectionServiceInfo:"x-ms-collection-service-info",RetryAfterInMilliseconds:"x-ms-retry-after-ms",RetryAfterInMs:"x-ms-retry-after-ms",IsFeedUnfiltered:"x-ms-is-feed-unfiltered",ResourceTokenExpiry:"x-ms-documentdb-expiry-seconds",EnableScanInQuery:"x-ms-documentdb-query-enable-scan",EmitVerboseTracesInQuery:"x-ms-documentdb-query-emit-traces",EnableCrossPartitionQuery:"x-ms-documentdb-query-enablecrosspartition",ParallelizeCrossPartitionQuery:"x-ms-documentdb-query-parallelizecrosspartitionquery",ResponseContinuationTokenLimitInKB:"x-ms-documentdb-responsecontinuationtokenlimitinkb",PopulateQueryMetrics:"x-ms-documentdb-populatequerymetrics",QueryMetrics:"x-ms-documentdb-query-metrics",Version:"x-ms-version",OwnerFullName:"x-ms-alt-content-path",OwnerId:"x-ms-content-path",PartitionKey:"x-ms-documentdb-partitionkey",PartitionKeyRangeID:"x-ms-documentdb-partitionkeyrangeid",MaxEntityCount:"x-ms-root-entity-max-count",CurrentEntityCount:"x-ms-root-entity-current-count",CollectionQuotaInMb:"x-ms-collection-quota-mb",CollectionCurrentUsageInMb:"x-ms-collection-usage-mb",MaxMediaStorageUsageInMB:"x-ms-max-media-storage-usage-mb",CurrentMediaStorageUsageInMB:"x-ms-media-storage-usage-mb",RequestCharge:"x-ms-request-charge",PopulateQuotaInfo:"x-ms-documentdb-populatequotainfo",MaxResourceQuota:"x-ms-resource-quota",OfferType:"x-ms-offer-type",OfferThroughput:"x-ms-offer-throughput",AutoscaleSettings:"x-ms-cosmos-offer-autopilot-settings",DisableRUPerMinuteUsage:"x-ms-documentdb-disable-ru-per-minute-usage",IsRUPerMinuteUsed:"x-ms-documentdb-is-ru-per-minute-used",OfferIsRUPerMinuteThroughputEnabled:"x-ms-offer-is-ru-per-minute-throughput-enabled",IndexTransformationProgress:"x-ms-documentdb-collection-index-transformation-progress",LazyIndexingProgress:"x-ms-documentdb-collection-lazy-indexing-progress",IsUpsert:"x-ms-documentdb-is-upsert",SubStatus:"x-ms-substatus",EnableScriptLogging:"x-ms-documentdb-script-enable-logging",ScriptLogResults:"x-ms-documentdb-script-log-results",ALLOW_MULTIPLE_WRITES:"x-ms-cosmos-allow-tentative-writes",IsBatchRequest:"x-ms-cosmos-is-batch-request",IsBatchAtomic:"x-ms-cosmos-batch-atomic",BatchContinueOnError:"x-ms-cosmos-batch-continue-on-error",DedicatedGatewayPerRequestCacheStaleness:"x-ms-dedicatedgateway-max-age",ForceRefresh:"x-ms-force-refresh"},WritableLocations:"writableLocations",ReadableLocations:"readableLocations",LocationUnavailableExpirationTimeInMs:5*60*1e3,ENABLE_MULTIPLE_WRITABLE_LOCATIONS:"enableMultipleWriteLocations",DefaultUnavailableLocationExpirationTimeMS:5*60*1e3,ThrottleRetryCount:"x-ms-throttle-retry-count",ThrottleRetryWaitTimeInMs:"x-ms-throttle-retry-wait-time-ms",CurrentVersion:"2020-07-15",AzureNamespace:"Azure.Cosmos",AzurePackageName:"@azure/cosmos",SDKName:"azure-cosmos-js",SDKVersion:"3.17.3",DefaultMaxBulkRequestBodySizeInBytes:220201,Quota:{CollectionSize:"collectionSize"},Path:{Root:"/",DatabasesPathSegment:"dbs",CollectionsPathSegment:"colls",UsersPathSegment:"users",DocumentsPathSegment:"docs",PermissionsPathSegment:"permissions",StoredProceduresPathSegment:"sprocs",TriggersPathSegment:"triggers",UserDefinedFunctionsPathSegment:"udfs",ConflictsPathSegment:"conflicts",AttachmentsPathSegment:"attachments",PartitionKeyRangesPathSegment:"pkranges",SchemasPathSegment:"schemas",OffersPathSegment:"offers",TopologyPathSegment:"topology",DatabaseAccountPathSegment:"databaseaccount"},PartitionKeyRange:{MinInclusive:"minInclusive",MaxExclusive:"maxExclusive",Id:"id"},QueryRangeConstants:{MinInclusive:"minInclusive",MaxExclusive:"maxExclusive",min:"min"},EffectiveParitionKeyConstants:{MinimumInclusiveEffectivePartitionKey:"",MaximumExclusiveEffectivePartitionKey:"FF"},EffectivePartitionKeyConstants:{MinimumInclusiveEffectivePartitionKey:"",MaximumExclusiveEffectivePartitionKey:"FF"}};w.ResourceType=void 0;(function(t){t.none="",t.database="dbs",t.offer="offers",t.user="users",t.permission="permissions",t.container="colls",t.conflicts="conflicts",t.sproc="sprocs",t.udf="udfs",t.trigger="triggers",t.item="docs",t.pkranges="pkranges",t.partitionkey="partitionKey"})(w.ResourceType||(w.ResourceType={}));w.HTTPMethod=void 0;(function(t){t.get="GET",t.patch="PATCH",t.post="POST",t.put="PUT",t.delete="DELETE"})(w.HTTPMethod||(w.HTTPMethod={}));w.OperationType=void 0;(function(t){t.Create="create",t.Replace="replace",t.Upsert="upsert",t.Delete="delete",t.Read="read",t.Query="query",t.Execute="execute",t.Batch="batch",t.Patch="patch"})(w.OperationType||(w.OperationType={}));var uo;(function(t){t.PrimaryMaster="PRIMARY_MASTER",t.SecondaryMaster="SECONDARY_MASTER",t.PrimaryReadOnly="PRIMARY_READONLY",t.SecondaryReadOnly="SECONDARY_READONLY"})(uo||(uo={}));var Nw;(function(t){t.Item="ITEM",t.StoredProcedure="STORED_PROCEDURE",t.UserDefinedFunction="USER_DEFINED_FUNCTION",t.Trigger="TRIGGER"})(Nw||(Nw={}));var kw;(function(t){t[t.ScopeAccountReadValue=1]="ScopeAccountReadValue",t[t.ScopeAccountListDatabasesValue=2]="ScopeAccountListDatabasesValue",t[t.ScopeDatabaseReadValue=4]="ScopeDatabaseReadValue",t[t.ScopeDatabaseReadOfferValue=8]="ScopeDatabaseReadOfferValue",t[t.ScopeDatabaseListContainerValue=16]="ScopeDatabaseListContainerValue",t[t.ScopeContainerReadValue=32]="ScopeContainerReadValue",t[t.ScopeContainerReadOfferValue=64]="ScopeContainerReadOfferValue",t[t.ScopeAccountCreateDatabasesValue=1]="ScopeAccountCreateDatabasesValue",t[t.ScopeAccountDeleteDatabasesValue=2]="ScopeAccountDeleteDatabasesValue",t[t.ScopeDatabaseDeleteValue=4]="ScopeDatabaseDeleteValue",t[t.ScopeDatabaseReplaceOfferValue=8]="ScopeDatabaseReplaceOfferValue",t[t.ScopeDatabaseCreateContainerValue=16]="ScopeDatabaseCreateContainerValue",t[t.ScopeDatabaseDeleteContainerValue=32]="ScopeDatabaseDeleteContainerValue",t[t.ScopeContainerReplaceValue=64]="ScopeContainerReplaceValue",t[t.ScopeContainerDeleteValue=128]="ScopeContainerDeleteValue",t[t.ScopeContainerReplaceOfferValue=256]="ScopeContainerReplaceOfferValue",t[t.ScopeAccountReadAllAccessValue=65535]="ScopeAccountReadAllAccessValue",t[t.ScopeDatabaseReadAllAccessValue=124]="ScopeDatabaseReadAllAccessValue",t[t.ScopeContainersReadAllAccessValue=96]="ScopeContainersReadAllAccessValue",t[t.ScopeAccountWriteAllAccessValue=65535]="ScopeAccountWriteAllAccessValue",t[t.ScopeDatabaseWriteAllAccessValue=508]="ScopeDatabaseWriteAllAccessValue",t[t.ScopeContainersWriteAllAccessValue=448]="ScopeContainersWriteAllAccessValue",t[t.ScopeContainerExecuteQueriesValue=1]="ScopeContainerExecuteQueriesValue",t[t.ScopeContainerReadFeedsValue=2]="ScopeContainerReadFeedsValue",t[t.ScopeContainerReadStoredProceduresValue=4]="ScopeContainerReadStoredProceduresValue",t[t.ScopeContainerReadUserDefinedFunctionsValue=8]="ScopeContainerReadUserDefinedFunctionsValue",t[t.ScopeContainerReadTriggersValue=16]="ScopeContainerReadTriggersValue",t[t.ScopeContainerReadConflictsValue=32]="ScopeContainerReadConflictsValue",t[t.ScopeItemReadValue=64]="ScopeItemReadValue",t[t.ScopeStoredProcedureReadValue=128]="ScopeStoredProcedureReadValue",t[t.ScopeUserDefinedFunctionReadValue=256]="ScopeUserDefinedFunctionReadValue",t[t.ScopeTriggerReadValue=512]="ScopeTriggerReadValue",t[t.ScopeContainerCreateItemsValue=1]="ScopeContainerCreateItemsValue",t[t.ScopeContainerReplaceItemsValue=2]="ScopeContainerReplaceItemsValue",t[t.ScopeContainerUpsertItemsValue=4]="ScopeContainerUpsertItemsValue",t[t.ScopeContainerDeleteItemsValue=8]="ScopeContainerDeleteItemsValue",t[t.ScopeContainerCreateStoredProceduresValue=16]="ScopeContainerCreateStoredProceduresValue",t[t.ScopeContainerReplaceStoredProceduresValue=32]="ScopeContainerReplaceStoredProceduresValue",t[t.ScopeContainerDeleteStoredProceduresValue=64]="ScopeContainerDeleteStoredProceduresValue",t[t.ScopeContainerExecuteStoredProceduresValue=128]="ScopeContainerExecuteStoredProceduresValue",t[t.ScopeContainerCreateTriggersValue=256]="ScopeContainerCreateTriggersValue",t[t.ScopeContainerReplaceTriggersValue=512]="ScopeContainerReplaceTriggersValue",t[t.ScopeContainerDeleteTriggersValue=1024]="ScopeContainerDeleteTriggersValue",t[t.ScopeContainerCreateUserDefinedFunctionsValue=2048]="ScopeContainerCreateUserDefinedFunctionsValue",t[t.ScopeContainerReplaceUserDefinedFunctionsValue=4096]="ScopeContainerReplaceUserDefinedFunctionsValue",t[t.ScopeContainerDeleteUserDefinedFunctionSValue=8192]="ScopeContainerDeleteUserDefinedFunctionSValue",t[t.ScopeContainerDeleteCONFLICTSValue=16384]="ScopeContainerDeleteCONFLICTSValue",t[t.ScopeItemReplaceValue=65536]="ScopeItemReplaceValue",t[t.ScopeItemUpsertValue=131072]="ScopeItemUpsertValue",t[t.ScopeItemDeleteValue=262144]="ScopeItemDeleteValue",t[t.ScopeStoredProcedureReplaceValue=1048576]="ScopeStoredProcedureReplaceValue",t[t.ScopeStoredProcedureDeleteValue=2097152]="ScopeStoredProcedureDeleteValue",t[t.ScopeStoredProcedureExecuteValue=4194304]="ScopeStoredProcedureExecuteValue",t[t.ScopeUserDefinedFunctionReplaceValue=8388608]="ScopeUserDefinedFunctionReplaceValue",t[t.ScopeUserDefinedFunctionDeleteValue=16777216]="ScopeUserDefinedFunctionDeleteValue",t[t.ScopeTriggerReplaceValue=33554432]="ScopeTriggerReplaceValue",t[t.ScopeTriggerDeleteValue=67108864]="ScopeTriggerDeleteValue",t[t.ScopeContainerReadAllAccessValue=4294967295]="ScopeContainerReadAllAccessValue",t[t.ScopeItemReadAllAccessValue=65]="ScopeItemReadAllAccessValue",t[t.ScopeContainerWriteAllAccessValue=4294967295]="ScopeContainerWriteAllAccessValue",t[t.ScopeItemWriteAllAccessValue=458767]="ScopeItemWriteAllAccessValue",t[t.NoneValue=0]="NoneValue"})(kw||(kw={}));w.SasTokenPermissionKind=void 0;(function(t){t[t.ContainerCreateItems=1]="ContainerCreateItems",t[t.ContainerReplaceItems=2]="ContainerReplaceItems",t[t.ContainerUpsertItems=4]="ContainerUpsertItems",t[t.ContainerDeleteItems=128]="ContainerDeleteItems",t[t.ContainerExecuteQueries=1]="ContainerExecuteQueries",t[t.ContainerReadFeeds=2]="ContainerReadFeeds",t[t.ContainerCreateStoreProcedure=16]="ContainerCreateStoreProcedure",t[t.ContainerReadStoreProcedure=4]="ContainerReadStoreProcedure",t[t.ContainerReplaceStoreProcedure=32]="ContainerReplaceStoreProcedure",t[t.ContainerDeleteStoreProcedure=64]="ContainerDeleteStoreProcedure",t[t.ContainerCreateTriggers=256]="ContainerCreateTriggers",t[t.ContainerReadTriggers=16]="ContainerReadTriggers",t[t.ContainerReplaceTriggers=512]="ContainerReplaceTriggers",t[t.ContainerDeleteTriggers=1024]="ContainerDeleteTriggers",t[t.ContainerCreateUserDefinedFunctions=2048]="ContainerCreateUserDefinedFunctions",t[t.ContainerReadUserDefinedFunctions=8]="ContainerReadUserDefinedFunctions",t[t.ContainerReplaceUserDefinedFunctions=4096]="ContainerReplaceUserDefinedFunctions",t[t.ContainerDeleteUserDefinedFunctions=8192]="ContainerDeleteUserDefinedFunctions",t[t.ContainerExecuteStoredProcedure=128]="ContainerExecuteStoredProcedure",t[t.ContainerReadConflicts=32]="ContainerReadConflicts",t[t.ContainerDeleteConflicts=16384]="ContainerDeleteConflicts",t[t.ContainerReadAny=64]="ContainerReadAny",t[t.ContainerFullAccess=4294967295]="ContainerFullAccess",t[t.ItemReadAny=65536]="ItemReadAny",t[t.ItemFullAccess=65]="ItemFullAccess",t[t.ItemRead=64]="ItemRead",t[t.ItemReplace=65536]="ItemReplace",t[t.ItemUpsert=131072]="ItemUpsert",t[t.ItemDelete=262144]="ItemDelete",t[t.StoreProcedureRead=128]="StoreProcedureRead",t[t.StoreProcedureReplace=1048576]="StoreProcedureReplace",t[t.StoreProcedureDelete=2097152]="StoreProcedureDelete",t[t.StoreProcedureExecute=4194304]="StoreProcedureExecute",t[t.UserDefinedFuntionRead=256]="UserDefinedFuntionRead",t[t.UserDefinedFuntionReplace=8388608]="UserDefinedFuntionReplace",t[t.UserDefinedFuntionDelete=16777216]="UserDefinedFuntionDelete",t[t.TriggerRead=512]="TriggerRead",t[t.TriggerReplace=33554432]="TriggerReplace",t[t.TriggerDelete=67108864]="TriggerDelete"})(w.SasTokenPermissionKind||(w.SasTokenPermissionKind={}));var Zw=new RegExp("^[/]+"),e_=new RegExp("[/]+$"),x3=new RegExp("[/\\\\?#]"),v3=new RegExp("[/\\\\#]");function b3(t){return JSON.stringify(t).replace(/[\u007F-\uFFFF]/g,e=>"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4))}s(b3,"jsonStringifyAndEscapeNonASCII");function qw(t){if(t.length===0)return{type:void 0,objectBody:void 0};t[t.length-1]!=="/"&&(t=t+"/"),t[0]!=="/"&&(t="/"+t);let e=t.split("/"),n,r;return e.length%2===0?(n=e[e.length-2],r=e[e.length-3]):(n=e[e.length-3],r=e[e.length-2]),{type:r,objectBody:{id:n,self:t}}}s(qw,"parseLink");function kf(t){return t===w.OperationType.Read||t===w.OperationType.Query}s(kf,"isReadRequest");function w3(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}s(w3,"sleep");function rf(t){return t.split("/").slice(0,4).join("/")}s(rf,"getContainerLink");function ho(t){return t.replace(Zw,"").replace(e_,"")}s(ho,"trimSlashes");function _3(t){let e=[],n=0,r=s(()=>{throw new Error("Path "+t+" is invalid at index "+n)},"throwError"),o=s(()=>{let u=t[n],p=++n;for(;p=t.indexOf(u,p),p===-1&&r(),t[p-1]==="\\";)++p;let d=t.substr(n,p-n);return n=p+1,d},"getEscapedToken"),c=s(()=>{let u=t.indexOf("/",n),p=null;return u===-1?(p=t.substr(n),n=t.length):(p=t.substr(n,u-n),n=u),p=p.trim(),p},"getToken");for(;n{let[u,...p]=c.split("=");return o[u]=p.join("="),o},{});if(!n||!r)throw new Error("Could not parse the provided connection string");return{endpoint:n,key:r}}s(S3,"parseConnectionString");var vt={Ok:200,Created:201,Accepted:202,NoContent:204,NotModified:304,BadRequest:400,Unauthorized:401,Forbidden:403,NotFound:404,MethodNotAllowed:405,RequestTimeout:408,Conflict:409,Gone:410,PreconditionFailed:412,RequestEntityTooLarge:413,TooManyRequests:429,RetryWith:449,InternalServerError:500,ServiceUnavailable:503,ENOTFOUND:"ENOTFOUND",OperationPaused:1200,OperationCancelled:1201},mo={Unknown:0,CrossPartitionQueryNotServable:1004,PartitionKeyRangeGone:1002,ReadSessionNotAvailable:1002,WriteForbidden:3,DatabaseAccountNotFound:1008};function qf(t){return t=Dn(t),xi(t),A.Path.DatabasesPathSegment+"/"+t}s(qf,"createDatabaseUri");function Ua(t,e){return e=Dn(e),xi(e),qf(t)+"/"+A.Path.CollectionsPathSegment+"/"+e}s(Ua,"createDocumentCollectionUri");function n_(t,e){return e=Dn(e),xi(e),qf(t)+"/"+A.Path.UsersPathSegment+"/"+e}s(n_,"createUserUri");function E3(t,e,n){return n=Dn(n),R3(n),Ua(t,e)+"/"+A.Path.DocumentsPathSegment+"/"+n}s(E3,"createDocumentUri");function P3(t,e,n){return n=Dn(n),xi(n),n_(t,e)+"/"+A.Path.PermissionsPathSegment+"/"+n}s(P3,"createPermissionUri");function A3(t,e,n){return n=Dn(n),xi(n),Ua(t,e)+"/"+A.Path.StoredProceduresPathSegment+"/"+n}s(A3,"createStoredProcedureUri");function C3(t,e,n){return n=Dn(n),xi(n),Ua(t,e)+"/"+A.Path.TriggersPathSegment+"/"+n}s(C3,"createTriggerUri");function O3(t,e,n){return n=Dn(n),xi(n),Ua(t,e)+"/"+A.Path.UserDefinedFunctionsPathSegment+"/"+n}s(O3,"createUserDefinedFunctionUri");function mi(t,e){if(e&&e.paths&&e.paths.length>0){let n=[];return e.paths.forEach(r=>{let o=_3(r),c=t;for(let u of o)if(typeof c=="object"&&u in c)c=c[u];else{c=void 0;break}n.push(c)}),n.length===1&&n[0]===void 0?Pa(e):n}}s(mi,"extractPartitionKey");function Pa(t){return t.systemKey===!0?[]:[{}]}s(Pa,"undefinedPartitionKey");async function r_(t,e){return Yw.createHmac("sha256",Buffer.from(t,"base64")).update(e).digest("base64")}s(r_,"hmac");async function I3(t,e,n=w.ResourceType.none,r="",o=new Date){if(t.startsWith("type=sas&"))return{[A.HttpHeaders.Authorization]:encodeURIComponent(t),[A.HttpHeaders.XDate]:o.toUTCString()};let c=await D3(t,e,n,r,o);return{[A.HttpHeaders.Authorization]:c,[A.HttpHeaders.XDate]:o.toUTCString()}}s(I3,"generateHeaders");async function D3(t,e,n,r="",o=new Date){let c="master",u="1.0",p=e.toLowerCase()+` +`+n.toLowerCase()+` +`+r+` +`+o.toUTCString().toLowerCase()+` + +`,d=await r_(t,p);return encodeURIComponent("type="+c+"&ver="+u+"&sig="+d)}s(D3,"signature");async function L3(t,e,n,r,o,c){if(t.permissionFeed){t.resourceTokens={};for(let u of t.permissionFeed){let p=T3(u.resource);if(!p)throw new Error(`authorization error: ${p} is an invalid resourceId in permissionFeed`);t.resourceTokens[p]=u._token}}t.key?await i_(e,r,o,c,t.key):t.resourceTokens?c[A.HttpHeaders.Authorization]=encodeURIComponent(M3(t.resourceTokens,n,r)):t.tokenProvider&&(c[A.HttpHeaders.Authorization]=encodeURIComponent(await t.tokenProvider({verb:e,path:n,resourceId:r,resourceType:o,headers:c})))}s(L3,"setAuthorizationHeader");async function i_(t,e,n,r,o){n===w.ResourceType.offer&&(e=e&&e.toLowerCase()),r=Object.assign(r,await I3(o,t,n,e))}s(i_,"setAuthorizationTokenHeaderUsingMasterKey");function M3(t,e,n){if(t&&Object.keys(t).length>0){if(!e&&!n)return t[Object.keys(t)[0]];if(n&&t[n])return t[n];if(!e||e.length<4)return null;e=Dn(e);let r=e&&e.split("/")||[];if(r.length===6){let c=r.slice(0,4).map(decodeURIComponent).join("/");if(t[c])return t[c]}let o=r.length%2===0?r.length-1:r.length-2;for(;o>0;o-=2){let c=decodeURI(r[o]);if(t[c])return t[c]}}return null}s(M3,"getAuthorizationTokenUsingResourceTokens");var N3=ja.createClientLogger("cosmosdb");function k3(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s(k3,"javaScriptFriendlyJSONStringify");function Ff(t){return typeof t=="object"?k3(t):t}s(Ff,"bodyFromData");var Fw="application/json";async function q3({clientOptions:t,defaultHeaders:e,verb:n,path:r,resourceId:o,resourceType:c,options:u={},partitionKeyRangeId:p,useMultipleWriteLocations:d,partitionKey:m}){let h=Object.assign({[A.HttpHeaders.ResponseContinuationTokenLimitInKB]:1,[A.HttpHeaders.EnableCrossPartitionQuery]:!0},e);return d&&(h[A.HttpHeaders.ALLOW_MULTIPLE_WRITES]=!0),u.continuationTokenLimitInKB&&(h[A.HttpHeaders.ResponseContinuationTokenLimitInKB]=u.continuationTokenLimitInKB),u.continuationToken?h[A.HttpHeaders.Continuation]=u.continuationToken:u.continuation&&(h[A.HttpHeaders.Continuation]=u.continuation),u.preTriggerInclude&&(h[A.HttpHeaders.PreTriggerInclude]=u.preTriggerInclude.constructor===Array?u.preTriggerInclude.join(","):u.preTriggerInclude),u.postTriggerInclude&&(h[A.HttpHeaders.PostTriggerInclude]=u.postTriggerInclude.constructor===Array?u.postTriggerInclude.join(","):u.postTriggerInclude),u.offerType&&(h[A.HttpHeaders.OfferType]=u.offerType),u.offerThroughput&&(h[A.HttpHeaders.OfferThroughput]=u.offerThroughput),u.maxItemCount&&(h[A.HttpHeaders.PageSize]=u.maxItemCount),u.accessCondition&&(u.accessCondition.type==="IfMatch"?h[A.HttpHeaders.IfMatch]=u.accessCondition.condition:h[A.HttpHeaders.IfNoneMatch]=u.accessCondition.condition),u.useIncrementalFeed&&(h[A.HttpHeaders.A_IM]="Incremental Feed"),u.indexingDirective&&(h[A.HttpHeaders.IndexingDirective]=u.indexingDirective),u.consistencyLevel&&(h[A.HttpHeaders.ConsistencyLevel]=u.consistencyLevel),u.maxIntegratedCacheStalenessInMs&&c===w.ResourceType.item&&(typeof u.maxIntegratedCacheStalenessInMs=="number"?h[A.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness]=u.maxIntegratedCacheStalenessInMs.toString():(N3.error(`RangeError: maxIntegratedCacheStalenessInMs "${u.maxIntegratedCacheStalenessInMs}" is not a valid parameter.`),h[A.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness]="null")),u.resourceTokenExpirySeconds&&(h[A.HttpHeaders.ResourceTokenExpiry]=u.resourceTokenExpirySeconds),u.sessionToken&&(h[A.HttpHeaders.SessionToken]=u.sessionToken),u.enableScanInQuery&&(h[A.HttpHeaders.EnableScanInQuery]=u.enableScanInQuery),u.populateQuotaInfo&&(h[A.HttpHeaders.PopulateQuotaInfo]=u.populateQuotaInfo),u.populateQueryMetrics&&(h[A.HttpHeaders.PopulateQueryMetrics]=u.populateQueryMetrics),u.maxDegreeOfParallelism!==void 0&&(h[A.HttpHeaders.ParallelizeCrossPartitionQuery]=!0),u.populateQuotaInfo&&(h[A.HttpHeaders.PopulateQuotaInfo]=!0),m!==void 0&&!h[A.HttpHeaders.PartitionKey]&&((m===null||!Array.isArray(m))&&(m=[m]),h[A.HttpHeaders.PartitionKey]=b3(m)),(t.key||t.tokenProvider)&&(h[A.HttpHeaders.XDate]=new Date().toUTCString()),(n===w.HTTPMethod.post||n===w.HTTPMethod.put)&&(h[A.HttpHeaders.ContentType]||(h[A.HttpHeaders.ContentType]=Fw)),h[A.HttpHeaders.Accept]||(h[A.HttpHeaders.Accept]=Fw),p!==void 0&&(h[A.HttpHeaders.PartitionKeyRangeID]=p),u.enableScriptLogging&&(h[A.HttpHeaders.EnableScriptLogging]=u.enableScriptLogging),u.disableRUPerMinuteUsage&&(h[A.HttpHeaders.DisableRUPerMinuteUsage]=!0),(t.key||t.resourceTokens||t.tokenProvider||t.permissionFeed)&&await L3(t,n,r,o,c,h),h}s(q3,"getHeaders");var o_=Nf.v4;function F3(t,e,n){let r=n.localeCompare(t)>=0,o=n.localeCompare(e)<0;return r&&o}s(F3,"isKeyInRange");var In={Create:"Create",Upsert:"Upsert",Read:"Read",Delete:"Delete",Replace:"Replace",Patch:"Patch"};function B3(t){return t.operationType!=="Patch"&&t.resourceBody!==void 0}s(B3,"hasResource");function j3(t,e){let n=B3(t)?$3(t.resourceBody,e):t.partitionKey&&t.partitionKey.replace(/[[\]"']/g,"")||t.partitionKey;return n==="{}"&&t.partitionKey==="[{}]"?{}:n==="null"&&t.partitionKey==="[null]"?null:n==="0"&&t.partitionKey==="[0]"?0:n}s(j3,"getPartitionKeyToHash");function U3(t,e,n={}){if((t.operationType===In.Create||t.operationType===In.Upsert)&&(t.resourceBody.id===void 0||t.resourceBody.id==="")&&!n.disableAutomaticIdGeneration&&(t.resourceBody.id=o_()),"partitionKey"in t){let r=mi(t,{paths:["/partitionKey"]});return Object.assign(Object.assign({},t),{partitionKey:JSON.stringify(r)})}else if(t.operationType===In.Create||t.operationType===In.Replace||t.operationType===In.Upsert){let r=mi(t.resourceBody,e);return Object.assign(Object.assign({},t),{partitionKey:JSON.stringify(r)})}else if(t.operationType===In.Read||t.operationType===In.Delete)return Object.assign(Object.assign({},t),{partitionKey:"[{}]"});return t}s(U3,"decorateOperation");function H3(t){if((t==null?void 0:t.operations)===void 0||t.operations.length<1)return[];let e=Bw(t.operations[0]),n=Object.assign(Object.assign({},t),{operations:[t.operations[0]],indexes:[t.indexes[0]]}),r=[];r.push(n);for(let o=1;oA.DefaultMaxBulkRequestBodySizeInBytes&&(n=Object.assign(Object.assign({},t),{operations:[],indexes:[]}),r.push(n),e=0),n.operations.push(c),n.indexes.push(t.indexes[o]),e+=u}return r}s(H3,"splitBatchBasedOnBodySize");function Bw(t){return new TextEncoder().encode(Ff(t)).length}s(Bw,"calculateObjectSizeInBytes");function z3(t,e={}){return(t.operationType===In.Create||t.operationType===In.Upsert)&&(t.resourceBody.id===void 0||t.resourceBody.id==="")&&!e.disableAutomaticIdGeneration&&(t.resourceBody.id=o_()),t}s(z3,"decorateBatchOperation");function $3(t,e){let n=e.split("/"),r=t;for(let o of n)if(o in r)r=r[o];else return o!=="_partitionKey"&&console.warn(`Partition key not found, using undefined: ${e} at ${o}`),"{}";return r}s($3,"deepFind");var W3={add:"add",replace:"replace",remove:"remove",set:"set",incr:"incr"};w.ConnectionMode=void 0;(function(t){t[t.Gateway=0]="Gateway"})(w.ConnectionMode||(w.ConnectionMode={}));var jw=Object.freeze({connectionMode:w.ConnectionMode.Gateway,requestTimeout:6e4,enableEndpointDiscovery:!0,preferredLocations:[],retryOptions:{maxRetryAttemptCount:9,fixedRetryIntervalInMilliseconds:0,maxWaitTimeInSeconds:30},useMultipleWriteLocations:!0,endpointRefreshRateInMs:3e5,enableBackgroundEndpointRefreshing:!0});w.ConsistencyLevel=void 0;(function(t){t.Strong="Strong",t.BoundedStaleness="BoundedStaleness",t.Session="Session",t.Eventual="Eventual",t.ConsistentPrefix="ConsistentPrefix"})(w.ConsistencyLevel||(w.ConsistencyLevel={}));var Hf=class Hf{constructor(e,n){this.writableLocations=[],this.readableLocations=[],this.databasesLink="/dbs/",this.mediaLink="/media/",this.maxMediaStorageUsageInMB=n[A.HttpHeaders.MaxMediaStorageUsageInMB],this.currentMediaStorageUsageInMB=n[A.HttpHeaders.CurrentMediaStorageUsageInMB],this.consistencyPolicy=e.userConsistencyPolicy?e.userConsistencyPolicy.defaultConsistencyLevel:w.ConsistencyLevel.Session,e[A.WritableLocations]&&e.id!=="localhost"&&(this.writableLocations=e[A.WritableLocations]),e[A.ReadableLocations]&&e.id!=="localhost"&&(this.readableLocations=e[A.ReadableLocations]),e[A.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]&&(this.enableMultipleWritableLocations=e[A.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]===!0||e[A.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]==="true")}get DatabasesLink(){return this.databasesLink}get MediaLink(){return this.mediaLink}get MaxMediaStorageUsageInMB(){return this.maxMediaStorageUsageInMB}get CurrentMediaStorageUsageInMB(){return this.currentMediaStorageUsageInMB}get ConsistencyPolicy(){return this.consistencyPolicy}};s(Hf,"DatabaseAccount");var ou=Hf;w.DataType=void 0;(function(t){t.Number="Number",t.String="String",t.Point="Point",t.LineString="LineString",t.Polygon="Polygon",t.MultiPolygon="MultiPolygon"})(w.DataType||(w.DataType={}));w.IndexingMode=void 0;(function(t){t.consistent="consistent",t.lazy="lazy",t.none="none"})(w.IndexingMode||(w.IndexingMode={}));w.SpatialType=void 0;(function(t){t.LineString="LineString",t.MultiPolygon="MultiPolygon",t.Point="Point",t.Polygon="Polygon"})(w.SpatialType||(w.SpatialType={}));w.IndexKind=void 0;(function(t){t.Range="Range",t.Spatial="Spatial"})(w.IndexKind||(w.IndexKind={}));w.PermissionMode=void 0;(function(t){t.None="none",t.Read="read",t.All="all"})(w.PermissionMode||(w.PermissionMode={}));w.TriggerOperation=void 0;(function(t){t.All="all",t.Create="create",t.Update="update",t.Delete="delete",t.Replace="replace"})(w.TriggerOperation||(w.TriggerOperation={}));w.TriggerType=void 0;(function(t){t.Pre="pre",t.Post="post"})(w.TriggerType||(w.TriggerType={}));w.UserDefinedFunctionType=void 0;(function(t){t.Javascript="Javascript"})(w.UserDefinedFunctionType||(w.UserDefinedFunctionType={}));w.GeospatialType=void 0;(function(t){t.Geography="Geography",t.Geometry="Geometry"})(w.GeospatialType||(w.GeospatialType={}));var zf=class zf extends Error{};s(zf,"ErrorResponse");var au=zf,$f=class $f{constructor(e,n,r,o){this.resource=e,this.headers=n,this.statusCode=r,this.substatus=o}get requestCharge(){return Number(this.headers[A.HttpHeaders.RequestCharge])||0}get activityId(){return this.headers[A.HttpHeaders.ActivityId]}get etag(){return this.headers[A.HttpHeaders.ETag]}};s($f,"ResourceResponse");var ot=$f,Wf=class Wf{constructor(e,n,r){this.resources=e,this.headers=n,this.hasMoreResults=r}get continuation(){return this.continuationToken}get continuationToken(){return this.headers[A.HttpHeaders.Continuation]}get queryMetrics(){return this.headers[A.HttpHeaders.QueryMetrics]}get requestCharge(){return this.headers[A.HttpHeaders.RequestCharge]}get activityId(){return this.headers[A.HttpHeaders.ActivityId]}};s(Wf,"FeedResponse");var go=Wf,uf="TimeoutError",Kf=class Kf extends Error{constructor(e="Timeout Error"){super(e),this.code=uf,this.name=uf}};s(Kf,"TimeoutError");var su=Kf,Pu=class Pu{constructor(e){this.requestCharge=e}add(...e){let n=this.requestCharge;for(let r of e){if(r==null)throw new Error("clientSideMetrics has null or undefined item(s)");n+=r.requestCharge}return new Pu(n)}static createFromArray(...e){if(e==null)throw new Error("clientSideMetricsArray is null or undefined item(s)");return this.zero.add(...e)}};s(Pu,"ClientSideMetrics");var Xn=Pu;Xn.zero=new Xn(0);var ue={RetrievedDocumentCount:"retrievedDocumentCount",RetrievedDocumentSize:"retrievedDocumentSize",OutputDocumentCount:"outputDocumentCount",OutputDocumentSize:"outputDocumentSize",IndexHitRatio:"indexUtilizationRatio",IndexHitDocumentCount:"indexHitDocumentCount",TotalQueryExecutionTimeInMs:"totalExecutionTimeInMs",QueryCompileTimeInMs:"queryCompileTimeInMs",LogicalPlanBuildTimeInMs:"queryLogicalPlanBuildTimeInMs",PhysicalPlanBuildTimeInMs:"queryPhysicalPlanBuildTimeInMs",QueryOptimizationTimeInMs:"queryOptimizationTimeInMs",IndexLookupTimeInMs:"indexLookupTimeInMs",DocumentLoadTimeInMs:"documentLoadTimeInMs",VMExecutionTimeInMs:"VMExecutionTimeInMs",DocumentWriteTimeInMs:"writeOutputTimeInMs",QueryEngineTimes:"queryEngineTimes",SystemFunctionExecuteTimeInMs:"systemFunctionExecuteTimeInMs",UserDefinedFunctionExecutionTimeInMs:"userFunctionExecuteTimeInMs",RetrievedDocumentCountText:"Retrieved Document Count",RetrievedDocumentSizeText:"Retrieved Document Size",OutputDocumentCountText:"Output Document Count",OutputDocumentSizeText:"Output Document Size",IndexUtilizationText:"Index Utilization",TotalQueryExecutionTimeText:"Total Query Execution Time",QueryPreparationTimesText:"Query Preparation Times",QueryCompileTimeText:"Query Compilation Time",LogicalPlanBuildTimeText:"Logical Plan Build Time",PhysicalPlanBuildTimeText:"Physical Plan Build Time",QueryOptimizationTimeText:"Query Optimization Time",QueryEngineTimesText:"Query Engine Times",IndexLookupTimeText:"Index Lookup Time",DocumentLoadTimeText:"Document Load Time",WriteOutputTimeText:"Document Write Time",RuntimeExecutionTimesText:"Runtime Execution Times",TotalExecutionTimeText:"Query Engine Execution Time",SystemFunctionExecuteTimeText:"System Function Execution Time",UserDefinedFunctionExecutionTimeText:"User-defined Function Execution Time",ClientSideQueryMetricsText:"Client Side Metrics",RetriesText:"Retry Count",RequestChargeText:"Request Charge",FetchExecutionRangesText:"Partition Execution Timeline",SchedulingMetricsText:"Scheduling Metrics"},pi=1e4,K3=1/pi,Bf=pi*1e3,G3=1/Bf,a_=Bf*60,Q3=1/a_,jf=a_*60,V3=1/jf,s_=jf*24,J3=1/s_,c_=1e3,u_=c_*60,l_=u_*60,Y3=l_*24,Uw=Number.MAX_SAFE_INTEGER/pi,Hw=Number.MIN_SAFE_INTEGER/pi,$e=class $e{constructor(e,n,r,o,c){if(!Number.isInteger(e))throw new Error("days is not an integer");if(!Number.isInteger(n))throw new Error("hours is not an integer");if(!Number.isInteger(r))throw new Error("minutes is not an integer");if(!Number.isInteger(o))throw new Error("seconds is not an integer");if(!Number.isInteger(c))throw new Error("milliseconds is not an integer");let u=(e*3600*24+n*3600+r*60+o)*1e3+c;if(u>Uw||u=0?this._ticks:-this._ticks)}equals(e){return $e.isTimeSpan(e)?this._ticks===e._ticks:!1}negate(){return $e.fromTicks(-this._ticks)}days(){return Math.floor(this._ticks/s_)}hours(){return Math.floor(this._ticks/jf)}milliseconds(){return Math.floor(this._ticks/pi)}seconds(){return Math.floor(this._ticks/Bf)}ticks(){return this._ticks}totalDays(){return this._ticks*J3}totalHours(){return this._ticks*V3}totalMilliseconds(){return this._ticks*K3}totalMinutes(){return this._ticks*Q3}totalSeconds(){return this._ticks*G3}static fromTicks(e){let n=new $e(0,0,0,0,0);return n._ticks=e,n}static isTimeSpan(e){return e._ticks}static additionDoesOverflow(e,n){let r=e+n;return e!==r-n||n!==r-e}static subtractionDoesUnderflow(e,n){let r=e-n;return e!==r+n||n!==e-r}static compare(e,n){return e._ticks>n._ticks?1:e._ticksUw||r=this.fetchFunctions.length?(this.state=en.STATES.ended,{result:void 0,headers:n}):this.current():{result:this.resources[this.currentIndex],headers:n}}else return this.state=en.STATES.ended,{result:void 0,headers:Xe()}}hasMoreResults(){return this.state===en.STATES.start||this.continuationToken!==void 0||this.currentIndex=this.fetchFunctions.length)return{headers:Xe(),result:void 0};let e=this.options.continuationToken||this.options.continuation;if(this.options.continuationToken=this.continuationToken,this.currentPartitionIndex>=this.fetchFunctions.length)return{headers:Xe(),result:void 0};let n,r;try{let o;this.nextFetchFunction!==void 0?(zw.verbose("using prefetch"),o=this.nextFetchFunction,this.nextFetchFunction=void 0):(zw.verbose("using fresh fetch"),o=this.fetchFunctions[this.currentPartitionIndex](this.options));let c=await o;if(n=c.result,r=c.headers,this.continuationToken=r[A.HttpHeaders.Continuation],this.continuationToken||++this.currentPartitionIndex,this.options&&this.options.bufferItems===!0){let u=this.fetchFunctions[this.currentPartitionIndex];this.nextFetchFunction=u?u(Object.assign(Object.assign({},this.options),{continuationToken:this.continuationToken})):void 0}}catch(o){throw this.state=en.STATES.ended,o}if(this.state=en.STATES.inProgress,this.currentIndex=0,this.options.continuationToken=e,this.options.continuation=e,A.HttpHeaders.QueryMetrics in r){let o=r[A.HttpHeaders.QueryMetrics],c=Er.createFromDelimitedString(o);if(A.HttpHeaders.RequestCharge in r){let u=Number(r[A.HttpHeaders.RequestCharge])||0;c=new Er(c.retrievedDocumentCount,c.retrievedDocumentSize,c.outputDocumentCount,c.outputDocumentSize,c.indexHitDocumentCount,c.totalQueryExecutionTime,c.queryPreparationTimes,c.indexLookupTime,c.documentLoadTime,c.vmExecutionTime,c.runtimeExecutionTimes,c.documentWriteTime,new Xn(u))}r[A.HttpHeaders.QueryMetrics]={},r[A.HttpHeaders.QueryMetrics][0]=c}return{result:n,headers:r}}_canFetchMore(){return this.state===en.STATES.start||this.continuationToken&&this.state===en.STATES.inProgress||this.currentPartitionIndext===e?0:t>e?1:-1},number:{ord:4,compFunc:(t,e)=>t===e?0:t>e?1:-1},string:{ord:5,compFunc:(t,e)=>t===e?0:t>e?1:-1}}),Vf=class Vf{constructor(e){this.sortOrder=e}targetPartitionKeyRangeDocProdComparator(e,n){let r=e.getTargetParitionKeyRange().minInclusive,o=n.getTargetParitionKeyRange().minInclusive;return r===o?0:r>o?1:-1}compare(e,n){if(e.gotSplit())return-1;if(n.gotSplit())return 1;let r=this.getOrderByItems(e.peekBufferedItems()[0]),o=this.getOrderByItems(n.peekBufferedItems()[0]);this.validateOrderByItems(r,o);for(let c=0;c"u")throw new Error("Cannot find the comparison function");return d(e,r)}compareOrderByItem(e,n){let r=this.getType(e),o=this.getType(n);return this.compareValue(e.item,r,n.item,o)}validateOrderByItems(e,n){if(e.length!==n.length)throw new Error(`Expected ${e.length}, but got ${n.length}.`);if(e.length!==this.sortOrder.length)throw new Error("orderByItems cannot have a different size than sort orders.");for(let r=0;r0&&(this.value=e.max)}getResult(){return this.value}};s(Jf,"MaxAggregator");var ff=Jf,Yf=class Yf{constructor(){this.value=void 0,this.comparer=new Ca(["Ascending"])}aggregate(e){if(this.value===void 0)this.value=e.min;else{let n=e.min===null?"NoValue":typeof e.min,r=this.value===null?"NoValue":typeof this.value;this.comparer.compareValue(e.min,n,this.value,r)<0&&(this.value=e.min)}}getResult(){return this.value}};s(Yf,"MinAggregator");var hf=Yf,Xf=class Xf{aggregate(e){e!==void 0&&(this.sum===void 0?this.sum=e:this.sum+=e)}getResult(){return this.sum}};s(Xf,"SumAggregator");var mf=Xf,Zf=class Zf{aggregate(e){this.value===void 0&&(this.value=e)}getResult(){return this.value}};s(Zf,"StaticValueAggregator");var gf=Zf;function p_(t){switch(t){case"Average":return new pf;case"Count":return new df;case"Max":return new ff;case"Min":return new hf;case"Sum":return new mf;default:return new gf}}s(p_,"createAggregator");var St;(function(t){t[t.Done=0]="Done",t[t.Exception=1]="Exception",t[t.Result=2]="Result"})(St||(St={}));var eh=class eh{constructor(e,n){e!==void 0?(this.feedResponse=e,this.fetchResultType=St.Result):(this.error=n,this.fetchResultType=St.Exception)}};s(eh,"FetchResult");var cu=eh,Ta=class Ta{constructor(e,n,r,o,c){this.clientContext=e,this.generation=0,this.fetchFunction=async u=>{let p=V(this.collectionLink,w.ResourceType.item),d=X(this.collectionLink);return this.clientContext.queryFeed({path:p,resourceType:w.ResourceType.item,resourceId:d,resultFn:m=>m.Documents,query:this.query,options:u,partitionKeyRangeId:this.targetPartitionKeyRange.id})},this.collectionLink=n,this.query=r,this.targetPartitionKeyRange=o,this.fetchResults=[],this.allFetched=!1,this.err=void 0,this.previousContinuationToken=void 0,this.continuationToken=void 0,this.respHeaders=Xe(),this.internalExecutionContext=new Aa(c,this.fetchFunction)}peekBufferedItems(){let e=[];for(let n=0,r=!1;n{this.fetchResults.push(new cu(r,void 0))}),n!=null&&A.HttpHeaders.QueryMetrics in n){let r=n[A.HttpHeaders.QueryMetrics][0];n[A.HttpHeaders.QueryMetrics]={},n[A.HttpHeaders.QueryMetrics][this.targetPartitionKeyRange.id]=r}return{result:e,headers:n}}catch(e){if(Ta._needPartitionKeyRangeCacheRefresh(e)){let n=new cu(void 0,e);return this.fetchResults.push(n),{result:[n],headers:e.headers}}else throw this._updateStates(e,e.resources===void 0),e}}getTargetParitionKeyRange(){return this.targetPartitionKeyRange}async nextItem(){if(this.err)throw this._updateStates(this.err,void 0),this.err;try{let{result:e,headers:n}=await this.current(),r=this.fetchResults.shift();if(this._updateStates(void 0,e===void 0),r.feedResponse!==e)throw new Error(`Expected ${r.feedResponse} to equal ${e}`);switch(r.fetchResultType){case St.Done:return{result:void 0,headers:n};case St.Exception:throw r.error.headers=n,r.error;case St.Result:return{result:r.feedResponse,headers:n}}}catch(e){throw this._updateStates(e,e.item===void 0),e}}async current(){if(this.fetchResults.length>0){let r=this.fetchResults[0];switch(r.fetchResultType){case St.Done:return{result:void 0,headers:this._getAndResetActiveResponseHeaders()};case St.Exception:throw r.error.headers=this._getAndResetActiveResponseHeaders(),r.error;case St.Result:return{result:r.feedResponse,headers:this._getAndResetActiveResponseHeaders()}}}if(this.allFetched)return{result:void 0,headers:this._getAndResetActiveResponseHeaders()};let{result:e,headers:n}=await this.bufferMore();return gn(this.respHeaders,n),e===void 0?{result:void 0,headers:this.respHeaders}:this.current()}};s(Ta,"DocumentProducer");var yf=Ta,Sa=class Sa{constructor(e,n,r,o){this.min=e,this.max=n,this.isMinInclusive=r,this.isMaxInclusive=o}overlaps(e){let n=this,r=e;return n===void 0||r===void 0||n.isEmpty()||r.isEmpty()?!1:n.min<=r.max||r.min<=n.max?!(n.min===r.max&&!(n.isMinInclusive&&r.isMaxInclusive)||r.min===n.max&&!(r.isMinInclusive&&n.isMaxInclusive)):!1}isFullRange(){return this.min===A.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey&&this.max===A.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey&&this.isMinInclusive===!0&&this.isMaxInclusive===!1}isEmpty(){return!(this.isMinInclusive&&this.isMaxInclusive)&&this.min===this.max}static parsePartitionKeyRange(e){return new Sa(e[A.PartitionKeyRange.MinInclusive],e[A.PartitionKeyRange.MaxExclusive],!0,!1)}static parseFromDict(e){return new Sa(e.min,e.max,e.isMinInclusive,e.isMaxInclusive)}};s(Sa,"QueryRange");var gi=Sa,th=class th{constructor(e,n){this.orderedPartitionKeyRanges=e,this.orderedRanges=e.map(r=>new gi(r[A.PartitionKeyRange.MinInclusive],r[A.PartitionKeyRange.MaxExclusive],!0,!1)),this.orderedPartitionInfo=n}getOrderedParitionKeyRanges(){return this.orderedPartitionKeyRanges}getOverlappingRanges(e){let n=Array.isArray(e)?e:[e],r={};for(let c of n){if(c.isEmpty())continue;if(c.isFullRange())return this.orderedPartitionKeyRanges;let u=this.orderedRanges.findIndex(d=>{if(c.min>d.min&&c.min=0;d--){let m=this.orderedRanges[d];if(c.max>m.min&&c.maxthis.orderedRanges.length)throw new Error("error in collection routing map, queried value is greater than the end range.");for(let d=u;dr[c]).sort((c,u)=>c[A.PartitionKeyRange.MinInclusive].localeCompare(u[A.PartitionKeyRange.MinInclusive]))}};s(th,"InMemoryCollectionRoutingMap");var xf=th;function Z3(t,e){let n=t[0][A.PartitionKeyRange.MinInclusive],r=e[0][A.PartitionKeyRange.MinInclusive];return n>r?1:nu[0]),c=r.map(u=>u[1]);if(tq(o))return new xf(o,c)}s(eq,"createCompleteRoutingMap");function tq(t){let e=!1;if(t.length>0){let n=t[0],r=t[t.length-1];e=n[A.PartitionKeyRange.MinInclusive]===A.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey,e=e&&r[A.PartitionKeyRange.MaxExclusive]===A.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey;for(let o=1;ou[A.PartitionKeyRange.MinInclusive])throw Error("Ranges overlap");break}}}return e}s(tq,"isCompleteSetOfRange");var nh=class nh{constructor(e){this.clientContext=e,this.collectionRoutingMapByCollectionId={}}async onCollectionRoutingMap(e){let n=X(e);return this.collectionRoutingMapByCollectionId[n]===void 0&&(this.collectionRoutingMapByCollectionId[n]=this.requestCollectionRoutingMap(e)),this.collectionRoutingMapByCollectionId[n]}async getOverlappingRanges(e,n){return(await this.onCollectionRoutingMap(e)).getOverlappingRanges(n)}async requestCollectionRoutingMap(e){let{resources:n}=await this.clientContext.queryPartitionKeyRanges(e).fetchAll();return eq(n.map(r=>[r,!0]))}};s(nh,"PartitionKeyRangeCache");var vf=nh,nq=A.PartitionKeyRange,li=class li{constructor(e){this.partitionKeyRangeCache=new vf(e)}static _secondRangeIsAfterFirstRange(e,n){if(typeof e.max>"u")throw new Error("range1 must have max");if(typeof n.min>"u")throw new Error("range2 must have min");return e.max>n.min?!1:!(e.max===n.min&&e.isMaxInclusive&&n.isMinInclusive)}static _isSortedAndNonOverlapping(e){for(let n=1;n=n?e:n}static _stringCompare(e,n){return e===n?0:e>n?1:-1}static _subtractRange(e,n){let r=this._stringMax(n[nq.MaxExclusive],e.min),o=this._stringCompare(r,e.min)===0?e.isMinInclusive:!1;return new gi(r,e.max,o,e.isMaxInclusive)}async getOverlappingRanges(e,n){if(!li._isSortedAndNonOverlapping(n))throw new Error("the list of ranges is not a non-overlapping sorted ranges");let r=[];if(n.length===0)return r;let o=await this.partitionKeyRangeCache.onCollectionRoutingMap(e),c=0,u=n[c];for(;;){if(u.isEmpty()){if(++c>=n.length)return r;u=n[c];continue}let p;r.length>0?p=li._subtractRange(u,r[r.length-1]):p=u;let d=o.getOverlappingRanges(p);if(d.length<=0)throw new Error(`error: returned overlapping ranges for queryRange ${p} is empty`);r=r.concat(d);let m=gi.parsePartitionKeyRange(r[r.length-1]);if(!m)throw new Error("expected lastKnowTargetRange to be truthy");if(li._stringCompare(u.max,m.max)>0)throw new Error(`error: returned overlapping ranges ${d} does not contain the requested range ${p}`);if(++c>=n.length)return r;for(u=n[c];li._stringCompare(u.max,m.max)<=0;){if(++c>=n.length)return r;u=n[c]}}}};s(li,"SmartRoutingMapProvider");var uu=li,rq=ja.createClientLogger("parallelQueryExecutionContextBase"),bf;(function(t){t.started="started",t.inProgress="inProgress",t.ended="ended"})(bf||(bf={}));var Jn=class Jn{constructor(e,n,r,o,c){this.clientContext=e,this.collectionLink=n,this.query=r,this.options=o,this.partitionedQueryExecutionInfo=c,this.clientContext=e,this.collectionLink=n,this.query=r,this.options=o,this.partitionedQueryExecutionInfo=c,this.err=void 0,this.state=Jn.STATES.started,this.routingProvider=new uu(this.clientContext),this.sortOrders=this.partitionedQueryExecutionInfo.queryInfo.orderBy,this.requestContinuation=o?o.continuationToken||o.continuation:null,this.respHeaders=Xe(),this.orderByPQ=new y3.default((p,d)=>this.documentProducerComparator(d,p)),this.sem=Mw.default(1);let u=s(async()=>{try{let p=await this._onTargetPartitionRanges();this.waitingForInternalExecutionContexts=p.length;let d=o.maxDegreeOfParallelism===void 0||o.maxDegreeOfParallelism<1?p.length:Math.min(o.maxDegreeOfParallelism,p.length);rq.info("Query starting against "+p.length+" ranges with parallelism of "+d);let m=Mw.default(d),h=[],y=[];if(this.requestContinuation)throw new Error("Continuation tokens are not yet supported for cross partition queries");h=p,h.forEach(v=>{y.push(this._createTargetPartitionQueryExecutionContext(v))}),y.forEach(v=>{let P=s(async()=>{try{let{result:_,headers:T}=await v.current();if(this._mergeWithActiveResponseHeaders(T),_===void 0)return;try{this.orderByPQ.enq(v)}catch(I){this.err=I}}catch(_){this._mergeWithActiveResponseHeaders(_.headers),this.err=_}finally{m.leave(),this._decrementInitiationLock()}},"throttledFunc");m.take(P)})}catch(p){this.err=p,this.sem.leave();return}},"createDocumentProducersAndFillUpPriorityQueueFunc");this.sem.take(u)}_decrementInitiationLock(){this.waitingForInternalExecutionContexts=this.waitingForInternalExecutionContexts-1,this.waitingForInternalExecutionContexts===0&&(this.sem.leave(),this.orderByPQ.size()===0&&(this.state=Jn.STATES.inProgress))}_mergeWithActiveResponseHeaders(e){gn(this.respHeaders,e)}_getAndResetActiveResponseHeaders(){let e=this.respHeaders;return this.respHeaders=Xe(),e}async _onTargetPartitionRanges(){let n=this.partitionedQueryExecutionInfo.queryRanges.map(r=>gi.parseFromDict(r));return this.routingProvider.getOverlappingRanges(this.collectionLink,n)}async _getReplacementPartitionKeyRanges(e){let n=e.targetPartitionKeyRange;this.routingProvider=new uu(this.clientContext);let r=gi.parsePartitionKeyRange(n);return this.routingProvider.getOverlappingRanges(this.collectionLink,[r])}async _repairExecutionContext(e){let n=this.orderByPQ.deq();try{let r=await this._getReplacementPartitionKeyRanges(n),o=[];r.forEach(p=>{let d=this._createTargetPartitionQueryExecutionContext(p,n.continuationToken);o.push(d)});let c=s(async(p,d)=>{try{let{result:m}=await p.current();m===void 0||this.orderByPQ.enq(p),await d()}catch(m){this.err=m;return}},"checkAndEnqueueDocumentProducer"),u=s(async p=>{if(p.length>0){let d=p.shift();await c(d,async()=>{await u(p)})}else return e()},"checkAndEnqueueDocumentProducers");await u(o)}catch(r){throw this.err=r,r}}static _needPartitionKeyRangeCacheRefresh(e){return e.code===vt.Gone&&"substatus"in e&&e.substatus===mo.PartitionKeyRangeGone}async _repairExecutionContextIfNeeded(e,n){let r=this.orderByPQ.peek();try{await r.current(),n()}catch(o){if(Jn._needPartitionKeyRangeCacheRefresh(o))return this._repairExecutionContext(e);throw this.err=o,o}}async nextItem(){if(this.err)throw this.err;return new Promise((e,n)=>{this.sem.take(()=>{if(this.err){this.sem.leave(),this.err.headers=this._getAndResetActiveResponseHeaders(),n(this.err);return}if(this.orderByPQ.size()===0)return this.state=Jn.STATES.ended,this.sem.leave(),e({result:void 0,headers:this._getAndResetActiveResponseHeaders()});let r=s(()=>(this.sem.leave(),e(this.nextItem())),"ifCallback"),o=s(async()=>{let c;try{c=this.orderByPQ.deq()}catch(d){this.err=d,this.sem.leave(),this.err.headers=this._getAndResetActiveResponseHeaders(),n(this.err);return}let u,p;try{let d=await c.nextItem();if(u=d.result,p=d.headers,this._mergeWithActiveResponseHeaders(p),u===void 0)return this.err=new Error("Extracted DocumentProducer from the priority queue doesn't have any buffered item!"),this.sem.leave(),e({result:void 0,headers:this._getAndResetActiveResponseHeaders()})}catch(d){this.err=new Error(`Extracted DocumentProducer from the priority queue fails to get the buffered item. Due to ${JSON.stringify(d)}`),this.err.headers=this._getAndResetActiveResponseHeaders(),this.sem.leave(),n(this.err);return}try{let{result:d,headers:m}=await c.current();if(this._mergeWithActiveResponseHeaders(m),d!==void 0)try{if(typeof c.fetchResults[0]>"u")throw new Error("Extracted DocumentProducer from PQ is invalid state with no result!");this.orderByPQ.enq(c)}catch(h){this.err=h}}catch(d){Jn._needPartitionKeyRangeCacheRefresh(d)?this.orderByPQ.enq(c):(this.err=d,n(this.err))}finally{this.sem.leave()}return e({result:u,headers:this._getAndResetActiveResponseHeaders()})},"elseCallback");this._repairExecutionContextIfNeeded(r,o).catch(n)})})}hasMoreResults(){return!(this.state===Jn.STATES.ended||this.err!==void 0)}_createTargetPartitionQueryExecutionContext(e,n){let r=this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery,o,c=this.query;typeof c=="string"?o={query:c}:o=c,r&&(o=JSON.parse(JSON.stringify(o)),r=r.replace("{documentdb-formattableorderbyquery-filter}","true"),o.query=r);let p=Object.assign({},this.options);return p.continuationToken=n,new yf(this.clientContext,this.collectionLink,o,e,p)}};s(Jn,"ParallelQueryExecutionContextBase");var Oa=Jn;Oa.STATES=bf;var rh=class rh extends Oa{documentProducerComparator(e,n){return e.generation-n.generation}};s(rh,"ParallelQueryExecutionContext");var wf=rh,ih=class ih extends Oa{constructor(e,n,r,o,c){super(e,n,r,o,c),this.orderByComparator=new Ca(this.sortOrders)}documentProducerComparator(e,n){return this.orderByComparator.compare(e,n)}};s(ih,"OrderByQueryExecutionContext");var _f=ih,oh=class oh{constructor(e,n,r){this.executionContext=e,this.offset=n,this.limit=r}async nextItem(){let e=Xe();for(;this.offset>0;){let{headers:n}=await this.executionContext.nextItem();this.offset--,gn(e,n)}if(this.limit>0){let{result:n,headers:r}=await this.executionContext.nextItem();return this.limit--,gn(e,r),{result:n,headers:e}}return{result:void 0,headers:Xe()}}hasMoreResults(){return(this.offset>0||this.limit>0)&&this.executionContext.hasMoreResults()}};s(oh,"OffsetLimitEndpointComponent");var lu=oh,ah=class ah{constructor(e){this.executionContext=e}async nextItem(){let{result:e,headers:n}=await this.executionContext.nextItem();return{result:e!==void 0?e.payload:void 0,headers:n}}hasMoreResults(){return this.executionContext.hasMoreResults()}};s(ah,"OrderByEndpointComponent");var Rf=ah;async function iq(t){let e=Yw.createHash("sha256");return e.update(t,"utf8"),e.digest("hex")}s(iq,"digest");async function Du(t){let e=g3.default(t);return iq(e)}s(Du,"hashObject");var sh=class sh{constructor(e){this.executionContext=e}async nextItem(){let{headers:e,result:n}=await this.executionContext.nextItem();if(n){let r=await Du(n);if(r===this.hashedLastResult)return{result:void 0,headers:e};this.hashedLastResult=r}return{result:n,headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()}};s(sh,"OrderedDistinctEndpointComponent");var Tf=sh,ch=class ch{constructor(e){this.executionContext=e,this.hashedResults=new Set}async nextItem(){let{headers:e,result:n}=await this.executionContext.nextItem();if(n){let r=await Du(n);if(this.hashedResults.has(r))return{result:void 0,headers:e};this.hashedResults.add(r)}return{result:n,headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()}};s(ch,"UnorderedDistinctEndpointComponent");var Sf=ch,d_="__empty__",Ef=s(t=>Object.keys(t).length>0?t.item2?t.item2:t.item:null,"extractAggregateResult"),uh=class uh{constructor(e,n){this.executionContext=e,this.queryInfo=n,this.groupings=new Map,this.aggregateResultArray=[],this.completed=!1}async nextItem(){if(this.aggregateResultArray.length>0)return{result:this.aggregateResultArray.pop(),headers:Xe()};if(this.completed)return{result:void 0,headers:Xe()};let e=Xe();for(;this.executionContext.hasMoreResults();){let{result:n,headers:r}=await this.executionContext.nextItem();if(gn(e,r),n){let o=n.groupByItems?await Du(n.groupByItems):d_,c=this.groupings.get(o),u=n.payload;if(c)Object.keys(u).map(p=>{let d=u[p]?u[p]:new Map().set("item2",null),m=Ef(d);c.get(p).aggregate(m)});else{let p=new Map;this.groupings.set(o,p),Object.keys(u).map(d=>{let m=this.queryInfo.groupByAliasToAggregateType[d],h=p_(m);if(p.set(d,h),m){let y=Ef(u[d]);h.aggregate(y)}else h.aggregate(u[d])})}}}for(let n of this.groupings.values()){let r={};for(let[o,c]of n.entries())r[o]=c.getResult();this.aggregateResultArray.push(r)}return this.completed=!0,{result:this.aggregateResultArray.pop(),headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()||this.aggregateResultArray.length>0}};s(uh,"GroupByEndpointComponent");var Pf=uh,lh=class lh{constructor(e,n){this.executionContext=e,this.queryInfo=n,this.aggregators=new Map,this.aggregateResultArray=[],this.completed=!1,this.aggregateType=this.queryInfo.aggregates[0]}async nextItem(){if(this.aggregateResultArray.length>0)return{result:this.aggregateResultArray.pop(),headers:Xe()};if(this.completed)return{result:void 0,headers:Xe()};let e=Xe();for(;this.executionContext.hasMoreResults();){let{result:n,headers:r}=await this.executionContext.nextItem();if(gn(e,r),n){let o=d_,c=n;if(n.groupByItems&&(c=n.payload,o=await Du(n.groupByItems)),this.aggregators.get(o)||this.aggregators.set(o,p_(this.aggregateType)),this.aggregateType){let p=Ef(c[0]);p===null&&(this.completed=!0),this.aggregators.get(o).aggregate(p)}else this.aggregators.get(o).aggregate(c)}}if(this.completed)return{result:void 0,headers:e};for(let n of this.aggregators.values())this.aggregateResultArray.push(n.getResult());return this.completed=!0,{result:this.aggregateResultArray.pop(),headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()||this.aggregateResultArray.length>0}};s(lh,"GroupByValueEndpointComponent");var Af=lh,Au=class Au{constructor(e,n,r,o,c){this.clientContext=e,this.collectionLink=n,this.query=r,this.options=o,this.partitionedQueryExecutionInfo=c,this.endpoint=null,this.pageSize=o.maxItemCount,this.pageSize===void 0&&(this.pageSize=Au.DEFAULT_PAGE_SIZE);let u=c.queryInfo.orderBy;Array.isArray(u)&&u.length>0?this.endpoint=new Rf(new _f(this.clientContext,this.collectionLink,this.query,this.options,this.partitionedQueryExecutionInfo)):this.endpoint=new wf(this.clientContext,this.collectionLink,this.query,this.options,this.partitionedQueryExecutionInfo),(Object.keys(c.queryInfo.groupByAliasToAggregateType).length>0||c.queryInfo.aggregates.length>0||c.queryInfo.groupByExpressions.length>0)&&(c.queryInfo.hasSelectValue?this.endpoint=new Af(this.endpoint,c.queryInfo):this.endpoint=new Pf(this.endpoint,c.queryInfo));let p=c.queryInfo.top;typeof p=="number"&&(this.endpoint=new lu(this.endpoint,0,p));let d=c.queryInfo.limit,m=c.queryInfo.offset;typeof d=="number"&&typeof m=="number"&&(this.endpoint=new lu(this.endpoint,m,d));let h=c.queryInfo.distinctType;h==="Ordered"&&(this.endpoint=new Tf(this.endpoint)),h==="Unordered"&&(this.endpoint=new Sf(this.endpoint))}async nextItem(){return this.endpoint.nextItem()}hasMoreResults(){return this.endpoint.hasMoreResults()}async fetchMore(){return typeof this.endpoint.fetchMore=="function"?this.endpoint.fetchMore():(this.fetchBuffer=[],this.fetchMoreRespHeaders=Xe(),this._fetchMoreImplementation())}async _fetchMoreImplementation(){try{let{result:e,headers:n}=await this.endpoint.nextItem();if(gn(this.fetchMoreRespHeaders,n),e===void 0){if(this.fetchBuffer.length===0)return{result:void 0,headers:this.fetchMoreRespHeaders};{let r=this.fetchBuffer;return this.fetchBuffer=[],{result:r,headers:this.fetchMoreRespHeaders}}}else if(this.fetchBuffer.push(e),this.fetchBuffer.length>=this.pageSize){let r=this.fetchBuffer.slice(0,this.pageSize);return this.fetchBuffer=this.fetchBuffer.splice(this.pageSize),{result:r,headers:this.fetchMoreRespHeaders}}else return this._fetchMoreImplementation()}catch(e){if(gn(this.fetchMoreRespHeaders,e.headers),e.headers=this.fetchMoreRespHeaders,e)throw e}}};s(Au,"PipelinedQueryExecutionContext");var pu=Au;pu.DEFAULT_PAGE_SIZE=10;var ph=class ph{constructor(e,n,r,o,c,u){this.clientContext=e,this.query=n,this.options=r,this.fetchFunctions=o,this.resourceLink=c,this.resourceType=u,this.query=n,this.fetchFunctions=o,this.options=r||{},this.resourceLink=c,this.fetchAllLastResHeaders=Xe(),this.reset(),this.isInitialized=!1}getAsyncIterator(){return br.__asyncGenerator(this,arguments,s(function*(){for(this.reset(),this.queryPlanPromise=this.fetchQueryPlan();this.queryExecutionContext.hasMoreResults();){let n;try{n=yield br.__await(this.queryExecutionContext.fetchMore())}catch(o){if(this.needsQueryPlan(o)){yield br.__await(this.createPipelinedExecutionContext());try{n=yield br.__await(this.queryExecutionContext.fetchMore())}catch(c){this.handleSplitError(c)}}else throw o}let r=new go(n.result,n.headers,this.queryExecutionContext.hasMoreResults());n.result!==void 0&&(yield yield br.__await(r))}},"getAsyncIterator_1"))}hasMoreResults(){return this.queryExecutionContext.hasMoreResults()}async fetchAll(){this.reset(),this.fetchAllTempResources=[];let e;try{e=await this.toArrayImplementation()}catch(n){this.handleSplitError(n)}return e}async fetchNext(){this.queryPlanPromise=this.fetchQueryPlan(),this.isInitialized||await this.init();let e;try{e=await this.queryExecutionContext.fetchMore()}catch(n){if(this.needsQueryPlan(n)){await this.createPipelinedExecutionContext();try{e=await this.queryExecutionContext.fetchMore()}catch(r){this.handleSplitError(r)}}else throw n}return new go(e.result,e.headers,this.queryExecutionContext.hasMoreResults())}reset(){this.queryPlanPromise=void 0,this.queryExecutionContext=new Aa(this.options,this.fetchFunctions)}async toArrayImplementation(){for(this.queryPlanPromise=this.fetchQueryPlan(),this.isInitialized||await this.init();this.queryExecutionContext.hasMoreResults();){let e;try{e=await this.queryExecutionContext.nextItem()}catch(o){if(this.needsQueryPlan(o))await this.createPipelinedExecutionContext(),e=await this.queryExecutionContext.nextItem();else throw o}let{result:n,headers:r}=e;gn(this.fetchAllLastResHeaders,r),n!==void 0&&this.fetchAllTempResources.push(n)}return new go(this.fetchAllTempResources,this.fetchAllLastResHeaders,this.queryExecutionContext.hasMoreResults())}async createPipelinedExecutionContext(){let e=await this.queryPlanPromise;if(e instanceof Error)throw e;let n=e.result,r=n.queryInfo;if(r.aggregates.length>0&&r.hasSelectValue===!1)throw new Error("Aggregate queries must use the VALUE keyword");this.queryExecutionContext=new pu(this.clientContext,this.resourceLink,this.query,this.options,n)}async fetchQueryPlan(){return!this.queryPlanPromise&&this.resourceType===w.ResourceType.item?this.clientContext.getQueryPlan(V(this.resourceLink)+"/docs",w.ResourceType.item,this.resourceLink,this.query,this.options).catch(e=>e):this.queryPlanPromise}needsQueryPlan(e){var n;if(!((n=e.body)===null||n===void 0)&&n.additionalErrorInfo||e.message.includes("Cross partition query only supports"))return e.code===vt.BadRequest&&this.resourceType===w.ResourceType.item;throw e}async init(){if(this.isInitialized!==!0)return this.initPromise===void 0&&(this.initPromise=this._init()),this.initPromise}async _init(){this.options.forceQueryPlan===!0&&this.resourceType===w.ResourceType.item&&await this.createPipelinedExecutionContext(),this.isInitialized=!0}handleSplitError(e){if(e.code===410){let n=new Error("Encountered partition split and could not recover. This request is retryable");throw n.code=503,n.originalError=e,n}else throw e}};s(ph,"QueryIterator");var Et=ph,dh=class dh extends ot{constructor(e,n,r,o){super(e,n,r),this.conflict=o}};s(dh,"ConflictResponse");var Ia=dh,fh=class fh{constructor(e,n,r,o){this.container=e,this.id=n,this.clientContext=r,this.partitionKey=o,this.partitionKey=o}get url(){return`/${this.container.url}/${A.Path.ConflictsPathSegment}/${this.id}`}async read(e){let n=V(this.url,w.ResourceType.conflicts),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.user,resourceId:r,options:e});return new Ia(o.result,o.headers,o.code,this)}async delete(e){if(this.partitionKey===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();this.partitionKey=Pa(c)}let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.conflicts,resourceId:r,options:e,partitionKey:this.partitionKey});return new Ia(o.result,o.headers,o.code,this)}};s(fh,"Conflict");var du=fh,hh=class hh{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=V(this.container.url,w.ResourceType.conflicts),o=X(this.container.url);return new Et(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.conflicts,resourceId:o,resultFn:u=>u.Conflicts,query:e,options:c}))}readAll(e){return this.query(void 0,e)}};s(hh,"Conflicts");var fu=hh;w.ConflictResolutionMode=void 0;(function(t){t.Custom="Custom",t.LastWriterWins="LastWriterWins"})(w.ConflictResolutionMode||(w.ConflictResolutionMode={}));var mh=class mh extends ot{constructor(e,n,r,o,c){super(e,n,r,o),this.item=c}};s(mh,"ItemResponse");var Yn=mh,gh=class gh{constructor(e,n,r,o){this.container=e,this.id=n,this.clientContext=o,this.partitionKey=r}get url(){return E3(this.container.database.id,this.container.id,this.id)}async read(e={}){if(this.partitionKey===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();this.partitionKey=Pa(c)}let n=V(this.url),r=X(this.url),o;try{o=await this.clientContext.read({path:n,resourceType:w.ResourceType.item,resourceId:r,options:e,partitionKey:this.partitionKey})}catch(c){if(c.code!==vt.NotFound)throw c;o=c}return new Yn(o.result,o.headers,o.code,o.substatus,this)}async replace(e,n={}){if(this.partitionKey===void 0){let{resource:p}=await this.container.readPartitionKeyDefinition();this.partitionKey=mi(e,p)}let r={};if(!cf(e,r))throw r;let o=V(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.item,resourceId:c,options:n,partitionKey:this.partitionKey});return new Yn(u.result,u.headers,u.code,u.substatus,this)}async delete(e={}){if(this.partitionKey===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();this.partitionKey=Pa(c)}let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.item,resourceId:r,options:e,partitionKey:this.partitionKey});return new Yn(o.result,o.headers,o.code,o.substatus,this)}async patch(e,n={}){if(this.partitionKey===void 0){let{resource:u}=await this.container.readPartitionKeyDefinition();this.partitionKey=mi(e,u)}let r=V(this.url),o=X(this.url),c=await this.clientContext.patch({body:e,path:r,resourceType:w.ResourceType.item,resourceId:o,options:n,partitionKey:this.partitionKey});return new Yn(c.result,c.headers,c.code,c.substatus,this)}};s(gh,"Item");var xo=gh,yh=class yh{constructor(e,n,r,o){this.result=e,this.count=n,this.statusCode=r,this.headers=Object.freeze(o)}get requestCharge(){let e=this.headers[A.HttpHeaders.RequestCharge];return e?parseInt(e,10):null}get activityId(){return this.headers[A.HttpHeaders.ActivityId]}get continuation(){return this.etag}get sessionToken(){return this.headers[A.HttpHeaders.SessionToken]}get etag(){return this.headers[A.HttpHeaders.ETag]}};s(yh,"ChangeFeedResponse");var hu=yh,Cu=class Cu{constructor(e,n,r,o,c){this.clientContext=e,this.resourceId=n,this.resourceLink=r,this.partitionKey=o,this.changeFeedOptions=c;let u=o!==void 0;this.isPartitionSpecified=u;let p=!0;c.continuation&&(this.nextIfNoneMatch=c.continuation,p=!1),c.startTime&&(this.ifModifiedSince=c.startTime.toUTCString(),p=!1),p&&!c.startFromBeginning&&(this.nextIfNoneMatch=Cu.IfNoneMatchAllHeaderValue)}get hasMoreResults(){return this.lastStatusCode!==vt.NotModified}getAsyncIterator(){return br.__asyncGenerator(this,arguments,s(function*(){do{let n=yield br.__await(this.fetchNext());n.count>0&&(yield yield br.__await(n))}while(this.hasMoreResults)},"getAsyncIterator_1"))}async fetchNext(){let e=await this.getFeedResponse();return this.lastStatusCode=e.statusCode,this.nextIfNoneMatch=e.headers[A.HttpHeaders.ETag],e}async getFeedResponse(){if(!this.isPartitionSpecified)throw new Error("Container is partitioned, but no partition key or partition key range id was specified.");let e={initialHeaders:{},useIncrementalFeed:!0};typeof this.changeFeedOptions.maxItemCount=="number"&&(e.maxItemCount=this.changeFeedOptions.maxItemCount),this.changeFeedOptions.sessionToken&&(e.sessionToken=this.changeFeedOptions.sessionToken),this.nextIfNoneMatch&&(e.accessCondition={type:A.HttpHeaders.IfNoneMatch,condition:this.nextIfNoneMatch}),this.ifModifiedSince&&(e.initialHeaders[A.HttpHeaders.IfModifiedSince]=this.ifModifiedSince);let n=await this.clientContext.queryFeed({path:this.resourceLink,resourceType:w.ResourceType.item,resourceId:this.resourceId,resultFn:r=>r?r.Documents:[],query:void 0,options:e,partitionKey:this.partitionKey});return new hu(n.result,n.result?n.result.length:0,n.code,n.headers)}};s(Cu,"ChangeFeedIterator");var Da=Cu;Da.IfNoneMatchAllHeaderValue="*";var Oe={Undefined:"00",Null:"01",False:"02",True:"03",MinNumber:"04",Number:"05",MaxNumber:"06",MinString:"07",String:"08",MaxString:"09",Int64:"0a",Int32:"0b",Int16:"0c",Int8:"0d",Uint64:"0e",Uint32:"0f",Uint16:"10",Uint8:"11",Binary:"12",Guid:"13",Float:"14",Infinity:"FF"};function f_(t){let e=oq(t),n=Buffer.from(Oe.Number,"hex"),r=fe.default.asUintN(64,fe.default.signedRightShift(e,fe.default.BigInt(56)));n=Buffer.concat([n,Buffer.from(r.toString(16),"hex")]),e=fe.default.asUintN(64,fe.default.leftShift(fe.default.BigInt(e),fe.default.BigInt(8)));let o=fe.default.BigInt(0),c,u;do u=o.toString(16).padStart(2,"0"),u!=="00"&&(n=Buffer.concat([n,Buffer.from(u,"hex")])),c=fe.default.asUintN(64,fe.default.signedRightShift(e,fe.default.BigInt(56))),o=fe.default.asUintN(64,fe.default.bitwiseOr(c,fe.default.BigInt(1))),e=fe.default.asUintN(64,fe.default.leftShift(e,fe.default.BigInt(7)));while(fe.default.notEqual(e,fe.default.BigInt(0)));return u=fe.default.asUintN(64,fe.default.bitwiseAnd(o,fe.default.BigInt(254))).toString(16).padStart(2,"0"),u!=="00"&&(n=Buffer.concat([n,Buffer.from(u,"hex")])),n}s(f_,"writeNumberForBinaryEncodingJSBI");function oq(t){let e=m_(t),n=fe.default.BigInt(9223372036854776e3);return e("00"+e.toString(16)).slice(-2)).join("")}s(aq,"buf2hex");function sq(t){let e=Buffer.from(Oe.String,"hex"),n=100,r=[...Buffer.from(t)],o=t.length<=n;for(let c=0;c<(o?r.length:n+1);c++){let u=r[c];u<255&&u++,e=Buffer.concat([e,Buffer.from(u.toString(16),"hex")])}return o&&(e=Buffer.concat([e,Buffer.from(Oe.Undefined,"hex")])),e}s(sq,"writeStringForBinaryEncoding");function _e(t,e){return(t&65535)*e+(((t>>>16)*e&65535)<<16)}s(_e,"_x86Multiply");function yt(t,e){return t<>>32-e}s(yt,"_x86Rotl");function Ra(t){return t^=t>>>16,t=_e(t,2246822507),t^=t>>>13,t=_e(t,3266489909),t^=t>>>16,t}s(Ra,"_x86Fmix");function vr(t,e){t=[t[0]>>>16,t[0]&65535,t[1]>>>16,t[1]&65535],e=[e[0]>>>16,e[0]&65535,e[1]>>>16,e[1]&65535];let n=[0,0,0,0];return n[3]+=t[3]+e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}s(vr,"_x64Add");function Zt(t,e){t=[t[0]>>>16,t[0]&65535,t[1]>>>16,t[1]&65535],e=[e[0]>>>16,e[0]&65535,e[1]>>>16,e[1]&65535];let n=[0,0,0,0];return n[3]+=t[3]*e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}s(Zt,"_x64Multiply");function co(t,e){return e%=64,e===32?[t[1],t[0]]:e<32?[t[0]<>>32-e,t[1]<>>32-e]:(e-=32,[t[1]<>>32-e,t[0]<>>32-e])}s(co,"_x64Rotl");function Bt(t,e){return e%=64,e===0?t:e<32?[t[0]<>>32-e,t[1]<>>1]),t=Zt(t,[4283543511,3981806797]),t=Ce(t,[0,t[0]>>>1]),t=Zt(t,[3301882366,444984403]),t=Ce(t,[0,t[0]>>>1]),t}s($w,"_x64Fmix");function cq(t,e){e=e||0;let n=t.length%4,r=t.length-n,o=e,c=0,u=3432918353,p=461845907,d=0;for(let m=0;m>>0}s(cq,"x86Hash32");function uq(t,e){e=e||0;let n=t.length%16,r=t.length-n,o=e,c=e,u=e,p=e,d=0,m=0,h=0,y=0,v=597399067,P=2869860233,_=951274213,T=2716044179,I=0;for(let N=0;N>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(p>>>0).toString(16)).slice(-8)}s(uq,"x86Hash128");function lq(t,e){e=e||0;let n=t.length%16,r=t.length-n,o=[0,e],c=[0,e],u=[0,0],p=[0,0],d=[2277735313,289559509],m=[1291169091,658871167],h=0;for(let T=0;T>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8),"hex"),v=Ww(y).toString("hex"),P=Buffer.from(("00000000"+(c[0]>>>0).toString(16)).slice(-8)+("00000000"+(c[1]>>>0).toString(16)).slice(-8),"hex"),_=Ww(P).toString("hex");return v+_}s(lq,"x64Hash128");function Ww(t){let e=Buffer.allocUnsafe(t.length);for(let n=0,r=t.length-1;n<=r;++n,--r)e[n]=t[r],e[r]=t[n];return e}s(Ww,"reverse$1");var g_={version:"3.0.0",x86:{hash32:cq,hash128:uq},x64:{hash128:lq},inputValidation:!0},y_=100;function pq(t){let e=dq(t),n=g_.x86.hash32(e),r=f_(n),o=fq(t);return Buffer.concat([r,o]).toString("hex").toUpperCase()}s(pq,"hashV1PartitionKey");function dq(t){let e;switch(typeof t){case"string":{let n=t.substr(0,y_);return e=Buffer.concat([Buffer.from(Oe.String,"hex"),Buffer.from(n),Buffer.from(Oe.Undefined,"hex")]),e}case"number":{let n=h_(t);return e=Buffer.concat([Buffer.from(Oe.Number,"hex"),n]),e}case"boolean":{let n=t?Oe.True:Oe.False;return Buffer.from(n,"hex")}case"object":return t===null?Buffer.from(Oe.Null,"hex"):Buffer.from(Oe.Undefined,"hex");case"undefined":return Buffer.from(Oe.Undefined,"hex");default:throw new Error(`Unexpected type: ${typeof t}`)}}s(dq,"prefixKeyByType$1");function fq(t){switch(typeof t){case"string":{let e=t.substr(0,y_);return sq(e)}case"number":return f_(t);case"boolean":{let e=t?Oe.True:Oe.False;return Buffer.from(e,"hex")}case"object":return t===null?Buffer.from(Oe.Null,"hex"):Buffer.from(Oe.Undefined,"hex");case"undefined":return Buffer.from(Oe.Undefined,"hex");default:throw new Error(`Unexpected type: ${typeof t}`)}}s(fq,"encodeByType");function hq(t){let e=mq(t),n=g_.x64.hash128(e),r=gq(Buffer.from(n,"hex"));return r[0]&=63,r.toString("hex").toUpperCase()}s(hq,"hashV2PartitionKey");function mq(t){let e;switch(typeof t){case"string":return e=Buffer.concat([Buffer.from(Oe.String,"hex"),Buffer.from(t),Buffer.from(Oe.Infinity,"hex")]),e;case"number":{let n=h_(t);return e=Buffer.concat([Buffer.from(Oe.Number,"hex"),n]),e}case"boolean":{let n=t?Oe.True:Oe.False;return Buffer.from(n,"hex")}case"object":return t===null?Buffer.from(Oe.Null,"hex"):Buffer.from(Oe.Undefined,"hex");case"undefined":return Buffer.from(Oe.Undefined,"hex");default:throw new Error(`Unexpected type: ${typeof t}`)}}s(mq,"prefixKeyByType");function gq(t){let e=Buffer.allocUnsafe(t.length);for(let n=0,r=t.length-1;n<=r;++n,--r)e[n]=t[r],e[r]=t[n];return e}s(gq,"reverse");var Kw=Nf.v4;function of(t){let e=typeof t;return t&&!(e==="string"||e==="boolean"||e==="number")}s(of,"isChangeFeedOptions");var xh=class xh{constructor(e,n){this.container=e,this.clientContext=n}query(e,n={}){let r=V(this.container.url,w.ResourceType.item),o=X(this.container.url),c=s(u=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.item,resourceId:o,resultFn:p=>p?p.Documents:[],query:e,options:u,partitionKey:n.partitionKey}),"fetchFunction");return new Et(this.clientContext,e,n,c,this.container.url,w.ResourceType.item)}readChangeFeed(e,n){return of(e)?this.changeFeed(e):this.changeFeed(e,n)}changeFeed(e,n){let r;!n&&of(e)?(r=void 0,n=e):e!==void 0&&!of(e)&&(r=e),n||(n={});let o=V(this.container.url,w.ResourceType.item),c=X(this.container.url);return new Da(this.clientContext,c,o,r,n)}readAll(e){return this.query("SELECT * from c",e)}async create(e,n={}){(e.id===void 0||e.id==="")&&!n.disableAutomaticIdGeneration&&(e.id=Kw());let{resource:r}=await this.container.readPartitionKeyDefinition(),o=mi(e,r),c={};if(!cf(e,c))throw c;let u=V(this.container.url,w.ResourceType.item),p=X(this.container.url),d=await this.clientContext.create({body:e,path:u,resourceType:w.ResourceType.item,resourceId:p,options:n,partitionKey:o}),m=new xo(this.container,d.result.id,o,this.clientContext);return new Yn(d.result,d.headers,d.code,d.substatus,m)}async upsert(e,n={}){let{resource:r}=await this.container.readPartitionKeyDefinition(),o=mi(e,r);(e.id===void 0||e.id==="")&&!n.disableAutomaticIdGeneration&&(e.id=Kw());let c={};if(!cf(e,c))throw c;let u=V(this.container.url,w.ResourceType.item),p=X(this.container.url),d=await this.clientContext.upsert({body:e,path:u,resourceType:w.ResourceType.item,resourceId:p,options:n,partitionKey:o}),m=new xo(this.container,d.result.id,o,this.clientContext);return new Yn(d.result,d.headers,d.code,d.substatus,m)}async bulk(e,n,r){let{resources:o}=await this.container.readPartitionKeyRanges().fetchAll(),{resource:c}=await this.container.getPartitionKeyDefinition(),u=o.map(m=>({min:m.minInclusive,max:m.maxExclusive,rangeId:m.id,indexes:[],operations:[]}));e.map(m=>U3(m,c,r)).forEach((m,h)=>{let y=c.paths[0].replace("/",""),v=c.version&&c.version===2,P=j3(m,y),_=v?hq(P):pq(P),T=u.find(I=>F3(I.min,I.max,_));T.operations.push(m),T.indexes.push(h)});let p=V(this.container.url,w.ResourceType.item),d=[];return await Promise.all(u.filter(m=>m.operations.length).flatMap(m=>H3(m)).map(async m=>{if(m.operations.length>100)throw new Error("Cannot run bulk request with more than 100 operations per partition");try{(await this.clientContext.bulk({body:m.operations,partitionKeyRangeId:m.rangeId,path:p,resourceId:this.container.url,bulkOptions:n,options:r})).result.forEach((y,v)=>{d[m.indexes[v]]=y})}catch(h){throw h.code===410?new Error("Partition key error. Either the partitions have split or an operation has an unsupported partitionKey type"):new Error(`Bulk request errored with: ${h.message}`)}})),d}async batch(e,n="[{}]",r){e.map(c=>z3(c,r));let o=V(this.container.url,w.ResourceType.item);if(e.length>100)throw new Error("Cannot run batch request with more than 100 operations per partition");try{return await this.clientContext.batch({body:e,partitionKey:n,path:o,resourceId:this.container.url,options:r})}catch(c){throw new Error(`Batch request error: ${c.message}`)}}};s(xh,"Items");var mu=xh,vh=class vh extends ot{constructor(e,n,r,o){super(e,n,r),this.storedProcedure=o}get sproc(){return this.storedProcedure}};s(vh,"StoredProcedureResponse");var di=vh,bh=class bh{constructor(e,n,r){this.container=e,this.id=n,this.clientContext=r}get url(){return A3(this.container.database.id,this.container.id,this.id)}async read(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.sproc,resourceId:r,options:e});return new di(o.result,o.headers,o.code,this)}async replace(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=V(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.sproc,resourceId:c,options:n});return new di(u.result,u.headers,u.code,this)}async delete(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.sproc,resourceId:r,options:e});return new di(o.result,o.headers,o.code,this)}async execute(e,n,r){if(e===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();e=Pa(c)}let o=await this.clientContext.execute({sprocLink:this.url,params:n,options:r,partitionKey:e});return new ot(o.result,o.headers,o.code)}};s(bh,"StoredProcedure");var La=bh,wh=class wh{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=V(this.container.url,w.ResourceType.sproc),o=X(this.container.url);return new Et(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.sproc,resourceId:o,resultFn:u=>u.StoredProcedures,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=V(this.container.url,w.ResourceType.sproc),c=X(this.container.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.sproc,resourceId:c,options:n}),p=new La(this.container,u.result.id,this.clientContext);return new di(u.result,u.headers,u.code,p)}};s(wh,"StoredProcedures");var gu=wh,_h=class _h extends ot{constructor(e,n,r,o){super(e,n,r),this.trigger=o}};s(_h,"TriggerResponse");var fi=_h,Rh=class Rh{constructor(e,n,r){this.container=e,this.id=n,this.clientContext=r}get url(){return C3(this.container.database.id,this.container.id,this.id)}async read(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.trigger,resourceId:r,options:e});return new fi(o.result,o.headers,o.code,this)}async replace(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=V(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.trigger,resourceId:c,options:n});return new fi(u.result,u.headers,u.code,this)}async delete(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.trigger,resourceId:r,options:e});return new fi(o.result,o.headers,o.code,this)}};s(Rh,"Trigger");var Ma=Rh,Th=class Th{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=V(this.container.url,w.ResourceType.trigger),o=X(this.container.url);return new Et(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.trigger,resourceId:o,resultFn:u=>u.Triggers,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=V(this.container.url,w.ResourceType.trigger),c=X(this.container.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.trigger,resourceId:c,options:n}),p=new Ma(this.container,u.result.id,this.clientContext);return new fi(u.result,u.headers,u.code,p)}};s(Th,"Triggers");var yu=Th,Sh=class Sh extends ot{constructor(e,n,r,o){super(e,n,r),this.userDefinedFunction=o}get udf(){return this.userDefinedFunction}};s(Sh,"UserDefinedFunctionResponse");var hi=Sh,Eh=class Eh{constructor(e,n,r){this.container=e,this.id=n,this.clientContext=r}get url(){return O3(this.container.database.id,this.container.id,this.id)}async read(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.udf,resourceId:r,options:e});return new hi(o.result,o.headers,o.code,this)}async replace(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=V(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.udf,resourceId:c,options:n});return new hi(u.result,u.headers,u.code,this)}async delete(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.udf,resourceId:r,options:e});return new hi(o.result,o.headers,o.code,this)}};s(Eh,"UserDefinedFunction");var Na=Eh,Ph=class Ph{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=V(this.container.url,w.ResourceType.udf),o=X(this.container.url);return new Et(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.udf,resourceId:o,resultFn:u=>u.UserDefinedFunctions,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=V(this.container.url,w.ResourceType.udf),c=X(this.container.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.udf,resourceId:c,options:n}),p=new Na(this.container,u.result.id,this.clientContext);return new hi(u.result,u.headers,u.code,p)}};s(Ph,"UserDefinedFunctions");var xu=Ph,Ah=class Ah{constructor(e,n){this.container=e,this.clientContext=n}storedProcedure(e){return new La(this.container,e,this.clientContext)}trigger(e){return new Ma(this.container,e,this.clientContext)}userDefinedFunction(e){return new Na(this.container,e,this.clientContext)}get storedProcedures(){return this.$sprocs||(this.$sprocs=new gu(this.container,this.clientContext)),this.$sprocs}get triggers(){return this.$triggers||(this.$triggers=new yu(this.container,this.clientContext)),this.$triggers}get userDefinedFunctions(){return this.$udfs||(this.$udfs=new xu(this.container,this.clientContext)),this.$udfs}};s(Ah,"Scripts");var vu=Ah,Ch=class Ch extends ot{constructor(e,n,r,o){super(e,n,r),this.container=o}};s(Ch,"ContainerResponse");var wr=Ch,Oh=class Oh extends ot{constructor(e,n,r,o){super(e,n,r),this.offer=o}};s(Oh,"OfferResponse");var yi=Oh,Ih=class Ih{constructor(e,n,r){this.client=e,this.id=n,this.clientContext=r}get url(){return`/${A.Path.OffersPathSegment}/${this.id}`}async read(e){let n=await this.clientContext.read({path:this.url,resourceType:w.ResourceType.offer,resourceId:this.id,options:e});return new yi(n.result,n.headers,n.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=await this.clientContext.replace({body:e,path:this.url,resourceType:w.ResourceType.offer,resourceId:this.id,options:n});return new yi(o.result,o.headers,o.code,this)}};s(Ih,"Offer");var vo=Ih,Dh=class Dh{constructor(e,n){this.client=e,this.clientContext=n}query(e,n){return new Et(this.clientContext,e,n,r=>this.clientContext.queryFeed({path:"/offers",resourceType:w.ResourceType.offer,resourceId:"",resultFn:o=>o.Offers,query:e,options:r}))}readAll(e){return this.query(void 0,e)}};s(Dh,"Offers");var bu=Dh,Lh=class Lh{constructor(e,n,r){this.database=e,this.id=n,this.clientContext=r}get items(){return this.$items||(this.$items=new mu(this,this.clientContext)),this.$items}get scripts(){return this.$scripts||(this.$scripts=new vu(this,this.clientContext)),this.$scripts}get conflicts(){return this.$conflicts||(this.$conflicts=new fu(this,this.clientContext)),this.$conflicts}get url(){return Ua(this.database.id,this.id)}item(e,n){return new xo(this,e,n,this.clientContext)}conflict(e,n){return new du(this,e,this.clientContext,n)}async read(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.container,resourceId:r,options:e});return this.clientContext.partitionKeyDefinitionCache[this.url]=o.result.partitionKey,new wr(o.result,o.headers,o.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=V(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.container,resourceId:c,options:n});return new wr(u.result,u.headers,u.code,this)}async delete(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.container,resourceId:r,options:e});return new wr(o.result,o.headers,o.code,this)}async getPartitionKeyDefinition(){return this.readPartitionKeyDefinition()}async readPartitionKeyDefinition(){if(this.url in this.clientContext.partitionKeyDefinitionCache)return new ot(this.clientContext.partitionKeyDefinitionCache[this.url],{},0);let{headers:e,statusCode:n}=await this.read();return new ot(this.clientContext.partitionKeyDefinitionCache[this.url],e,n)}async readOffer(e={}){let{resource:n}=await this.read(),r="/offers",o=n._self,c=await this.clientContext.queryFeed({path:r,resourceId:"",resourceType:w.ResourceType.offer,query:`SELECT * from root where root.resource = "${o}"`,resultFn:p=>p.Offers,options:e}),u=c.result[0]?new vo(this.database.client,c.result[0].id,this.clientContext):void 0;return new yi(c.result[0],c.headers,c.code,u)}async getQueryPlan(e){let n=V(this.url);return this.clientContext.getQueryPlan(n+"/docs",w.ResourceType.item,X(this.url),e)}readPartitionKeyRanges(e){return e=e||{},this.clientContext.queryPartitionKeyRanges(this.url,void 0,e)}async deleteAllItemsForPartitionKey(e,n){let r=V(this.url),o=X(this.url);r=r+"/operations/partitionkeydelete";let c=await this.clientContext.delete({path:r,resourceType:w.ResourceType.container,resourceId:o,options:n,partitionKey:e,method:w.HTTPMethod.post});return new wr(c.result,c.headers,c.code,this)}};s(Lh,"Container");var ka=Lh;function x_(t){if(t.throughput){if(t.maxThroughput)throw console.log("should be erroring"),new Error("Cannot specify `throughput` with `maxThroughput`");if(t.autoUpgradePolicy)throw new Error("Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead")}}s(x_,"validateOffer");var Mh=class Mh{constructor(e,n){this.database=e,this.clientContext=n}query(e,n){let r=V(this.database.url,w.ResourceType.container),o=X(this.database.url);return new Et(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.container,resourceId:o,resultFn:u=>u.DocumentCollections,query:e,options:c}))}async create(e,n={}){let r={};if(!lt(e,r))throw r;let o=V(this.database.url,w.ResourceType.container),c=X(this.database.url);if(x_(e),e.maxThroughput){let d={maxThroughput:e.maxThroughput};e.autoUpgradePolicy&&(d.autoUpgradePolicy=e.autoUpgradePolicy);let m=JSON.stringify(d);n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.AutoscaleSettings]:m}),delete e.maxThroughput,delete e.autoUpgradePolicy}if(e.throughput&&(n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.OfferThroughput]:e.throughput}),delete e.throughput),typeof e.partitionKey=="string"){if(!e.partitionKey.startsWith("/"))throw new Error("Partition key must start with '/'");e.partitionKey={paths:[e.partitionKey]}}(!e.partitionKey||!e.partitionKey.paths)&&(e.partitionKey={paths:[Xw]});let u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.container,resourceId:c,options:n}),p=new ka(this.database,u.result.id,this.clientContext);return new wr(u.result,u.headers,u.code,p)}async createIfNotExists(e,n){if(!e||e.id===null||e.id===void 0)throw new Error("body parameter must be an object with an id property");try{return await this.database.container(e.id).read(n)}catch(r){if(r.code===vt.NotFound){let o=await this.create(e,n);return gn(o.headers,r.headers),o}else throw r}}readAll(e){return this.query(void 0,e)}};s(Mh,"Containers");var wu=Mh,Nh=class Nh extends ot{constructor(e,n,r,o){super(e,n,r),this.permission=o}};s(Nh,"PermissionResponse");var _r=Nh,kh=class kh{constructor(e,n,r){this.user=e,this.id=n,this.clientContext=r}get url(){return P3(this.user.database.id,this.user.id,this.id)}async read(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.permission,resourceId:r,options:e});return new _r(o.result,o.headers,o.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=V(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.permission,resourceId:c,options:n});return new _r(u.result,u.headers,u.code,this)}async delete(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.permission,resourceId:r,options:e});return new _r(o.result,o.headers,o.code,this)}};s(kh,"Permission");var bo=kh,qh=class qh{constructor(e,n){this.user=e,this.clientContext=n}query(e,n){let r=V(this.user.url,w.ResourceType.permission),o=X(this.user.url);return new Et(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.permission,resourceId:o,resultFn:u=>u.Permissions,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){let r={};if(!lt(e,r))throw r;let o=V(this.user.url,w.ResourceType.permission),c=X(this.user.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.permission,resourceId:c,options:n}),p=new bo(this.user,u.result.id,this.clientContext);return new _r(u.result,u.headers,u.code,p)}async upsert(e,n){let r={};if(!lt(e,r))throw r;let o=V(this.user.url,w.ResourceType.permission),c=X(this.user.url),u=await this.clientContext.upsert({body:e,path:o,resourceType:w.ResourceType.permission,resourceId:c,options:n}),p=new bo(this.user,u.result.id,this.clientContext);return new _r(u.result,u.headers,u.code,p)}};s(qh,"Permissions");var _u=qh,Fh=class Fh extends ot{constructor(e,n,r,o){super(e,n,r),this.user=o}};s(Fh,"UserResponse");var Rr=Fh,Bh=class Bh{constructor(e,n,r){this.database=e,this.id=n,this.clientContext=r,this.permissions=new _u(this,this.clientContext)}get url(){return n_(this.database.id,this.id)}permission(e){return new bo(this,e,this.clientContext)}async read(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.user,resourceId:r,options:e});return new Rr(o.result,o.headers,o.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=V(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.user,resourceId:c,options:n});return new Rr(u.result,u.headers,u.code,this)}async delete(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.user,resourceId:r,options:e});return new Rr(o.result,o.headers,o.code,this)}};s(Bh,"User");var wo=Bh,jh=class jh{constructor(e,n){this.database=e,this.clientContext=n}query(e,n){let r=V(this.database.url,w.ResourceType.user),o=X(this.database.url);return new Et(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.user,resourceId:o,resultFn:u=>u.Users,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){let r={};if(!lt(e,r))throw r;let o=V(this.database.url,w.ResourceType.user),c=X(this.database.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.user,resourceId:c,options:n}),p=new wo(this.database,u.result.id,this.clientContext);return new Rr(u.result,u.headers,u.code,p)}async upsert(e,n){let r={};if(!lt(e,r))throw r;let o=V(this.database.url,w.ResourceType.user),c=X(this.database.url),u=await this.clientContext.upsert({body:e,path:o,resourceType:w.ResourceType.user,resourceId:c,options:n}),p=new wo(this.database,u.result.id,this.clientContext);return new Rr(u.result,u.headers,u.code,p)}};s(jh,"Users");var Ru=jh,Uh=class Uh extends ot{constructor(e,n,r,o){super(e,n,r),this.database=o}};s(Uh,"DatabaseResponse");var _o=Uh,Hh=class Hh{constructor(e,n,r){this.client=e,this.id=n,this.clientContext=r,this.containers=new wu(this,this.clientContext),this.users=new Ru(this,this.clientContext)}get url(){return qf(this.id)}container(e){return new ka(this,e,this.clientContext)}user(e){return new wo(this,e,this.clientContext)}async read(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.database,resourceId:r,options:e});return new _o(o.result,o.headers,o.code,this)}async delete(e){let n=V(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.database,resourceId:r,options:e});return new _o(o.result,o.headers,o.code,this)}async readOffer(e={}){let{resource:n}=await this.read(),r="/offers",o=n._self,c=await this.clientContext.queryFeed({path:r,resourceId:"",resourceType:w.ResourceType.offer,query:`SELECT * from root where root.resource = "${o}"`,resultFn:p=>p.Offers,options:e}),u=c.result[0]?new vo(this.client,c.result[0].id,this.clientContext):void 0;return new yi(c.result[0],c.headers,c.code,u)}};s(Hh,"Database");var qa=Hh,zh=class zh{constructor(e,n){this.client=e,this.clientContext=n}query(e,n){let r=s(o=>this.clientContext.queryFeed({path:"/dbs",resourceType:w.ResourceType.database,resourceId:"",resultFn:c=>c.Databases,query:e,options:o}),"cb");return new Et(this.clientContext,e,n,r)}async create(e,n={}){let r={};if(!lt(e,r))throw r;if(x_(e),e.maxThroughput){let p={maxThroughput:e.maxThroughput};e.autoUpgradePolicy&&(p.autoUpgradePolicy=e.autoUpgradePolicy);let d=JSON.stringify(p);n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.AutoscaleSettings]:d}),delete e.maxThroughput,delete e.autoUpgradePolicy}e.throughput&&(n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.OfferThroughput]:e.throughput}),delete e.throughput);let c=await this.clientContext.create({body:e,path:"/dbs",resourceType:w.ResourceType.database,resourceId:void 0,options:n}),u=new qa(this.client,e.id,this.clientContext);return new _o(c.result,c.headers,c.code,u)}async createIfNotExists(e,n){if(!e||e.id===null||e.id===void 0)throw new Error("body parameter must be an object with an id property");try{return await this.client.database(e.id).read(n)}catch(r){if(r.code===vt.NotFound){let o=await this.create(e,n);return gn(o.headers,r.headers),o}else throw r}}readAll(e){return this.query(void 0,e)}};s(zh,"Databases");var Tu=zh;w.PluginOn=void 0;(function(t){t.request="request",t.operation="operation"})(w.PluginOn||(w.PluginOn={}));async function hn(t,e,n){if(!t.plugins)return e(t,void 0);let r=0,o=s(c=>++r>=c.plugins.length?e(t,void 0):c.plugins[r].on!==n?o(t):c.plugins[r].plugin(c,o),"_");return t.plugins[r].on!==n?o(t):t.plugins[r].plugin(t,o)}s(hn,"executePlugins");var yq=10004,xq=10009,vq=10013,bq=10014,wq=10022,_q=10035,Rq=10036,Tq=10048,Sq=10054,Eq=10058,Pq=10060,Aq=10061,Cq=10063,Oq=10064,Iq=10065,Dq="ECONNRESET",Lq="EPIPE",Mq=[yq,xq,vq,bq,wq,_q,Rq,Tq,Sq,Eq,Pq,Aq,Cq,Oq,Iq,Dq,uf,Lq];function Nq(t,e){return(t===w.OperationType.Read||t===w.OperationType.Query)&&Mq.indexOf(e)!==-1}s(Nq,"needsRetry");var $h=class $h{constructor(e){this.operationType=e,this.maxTries=10,this.currentRetryAttemptCount=0,this.retryAfterInMs=1e3}async shouldRetry(e){return e&&this.currentRetryAttemptCount=this.maxTries?!1:(this.currentRetryAttemptCount++,kf(this.operationType)?await this.globalEndpointManager.markCurrentLocationUnavailableForRead(r):await this.globalEndpointManager.markCurrentLocationUnavailableForWrite(r),n.retryCount=this.currentRetryAttemptCount,n.clearSessionTokenNotAvailable=!1,n.retryRequestOnPreferredLocations=!1,!0)}};s(Ea,"EndpointDiscoveryRetryPolicy");var Fa=Ea;Fa.maxTries=120;Fa.retryAfterInMs=1e3;var Wh=class Wh{constructor(e=9,n=0,r=30){this.maxTries=e,this.fixedRetryIntervalInMs=n,this.currentRetryAttemptCount=0,this.cummulativeWaitTimeinMs=0,this.retryAfterInMs=0,this.timeoutInMs=r*1e3,this.currentRetryAttemptCount=0,this.cummulativeWaitTimeinMs=0}async shouldRetry(e){return e&&this.currentRetryAttemptCountr.length?!1:(this.currentRetryAttemptCount++,n.retryCount++,n.retryRequestOnPreferredLocations=this.currentRetryAttemptCount>1,n.clearSessionTokenNotAvailable=this.currentRetryAttemptCount===r.length,!0)}else return this.currentRetryAttemptCount>1?!1:(this.currentRetryAttemptCount++,n.retryCount++,n.retryRequestOnPreferredLocations=!1,n.clearSessionTokenNotAvailable=!0,!0)}};s(Kh,"SessionRetryPolicy");var If=Kh;async function v_({retryContext:t={retryCount:0},retryPolicies:e,requestContext:n,executeRequest:r}){e||(e={endpointDiscoveryRetryPolicy:new Fa(n.globalEndpointManager,n.operationType),resourceThrottleRetryPolicy:new Of(n.connectionPolicy.retryOptions.maxRetryAttemptCount,n.connectionPolicy.retryOptions.fixedRetryIntervalInMilliseconds,n.connectionPolicy.retryOptions.maxWaitTimeInSeconds),sessionReadRetryPolicy:new If(n.globalEndpointManager,n.resourceType,n.operationType,n.connectionPolicy),defaultRetryPolicy:new Cf(n.operationType)}),t&&t.clearSessionTokenNotAvailable&&(n.client.clearSessionToken(n.path),delete n.headers["x-ms-session-token"]),n.endpoint=await n.globalEndpointManager.resolveServiceEndpoint(n.resourceType,n.operationType);try{let o=await r(n);return o.headers[A.ThrottleRetryCount]=e.resourceThrottleRetryPolicy.currentRetryAttemptCount,o.headers[A.ThrottleRetryWaitTimeInMs]=e.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs,o}catch(o){let c=null,u=o.headers||{};o.code===vt.ENOTFOUND||o.code==="REQUEST_SEND_ERROR"||o.code===vt.Forbidden&&(o.substatus===mo.DatabaseAccountNotFound||o.substatus===mo.WriteForbidden)?c=e.endpointDiscoveryRetryPolicy:o.code===vt.TooManyRequests?c=e.resourceThrottleRetryPolicy:o.code===vt.NotFound&&o.substatus===mo.ReadSessionNotAvailable?c=e.sessionReadRetryPolicy:c=e.defaultRetryPolicy;let p=await c.shouldRetry(o,t,n.endpoint);if(p){n.retryCount++;let d=p[1];return d!==void 0&&(n.endpoint=d),await w3(c.retryAfterInMs),v_({executeRequest:r,requestContext:n,retryContext:t,retryPolicies:e})}else throw u[A.ThrottleRetryCount]=e.resourceThrottleRetryPolicy.currentRetryAttemptCount,u[A.ThrottleRetryWaitTimeInMs]=e.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs,o.headers=Object.assign(Object.assign({},o.headers),u),o}}s(v_,"execute");var Df,Gw=require("https"),kq=require("tls");kq.DEFAULT_MIN_VERSION?Df=new Gw.Agent({keepAlive:!0,minVersion:"TLSv1.2"}):Df=new Gw.Agent({keepAlive:!0,secureProtocol:"TLSv1_2_method"});var qq=require("http"),Fq=new qq.Agent({keepAlive:!0}),af;function Bq(){return af||(af=yo.createDefaultHttpClient()),af}s(Bq,"getCachedDefaultHttpClient");var jq=ja.createClientLogger("RequestHandler");async function Uq(t){return hn(t,Hq,w.PluginOn.request)}s(Uq,"executeRequest");async function Hq(t){let e=new d3.AbortController,n=e.signal,r=t.options&&t.options.abortSignal;r&&(r.aborted?e.abort():r.addEventListener("abort",()=>{e.abort()}));let o=setTimeout(()=>{e.abort()},t.connectionPolicy.requestTimeout),c;t.body&&(t.body=Ff(t.body));let u=Bq(),p=ho(t.endpoint)+t.path,d=yo.createHttpHeaders(t.headers),m=yo.createPipelineRequest({url:p,headers:d,method:t.method,abortSignal:n,body:t.body});if(t.requestAgent)m.agent=t.requestAgent;else{let P=new URL(p);m.agent=P.protocol==="http"?Fq:Df}try{t.pipeline?c=await t.pipeline.sendRequest(u,m):c=await u.sendRequest(m)}catch(P){throw P.name==="AbortError"?r&&r.aborted===!0?(clearTimeout(o),P):new su(`Timeout Error! Request took more than ${t.connectionPolicy.requestTimeout} ms`):P}clearTimeout(o);let h=c.status===204||c.status===304||c.bodyAsText===""?null:JSON.parse(c.bodyAsText),y=c.headers.toJSON(),v=y[A.HttpHeaders.SubStatus]?parseInt(y[A.HttpHeaders.SubStatus],10):void 0;if(c.status>=400){let P=new au(h.message);throw jq.warning(c.status+" "+t.endpoint+" "+t.path+" "+h.message),P.code=c.status,P.body=h,P.headers=y,A.HttpHeaders.ActivityId in y&&(P.activityId=y[A.HttpHeaders.ActivityId]),A.HttpHeaders.SubStatus in y&&(P.substatus=v),A.HttpHeaders.RetryAfterInMs in y&&(P.retryAfterInMs=parseInt(y[A.HttpHeaders.RetryAfterInMs],10),Object.defineProperty(P,"retryAfterInMilliseconds",{get:()=>P.retryAfterInMs})),P}return{headers:y,result:h,code:c.status,substatus:v}}s(Hq,"httpRequest");async function zq(t){if(t.body&&(t.body=Ff(t.body),!t.body))throw new Error("parameter data must be a javascript object, string, or Buffer");return v_({requestContext:t,executeRequest:Uq})}s(zq,"request");var Xt={request:zq};function $q(t){return Buffer.from(t,"base64").toString("binary")}s($q,"atob");var tn=class tn{constructor(e,n,r,o){if(this.version=e,this.globalLsn=n,this.localLsnByregion=r,this.sessionToken=o,!this.sessionToken){let c=[];for(let[p,d]of this.localLsnByregion.entries())c.push(`${p}${tn.REGION_PROGRESS_SEPARATOR}${d}`);let u=c.join(tn.SEGMENT_SEPARATOR);u===""?this.sessionToken=`${this.version}${tn.SEGMENT_SEPARATOR}${this.globalLsn}`:this.sessionToken=`${this.version}${tn.SEGMENT_SEPARATOR}${this.globalLsn}${tn.SEGMENT_SEPARATOR}${u}`}}static create(e){let[n,r,...o]=e.split(tn.SEGMENT_SEPARATOR),c=parseInt(n,10),u=parseFloat(r);if(typeof c!="number"||typeof u!="number")return null;let p=new Map;for(let d of o){let[m,h]=d.split(tn.REGION_PROGRESS_SEPARATOR);if(!m||!h)return null;let y=parseInt(m,10),v;try{v=h}catch{return null}if(typeof y!="number")return null;p.set(y,v)}return new tn(c,u,p,e)}equals(e){return e?this.version===e.version&&this.globalLsn===e.globalLsn&&this.areRegionProgressEqual(e.localLsnByregion):!1}merge(e){if(e==null)throw new Error("other (Vector Session Token) must not be null");if(this.version===e.version&&this.localLsnByregion.size!==e.localLsnByregion.size)throw new Error(`Compared session tokens ${this.sessionToken} and ${e.sessionToken} have unexpected regions`);let[n,r]=this.versione?t:e:t.length>e.length?t:e}s(Wq,"max");var mn=class mn{constructor(e=new Map,n=new Map){this.collectionNameToCollectionResourceId=e,this.collectionResourceIdToSessionTokens=n}get(e){if(!e)throw new Error("request cannot be null");let n=rf(ho(e.resourceAddress)),r=this.getPartitionKeyRangeIdToTokenMap(n);return mn.getCombinedSessionTokenString(r)}remove(e){let n,r=ho(e.resourceAddress),o=rf(r);o&&(n=this.collectionNameToCollectionResourceId.get(o),this.collectionNameToCollectionResourceId.delete(o)),n!==void 0&&this.collectionResourceIdToSessionTokens.delete(n)}set(e,n){if(!n||mn.isReadingFromMaster(e.resourceType,e.operationType))return;let r=n[A.HttpHeaders.SessionToken];if(!r)return;let o=this.getContainerName(e,n),c=e.isNameBased&&n[A.HttpHeaders.OwnerId]||e.resourceId;if(c&&o&&this.validateOwnerID(c)){this.collectionResourceIdToSessionTokens.has(c)||this.collectionResourceIdToSessionTokens.set(c,new Map),this.collectionNameToCollectionResourceId.has(o)||this.collectionNameToCollectionResourceId.set(o,c);let u=this.collectionResourceIdToSessionTokens.get(c);mn.compareAndSetToken(r,u)}}validateOwnerID(e){return $q(e.replace(/-/g,"/")).length===8}getPartitionKeyRangeIdToTokenMap(e){let n=null;return e&&this.collectionNameToCollectionResourceId.has(e)&&(n=this.collectionResourceIdToSessionTokens.get(this.collectionNameToCollectionResourceId.get(e))),n}static getCombinedSessionTokenString(e){if(!e||e.size===0)return mn.EMPTY_SESSION_TOKEN;let n="";for(let[r,o]of e.entries())n+=r+mn.SESSION_TOKEN_PARTITION_SPLITTER+o.toString()+mn.SESSION_TOKEN_SEPARATOR;return n.slice(0,-1)}static compareAndSetToken(e,n){if(!e)return;let r=e.split(mn.SESSION_TOKEN_SEPARATOR);for(let o of r){let c=o.split(mn.SESSION_TOKEN_PARTITION_SPLITTER);if(c.length!==2)return;let u=c[0],p=Ba.create(c[1]),d=n.get(u)?n.get(u).merge(p):p;n.set(u,d)}}static isReadingFromMaster(e,n){return e===A.Path.OffersPathSegment||e===A.Path.DatabasesPathSegment||e===A.Path.UsersPathSegment||e===A.Path.PermissionsPathSegment||e===A.Path.TopologyPathSegment||e===A.Path.DatabaseAccountPathSegment||e===A.Path.PartitionKeyRangesPathSegment||e===A.Path.CollectionsPathSegment&&n===w.OperationType.Query}getContainerName(e,n){let r=n[A.HttpHeaders.OwnerFullName];return r||(r=ho(e.resourceAddress)),rf(r)}};s(mn,"SessionContainer");var Ro=mn;Ro.EMPTY_SESSION_TOKEN="";Ro.SESSION_TOKEN_SEPARATOR=",";Ro.SESSION_TOKEN_PARTITION_SPLITTER=":";function Kq(t){return new URL(t)}s(Kq,"checkURL");function Gq(t){return new URL(t).href.replace(/\/$/,"")}s(Gq,"sanitizeEndpoint");var Qq=Nf.v4,sf=ja.createClientLogger("ClientContext"),Qw="application/query+json",Gh=class Gh{constructor(e,n){if(this.cosmosClientOptions=e,this.globalEndpointManager=n,this.connectionPolicy=e.connectionPolicy,this.sessionContainer=new Ro,this.partitionKeyDefinitionCache={},this.pipeline=null,e.aadCredentials){this.pipeline=yo.createEmptyPipeline();let o=`${Gq(e.endpoint)}/.default`;this.pipeline.addPolicy(yo.bearerTokenAuthenticationPolicy({credential:e.aadCredentials,scopes:o,challengeCallbacks:{async authorizeRequest({request:c,getAccessToken:u}){let m=`type=aad&ver=1.0&sig=${(await u([o],{})).token}`;c.headers.set("Authorization",m)}}}))}}async read({path:e,resourceType:n,resourceId:r,options:o={},partitionKey:c}){try{let u=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.get,path:e,operationType:w.OperationType.Read,resourceId:r,options:o,resourceType:n,partitionKey:c});u.headers=await this.buildHeaders(u),this.applySessionToken(u),u.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(u.resourceType,u.operationType);let p=await hn(u,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,e,w.OperationType.Read,p.headers),p}catch(u){throw this.captureSessionToken(u,e,w.OperationType.Upsert,u.headers),u}}async queryFeed({path:e,resourceType:n,resourceId:r,resultFn:o,query:c,options:u,partitionKeyRangeId:p,partitionKey:d}){let m=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.get,path:e,operationType:w.OperationType.Query,partitionKeyRangeId:p,resourceId:r,resourceType:n,options:u,body:c,partitionKey:d}),h=Qq();c!==void 0&&(m.method=w.HTTPMethod.post),m.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(m.resourceType,m.operationType),m.headers=await this.buildHeaders(m),c!==void 0&&(m.headers[A.HttpHeaders.IsQuery]="true",m.headers[A.HttpHeaders.ContentType]=Qw,typeof c=="string"&&(m.body={query:c})),this.applySessionToken(m),sf.info("query "+h+" started"+(m.partitionKeyRangeId?" pkrid: "+m.partitionKeyRangeId:"")),sf.verbose(m);let y=Date.now(),v=await Xt.request(m);return sf.info("query "+h+" finished - "+(Date.now()-y)+"ms"),this.captureSessionToken(void 0,e,w.OperationType.Query,v.headers),this.processQueryFeedResponse(v,!!c,o)}async getQueryPlan(e,n,r,o,c={}){let u=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,path:e,operationType:w.OperationType.Read,resourceId:r,resourceType:n,options:c,body:o});u.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(u.resourceType,u.operationType),u.headers=await this.buildHeaders(u),u.headers[A.HttpHeaders.IsQueryPlan]="True",u.headers[A.HttpHeaders.QueryVersion]="1.4",u.headers[A.HttpHeaders.SupportedQueryFeatures]="NonValueAggregate, Aggregate, Distinct, MultipleOrderBy, OffsetAndLimit, OrderBy, Top, CompositeAggregate, GroupBy, MultipleAggregates",u.headers[A.HttpHeaders.ContentType]=Qw,typeof o=="string"&&(u.body={query:o}),this.applySessionToken(u);let p=await Xt.request(u);return this.captureSessionToken(void 0,e,w.OperationType.Query,p.headers),p}queryPartitionKeyRanges(e,n,r){let o=V(e,w.ResourceType.pkranges),c=X(e),u=s(p=>this.queryFeed({path:o,resourceType:w.ResourceType.pkranges,resourceId:c,resultFn:d=>d.PartitionKeyRanges,query:n,options:p}),"cb");return new Et(this,n,r,u)}async delete({path:e,resourceType:n,resourceId:r,options:o={},partitionKey:c,method:u=w.HTTPMethod.delete}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:u,operationType:w.OperationType.Delete,path:e,resourceType:n,options:o,resourceId:r,partitionKey:c});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return qw(e).type!=="colls"?this.captureSessionToken(void 0,e,w.OperationType.Delete,d.headers):this.clearSessionToken(e),d}catch(p){throw this.captureSessionToken(p,e,w.OperationType.Upsert,p.headers),p}}async patch({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.patch,operationType:w.OperationType.Patch,path:n,resourceType:r,body:e,resourceId:o,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Patch,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}async create({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Create,path:n,resourceType:r,resourceId:o,body:e,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Create,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}processQueryFeedResponse(e,n,r){return n?{result:r(e.result),headers:e.headers,code:e.code}:{result:r(e.result).map(c=>c),headers:e.headers,code:e.code}}applySessionToken(e){let n=this.getSessionParams(e.path);if(e.headers&&e.headers[A.HttpHeaders.SessionToken])return;let r=e.headers[A.HttpHeaders.ConsistencyLevel];if(r&&r===w.ConsistencyLevel.Session&&n.resourceAddress){let o=this.sessionContainer.get(n);o&&(e.headers[A.HttpHeaders.SessionToken]=o)}}async replace({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.put,operationType:w.OperationType.Replace,path:n,resourceType:r,body:e,resourceId:o,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Replace,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}async upsert({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Upsert,path:n,resourceType:r,body:e,resourceId:o,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),p.headers[A.HttpHeaders.IsUpsert]=!0,this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Upsert,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}async execute({sprocLink:e,params:n,options:r={},partitionKey:o}){n!=null&&!Array.isArray(n)&&(n=[n]);let c=V(e),u=X(e),p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Execute,path:c,resourceType:w.ResourceType.sproc,options:r,resourceId:u,body:n,partitionKey:o});return p.headers=await this.buildHeaders(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType),hn(p,Xt.request,w.PluginOn.operation)}async getDatabaseAccount(e={}){let n=e.urlConnection||this.cosmosClientOptions.endpoint,r=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{endpoint:n,method:w.HTTPMethod.get,operationType:w.OperationType.Read,path:"",resourceType:w.ResourceType.none,options:e});r.headers=await this.buildHeaders(r);let{result:o,headers:c}=await hn(r,Xt.request,w.PluginOn.operation);return{result:new ou(o,c),headers:c}}getWriteEndpoint(){return this.globalEndpointManager.getWriteEndpoint()}getReadEndpoint(){return this.globalEndpointManager.getReadEndpoint()}getWriteEndpoints(){return this.globalEndpointManager.getWriteEndpoints()}getReadEndpoints(){return this.globalEndpointManager.getReadEndpoints()}async batch({body:e,path:n,partitionKey:r,resourceId:o,options:c={}}){try{let u=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Batch,path:n,body:e,resourceType:w.ResourceType.item,resourceId:o,options:c,partitionKey:r});u.headers=await this.buildHeaders(u),u.headers[A.HttpHeaders.IsBatchRequest]=!0,u.headers[A.HttpHeaders.IsBatchAtomic]=!0,this.applySessionToken(u),u.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(u.resourceType,u.operationType);let p=await hn(u,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Batch,p.headers),p}catch(u){throw this.captureSessionToken(u,n,w.OperationType.Upsert,u.headers),u}}async bulk({body:e,path:n,partitionKeyRangeId:r,resourceId:o,bulkOptions:c={},options:u={}}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Batch,path:n,body:e,resourceType:w.ResourceType.item,resourceId:o,options:u});p.headers=await this.buildHeaders(p),p.headers[A.HttpHeaders.IsBatchRequest]=!0,p.headers[A.HttpHeaders.PartitionKeyRangeID]=r,p.headers[A.HttpHeaders.IsBatchAtomic]=!1,p.headers[A.HttpHeaders.BatchContinueOnError]=c.continueOnError||!1,this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Batch,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}captureSessionToken(e,n,r,o){let c=this.getSessionParams(n);c.operationType=r,(!e||!this.isMasterResource(c.resourceType)&&(e.code===vt.PreconditionFailed||e.code===vt.Conflict||e.code===vt.NotFound&&e.substatus!==mo.ReadSessionNotAvailable))&&this.sessionContainer.set(c,o)}clearSessionToken(e){let n=this.getSessionParams(e);this.sessionContainer.remove(n)}getSessionParams(e){let r=null,o=qw(e);r=o.objectBody.self;let c=o.type;return{resourceId:null,resourceAddress:r,resourceType:c,isNameBased:!0}}isMasterResource(e){return e===A.Path.OffersPathSegment||e===A.Path.DatabasesPathSegment||e===A.Path.UsersPathSegment||e===A.Path.PermissionsPathSegment||e===A.Path.TopologyPathSegment||e===A.Path.DatabaseAccountPathSegment||e===A.Path.PartitionKeyRangesPathSegment||e===A.Path.CollectionsPathSegment}buildHeaders(e){return q3({clientOptions:this.cosmosClientOptions,defaultHeaders:Object.assign(Object.assign({},this.cosmosClientOptions.defaultHeaders),e.options.initialHeaders),verb:e.method,path:e.path,resourceId:e.resourceId,resourceType:e.resourceType,options:e.options,partitionKeyRangeId:e.partitionKeyRangeId,useMultipleWriteLocations:this.connectionPolicy.useMultipleWriteLocations,partitionKey:e.partitionKey})}getContextDerivedPropsForRequestCreation(){return{globalEndpointManager:this.globalEndpointManager,requestAgent:this.cosmosClientOptions.agent,connectionPolicy:this.connectionPolicy,client:this,plugins:this.cosmosClientOptions.plugins,pipeline:this.pipeline}}};s(Gh,"ClientContext");var Su=Gh;function Vq(t){let e=`${f3.getUserAgent()} ${A.SDKName}/${A.SDKVersion}`;return t?e+" "+t:e}s(Vq,"getUserAgent");var Ou=class Ou{constructor(e,n){this.readDatabaseAccount=n,this.writeableLocations=[],this.readableLocations=[],this.unavailableReadableLocations=[],this.unavailableWriteableLocations=[],this.options=e,this.defaultEndpoint=e.endpoint,this.enableEndpointDiscovery=e.connectionPolicy.enableEndpointDiscovery,this.isRefreshing=!1,this.preferredLocations=this.options.connectionPolicy.preferredLocations}async getReadEndpoint(){return this.resolveServiceEndpoint(w.ResourceType.item,w.OperationType.Read)}async getWriteEndpoint(){return this.resolveServiceEndpoint(w.ResourceType.item,w.OperationType.Replace)}async getReadEndpoints(){return this.readableLocations.map(e=>e.databaseAccountEndpoint)}async getWriteEndpoints(){return this.writeableLocations.map(e=>e.databaseAccountEndpoint)}async markCurrentLocationUnavailableForRead(e){await this.refreshEndpointList();let n=this.readableLocations.find(r=>r.databaseAccountEndpoint===e);n&&(n.unavailable=!0,n.lastUnavailabilityTimestampInMs=Date.now(),this.unavailableReadableLocations.push(n))}async markCurrentLocationUnavailableForWrite(e){await this.refreshEndpointList();let n=this.writeableLocations.find(r=>r.databaseAccountEndpoint===e);n&&(n.unavailable=!0,n.lastUnavailabilityTimestampInMs=Date.now(),this.unavailableWriteableLocations.push(n))}canUseMultipleWriteLocations(e,n){let r=this.options.connectionPolicy.useMultipleWriteLocations;return e&&(r=r&&(e===w.ResourceType.item||e===w.ResourceType.sproc&&n===w.OperationType.Execute)),r}async resolveServiceEndpoint(e,n){if(!this.options.connectionPolicy.enableEndpointDiscovery)return this.defaultEndpoint;if(e===w.ResourceType.none)return this.defaultEndpoint;if(this.readableLocations.length===0||this.writeableLocations.length===0){let{resource:c}=await this.readDatabaseAccount({urlConnection:this.defaultEndpoint});this.writeableLocations=c.writableLocations,this.readableLocations=c.readableLocations}let r=kf(n)?this.readableLocations:this.writeableLocations,o;if(this.preferredLocations&&this.preferredLocations.length>0){for(let c of this.preferredLocations)if(o=r.find(u=>u.unavailable!==!0&&Vw(u.name)===Vw(c)),o)break}return o||(o=r.find(c=>c.unavailable!==!0)),o?o.databaseAccountEndpoint:this.defaultEndpoint}async refreshEndpointList(){if(!this.isRefreshing&&this.enableEndpointDiscovery){this.isRefreshing=!0;let e=await this.getDatabaseAccountFromAnyEndpoint();e&&(this.refreshStaleUnavailableLocations(),this.refreshEndpoints(e)),this.isRefreshing=!1}}refreshEndpoints(e){for(let n of e.writableLocations)this.writeableLocations.find(o=>o.name===n.name)||this.writeableLocations.push(n);for(let n of e.readableLocations)this.readableLocations.find(o=>o.name===n.name)||this.readableLocations.push(n)}refreshStaleUnavailableLocations(){let e=Date.now();this.updateLocation(e,this.unavailableReadableLocations,this.readableLocations),this.unavailableReadableLocations=this.cleanUnavailableLocationList(e,this.unavailableReadableLocations),this.updateLocation(e,this.unavailableWriteableLocations,this.writeableLocations),this.unavailableWriteableLocations=this.cleanUnavailableLocationList(e,this.unavailableWriteableLocations)}updateLocation(e,n,r){for(let o of n){let c=r.find(u=>u.name===o.name);c&&e-c.lastUnavailabilityTimestampInMs>A.LocationUnavailableExpirationTimeInMs&&(c.unavailable=!1)}}cleanUnavailableLocationList(e,n){return n.filter(r=>!(r&&e-r.lastUnavailabilityTimestampInMs>=A.LocationUnavailableExpirationTimeInMs))}async getDatabaseAccountFromAnyEndpoint(){try{let e={urlConnection:this.defaultEndpoint},{resource:n}=await this.readDatabaseAccount(e);return n}catch{}if(this.preferredLocations)for(let e of this.preferredLocations)try{let r={urlConnection:Ou.getLocationalEndpoint(this.defaultEndpoint,e)},{resource:o}=await this.readDatabaseAccount(r);if(o)return o}catch{}}static getLocationalEndpoint(e,n){let r=new URL(e);if(r.hostname){let o=r.hostname.toString().toLowerCase().split(".");if(o){let c=o[0],u=c+"-"+n.replace(" ","");return e.toLowerCase().replace(c,u)}}return null}};s(Ou,"GlobalEndpointManager");var Eu=Ou;function Vw(t){return t.split(" ").join("").toLowerCase()}s(Vw,"normalizeEndpoint");var Qh=class Qh{constructor(e){var n,r;if(typeof e=="string"&&(e=S3(e)),!Kq(e.endpoint))throw new Error("Invalid endpoint specified");e.connectionPolicy=Object.assign({},jw,e.connectionPolicy),e.defaultHeaders=e.defaultHeaders||{},e.defaultHeaders[A.HttpHeaders.CacheControl]="no-cache",e.defaultHeaders[A.HttpHeaders.Version]=A.CurrentVersion,e.consistencyLevel!==void 0&&(e.defaultHeaders[A.HttpHeaders.ConsistencyLevel]=e.consistencyLevel),e.defaultHeaders[A.HttpHeaders.UserAgent]=Vq(e.userAgentSuffix);let c=new Eu(e,async u=>this.getDatabaseAccount(u));this.clientContext=new Su(e,c),!((n=e.connectionPolicy)===null||n===void 0)&&n.enableEndpointDiscovery&&(!((r=e.connectionPolicy)===null||r===void 0)&&r.enableBackgroundEndpointRefreshing)&&this.backgroundRefreshEndpointList(c,e.connectionPolicy.endpointRefreshRateInMs||jw.endpointRefreshRateInMs),this.databases=new Tu(this,this.clientContext),this.offers=new bu(this,this.clientContext)}async getDatabaseAccount(e){let n=await this.clientContext.getDatabaseAccount(e);return new ot(n.result,n.headers,n.code)}getWriteEndpoint(){return this.clientContext.getWriteEndpoint()}getReadEndpoint(){return this.clientContext.getReadEndpoint()}getWriteEndpoints(){return this.clientContext.getWriteEndpoints()}getReadEndpoints(){return this.clientContext.getReadEndpoints()}database(e){return new qa(this,e,this.clientContext)}offer(e){return new vo(this,e,this.clientContext)}dispose(){clearTimeout(this.endpointRefresher)}async backgroundRefreshEndpointList(e,n){this.endpointRefresher=setInterval(()=>{try{e.refreshEndpointList()}catch(r){console.warn("Failed to refresh endpoints",r)}},n),this.endpointRefresher.unref&&typeof this.endpointRefresher.unref=="function"&&this.endpointRefresher.unref()}};s(Qh,"CosmosClient");var Lf=Qh,Vh=class Vh{};s(Vh,"SasTokenProperties");var Mf=Vh;function Jq(t){let e=new Uint8Array(t.length);for(let n=0;n0){if(typeof e.resourceKind!="string"&&e.resourceKind!=="ITEM")throw new Error(`illegalArgumentException : ${e.resourceKind} is an invalid partition key value range`);e.partitionKeyValueRanges.forEach(u=>{r+=`${Jq(u)},`})}if(e.controlPlaneReaderScope===0&&(e.controlPlaneReaderScope+=w.SasTokenPermissionKind.ContainerReadAny,e.controlPlaneWriterScope+=w.SasTokenPermissionKind.ContainerReadAny),e.dataPlaneReaderScope===0&&e.dataPlaneWriterScope===0&&(e.dataPlaneReaderScope=w.SasTokenPermissionKind.ContainerFullAccess,e.dataPlaneWriterScope=w.SasTokenPermissionKind.ContainerFullAccess),typeof e.keyType!="number"||typeof e.keyType===void 0)switch(e.keyType){case uo.PrimaryMaster:e.keyType=1;break;case uo.SecondaryMaster:e.keyType=2;break;case uo.PrimaryReadOnly:e.keyType=3;break;case uo.SecondaryReadOnly:e.keyType=4;break;default:throw new Error(`illegalArgumentException : ${e.keyType} is an invalid key type`)}let o=e.user+` +`+e.userTag+` +`+e.resourcePath+` +`+r+` +`+Jw(e.startTime).toString(16)+` +`+Jw(e.expiryTime).toString(16)+` +`+e.keyType+` +`+e.controlPlaneReaderScope.toString(16)+` +`+e.controlPlaneWriterScope.toString(16)+` +`+e.dataPlaneReaderScope.toString(16)+` +`+e.dataPlaneWriterScope.toString(16)+` +`;return"type=sas&ver=1.0&sig="+await r_(t,Buffer.from(o).toString("base64"))+";"+Buffer.from(o).toString("base64")}s(Yq,"createAuthorizationSasToken");function Jw(t){return Math.round(t.getTime()/1e3)}s(Jw,"utcsecondsSinceEpoch");Object.defineProperty(w,"RestError",{enumerable:!0,get:function(){return yo.RestError}});Object.defineProperty(w,"AbortError",{enumerable:!0,get:function(){return m3.AbortError}});w.BulkOperationType=In;w.ChangeFeedIterator=Da;w.ChangeFeedResponse=hu;w.ClientContext=Su;w.ClientSideMetrics=Xn;w.Conflict=du;w.ConflictResponse=Ia;w.Conflicts=fu;w.Constants=A;w.Container=ka;w.ContainerResponse=wr;w.Containers=wu;w.CosmosClient=Lf;w.DEFAULT_PARTITION_KEY_PATH=Xw;w.Database=qa;w.DatabaseAccount=ou;w.DatabaseResponse=_o;w.Databases=Tu;w.ErrorResponse=au;w.FeedResponse=go;w.GlobalEndpointManager=Eu;w.Item=xo;w.ItemResponse=Yn;w.Items=mu;w.Offer=vo;w.OfferResponse=yi;w.Offers=bu;w.PatchOperationType=W3;w.Permission=bo;w.PermissionResponse=_r;w.Permissions=_u;w.QueryIterator=Et;w.QueryMetrics=Er;w.QueryMetricsConstants=ue;w.QueryPreparationTimes=Tr;w.ResourceResponse=ot;w.RuntimeExecutionTimes=Sr;w.SasTokenProperties=Mf;w.Scripts=vu;w.StatusCodes=vt;w.StoredProcedure=La;w.StoredProcedureResponse=di;w.StoredProcedures=gu;w.TimeSpan=ve;w.TimeoutError=su;w.Trigger=Ma;w.TriggerResponse=fi;w.Triggers=yu;w.User=wo;w.UserDefinedFunction=Na;w.UserDefinedFunctionResponse=hi;w.UserDefinedFunctions=xu;w.UserResponse=Rr;w.Users=Ru;w.createAuthorizationSasToken=Yq;w.extractPartitionKey=mi;w.setAuthorizationTokenHeaderUsingMasterKey=i_});var Yh=L((a5,b_)=>{"use strict";var{CosmosClient:Xq}=Jh();function Zq(t){if(/:\d+/.test(t.host))return t.host;if(t.port)return t.host+":"+(t.port||"443")}s(Zq,"getEndpoint");function eF(t){let e=Zq(t),n=t.accountKey,r={requestTimeout:3e4};return t.disableSSL&&(process.env.NODE_TLS_REJECT_UNAUTHORIZED=0),new Xq({endpoint:e,key:n,connectionPolicy:r})}s(eF,"setUpDocumentClient");b_.exports=eF});var w_=L((To,Ha)=>{(function(){var t,e="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",p=500,d="__lodash_placeholder__",m=1,h=2,y=4,v=1,P=2,_=1,T=2,I=4,N=8,H=16,j=32,G=64,te=128,Ee=256,Ie=512,Ke=30,Ge="...",at=800,vn=16,Le=1,je=2,be=3,Re=1/0,Te=9007199254740991,J=17976931348623157e292,Q=NaN,me=4294967295,jt=me-1,et=me>>>1,bn=[["ary",te],["bind",_],["bindKey",T],["curry",N],["curryRight",H],["flip",Ie],["partial",j],["partialRight",G],["rearg",Ee]],wn="[object Arguments]",dt="[object Array]",Ct="[object AsyncFunction]",_n="[object Boolean]",Fn="[object Date]",tt="[object DOMException]",us="[object Error]",ls="[object Function]",Lg="[object GeneratorFunction]",sn="[object Map]",Bo="[object Number]",yS="[object Null]",Bn="[object Object]",Mg="[object Promise]",xS="[object Proxy]",jo="[object RegExp]",cn="[object Set]",Uo="[object String]",ps="[object Symbol]",vS="[object Undefined]",Ho="[object WeakMap]",bS="[object WeakSet]",zo="[object ArrayBuffer]",Si="[object DataView]",cl="[object Float32Array]",ul="[object Float64Array]",ll="[object Int8Array]",pl="[object Int16Array]",dl="[object Int32Array]",fl="[object Uint8Array]",hl="[object Uint8ClampedArray]",ml="[object Uint16Array]",gl="[object Uint32Array]",wS=/\b__p \+= '';/g,_S=/\b(__p \+=) '' \+/g,RS=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ng=/&(?:amp|lt|gt|quot|#39);/g,kg=/[&<>"']/g,TS=RegExp(Ng.source),SS=RegExp(kg.source),ES=/<%-([\s\S]+?)%>/g,PS=/<%([\s\S]+?)%>/g,qg=/<%=([\s\S]+?)%>/g,AS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CS=/^\w*$/,OS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yl=/[\\^$.*+?()[\]{}|]/g,IS=RegExp(yl.source),xl=/^\s+/,DS=/\s/,LS=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,MS=/\{\n\/\* \[wrapped with (.+)\] \*/,NS=/,? & /,kS=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qS=/[()=,{}\[\]\/\s]/,FS=/\\(\\)?/g,BS=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fg=/\w*$/,jS=/^[-+]0x[0-9a-f]+$/i,US=/^0b[01]+$/i,HS=/^\[object .+?Constructor\]$/,zS=/^0o[0-7]+$/i,$S=/^(?:0|[1-9]\d*)$/,WS=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ds=/($^)/,KS=/['\n\r\u2028\u2029\\]/g,fs="\\ud800-\\udfff",GS="\\u0300-\\u036f",QS="\\ufe20-\\ufe2f",VS="\\u20d0-\\u20ff",Bg=GS+QS+VS,jg="\\u2700-\\u27bf",Ug="a-z\\xdf-\\xf6\\xf8-\\xff",JS="\\xac\\xb1\\xd7\\xf7",YS="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",XS="\\u2000-\\u206f",ZS=" \\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",Hg="A-Z\\xc0-\\xd6\\xd8-\\xde",zg="\\ufe0e\\ufe0f",$g=JS+YS+XS+ZS,vl="['\u2019]",eE="["+fs+"]",Wg="["+$g+"]",hs="["+Bg+"]",Kg="\\d+",tE="["+jg+"]",Gg="["+Ug+"]",Qg="[^"+fs+$g+Kg+jg+Ug+Hg+"]",bl="\\ud83c[\\udffb-\\udfff]",nE="(?:"+hs+"|"+bl+")",Vg="[^"+fs+"]",wl="(?:\\ud83c[\\udde6-\\uddff]){2}",_l="[\\ud800-\\udbff][\\udc00-\\udfff]",Ei="["+Hg+"]",Jg="\\u200d",Yg="(?:"+Gg+"|"+Qg+")",rE="(?:"+Ei+"|"+Qg+")",Xg="(?:"+vl+"(?:d|ll|m|re|s|t|ve))?",Zg="(?:"+vl+"(?:D|LL|M|RE|S|T|VE))?",ey=nE+"?",ty="["+zg+"]?",iE="(?:"+Jg+"(?:"+[Vg,wl,_l].join("|")+")"+ty+ey+")*",oE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",aE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ny=ty+ey+iE,sE="(?:"+[tE,wl,_l].join("|")+")"+ny,cE="(?:"+[Vg+hs+"?",hs,wl,_l,eE].join("|")+")",uE=RegExp(vl,"g"),lE=RegExp(hs,"g"),Rl=RegExp(bl+"(?="+bl+")|"+cE+ny,"g"),pE=RegExp([Ei+"?"+Gg+"+"+Xg+"(?="+[Wg,Ei,"$"].join("|")+")",rE+"+"+Zg+"(?="+[Wg,Ei+Yg,"$"].join("|")+")",Ei+"?"+Yg+"+"+Xg,Ei+"+"+Zg,aE,oE,Kg,sE].join("|"),"g"),dE=RegExp("["+Jg+fs+Bg+zg+"]"),fE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hE=["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"],mE=-1,Pe={};Pe[cl]=Pe[ul]=Pe[ll]=Pe[pl]=Pe[dl]=Pe[fl]=Pe[hl]=Pe[ml]=Pe[gl]=!0,Pe[wn]=Pe[dt]=Pe[zo]=Pe[_n]=Pe[Si]=Pe[Fn]=Pe[us]=Pe[ls]=Pe[sn]=Pe[Bo]=Pe[Bn]=Pe[jo]=Pe[cn]=Pe[Uo]=Pe[Ho]=!1;var Se={};Se[wn]=Se[dt]=Se[zo]=Se[Si]=Se[_n]=Se[Fn]=Se[cl]=Se[ul]=Se[ll]=Se[pl]=Se[dl]=Se[sn]=Se[Bo]=Se[Bn]=Se[jo]=Se[cn]=Se[Uo]=Se[ps]=Se[fl]=Se[hl]=Se[ml]=Se[gl]=!0,Se[us]=Se[ls]=Se[Ho]=!1;var gE={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},yE={"&":"&","<":"<",">":">",'"':""","'":"'"},xE={"&":"&","<":"<",">":">",""":'"',"'":"'"},vE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bE=parseFloat,wE=parseInt,ry=typeof global=="object"&&global&&global.Object===Object&&global,_E=typeof self=="object"&&self&&self.Object===Object&&self,Qe=ry||_E||Function("return this")(),Tl=typeof To=="object"&&To&&!To.nodeType&&To,Mr=Tl&&typeof Ha=="object"&&Ha&&!Ha.nodeType&&Ha,iy=Mr&&Mr.exports===Tl,Sl=iy&&ry.process,Ut=function(){try{var C=Mr&&Mr.require&&Mr.require("util").types;return C||Sl&&Sl.binding&&Sl.binding("util")}catch{}}(),oy=Ut&&Ut.isArrayBuffer,ay=Ut&&Ut.isDate,sy=Ut&&Ut.isMap,cy=Ut&&Ut.isRegExp,uy=Ut&&Ut.isSet,ly=Ut&&Ut.isTypedArray;function Ot(C,k,M){switch(M.length){case 0:return C.call(k);case 1:return C.call(k,M[0]);case 2:return C.call(k,M[0],M[1]);case 3:return C.call(k,M[0],M[1],M[2])}return C.apply(k,M)}s(Ot,"apply");function RE(C,k,M,$){for(var re=-1,ge=C==null?0:C.length;++re-1}s(ms,"arrayIncludes");function El(C,k,M){for(var $=-1,re=C==null?0:C.length;++$-1;);return M}s(yy,"charsStartIndex");function xy(C,k){for(var M=C.length;M--&&Pi(k,C[M],0)>-1;);return M}s(xy,"charsEndIndex");function DE(C,k){for(var M=C.length,$=0;M--;)C[M]===k&&++$;return $}s(DE,"countHolders");var LE=Ol(gE),ME=Ol(yE);function NE(C){return"\\"+vE[C]}s(NE,"escapeStringChar");function kE(C,k){return C==null?t:C[k]}s(kE,"getValue");function Ai(C){return dE.test(C)}s(Ai,"hasUnicode");function qE(C){return fE.test(C)}s(qE,"hasUnicodeWord");function FE(C){for(var k,M=[];!(k=C.next()).done;)M.push(k.value);return M}s(FE,"iteratorToArray");function Ml(C){var k=-1,M=Array(C.size);return C.forEach(function($,re){M[++k]=[re,$]}),M}s(Ml,"mapToArray");function vy(C,k){return function(M){return C(k(M))}}s(vy,"overArg");function nr(C,k){for(var M=-1,$=C.length,re=0,ge=[];++M<$;){var He=C[M];(He===k||He===d)&&(C[M]=d,ge[re++]=M)}return ge}s(nr,"replaceHolders");function ys(C){var k=-1,M=Array(C.size);return C.forEach(function($){M[++k]=$}),M}s(ys,"setToArray");function BE(C){var k=-1,M=Array(C.size);return C.forEach(function($){M[++k]=[$,$]}),M}s(BE,"setToPairs");function jE(C,k,M){for(var $=M-1,re=C.length;++$-1}s(TP,"listCacheHas");function SP(i,a){var l=this.__data__,f=Ds(l,i);return f<0?(++this.size,l.push([i,a])):l[f][1]=a,this}s(SP,"listCacheSet"),jn.prototype.clear=wP,jn.prototype.delete=_P,jn.prototype.get=RP,jn.prototype.has=TP,jn.prototype.set=SP;function Un(i){var a=-1,l=i==null?0:i.length;for(this.clear();++a=a?i:a)),i}s(Fr,"baseClamp");function Wt(i,a,l,f,g,b){var S,E=a&m,O=a&h,q=a&y;if(l&&(S=g?l(i,f,g,b):l(i)),S!==t)return S;if(!De(i))return i;var F=ie(i);if(F){if(S=CA(i),!E)return bt(i,S)}else{var B=ct(i),z=B==ls||B==Lg;if(ur(i))return tx(i,E);if(B==Bn||B==wn||z&&!g){if(S=O||z?{}:bx(i),!E)return O?xA(i,UP(S,i)):yA(i,Iy(S,i))}else{if(!Se[B])return g?i:{};S=OA(i,B,E)}}b||(b=new ln);var W=b.get(i);if(W)return W;b.set(i,S),Vx(i)?i.forEach(function(ee){S.add(Wt(ee,a,l,ee,i,b))}):Gx(i)&&i.forEach(function(ee,ce){S.set(ce,Wt(ee,a,l,ce,i,b))});var Z=q?O?ap:op:O?_t:Ve,ae=F?t:Z(i);return Ht(ae||i,function(ee,ce){ae&&(ce=ee,ee=i[ce]),Jo(S,ce,Wt(ee,a,l,ce,i,b))}),S}s(Wt,"baseClone");function HP(i){var a=Ve(i);return function(l){return Dy(l,i,a)}}s(HP,"baseConforms");function Dy(i,a,l){var f=l.length;if(i==null)return!f;for(i=we(i);f--;){var g=l[f],b=a[g],S=i[g];if(S===t&&!(g in i)||!b(S))return!1}return!0}s(Dy,"baseConformsTo");function Ly(i,a,l){if(typeof i!="function")throw new zt(o);return ra(function(){i.apply(t,l)},a)}s(Ly,"baseDelay");function Yo(i,a,l,f){var g=-1,b=ms,S=!0,E=i.length,O=[],q=a.length;if(!E)return O;l&&(a=Ae(a,It(l))),f?(b=El,S=!1):a.length>=n&&(b=$o,S=!1,a=new qr(a));e:for(;++gg?0:g+l),f=f===t||f>g?g:oe(f),f<0&&(f+=g),f=l>f?0:Yx(f);l0&&l(E)?a>1?nt(E,a-1,l,f,g):tr(g,E):f||(g[g.length]=E)}return g}s(nt,"baseFlatten");var Ul=sx(),ky=sx(!0);function Rn(i,a){return i&&Ul(i,a,Ve)}s(Rn,"baseForOwn");function Hl(i,a){return i&&ky(i,a,Ve)}s(Hl,"baseForOwnRight");function Ms(i,a){return er(a,function(l){return Kn(i[l])})}s(Ms,"baseFunctions");function Br(i,a){a=sr(a,i);for(var l=0,f=a.length;i!=null&&la}s(zl,"baseGt");function WP(i,a){return i!=null&&xe.call(i,a)}s(WP,"baseHas");function KP(i,a){return i!=null&&a in we(i)}s(KP,"baseHasIn");function GP(i,a,l){return i>=st(a,l)&&i=120&&F.length>=120)?new qr(S&&F):t}F=i[0];var B=-1,z=E[0];e:for(;++B-1;)E!==i&&Ss.call(E,O,1),Ss.call(i,O,1);return i}s(Ql,"basePullAll");function Gy(i,a){for(var l=i?a.length:0,f=l-1;l--;){var g=a[l];if(l==f||g!==b){var b=g;Wn(g)?Ss.call(i,g,1):Xl(i,g)}}return i}s(Gy,"basePullAt");function Vl(i,a){return i+As(Py()*(a-i+1))}s(Vl,"baseRandom");function aA(i,a,l,f){for(var g=-1,b=ze(Ps((a-i)/(l||1)),0),S=M(b);b--;)S[f?b:++g]=i,i+=l;return S}s(aA,"baseRange");function Jl(i,a){var l="";if(!i||a<1||a>Te)return l;do a%2&&(l+=i),a=As(a/2),a&&(i+=i);while(a);return l}s(Jl,"baseRepeat");function se(i,a){return fp(Rx(i,a,Rt),i+"")}s(se,"baseRest");function sA(i){return Oy(Fi(i))}s(sA,"baseSample");function cA(i,a){var l=Fi(i);return Ws(l,Fr(a,0,l.length))}s(cA,"baseSampleSize");function ea(i,a,l,f){if(!De(i))return i;a=sr(a,i);for(var g=-1,b=a.length,S=b-1,E=i;E!=null&&++gg?0:g+a),l=l>g?g:l,l<0&&(l+=g),g=a>l?0:l-a>>>0,a>>>=0;for(var b=M(g);++f>>1,S=i[b];S!==null&&!Lt(S)&&(l?S<=a:S=n){var q=a?null:_A(i);if(q)return ys(q);S=!1,g=$o,O=new qr}else O=a?[]:E;e:for(;++f=f?i:Kt(i,a,l)}s(cr,"castSlice");var ex=ZE||function(i){return Qe.clearTimeout(i)};function tx(i,a){if(a)return i.slice();var l=i.length,f=_y?_y(l):new i.constructor(l);return i.copy(f),f}s(tx,"cloneBuffer");function np(i){var a=new i.constructor(i.byteLength);return new Rs(a).set(new Rs(i)),a}s(np,"cloneArrayBuffer");function fA(i,a){var l=a?np(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}s(fA,"cloneDataView");function hA(i){var a=new i.constructor(i.source,Fg.exec(i));return a.lastIndex=i.lastIndex,a}s(hA,"cloneRegExp");function mA(i){return Vo?we(Vo.call(i)):{}}s(mA,"cloneSymbol");function nx(i,a){var l=a?np(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}s(nx,"cloneTypedArray");function rx(i,a){if(i!==a){var l=i!==t,f=i===null,g=i===i,b=Lt(i),S=a!==t,E=a===null,O=a===a,q=Lt(a);if(!E&&!q&&!b&&i>a||b&&S&&O&&!E&&!q||f&&S&&O||!l&&O||!g)return 1;if(!f&&!b&&!q&&i=E)return O;var q=l[f];return O*(q=="desc"?-1:1)}}return i.index-a.index}s(gA,"compareMultiple");function ix(i,a,l,f){for(var g=-1,b=i.length,S=l.length,E=-1,O=a.length,q=ze(b-S,0),F=M(O+q),B=!f;++E1?l[g-1]:t,S=g>2?l[2]:t;for(b=i.length>3&&typeof b=="function"?(g--,b):t,S&&ht(l[0],l[1],S)&&(b=g<3?t:b,g=1),a=we(a);++f-1?g[b?a[S]:S]:t}}s(ux,"createFind");function lx(i){return $n(function(a){var l=a.length,f=l,g=$t.prototype.thru;for(i&&a.reverse();f--;){var b=a[f];if(typeof b!="function")throw new zt(o);if(g&&!S&&zs(b)=="wrapper")var S=new $t([],!0)}for(f=S?f:l;++f1&&de.reverse(),F&&OE))return!1;var q=b.get(i),F=b.get(a);if(q&&F)return q==a&&F==i;var B=-1,z=!0,W=l&P?new qr:t;for(b.set(i,a),b.set(a,i);++B1?"& ":"")+a[f],a=a.join(l>2?", ":" "),i.replace(LS,`{ +/* [wrapped with `+a+`] */ +`)}s(IA,"insertWrapDetails");function DA(i){return ie(i)||Hr(i)||!!(Sy&&i&&i[Sy])}s(DA,"isFlattenable");function Wn(i,a){var l=typeof i;return a=a??Te,!!a&&(l=="number"||l!="symbol"&&$S.test(i))&&i>-1&&i%1==0&&i0){if(++a>=at)return arguments[0]}else a=0;return i.apply(t,arguments)}}s(Px,"shortOut");function Ws(i,a){var l=-1,f=i.length,g=f-1;for(a=a===t?f:a;++l1?i[a-1]:t;return l=typeof l=="function"?(i.pop(),l):t,Nx(i,l)});function kx(i){var a=x(i);return a.__chain__=!0,a}s(kx,"chain");function zC(i,a){return a(i),i}s(zC,"tap");function Ks(i,a){return a(i)}s(Ks,"thru");var $C=$n(function(i){var a=i.length,l=a?i[0]:0,f=this.__wrapped__,g=s(function(b){return jl(b,i)},"interceptor");return a>1||this.__actions__.length||!(f instanceof le)||!Wn(l)?this.thru(g):(f=f.slice(l,+l+(a?1:0)),f.__actions__.push({func:Ks,args:[g],thisArg:t}),new $t(f,this.__chain__).thru(function(b){return a&&!b.length&&b.push(t),b}))});function WC(){return kx(this)}s(WC,"wrapperChain");function KC(){return new $t(this.value(),this.__chain__)}s(KC,"wrapperCommit");function GC(){this.__values__===t&&(this.__values__=Jx(this.value()));var i=this.__index__>=this.__values__.length,a=i?t:this.__values__[this.__index__++];return{done:i,value:a}}s(GC,"wrapperNext");function QC(){return this}s(QC,"wrapperToIterator");function VC(i){for(var a,l=this;l instanceof Is;){var f=Cx(l);f.__index__=0,f.__values__=t,a?g.__wrapped__=f:a=f;var g=f;l=l.__wrapped__}return g.__wrapped__=i,a}s(VC,"wrapperPlant");function JC(){var i=this.__wrapped__;if(i instanceof le){var a=i;return this.__actions__.length&&(a=new le(this)),a=a.reverse(),a.__actions__.push({func:Ks,args:[hp],thisArg:t}),new $t(a,this.__chain__)}return this.thru(hp)}s(JC,"wrapperReverse");function YC(){return Xy(this.__wrapped__,this.__actions__)}s(YC,"wrapperValue");var XC=Fs(function(i,a,l){xe.call(i,l)?++i[l]:Hn(i,l,1)});function ZC(i,a,l){var f=ie(i)?py:zP;return l&&ht(i,a,l)&&(a=t),f(i,Y(a,3))}s(ZC,"every");function eO(i,a){var l=ie(i)?er:Ny;return l(i,Y(a,3))}s(eO,"filter");var tO=ux(Ox),nO=ux(Ix);function rO(i,a){return nt(Gs(i,a),1)}s(rO,"flatMap");function iO(i,a){return nt(Gs(i,a),Re)}s(iO,"flatMapDeep");function oO(i,a,l){return l=l===t?1:oe(l),nt(Gs(i,a),l)}s(oO,"flatMapDepth");function qx(i,a){var l=ie(i)?Ht:or;return l(i,Y(a,3))}s(qx,"forEach");function Fx(i,a){var l=ie(i)?TE:My;return l(i,Y(a,3))}s(Fx,"forEachRight");var aO=Fs(function(i,a,l){xe.call(i,l)?i[l].push(a):Hn(i,l,[a])});function sO(i,a,l,f){i=wt(i)?i:Fi(i),l=l&&!f?oe(l):0;var g=i.length;return l<0&&(l=ze(g+l,0)),Xs(i)?l<=g&&i.indexOf(a,l)>-1:!!g&&Pi(i,a,l)>-1}s(sO,"includes");var cO=se(function(i,a,l){var f=-1,g=typeof a=="function",b=wt(i)?M(i.length):[];return or(i,function(S){b[++f]=g?Ot(a,S,l):Xo(S,a,l)}),b}),uO=Fs(function(i,a,l){Hn(i,l,a)});function Gs(i,a){var l=ie(i)?Ae:Uy;return l(i,Y(a,3))}s(Gs,"map");function lO(i,a,l,f){return i==null?[]:(ie(a)||(a=a==null?[]:[a]),l=f?t:l,ie(l)||(l=l==null?[]:[l]),Wy(i,a,l))}s(lO,"orderBy");var pO=Fs(function(i,a,l){i[l?0:1].push(a)},function(){return[[],[]]});function dO(i,a,l){var f=ie(i)?Pl:my,g=arguments.length<3;return f(i,Y(a,4),l,g,or)}s(dO,"reduce");function fO(i,a,l){var f=ie(i)?SE:my,g=arguments.length<3;return f(i,Y(a,4),l,g,My)}s(fO,"reduceRight");function hO(i,a){var l=ie(i)?er:Ny;return l(i,Js(Y(a,3)))}s(hO,"reject");function mO(i){var a=ie(i)?Oy:sA;return a(i)}s(mO,"sample");function gO(i,a,l){(l?ht(i,a,l):a===t)?a=1:a=oe(a);var f=ie(i)?FP:cA;return f(i,a)}s(gO,"sampleSize");function yO(i){var a=ie(i)?BP:lA;return a(i)}s(yO,"shuffle");function xO(i){if(i==null)return 0;if(wt(i))return Xs(i)?Ci(i):i.length;var a=ct(i);return a==sn||a==cn?i.size:Kl(i).length}s(xO,"size");function vO(i,a,l){var f=ie(i)?Al:pA;return l&&ht(i,a,l)&&(a=t),f(i,Y(a,3))}s(vO,"some");var bO=se(function(i,a){if(i==null)return[];var l=a.length;return l>1&&ht(i,a[0],a[1])?a=[]:l>2&&ht(a[0],a[1],a[2])&&(a=[a[0]]),Wy(i,nt(a,1),[])}),Qs=eP||function(){return Qe.Date.now()};function wO(i,a){if(typeof a!="function")throw new zt(o);return i=oe(i),function(){if(--i<1)return a.apply(this,arguments)}}s(wO,"after");function Bx(i,a,l){return a=l?t:a,a=i&&a==null?i.length:a,zn(i,te,t,t,t,t,a)}s(Bx,"ary");function jx(i,a){var l;if(typeof a!="function")throw new zt(o);return i=oe(i),function(){return--i>0&&(l=a.apply(this,arguments)),i<=1&&(a=t),l}}s(jx,"before");var gp=se(function(i,a,l){var f=_;if(l.length){var g=nr(l,ki(gp));f|=j}return zn(i,f,a,l,g)}),Ux=se(function(i,a,l){var f=_|T;if(l.length){var g=nr(l,ki(Ux));f|=j}return zn(a,f,i,l,g)});function Hx(i,a,l){a=l?t:a;var f=zn(i,N,t,t,t,t,t,a);return f.placeholder=Hx.placeholder,f}s(Hx,"curry");function zx(i,a,l){a=l?t:a;var f=zn(i,H,t,t,t,t,t,a);return f.placeholder=zx.placeholder,f}s(zx,"curryRight");function $x(i,a,l){var f,g,b,S,E,O,q=0,F=!1,B=!1,z=!0;if(typeof i!="function")throw new zt(o);a=Qt(a)||0,De(l)&&(F=!!l.leading,B="maxWait"in l,b=B?ze(Qt(l.maxWait)||0,a):b,z="trailing"in l?!!l.trailing:z);function W(Fe){var dn=f,Qn=g;return f=g=t,q=Fe,S=i.apply(Qn,dn),S}s(W,"invokeFunc");function Z(Fe){return q=Fe,E=ra(ce,a),F?W(Fe):S}s(Z,"leadingEdge");function ae(Fe){var dn=Fe-O,Qn=Fe-q,uv=a-dn;return B?st(uv,b-Qn):uv}s(ae,"remainingWait");function ee(Fe){var dn=Fe-O,Qn=Fe-q;return O===t||dn>=a||dn<0||B&&Qn>=b}s(ee,"shouldInvoke");function ce(){var Fe=Qs();if(ee(Fe))return de(Fe);E=ra(ce,ae(Fe))}s(ce,"timerExpired");function de(Fe){return E=t,z&&f?W(Fe):(f=g=t,S)}s(de,"trailingEdge");function Mt(){E!==t&&ex(E),q=0,f=O=g=E=t}s(Mt,"cancel");function mt(){return E===t?S:de(Qs())}s(mt,"flush");function Nt(){var Fe=Qs(),dn=ee(Fe);if(f=arguments,g=this,O=Fe,dn){if(E===t)return Z(O);if(B)return ex(E),E=ra(ce,a),W(O)}return E===t&&(E=ra(ce,a)),S}return s(Nt,"debounced"),Nt.cancel=Mt,Nt.flush=mt,Nt}s($x,"debounce");var _O=se(function(i,a){return Ly(i,1,a)}),RO=se(function(i,a,l){return Ly(i,Qt(a)||0,l)});function TO(i){return zn(i,Ie)}s(TO,"flip");function Vs(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new zt(o);var l=s(function(){var f=arguments,g=a?a.apply(this,f):f[0],b=l.cache;if(b.has(g))return b.get(g);var S=i.apply(this,f);return l.cache=b.set(g,S)||b,S},"memoized");return l.cache=new(Vs.Cache||Un),l}s(Vs,"memoize"),Vs.Cache=Un;function Js(i){if(typeof i!="function")throw new zt(o);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}s(Js,"negate");function SO(i){return jx(2,i)}s(SO,"once");var EO=dA(function(i,a){a=a.length==1&&ie(a[0])?Ae(a[0],It(Y())):Ae(nt(a,1),It(Y()));var l=a.length;return se(function(f){for(var g=-1,b=st(f.length,l);++g=a}),Hr=Fy(function(){return arguments}())?Fy:function(i){return Me(i)&&xe.call(i,"callee")&&!Ty.call(i,"callee")},ie=M.isArray,UO=oy?It(oy):VP;function wt(i){return i!=null&&Ys(i.length)&&!Kn(i)}s(wt,"isArrayLike");function qe(i){return Me(i)&&wt(i)}s(qe,"isArrayLikeObject");function HO(i){return i===!0||i===!1||Me(i)&&ft(i)==_n}s(HO,"isBoolean");var ur=nP||Ap,zO=ay?It(ay):JP;function $O(i){return Me(i)&&i.nodeType===1&&!ia(i)}s($O,"isElement");function WO(i){if(i==null)return!0;if(wt(i)&&(ie(i)||typeof i=="string"||typeof i.splice=="function"||ur(i)||qi(i)||Hr(i)))return!i.length;var a=ct(i);if(a==sn||a==cn)return!i.size;if(na(i))return!Kl(i).length;for(var l in i)if(xe.call(i,l))return!1;return!0}s(WO,"isEmpty");function KO(i,a){return Zo(i,a)}s(KO,"isEqual");function GO(i,a,l){l=typeof l=="function"?l:t;var f=l?l(i,a):t;return f===t?Zo(i,a,t,l):!!f}s(GO,"isEqualWith");function xp(i){if(!Me(i))return!1;var a=ft(i);return a==us||a==tt||typeof i.message=="string"&&typeof i.name=="string"&&!ia(i)}s(xp,"isError");function QO(i){return typeof i=="number"&&Ey(i)}s(QO,"isFinite");function Kn(i){if(!De(i))return!1;var a=ft(i);return a==ls||a==Lg||a==Ct||a==xS}s(Kn,"isFunction");function Kx(i){return typeof i=="number"&&i==oe(i)}s(Kx,"isInteger");function Ys(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Te}s(Ys,"isLength");function De(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}s(De,"isObject");function Me(i){return i!=null&&typeof i=="object"}s(Me,"isObjectLike");var Gx=sy?It(sy):XP;function VO(i,a){return i===a||Wl(i,a,cp(a))}s(VO,"isMatch");function JO(i,a,l){return l=typeof l=="function"?l:t,Wl(i,a,cp(a),l)}s(JO,"isMatchWith");function YO(i){return Qx(i)&&i!=+i}s(YO,"isNaN");function XO(i){if(NA(i))throw new re(r);return By(i)}s(XO,"isNative");function ZO(i){return i===null}s(ZO,"isNull");function eI(i){return i==null}s(eI,"isNil");function Qx(i){return typeof i=="number"||Me(i)&&ft(i)==Bo}s(Qx,"isNumber");function ia(i){if(!Me(i)||ft(i)!=Bn)return!1;var a=Ts(i);if(a===null)return!0;var l=xe.call(a,"constructor")&&a.constructor;return typeof l=="function"&&l instanceof l&&bs.call(l)==JE}s(ia,"isPlainObject");var vp=cy?It(cy):ZP;function tI(i){return Kx(i)&&i>=-Te&&i<=Te}s(tI,"isSafeInteger");var Vx=uy?It(uy):eA;function Xs(i){return typeof i=="string"||!ie(i)&&Me(i)&&ft(i)==Uo}s(Xs,"isString");function Lt(i){return typeof i=="symbol"||Me(i)&&ft(i)==ps}s(Lt,"isSymbol");var qi=ly?It(ly):tA;function nI(i){return i===t}s(nI,"isUndefined");function rI(i){return Me(i)&&ct(i)==Ho}s(rI,"isWeakMap");function iI(i){return Me(i)&&ft(i)==bS}s(iI,"isWeakSet");var oI=Hs(Gl),aI=Hs(function(i,a){return i<=a});function Jx(i){if(!i)return[];if(wt(i))return Xs(i)?un(i):bt(i);if(Wo&&i[Wo])return FE(i[Wo]());var a=ct(i),l=a==sn?Ml:a==cn?ys:Fi;return l(i)}s(Jx,"toArray");function Gn(i){if(!i)return i===0?i:0;if(i=Qt(i),i===Re||i===-Re){var a=i<0?-1:1;return a*J}return i===i?i:0}s(Gn,"toFinite");function oe(i){var a=Gn(i),l=a%1;return a===a?l?a-l:a:0}s(oe,"toInteger");function Yx(i){return i?Fr(oe(i),0,me):0}s(Yx,"toLength");function Qt(i){if(typeof i=="number")return i;if(Lt(i))return Q;if(De(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=De(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=gy(i);var l=US.test(i);return l||zS.test(i)?wE(i.slice(2),l?2:8):jS.test(i)?Q:+i}s(Qt,"toNumber");function Xx(i){return Tn(i,_t(i))}s(Xx,"toPlainObject");function sI(i){return i?Fr(oe(i),-Te,Te):i===0?i:0}s(sI,"toSafeInteger");function ye(i){return i==null?"":Dt(i)}s(ye,"toString");var cI=Mi(function(i,a){if(na(a)||wt(a)){Tn(a,Ve(a),i);return}for(var l in a)xe.call(a,l)&&Jo(i,l,a[l])}),Zx=Mi(function(i,a){Tn(a,_t(a),i)}),Zs=Mi(function(i,a,l,f){Tn(a,_t(a),i,f)}),uI=Mi(function(i,a,l,f){Tn(a,Ve(a),i,f)}),lI=$n(jl);function pI(i,a){var l=Li(i);return a==null?l:Iy(l,a)}s(pI,"create");var dI=se(function(i,a){i=we(i);var l=-1,f=a.length,g=f>2?a[2]:t;for(g&&ht(a[0],a[1],g)&&(f=1);++l1),b}),Tn(i,ap(i),l),f&&(l=Wt(l,m|h|y,RA));for(var g=a.length;g--;)Xl(l,a[g]);return l});function OI(i,a){return tv(i,Js(Y(a)))}s(OI,"omitBy");var II=$n(function(i,a){return i==null?{}:iA(i,a)});function tv(i,a){if(i==null)return{};var l=Ae(ap(i),function(f){return[f]});return a=Y(a),Ky(i,l,function(f,g){return a(f,g[0])})}s(tv,"pickBy");function DI(i,a,l){a=sr(a,i);var f=-1,g=a.length;for(g||(g=1,i=t);++fa){var f=i;i=a,a=f}if(l||i%1||a%1){var g=Py();return st(i+g*(a-i+bE("1e-"+((g+"").length-1))),a)}return Vl(i,a)}s(HI,"random");var zI=Ni(function(i,a,l){return a=a.toLowerCase(),i+(l?iv(a):a)});function iv(i){return _p(ye(i).toLowerCase())}s(iv,"capitalize");function ov(i){return i=ye(i),i&&i.replace(WS,LE).replace(lE,"")}s(ov,"deburr");function $I(i,a,l){i=ye(i),a=Dt(a);var f=i.length;l=l===t?f:Fr(oe(l),0,f);var g=l;return l-=a.length,l>=0&&i.slice(l,g)==a}s($I,"endsWith");function WI(i){return i=ye(i),i&&SS.test(i)?i.replace(kg,ME):i}s(WI,"escape");function KI(i){return i=ye(i),i&&IS.test(i)?i.replace(yl,"\\$&"):i}s(KI,"escapeRegExp");var GI=Ni(function(i,a,l){return i+(l?"-":"")+a.toLowerCase()}),QI=Ni(function(i,a,l){return i+(l?" ":"")+a.toLowerCase()}),VI=cx("toLowerCase");function JI(i,a,l){i=ye(i),a=oe(a);var f=a?Ci(i):0;if(!a||f>=a)return i;var g=(a-f)/2;return Us(As(g),l)+i+Us(Ps(g),l)}s(JI,"pad");function YI(i,a,l){i=ye(i),a=oe(a);var f=a?Ci(i):0;return a&&f>>0,l?(i=ye(i),i&&(typeof a=="string"||a!=null&&!vp(a))&&(a=Dt(a),!a&&Ai(i))?cr(un(i),0,l):i.split(a,l)):[]}s(rD,"split");var iD=Ni(function(i,a,l){return i+(l?" ":"")+_p(a)});function oD(i,a,l){return i=ye(i),l=l==null?0:Fr(oe(l),0,i.length),a=Dt(a),i.slice(l,l+a.length)==a}s(oD,"startsWith");function aD(i,a,l){var f=x.templateSettings;l&&ht(i,a,l)&&(a=t),i=ye(i),a=Zs({},a,f,mx);var g=Zs({},a.imports,f.imports,mx),b=Ve(g),S=Ll(g,b),E,O,q=0,F=a.interpolate||ds,B="__p += '",z=Nl((a.escape||ds).source+"|"+F.source+"|"+(F===qg?BS:ds).source+"|"+(a.evaluate||ds).source+"|$","g"),W="//# sourceURL="+(xe.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mE+"]")+` +`;i.replace(z,function(ee,ce,de,Mt,mt,Nt){return de||(de=Mt),B+=i.slice(q,Nt).replace(KS,NE),ce&&(E=!0,B+=`' + +__e(`+ce+`) + +'`),mt&&(O=!0,B+=`'; +`+mt+`; +__p += '`),de&&(B+=`' + +((__t = (`+de+`)) == null ? '' : __t) + +'`),q=Nt+ee.length,ee}),B+=`'; +`;var Z=xe.call(a,"variable")&&a.variable;if(!Z)B=`with (obj) { +`+B+` +} +`;else if(qS.test(Z))throw new re(c);B=(O?B.replace(wS,""):B).replace(_S,"$1").replace(RS,"$1;"),B="function("+(Z||"obj")+`) { +`+(Z?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(O?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+B+`return __p +}`;var ae=sv(function(){return ge(b,W+"return "+B).apply(t,S)});if(ae.source=B,xp(ae))throw ae;return ae}s(aD,"template");function sD(i){return ye(i).toLowerCase()}s(sD,"toLower");function cD(i){return ye(i).toUpperCase()}s(cD,"toUpper");function uD(i,a,l){if(i=ye(i),i&&(l||a===t))return gy(i);if(!i||!(a=Dt(a)))return i;var f=un(i),g=un(a),b=yy(f,g),S=xy(f,g)+1;return cr(f,b,S).join("")}s(uD,"trim");function lD(i,a,l){if(i=ye(i),i&&(l||a===t))return i.slice(0,by(i)+1);if(!i||!(a=Dt(a)))return i;var f=un(i),g=xy(f,un(a))+1;return cr(f,0,g).join("")}s(lD,"trimEnd");function pD(i,a,l){if(i=ye(i),i&&(l||a===t))return i.replace(xl,"");if(!i||!(a=Dt(a)))return i;var f=un(i),g=yy(f,un(a));return cr(f,g).join("")}s(pD,"trimStart");function dD(i,a){var l=Ke,f=Ge;if(De(a)){var g="separator"in a?a.separator:g;l="length"in a?oe(a.length):l,f="omission"in a?Dt(a.omission):f}i=ye(i);var b=i.length;if(Ai(i)){var S=un(i);b=S.length}if(l>=b)return i;var E=l-Ci(f);if(E<1)return f;var O=S?cr(S,0,E).join(""):i.slice(0,E);if(g===t)return O+f;if(S&&(E+=O.length-E),vp(g)){if(i.slice(E).search(g)){var q,F=O;for(g.global||(g=Nl(g.source,ye(Fg.exec(g))+"g")),g.lastIndex=0;q=g.exec(F);)var B=q.index;O=O.slice(0,B===t?E:B)}}else if(i.indexOf(Dt(g),E)!=E){var z=O.lastIndexOf(g);z>-1&&(O=O.slice(0,z))}return O+f}s(dD,"truncate");function fD(i){return i=ye(i),i&&TS.test(i)?i.replace(Ng,HE):i}s(fD,"unescape");var hD=Ni(function(i,a,l){return i+(l?" ":"")+a.toUpperCase()}),_p=cx("toUpperCase");function av(i,a,l){return i=ye(i),a=l?t:a,a===t?qE(i)?WE(i):AE(i):i.match(a)||[]}s(av,"words");var sv=se(function(i,a){try{return Ot(i,t,a)}catch(l){return xp(l)?l:new re(l)}}),mD=$n(function(i,a){return Ht(a,function(l){l=Sn(l),Hn(i,l,gp(i[l],i))}),i});function gD(i){var a=i==null?0:i.length,l=Y();return i=a?Ae(i,function(f){if(typeof f[1]!="function")throw new zt(o);return[l(f[0]),f[1]]}):[],se(function(f){for(var g=-1;++gTe)return[];var l=me,f=st(i,me);a=Y(a),i-=me;for(var g=Dl(f,a);++l0||a<0)?new le(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),a!==t&&(a=oe(a),l=a<0?l.dropRight(-a):l.take(a-i)),l)},le.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},le.prototype.toArray=function(){return this.take(me)},Rn(le.prototype,function(i,a){var l=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=x[f?"take"+(a=="last"?"Right":""):a],b=f||/^find/.test(a);g&&(x.prototype[a]=function(){var S=this.__wrapped__,E=f?[1]:arguments,O=S instanceof le,q=E[0],F=O||ie(S),B=s(function(ce){var de=g.apply(x,tr([ce],E));return f&&z?de[0]:de},"interceptor");F&&l&&typeof q=="function"&&q.length!=1&&(O=F=!1);var z=this.__chain__,W=!!this.__actions__.length,Z=b&&!z,ae=O&&!W;if(!b&&F){S=ae?S:new le(this);var ee=i.apply(S,E);return ee.__actions__.push({func:Ks,args:[B],thisArg:t}),new $t(ee,z)}return Z&&ae?i.apply(this,E):(ee=this.thru(B),Z?f?ee.value()[0]:ee.value():ee)})}),Ht(["pop","push","shift","sort","splice","unshift"],function(i){var a=xs[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",f=/^(?:pop|shift)$/.test(i);x.prototype[i]=function(){var g=arguments;if(f&&!this.__chain__){var b=this.value();return a.apply(ie(b)?b:[],g)}return this[l](function(S){return a.apply(ie(S)?S:[],g)})}}),Rn(le.prototype,function(i,a){var l=x[a];if(l){var f=l.name+"";xe.call(Di,f)||(Di[f]=[]),Di[f].push({name:a,func:l})}}),Di[Bs(t,T).name]=[{name:"wrapper",func:t}],le.prototype.clone=fP,le.prototype.reverse=hP,le.prototype.value=mP,x.prototype.at=$C,x.prototype.chain=WC,x.prototype.commit=KC,x.prototype.next=GC,x.prototype.plant=VC,x.prototype.reverse=JC,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=YC,x.prototype.first=x.prototype.head,Wo&&(x.prototype[Wo]=QC),x},"runInContext"),rr=KE();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Qe._=rr,define(function(){return rr})):Mr?((Mr.exports=rr)._=rr,Tl._=rr):Qe._=rr}).call(To)});var T_=L((u5,R_)=>{var __=require("stream").Stream,tF=require("util");R_.exports=yn;function yn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}s(yn,"DelayedStream");tF.inherits(yn,__);yn.create=function(t,e){var n=new this;e=e||{};for(var r in e)n[r]=e[r];n.source=t;var o=t.emit;return t.emit=function(){return n._handleEmit(arguments),o.apply(t,arguments)},t.on("error",function(){}),n.pauseStream&&t.pause(),n};Object.defineProperty(yn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});yn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};yn.prototype.resume=function(){this._released||this.release(),this.source.resume()};yn.prototype.pause=function(){this.source.pause()};yn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};yn.prototype.pipe=function(){var t=__.prototype.pipe.apply(this,arguments);return this.resume(),t};yn.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};yn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var A_=L((p5,P_)=>{var nF=require("util"),E_=require("stream").Stream,S_=T_();P_.exports=ke;function ke(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}s(ke,"CombinedStream");nF.inherits(ke,E_);ke.create=function(t){var e=new this;t=t||{};for(var n in t)e[n]=t[n];return e};ke.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ke.prototype.append=function(t){var e=ke.isStreamLike(t);if(e){if(!(t instanceof S_)){var n=S_.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=n}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};ke.prototype.pipe=function(t,e){return E_.prototype.pipe.call(this,t,e),this.resume(),t};ke.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ke.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(n){var r=ke.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};ke.prototype._pipeNext=function(t){this._currentStream=t;var e=ke.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var n=t;this.write(n),this._getNext()};ke.prototype._handleErrors=function(t){var e=this;t.on("error",function(n){e._emitError(n)})};ke.prototype.write=function(t){this.emit("data",t)};ke.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ke.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ke.prototype.end=function(){this._reset(),this.emit("end")};ke.prototype.destroy=function(){this._reset(),this.emit("close")};ke.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ke.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ke.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ke.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var C_=L((f5,rF)=>{rF.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var I_=L((h5,O_)=>{O_.exports=C_()});var M_=L(Pt=>{"use strict";var Lu=I_(),iF=require("path").extname,D_=/^\s*([^;\s]*)(?:;|\s|$)/,oF=/^text\//i;Pt.charset=L_;Pt.charsets={lookup:L_};Pt.contentType=aF;Pt.extension=sF;Pt.extensions=Object.create(null);Pt.lookup=cF;Pt.types=Object.create(null);uF(Pt.extensions,Pt.types);function L_(t){if(!t||typeof t!="string")return!1;var e=D_.exec(t),n=e&&Lu[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&oF.test(e[1])?"UTF-8":!1}s(L_,"charset");function aF(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Pt.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var n=Pt.charset(e);n&&(e+="; charset="+n.toLowerCase())}return e}s(aF,"contentType");function sF(t){if(!t||typeof t!="string")return!1;var e=D_.exec(t),n=e&&Pt.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}s(sF,"extension");function cF(t){if(!t||typeof t!="string")return!1;var e=iF("x."+t).toLowerCase().substr(1);return e&&Pt.types[e]||!1}s(cF,"lookup");function uF(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys(Lu).forEach(s(function(o){var c=Lu[o],u=c.extensions;if(!(!u||!u.length)){t[o]=u;for(var p=0;ph||m===h&&e[d].substr(0,12)==="application/"))continue}e[d]=o}}},"forEachMimeType"))}s(uF,"populateMaps")});var k_=L((y5,N_)=>{N_.exports=lF;function lF(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}s(lF,"defer")});var Xh=L((v5,F_)=>{var q_=k_();F_.exports=pF;function pF(t){var e=!1;return q_(function(){e=!0}),s(function(r,o){e?t(r,o):q_(s(function(){t(r,o)},"nextTick_callback"))},"async_callback")}s(pF,"async")});var Zh=L((w5,B_)=>{B_.exports=dF;function dF(t){Object.keys(t.jobs).forEach(fF.bind(t)),t.jobs={}}s(dF,"abort");function fF(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}s(fF,"clean")});var em=L((R5,U_)=>{var j_=Xh(),hF=Zh();U_.exports=mF;function mF(t,e,n,r){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=gF(e,o,t[o],function(c,u){o in n.jobs&&(delete n.jobs[o],c?hF(n):n.results[o]=u,r(c,n.results))})}s(mF,"iterate");function gF(t,e,n,r){var o;return t.length==2?o=t(n,j_(r)):o=t(n,e,j_(r)),o}s(gF,"runJob")});var tm=L((S5,H_)=>{H_.exports=yF;function yF(t,e){var n=!Array.isArray(t),r={index:0,keyedList:n||e?Object.keys(t):null,jobs:{},results:n?{}:[],size:n?Object.keys(t).length:t.length};return e&&r.keyedList.sort(n?e:function(o,c){return e(t[o],t[c])}),r}s(yF,"state")});var nm=L((P5,z_)=>{var xF=Zh(),vF=Xh();z_.exports=bF;function bF(t){Object.keys(this.jobs).length&&(this.index=this.size,xF(this),vF(t)(null,this.results))}s(bF,"terminator")});var W_=L((C5,$_)=>{var wF=em(),_F=tm(),RF=nm();$_.exports=TF;function TF(t,e,n){for(var r=_F(t);r.index<(r.keyedList||t).length;)wF(t,e,r,function(o,c){if(o){n(o,c);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return RF.bind(r,n)}s(TF,"parallel")});var rm=L((I5,Mu)=>{var K_=em(),SF=tm(),EF=nm();Mu.exports=PF;Mu.exports.ascending=G_;Mu.exports.descending=AF;function PF(t,e,n,r){var o=SF(t,n);return K_(t,e,o,s(function c(u,p){if(u){r(u,p);return}if(o.index++,o.index<(o.keyedList||t).length){K_(t,e,o,c);return}r(null,o.results)},"iteratorHandler")),EF.bind(o,r)}s(PF,"serialOrdered");function G_(t,e){return te?1:0}s(G_,"ascending");function AF(t,e){return-1*G_(t,e)}s(AF,"descending")});var V_=L((L5,Q_)=>{var CF=rm();Q_.exports=OF;function OF(t,e,n){return CF(t,e,null,n)}s(OF,"serial")});var Y_=L((N5,J_)=>{J_.exports={parallel:W_(),serial:V_(),serialOrdered:rm()}});var Z_=L((k5,X_)=>{X_.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var n1=L((q5,t1)=>{var sm=A_(),e1=require("util"),im=require("path"),IF=require("http"),DF=require("https"),LF=require("url").parse,MF=require("fs"),NF=require("stream").Stream,om=M_(),kF=Y_(),am=Z_();t1.exports=he;e1.inherits(he,sm);function he(t){if(!(this instanceof he))return new he(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],sm.call(this),t=t||{};for(var e in t)this[e]=t[e]}s(he,"FormData");he.LINE_BREAK=`\r +`;he.DEFAULT_CONTENT_TYPE="application/octet-stream";he.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=sm.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),e1.isArray(e)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(t,e,n),c=this._multiPartFooter();r(o),r(e),r(c),this._trackLength(o,e,n)};he.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+he.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof NF))&&(n.knownLength||this._valuesToMeasure.push(e))};he.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):MF.stat(t.path,function(n,r){var o;if(n){e(n);return}o=r.size-(t.start?t.start:0),e(null,o)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};he.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),o=this._getContentType(e,n),c="",u={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};typeof n.header=="object"&&am(u,n.header);var p;for(var d in u)u.hasOwnProperty(d)&&(p=u[d],p!=null&&(Array.isArray(p)||(p=[p]),p.length&&(c+=d+": "+p.join("; ")+he.LINE_BREAK)));return"--"+this.getBoundary()+he.LINE_BREAK+c+he.LINE_BREAK};he.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=im.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=im.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=im.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};he.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=om.lookup(t.name)),!n&&t.path&&(n=om.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=om.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=he.DEFAULT_CONTENT_TYPE),n};he.prototype._multiPartFooter=function(){return function(t){var e=he.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};he.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+he.LINE_BREAK};he.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};he.prototype.setBoundary=function(t){this._boundary=t};he.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};he.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n{"use strict";var qF=require("url").parse,FF={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},BF=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function jF(t){var e=typeof t=="string"?qF(t):t||{},n=e.protocol,r=e.host,o=e.port;if(typeof r!="string"||!r||typeof n!="string"||(n=n.split(":",1)[0],r=r.replace(/:\d*$/,""),o=parseInt(o)||FF[n]||0,!UF(r,o)))return"";var c=So("npm_config_"+n+"_proxy")||So(n+"_proxy")||So("npm_config_proxy")||So("all_proxy");return c&&c.indexOf("://")===-1&&(c=n+"://"+c),c}s(jF,"getProxyForUrl");function UF(t,e){var n=(So("npm_config_no_proxy")||So("no_proxy")).toLowerCase();return n?n==="*"?!1:n.split(/[,\s]/).every(function(r){if(!r)return!0;var o=r.match(/^(.+):(\d+)$/),c=o?o[1]:r,u=o?parseInt(o[2]):0;return u&&u!==e?!0:/^[.*]/.test(c)?(c.charAt(0)==="*"&&(c=c.slice(1)),!BF.call(t,c)):t!==c}):!0}s(UF,"shouldProxy");function So(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}s(So,"getEnv");r1.getProxyForUrl=jF});var a1=L((U5,o1)=>{var za;o1.exports=function(){if(!za){try{za=fa()("follow-redirects")}catch{}typeof za!="function"&&(za=s(function(){},"debug"))}za.apply(null,arguments)}});var p1=L((z5,vm)=>{var Ka=require("url"),$a=Ka.URL,HF=require("http"),zF=require("https"),dm=require("stream").Writable,fm=require("assert"),s1=a1(),hm=!1;try{fm(new $a)}catch(t){hm=t.code==="ERR_INVALID_URL"}var $F=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],mm=["abort","aborted","connect","error","socket","timeout"],gm=Object.create(null);mm.forEach(function(t){gm[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var um=Ga("ERR_INVALID_URL","Invalid URL",TypeError),lm=Ga("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),WF=Ga("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",lm),KF=Ga("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),GF=Ga("ERR_STREAM_WRITE_AFTER_END","write after end"),QF=dm.prototype.destroy||u1;function At(t,e){dm.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(r){try{n._processResponse(r)}catch(o){n.emit("error",o instanceof lm?o:new lm({cause:o}))}},this._performRequest()}s(At,"RedirectableRequest");At.prototype=Object.create(dm.prototype);At.prototype.abort=function(){xm(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};At.prototype.destroy=function(t){return xm(this._currentRequest,t),QF.call(this,t),this};At.prototype.write=function(t,e,n){if(this._ending)throw new GF;if(!vi(t)&&!YF(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Wa(e)&&(n=e,e=null),t.length===0){n&&n();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new KF),this.abort())};At.prototype.end=function(t,e,n){if(Wa(t)?(n=t,t=e=null):Wa(e)&&(n=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,o=this._currentRequest;this.write(t,e,function(){r._ended=!0,o.end(null,null,n)}),this._ending=!0}};At.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};At.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};At.prototype.setTimeout=function(t,e){var n=this;function r(u){u.setTimeout(t),u.removeListener("timeout",u.destroy),u.addListener("timeout",u.destroy)}s(r,"destroyOnTimeout");function o(u){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),c()},t),r(u)}s(o,"startTimer");function c(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",c),n.removeListener("error",c),n.removeListener("response",c),n.removeListener("close",c),e&&n.removeListener("timeout",e),n.socket||n._currentRequest.removeListener("socket",o)}return s(c,"clearTimer"),e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",c),this.on("error",c),this.on("response",c),this.on("close",c),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){At.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(At.prototype,t,{get:function(){return this._currentRequest[t]}})});At.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};At.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var n=t.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=e.request(this._options,this._onNativeResponse);r._redirectable=this;for(var o of mm)r.on(o,gm[o]);if(this._currentUrl=/^\//.test(this._options.path)?Ka.format(this._options):this._options.path,this._isRedirect){var c=0,u=this,p=this._requestBodyBuffers;s(function d(m){if(r===u._currentRequest)if(m)u.emit("error",m);else if(c=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(xm(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new WF;var r,o=this._options.beforeRedirect;o&&(r=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var c=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],cm(/^content-/i,this._options.headers));var u=cm(/^host$/i,this._options.headers),p=ym(this._currentUrl),d=u||p.host,m=/^\w+:/.test(n)?this._currentUrl:Ka.format(Object.assign(p,{host:d})),h=VF(n,m);if(s1("redirecting to",h.href),this._isRedirect=!0,pm(h,this._options),(h.protocol!==p.protocol&&h.protocol!=="https:"||h.host!==d&&!JF(h.host,d))&&cm(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Wa(o)){var y={headers:t.headers,statusCode:e},v={url:m,method:c,headers:r};o(this._options,y,v),this._sanitizeOptions(this._options)}this._performRequest()};function c1(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach(function(r){var o=r+":",c=n[o]=t[r],u=e[r]=Object.create(c);function p(m,h,y){return XF(m)?m=pm(m):vi(m)?m=pm(ym(m)):(y=h,h=l1(m),m={protocol:o}),Wa(h)&&(y=h,h=null),h=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},m,h),h.nativeProtocols=n,!vi(h.host)&&!vi(h.hostname)&&(h.hostname="::1"),fm.equal(h.protocol,o,"protocol mismatch"),s1("options",h),new At(h,y)}s(p,"request");function d(m,h,y){var v=u.request(m,h,y);return v.end(),v}s(d,"get"),Object.defineProperties(u,{request:{value:p,configurable:!0,enumerable:!0,writable:!0},get:{value:d,configurable:!0,enumerable:!0,writable:!0}})}),e}s(c1,"wrap");function u1(){}s(u1,"noop");function ym(t){var e;if(hm)e=new $a(t);else if(e=l1(Ka.parse(t)),!vi(e.protocol))throw new um({input:t});return e}s(ym,"parseUrl");function VF(t,e){return hm?new $a(t,e):ym(Ka.resolve(e,t))}s(VF,"resolveUrl");function l1(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new um({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new um({input:t.href||t});return t}s(l1,"validateUrl");function pm(t,e){var n=e||{};for(var r of $F)n[r]=t[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}s(pm,"spreadUrlObject");function cm(t,e){var n;for(var r in e)t.test(r)&&(n=e[r],delete e[r]);return n===null||typeof n>"u"?void 0:String(n).trim()}s(cm,"removeMatchingHeaders");function Ga(t,e,n){function r(o){Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return s(r,"CustomError"),r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),r}s(Ga,"createErrorType");function xm(t,e){for(var n of mm)t.removeListener(n,gm[n]);t.on("error",u1),t.destroy(e)}s(xm,"destroyRequest");function JF(t,e){fm(vi(t)&&vi(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}s(JF,"isSubdomain");function vi(t){return typeof t=="string"||t instanceof String}s(vi,"isString");function Wa(t){return typeof t=="function"}s(Wa,"isFunction");function YF(t){return typeof t=="object"&&"length"in t}s(YF,"isBuffer");function XF(t){return $a&&t instanceof $a}s(XF,"isURL");vm.exports=c1({http:HF,https:zF});vm.exports.wrap=c1});var eR=L((W5,Z1)=>{"use strict";var ZF=n1(),eB=require("url"),tB=i1(),nB=require("http"),rB=require("https"),C1=require("util"),iB=p1(),oB=require("zlib"),O1=require("stream"),aB=require("events");function Zn(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}s(Zn,"_interopDefaultLegacy");var I1=Zn(ZF),sB=Zn(eB),cB=Zn(nB),uB=Zn(rB),lB=Zn(C1),pB=Zn(iB),Or=Zn(oB),Ar=Zn(O1),dB=Zn(aB);function D1(t,e){return s(function(){return t.apply(e,arguments)},"wrap")}s(D1,"bind");var{toString:fB}=Object.prototype,{getPrototypeOf:Mm}=Object,Uu=(t=>e=>{let n=fB.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ln=s(t=>(t=t.toLowerCase(),e=>Uu(e)===t),"kindOfTest"),Hu=s(t=>e=>typeof e===t,"typeOfTest"),{isArray:Co}=Array,Ja=Hu("undefined");function hB(t){return t!==null&&!Ja(t)&&t.constructor!==null&&!Ja(t.constructor)&&nn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}s(hB,"isBuffer");var L1=Ln("ArrayBuffer");function mB(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&L1(t.buffer),e}s(mB,"isArrayBufferView");var gB=Hu("string"),nn=Hu("function"),M1=Hu("number"),zu=s(t=>t!==null&&typeof t=="object","isObject"),yB=s(t=>t===!0||t===!1,"isBoolean"),ku=s(t=>{if(Uu(t)!=="object")return!1;let e=Mm(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},"isPlainObject"),xB=Ln("Date"),vB=Ln("File"),bB=Ln("Blob"),wB=Ln("FileList"),_B=s(t=>zu(t)&&nn(t.pipe),"isStream"),RB=s(t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||nn(t.append)&&((e=Uu(t))==="formdata"||e==="object"&&nn(t.toString)&&t.toString()==="[object FormData]"))},"isFormData"),TB=Ln("URLSearchParams"),SB=s(t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function Xa(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Co(t))for(r=0,o=t.length;r0;)if(o=n[r],e===o.toLowerCase())return o;return null}s(N1,"findKey");var k1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,q1=s(t=>!Ja(t)&&t!==k1,"isContextDefined");function Tm(){let{caseless:t}=q1(this)&&this||{},e={},n=s((r,o)=>{let c=t&&N1(e,o)||o;ku(e[c])&&ku(r)?e[c]=Tm(e[c],r):ku(r)?e[c]=Tm({},r):Co(r)?e[c]=r.slice():e[c]=r},"assignValue");for(let r=0,o=arguments.length;r(Xa(e,(o,c)=>{n&&nn(o)?t[c]=D1(o,n):t[c]=o},{allOwnKeys:r}),t),"extend"),PB=s(t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),"stripBOM"),AB=s((t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},"inherits"),CB=s((t,e,n,r)=>{let o,c,u,p={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),c=o.length;c-- >0;)u=o[c],(!r||r(u,t,e))&&!p[u]&&(e[u]=t[u],p[u]=!0);t=n!==!1&&Mm(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},"toFlatObject"),OB=s((t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;let r=t.indexOf(e,n);return r!==-1&&r===n},"endsWith"),IB=s(t=>{if(!t)return null;if(Co(t))return t;let e=t.length;if(!M1(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},"toArray"),DB=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Mm(Uint8Array)),LB=s((t,e)=>{let r=(t&&t[Symbol.iterator]).call(t),o;for(;(o=r.next())&&!o.done;){let c=o.value;e.call(t,c[0],c[1])}},"forEachEntry"),MB=s((t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},"matchAll"),NB=Ln("HTMLFormElement"),kB=s(t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,s(function(n,r,o){return r.toUpperCase()+o},"replacer")),"toCamelCase"),d1=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),qB=Ln("RegExp"),F1=s((t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};Xa(n,(o,c)=>{let u;(u=e(o,c,t))!==!1&&(r[c]=u||o)}),Object.defineProperties(t,r)},"reduceDescriptors"),FB=s(t=>{F1(t,(e,n)=>{if(nn(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=t[n];if(nn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},"freezeMethods"),BB=s((t,e)=>{let n={},r=s(o=>{o.forEach(c=>{n[c]=!0})},"define");return Co(t)?r(t):r(String(t).split(e)),n},"toObjectSet"),jB=s(()=>{},"noop"),UB=s((t,e)=>(t=+t,Number.isFinite(t)?t:e),"toFiniteNumber"),bm="abcdefghijklmnopqrstuvwxyz",f1="0123456789",B1={DIGIT:f1,ALPHA:bm,ALPHA_DIGIT:bm+bm.toUpperCase()+f1},HB=s((t=16,e=B1.ALPHA_DIGIT)=>{let n="",{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},"generateString");function zB(t){return!!(t&&nn(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}s(zB,"isSpecCompliantForm");var $B=s(t=>{let e=new Array(10),n=s((r,o)=>{if(zu(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;let c=Co(r)?[]:{};return Xa(r,(u,p)=>{let d=n(u,o+1);!Ja(d)&&(c[p]=d)}),e[o]=void 0,c}}return r},"visit");return n(t,0)},"toJSONObject"),WB=Ln("AsyncFunction"),KB=s(t=>t&&(zu(t)||nn(t))&&nn(t.then)&&nn(t.catch),"isThenable"),D={isArray:Co,isArrayBuffer:L1,isBuffer:hB,isFormData:RB,isArrayBufferView:mB,isString:gB,isNumber:M1,isBoolean:yB,isObject:zu,isPlainObject:ku,isUndefined:Ja,isDate:xB,isFile:vB,isBlob:bB,isRegExp:qB,isFunction:nn,isStream:_B,isURLSearchParams:TB,isTypedArray:DB,isFileList:wB,forEach:Xa,merge:Tm,extend:EB,trim:SB,stripBOM:PB,inherits:AB,toFlatObject:CB,kindOf:Uu,kindOfTest:Ln,endsWith:OB,toArray:IB,forEachEntry:LB,matchAll:MB,isHTMLForm:NB,hasOwnProperty:d1,hasOwnProp:d1,reduceDescriptors:F1,freezeMethods:FB,toObjectSet:BB,toCamelCase:kB,noop:jB,toFiniteNumber:UB,findKey:N1,global:k1,isContextDefined:q1,ALPHABET:B1,generateString:HB,isSpecCompliantForm:zB,toJSONObject:$B,isAsyncFn:WB,isThenable:KB};function K(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}s(K,"AxiosError");D.inherits(K,Error,{toJSON:s(function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var j1=K.prototype,U1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{U1[t]={value:t}});Object.defineProperties(K,U1);Object.defineProperty(j1,"isAxiosError",{value:!0});K.from=(t,e,n,r,o,c)=>{let u=Object.create(j1);return D.toFlatObject(t,u,s(function(d){return d!==Error.prototype},"filter"),p=>p!=="isAxiosError"),K.call(u,t.message,e,n,r,o),u.cause=t,u.name=t.name,c&&Object.assign(u,c),u};function Sm(t){return D.isPlainObject(t)||D.isArray(t)}s(Sm,"isVisitable");function H1(t){return D.endsWith(t,"[]")?t.slice(0,-2):t}s(H1,"removeBrackets");function h1(t,e,n){return t?t.concat(e).map(s(function(o,c){return o=H1(o),!n&&c?"["+o+"]":o},"each")).join(n?".":""):e}s(h1,"renderKey");function GB(t){return D.isArray(t)&&!t.some(Sm)}s(GB,"isFlatArray");var QB=D.toFlatObject(D,{},null,s(function(e){return/^is[A-Z]/.test(e)},"filter"));function $u(t,e,n){if(!D.isObject(t))throw new TypeError("target must be an object");e=e||new(I1.default||FormData),n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,s(function(T,I){return!D.isUndefined(I[T])},"defined"));let r=n.metaTokens,o=n.visitor||h,c=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(e);if(!D.isFunction(o))throw new TypeError("visitor must be a function");function m(_){if(_===null)return"";if(D.isDate(_))return _.toISOString();if(!d&&D.isBlob(_))throw new K("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(_)||D.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}s(m,"convertValue");function h(_,T,I){let N=_;if(_&&!I&&typeof _=="object"){if(D.endsWith(T,"{}"))T=r?T:T.slice(0,-2),_=JSON.stringify(_);else if(D.isArray(_)&&GB(_)||(D.isFileList(_)||D.endsWith(T,"[]"))&&(N=D.toArray(_)))return T=H1(T),N.forEach(s(function(j,G){!(D.isUndefined(j)||j===null)&&e.append(u===!0?h1([T],G,c):u===null?T:T+"[]",m(j))},"each")),!1}return Sm(_)?!0:(e.append(h1(I,T,c),m(_)),!1)}s(h,"defaultVisitor");let y=[],v=Object.assign(QB,{defaultVisitor:h,convertValue:m,isVisitable:Sm});function P(_,T){if(!D.isUndefined(_)){if(y.indexOf(_)!==-1)throw Error("Circular reference detected in "+T.join("."));y.push(_),D.forEach(_,s(function(N,H){(!(D.isUndefined(N)||N===null)&&o.call(e,N,D.isString(H)?H.trim():H,T,v))===!0&&P(N,T?T.concat(H):[H])},"each")),y.pop()}}if(s(P,"build"),!D.isObject(t))throw new TypeError("data must be an object");return P(t),e}s($u,"toFormData");function m1(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,s(function(r){return e[r]},"replacer"))}s(m1,"encode$1");function z1(t,e){this._pairs=[],t&&$u(t,this,e)}s(z1,"AxiosURLSearchParams");var $1=z1.prototype;$1.append=s(function(e,n){this._pairs.push([e,n])},"append");$1.toString=s(function(e){let n=e?function(r){return e.call(this,r,m1)}:m1;return this._pairs.map(s(function(o){return n(o[0])+"="+n(o[1])},"each"),"").join("&")},"toString");function VB(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}s(VB,"encode");function Nm(t,e,n){if(!e)return t;let r=n&&n.encode||VB,o=n&&n.serialize,c;if(o?c=o(e,n):c=D.isURLSearchParams(e)?e.toString():new z1(e,n).toString(r),c){let u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}s(Nm,"buildURL");var Um=class Um{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){D.forEach(this.handlers,s(function(r){r!==null&&e(r)},"forEachHandler"))}};s(Um,"InterceptorManager");var Em=Um,g1=Em,km={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JB=sB.default.URLSearchParams,xn={isNode:!0,classes:{URLSearchParams:JB,FormData:I1.default,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};function YB(t,e){return $u(t,new xn.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,c){return D.isBuffer(n)?(this.append(r,n.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},e))}s(YB,"toURLEncodedForm");function XB(t){return D.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}s(XB,"parsePropPath");function ZB(t){let e={},n=Object.keys(t),r,o=n.length,c;for(r=0;r=n.length;return u=!u&&D.isArray(o)?o.length:u,d?(D.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!p):((!o[u]||!D.isObject(o[u]))&&(o[u]=[]),e(n,r,o[u],c)&&D.isArray(o[u])&&(o[u]=ZB(o[u])),!p)}if(s(e,"buildPath"),D.isFormData(t)&&D.isFunction(t.entries)){let n={};return D.forEachEntry(t,(r,o)=>{e(XB(r),o,n,0)}),n}return null}s(W1,"formDataToJSON");function ej(t,e,n){if(D.isString(t))try{return(e||JSON.parse)(t),D.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}s(ej,"stringifySafely");var qm={transitional:km,adapter:["xhr","http"],transformRequest:[s(function(e,n){let r=n.getContentType()||"",o=r.indexOf("application/json")>-1,c=D.isObject(e);if(c&&D.isHTMLForm(e)&&(e=new FormData(e)),D.isFormData(e))return o&&o?JSON.stringify(W1(e)):e;if(D.isArrayBuffer(e)||D.isBuffer(e)||D.isStream(e)||D.isFile(e)||D.isBlob(e))return e;if(D.isArrayBufferView(e))return e.buffer;if(D.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let p;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return YB(e,this.formSerializer).toString();if((p=D.isFileList(e))||r.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return $u(p?{"files[]":e}:e,d&&new d,this.formSerializer)}}return c||o?(n.setContentType("application/json",!1),ej(e)):e},"transformRequest")],transformResponse:[s(function(e){let n=this.transitional||qm.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(e&&D.isString(e)&&(r&&!this.responseType||o)){let u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(p){if(u)throw p.name==="SyntaxError"?K.from(p,K.ERR_BAD_RESPONSE,this,null,this.response):p}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xn.classes.FormData,Blob:xn.classes.Blob},validateStatus:s(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],t=>{qm.headers[t]={}});var Fm=qm,tj=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),nj=s(t=>{let e={},n,r,o;return t&&t.split(` +`).forEach(s(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||e[n]&&tj[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)},"parser")),e},"parseHeaders"),y1=Symbol("internals");function Qa(t){return t&&String(t).trim().toLowerCase()}s(Qa,"normalizeHeader");function qu(t){return t===!1||t==null?t:D.isArray(t)?t.map(qu):String(t)}s(qu,"normalizeValue");function rj(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}s(rj,"parseTokens");var ij=s(t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()),"isValidHeaderName");function wm(t,e,n,r,o){if(D.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!D.isString(e)){if(D.isString(r))return e.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(e)}}s(wm,"matchHeaderValue");function oj(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}s(oj,"formatHeader");function aj(t,e){let n=D.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,c,u){return this[r].call(this,e,o,c,u)},configurable:!0})})}s(aj,"buildAccessors");var Hm=class Hm{constructor(e){e&&this.set(e)}set(e,n,r){let o=this;function c(p,d,m){let h=Qa(d);if(!h)throw new Error("header name must be a non-empty string");let y=D.findKey(o,h);(!y||o[y]===void 0||m===!0||m===void 0&&o[y]!==!1)&&(o[y||d]=qu(p))}s(c,"setHeader");let u=s((p,d)=>D.forEach(p,(m,h)=>c(m,h,d)),"setHeaders");return D.isPlainObject(e)||e instanceof this.constructor?u(e,n):D.isString(e)&&(e=e.trim())&&!ij(e)?u(nj(e),n):e!=null&&c(n,e,r),this}get(e,n){if(e=Qa(e),e){let r=D.findKey(this,e);if(r){let o=this[r];if(!n)return o;if(n===!0)return rj(o);if(D.isFunction(n))return n.call(this,o,r);if(D.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Qa(e),e){let r=D.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||wm(this,this[r],r,n)))}return!1}delete(e,n){let r=this,o=!1;function c(u){if(u=Qa(u),u){let p=D.findKey(r,u);p&&(!n||wm(r,r[p],p,n))&&(delete r[p],o=!0)}}return s(c,"deleteHeader"),D.isArray(e)?e.forEach(c):c(e),o}clear(e){let n=Object.keys(this),r=n.length,o=!1;for(;r--;){let c=n[r];(!e||wm(this,this[c],c,e,!0))&&(delete this[c],o=!0)}return o}normalize(e){let n=this,r={};return D.forEach(this,(o,c)=>{let u=D.findKey(r,c);if(u){n[u]=qu(o),delete n[c];return}let p=e?oj(c):String(c).trim();p!==c&&delete n[c],n[p]=qu(o),r[p]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return D.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){let r=(this[y1]=this[y1]={accessors:{}}).accessors,o=this.prototype;function c(u){let p=Qa(u);r[p]||(aj(o,u),r[p]=!0)}return s(c,"defineAccessor"),D.isArray(e)?e.forEach(c):c(e),this}};s(Hm,"AxiosHeaders");var Eo=Hm;Eo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Eo.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});D.freezeMethods(Eo);var rn=Eo;function _m(t,e){let n=this||Fm,r=e||n,o=rn.from(r.headers),c=r.data;return D.forEach(t,s(function(p){c=p.call(n,c,o.normalize(),e?e.status:void 0)},"transform")),o.normalize(),c}s(_m,"transformData");function K1(t){return!!(t&&t.__CANCEL__)}s(K1,"isCancel");function bi(t,e,n){K.call(this,t??"canceled",K.ERR_CANCELED,e,n),this.name="CanceledError"}s(bi,"CanceledError");D.inherits(bi,K,{__CANCEL__:!0});function Va(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}s(Va,"settle");function sj(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}s(sj,"isAbsoluteURL");function cj(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}s(cj,"combineURLs");function Bm(t,e){return t&&!sj(e)?cj(t,e):e}s(Bm,"buildFullPath");var Bu="1.6.0";function G1(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}s(G1,"parseProtocol");var uj=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function lj(t,e,n){let r=n&&n.Blob||xn.classes.Blob,o=G1(t);if(e===void 0&&r&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let c=uj.exec(t);if(!c)throw new K("Invalid URL",K.ERR_INVALID_URL);let u=c[1],p=c[2],d=c[3],m=Buffer.from(decodeURIComponent(d),p?"base64":"utf8");if(e){if(!r)throw new K("Blob is not supported",K.ERR_NOT_SUPPORT);return new r([m],{type:u})}return m}throw new K("Unsupported protocol "+o,K.ERR_NOT_SUPPORT)}s(lj,"fromDataURI");function pj(t,e){let n=0,r=1e3/e,o=null;return s(function(u,p){let d=Date.now();if(u||d-n>r)return o&&(clearTimeout(o),o=null),n=d,t.apply(null,p);o||(o=setTimeout(()=>(o=null,n=Date.now(),t.apply(null,p)),r-(d-n)))},"throttled")}s(pj,"throttle");function Q1(t,e){t=t||10;let n=new Array(t),r=new Array(t),o=0,c=0,u;return e=e!==void 0?e:1e3,s(function(d){let m=Date.now(),h=r[c];u||(u=m),n[o]=d,r[o]=m;let y=c,v=0;for(;y!==o;)v+=n[y++],y=y%t;if(o=(o+1)%t,o===c&&(c=(c+1)%t),m-u!D.isUndefined(d[p])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[Nu]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},o=Q1(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",p=>{p==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let c=0;r.updateProgress=pj(s(function(){let d=r.length,m=r.bytesSeen,h=m-c;if(!h||n.destroyed)return;let y=o(h);c=m,process.nextTick(()=>{n.emit("progress",{loaded:m,total:d,progress:d?m/d:void 0,bytes:h,rate:y||void 0,estimated:y&&d&&m<=d?(d-m)/y:void 0})})},"throttledHandler"),r.ticksRate);let u=s(()=>{r.updateProgress(!0)},"onFinish");this.once("end",u),this.once("error",u)}_read(e){let n=this[Nu];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let o=this,c=this[Nu],u=c.maxRate,p=this.readableHighWaterMark,d=c.timeWindow,m=1e3/d,h=u/m,y=c.minChunkSize!==!1?Math.max(c.minChunkSize,h*.01):0;function v(_,T){let I=Buffer.byteLength(_);c.bytesSeen+=I,c.bytes+=I,c.isCaptured&&c.updateProgress(),o.push(_)?process.nextTick(T):c.onReadCallback=()=>{c.onReadCallback=null,process.nextTick(T)}}s(v,"pushChunk");let P=s((_,T)=>{let I=Buffer.byteLength(_),N=null,H=p,j,G=0;if(u){let te=Date.now();(!c.ts||(G=te-c.ts)>=d)&&(c.ts=te,j=h-c.bytes,c.bytes=j<0?-j:0,G=0),j=h-c.bytes}if(u){if(j<=0)return setTimeout(()=>{T(null,_)},d-G);jH&&I-H>y&&(N=_.subarray(H),_=_.subarray(0,H)),v(_,N?()=>{process.nextTick(T,null,N)}:T)},"transformChunk");P(e,s(function _(T,I){if(T)return r(T);I?P(I,_):r(null)},"transformNextChunk"))}setLength(e){return this[Nu].length=+e,this}};s(zm,"AxiosTransformStream");var Pm=zm,x1=Pm,{asyncIterator:v1}=Symbol,dj=s(async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[v1]?yield*t[v1]():yield t},"readBlob"),V1=dj,fj=D.ALPHABET.ALPHA_DIGIT+"-_",Ya=new C1.TextEncoder,Cr=`\r +`,hj=Ya.encode(Cr),mj=2,$m=class $m{constructor(e,n){let{escapeName:r}=this.constructor,o=D.isString(n),c=`Content-Disposition: form-data; name="${r(e)}"${!o&&n.name?`; filename="${r(n.name)}"`:""}${Cr}`;o?n=Ya.encode(String(n).replace(/\r?\n|\r\n?/g,Cr)):c+=`Content-Type: ${n.type||"application/octet-stream"}${Cr}`,this.headers=Ya.encode(c+Cr),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+mj,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;D.isTypedArray(e)?yield e:yield*V1(e),yield hj}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}};s($m,"FormDataPart");var Am=$m,gj=s((t,e,n)=>{let{tag:r="form-data-boundary",size:o=25,boundary:c=r+"-"+D.generateString(o,fj)}=n||{};if(!D.isFormData(t))throw TypeError("FormData instance required");if(c.length<1||c.length>70)throw Error("boundary must be 10-70 characters long");let u=Ya.encode("--"+c+Cr),p=Ya.encode("--"+c+"--"+Cr+Cr),d=p.byteLength,m=Array.from(t.entries()).map(([y,v])=>{let P=new Am(y,v);return d+=P.size,P});d+=u.byteLength*m.length,d=D.toFiniteNumber(d);let h={"Content-Type":`multipart/form-data; boundary=${c}`};return Number.isFinite(d)&&(h["Content-Length"]=d),e&&e(h),O1.Readable.from(async function*(){for(let y of m)yield u,yield*y.encode();yield p}())},"formDataToStream"),yj=gj,Wm=class Wm extends Ar.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,n)}this.__transform(e,n,r)}};s(Wm,"ZlibHeaderTransformStream");var Cm=Wm,xj=Cm,vj=s((t,e)=>D.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(o=>{try{e?r(null,...e(o)):r(null,o)}catch(c){r(c)}},r)}:t,"callbackify"),bj=vj,b1={flush:Or.default.constants.Z_SYNC_FLUSH,finishFlush:Or.default.constants.Z_SYNC_FLUSH},wj={flush:Or.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Or.default.constants.BROTLI_OPERATION_FLUSH},w1=D.isFunction(Or.default.createBrotliDecompress),{http:_j,https:Rj}=pB.default,Tj=/https:?/,_1=xn.protocols.map(t=>t+":");function Sj(t){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t)}s(Sj,"dispatchBeforeRedirect");function J1(t,e,n){let r=e;if(!r&&r!==!1){let o=tB.getProxyForUrl(n);o&&(r=new URL(o))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let c=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+c}t.headers.host=t.hostname+(t.port?":"+t.port:"");let o=r.hostname||r.host;t.hostname=o,t.host=o,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=s(function(c){J1(c,e,c.href)},"beforeRedirect")}s(J1,"setProxy");var Ej=typeof process<"u"&&D.kindOf(process)==="process",Pj=s(t=>new Promise((e,n)=>{let r,o,c=s((d,m)=>{o||(o=!0,r&&r(d,m))},"done"),u=s(d=>{c(d),e(d)},"_resolve"),p=s(d=>{c(d,!0),n(d)},"_reject");t(u,p,d=>r=d).catch(p)}),"wrapAsync"),Aj=s(({address:t,family:e})=>{if(!D.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},"resolveFamily"),R1=s((t,e)=>Aj(D.isObject(t)?t:{address:t,family:e}),"buildAddressEntry"),Cj=Ej&&s(function(e){return Pj(s(async function(r,o,c){let{data:u,lookup:p,family:d}=e,{responseType:m,responseEncoding:h}=e,y=e.method.toUpperCase(),v,P=!1,_;if(p){let J=bj(p,Q=>D.isArray(Q)?Q:[Q]);p=s((Q,me,jt)=>{J(Q,me,(et,bn,wn)=>{let dt=D.isArray(bn)?bn.map(Ct=>R1(Ct)):[R1(bn,wn)];me.all?jt(et,dt):jt(et,dt[0].address,dt[0].family)})},"lookup")}let T=new dB.default,I=s(()=>{e.cancelToken&&e.cancelToken.unsubscribe(N),e.signal&&e.signal.removeEventListener("abort",N),T.removeAllListeners()},"onFinished");c((J,Q)=>{v=!0,Q&&(P=!0,I())});function N(J){T.emit("abort",!J||J.type?new bi(null,e,_):J)}s(N,"abort"),T.once("abort",o),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(N),e.signal&&(e.signal.aborted?N():e.signal.addEventListener("abort",N)));let H=Bm(e.baseURL,e.url),j=new URL(H,"http://localhost"),G=j.protocol||_1[0];if(G==="data:"){let J;if(y!=="GET")return Va(r,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{J=lj(e.url,m==="blob",{Blob:e.env&&e.env.Blob})}catch(Q){throw K.from(Q,K.ERR_BAD_REQUEST,e)}return m==="text"?(J=J.toString(h),(!h||h==="utf8")&&(J=D.stripBOM(J))):m==="stream"&&(J=Ar.default.Readable.from(J)),Va(r,o,{data:J,status:200,statusText:"OK",headers:new rn,config:e})}if(_1.indexOf(G)===-1)return o(new K("Unsupported protocol "+G,K.ERR_BAD_REQUEST,e));let te=rn.from(e.headers).normalize();te.set("User-Agent","axios/"+Bu,!1);let Ee=e.onDownloadProgress,Ie=e.onUploadProgress,Ke=e.maxRate,Ge,at;if(D.isSpecCompliantForm(u)){let J=te.getContentType(/boundary=([-_\w\d]{10,70})/i);u=yj(u,Q=>{te.set(Q)},{tag:`axios-${Bu}-boundary`,boundary:J&&J[1]||void 0})}else if(D.isFormData(u)&&D.isFunction(u.getHeaders)){if(te.set(u.getHeaders()),!te.hasContentLength())try{let J=await lB.default.promisify(u.getLength).call(u);Number.isFinite(J)&&J>=0&&te.setContentLength(J)}catch{}}else if(D.isBlob(u))u.size&&te.setContentType(u.type||"application/octet-stream"),te.setContentLength(u.size||0),u=Ar.default.Readable.from(V1(u));else if(u&&!D.isStream(u)){if(!Buffer.isBuffer(u))if(D.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(D.isString(u))u=Buffer.from(u,"utf-8");else return o(new K("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",K.ERR_BAD_REQUEST,e));if(te.setContentLength(u.length,!1),e.maxBodyLength>-1&&u.length>e.maxBodyLength)return o(new K("Request body larger than maxBodyLength limit",K.ERR_BAD_REQUEST,e))}let vn=D.toFiniteNumber(te.getContentLength());D.isArray(Ke)?(Ge=Ke[0],at=Ke[1]):Ge=at=Ke,u&&(Ie||Ge)&&(D.isStream(u)||(u=Ar.default.Readable.from(u,{objectMode:!1})),u=Ar.default.pipeline([u,new x1({length:vn,maxRate:D.toFiniteNumber(Ge)})],D.noop),Ie&&u.on("progress",J=>{Ie(Object.assign(J,{upload:!0}))}));let Le;if(e.auth){let J=e.auth.username||"",Q=e.auth.password||"";Le=J+":"+Q}if(!Le&&j.username){let J=j.username,Q=j.password;Le=J+":"+Q}Le&&te.delete("authorization");let je;try{je=Nm(j.pathname+j.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(J){let Q=new Error(J.message);return Q.config=e,Q.url=e.url,Q.exists=!0,o(Q)}te.set("Accept-Encoding","gzip, compress, deflate"+(w1?", br":""),!1);let be={path:je,method:y,headers:te.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:Le,protocol:G,family:d,beforeRedirect:Sj,beforeRedirects:{}};!D.isUndefined(p)&&(be.lookup=p),e.socketPath?be.socketPath=e.socketPath:(be.hostname=j.hostname,be.port=j.port,J1(be,e.proxy,G+"//"+j.hostname+(j.port?":"+j.port:"")+be.path));let Re,Te=Tj.test(be.protocol);if(be.agent=Te?e.httpsAgent:e.httpAgent,e.transport?Re=e.transport:e.maxRedirects===0?Re=Te?uB.default:cB.default:(e.maxRedirects&&(be.maxRedirects=e.maxRedirects),e.beforeRedirect&&(be.beforeRedirects.config=e.beforeRedirect),Re=Te?Rj:_j),e.maxBodyLength>-1?be.maxBodyLength=e.maxBodyLength:be.maxBodyLength=1/0,e.insecureHTTPParser&&(be.insecureHTTPParser=e.insecureHTTPParser),_=Re.request(be,s(function(Q){if(_.destroyed)return;let me=[Q],jt=+Q.headers["content-length"];if(Ee){let Ct=new x1({length:D.toFiniteNumber(jt),maxRate:D.toFiniteNumber(at)});Ee&&Ct.on("progress",_n=>{Ee(Object.assign(_n,{download:!0}))}),me.push(Ct)}let et=Q,bn=Q.req||_;if(e.decompress!==!1&&Q.headers["content-encoding"])switch((y==="HEAD"||Q.statusCode===204)&&delete Q.headers["content-encoding"],(Q.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":me.push(Or.default.createUnzip(b1)),delete Q.headers["content-encoding"];break;case"deflate":me.push(new xj),me.push(Or.default.createUnzip(b1)),delete Q.headers["content-encoding"];break;case"br":w1&&(me.push(Or.default.createBrotliDecompress(wj)),delete Q.headers["content-encoding"])}et=me.length>1?Ar.default.pipeline(me,D.noop):me[0];let wn=Ar.default.finished(et,()=>{wn(),I()}),dt={status:Q.statusCode,statusText:Q.statusMessage,headers:new rn(Q.headers),config:e,request:bn};if(m==="stream")dt.data=et,Va(r,o,dt);else{let Ct=[],_n=0;et.on("data",s(function(tt){Ct.push(tt),_n+=tt.length,e.maxContentLength>-1&&_n>e.maxContentLength&&(P=!0,et.destroy(),o(new K("maxContentLength size of "+e.maxContentLength+" exceeded",K.ERR_BAD_RESPONSE,e,bn)))},"handleStreamData")),et.on("aborted",s(function(){if(P)return;let tt=new K("maxContentLength size of "+e.maxContentLength+" exceeded",K.ERR_BAD_RESPONSE,e,bn);et.destroy(tt),o(tt)},"handlerStreamAborted")),et.on("error",s(function(tt){_.destroyed||o(K.from(tt,null,e,bn))},"handleStreamError")),et.on("end",s(function(){try{let tt=Ct.length===1?Ct[0]:Buffer.concat(Ct);m!=="arraybuffer"&&(tt=tt.toString(h),(!h||h==="utf8")&&(tt=D.stripBOM(tt))),dt.data=tt}catch(tt){return o(K.from(tt,null,e,dt.request,dt))}Va(r,o,dt)},"handleStreamEnd"))}T.once("abort",Ct=>{et.destroyed||(et.emit("error",Ct),et.destroy())})},"handleResponse")),T.once("abort",J=>{o(J),_.destroy(J)}),_.on("error",s(function(Q){o(K.from(Q,null,e,_))},"handleRequestError")),_.on("socket",s(function(Q){Q.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let J=parseInt(e.timeout,10);if(Number.isNaN(J)){o(new K("error trying to parse `config.timeout` to int",K.ERR_BAD_OPTION_VALUE,e,_));return}_.setTimeout(J,s(function(){if(v)return;let me=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",jt=e.transitional||km;e.timeoutErrorMessage&&(me=e.timeoutErrorMessage),o(new K(me,jt.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,_)),N()},"handleRequestTimeout"))}if(D.isStream(u)){let J=!1,Q=!1;u.on("end",()=>{J=!0}),u.once("error",me=>{Q=!0,_.destroy(me)}),u.on("close",()=>{!J&&!Q&&N(new bi("Request stream has been aborted",e,_))}),u.pipe(_)}else _.end(u)},"dispatchHttpRequest"))},"httpAdapter"),Oj=xn.isStandardBrowserEnv?s(function(){return{write:s(function(n,r,o,c,u,p){let d=[];d.push(n+"="+encodeURIComponent(r)),D.isNumber(o)&&d.push("expires="+new Date(o).toGMTString()),D.isString(c)&&d.push("path="+c),D.isString(u)&&d.push("domain="+u),p===!0&&d.push("secure"),document.cookie=d.join("; ")},"write"),read:s(function(n){let r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},"read"),remove:s(function(n){this.write(n,"",Date.now()-864e5)},"remove")}},"standardBrowserEnv")():s(function(){return{write:s(function(){},"write"),read:s(function(){return null},"read"),remove:s(function(){},"remove")}},"nonStandardBrowserEnv")(),Ij=xn.isStandardBrowserEnv?s(function(){let e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function o(c){let u=c;return e&&(n.setAttribute("href",u),u=n.href),n.setAttribute("href",u),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s(o,"resolveURL"),r=o(window.location.href),s(function(u){let p=D.isString(u)?o(u):u;return p.protocol===r.protocol&&p.host===r.host},"isURLSameOrigin")},"standardBrowserEnv")():s(function(){return s(function(){return!0},"isURLSameOrigin")},"nonStandardBrowserEnv")();function T1(t,e){let n=0,r=Q1(50,250);return o=>{let c=o.loaded,u=o.lengthComputable?o.total:void 0,p=c-n,d=r(p),m=c<=u;n=c;let h={loaded:c,total:u,progress:u?c/u:void 0,bytes:p,rate:d||void 0,estimated:d&&u&&m?(u-c)/d:void 0,event:o};h[e?"download":"upload"]=!0,t(h)}}s(T1,"progressEventReducer");var Dj=typeof XMLHttpRequest<"u",Lj=Dj&&function(t){return new Promise(s(function(n,r){let o=t.data,c=rn.from(t.headers).normalize(),u=t.responseType,p;function d(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}s(d,"done");let m;D.isFormData(o)&&(xn.isStandardBrowserEnv||xn.isStandardBrowserWebWorkerEnv?c.setContentType(!1):c.getContentType(/^\s*multipart\/form-data/)?D.isString(m=c.getContentType())&&c.setContentType(m.replace(/^\s*(multipart\/form-data);+/,"$1")):c.setContentType("multipart/form-data"));let h=new XMLHttpRequest;if(t.auth){let _=t.auth.username||"",T=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";c.set("Authorization","Basic "+btoa(_+":"+T))}let y=Bm(t.baseURL,t.url);h.open(t.method.toUpperCase(),Nm(y,t.params,t.paramsSerializer),!0),h.timeout=t.timeout;function v(){if(!h)return;let _=rn.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),I={data:!u||u==="text"||u==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:_,config:t,request:h};Va(s(function(H){n(H),d()},"_resolve"),s(function(H){r(H),d()},"_reject"),I),h=null}if(s(v,"onloadend"),"onloadend"in h?h.onloadend=v:h.onreadystatechange=s(function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},"handleLoad"),h.onabort=s(function(){h&&(r(new K("Request aborted",K.ECONNABORTED,t,h)),h=null)},"handleAbort"),h.onerror=s(function(){r(new K("Network Error",K.ERR_NETWORK,t,h)),h=null},"handleError"),h.ontimeout=s(function(){let T=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",I=t.transitional||km;t.timeoutErrorMessage&&(T=t.timeoutErrorMessage),r(new K(T,I.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,t,h)),h=null},"handleTimeout"),xn.isStandardBrowserEnv){let _=Ij(y)&&t.xsrfCookieName&&Oj.read(t.xsrfCookieName);_&&c.set(t.xsrfHeaderName,_)}o===void 0&&c.setContentType(null),"setRequestHeader"in h&&D.forEach(c.toJSON(),s(function(T,I){h.setRequestHeader(I,T)},"setRequestHeader")),D.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),u&&u!=="json"&&(h.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&h.addEventListener("progress",T1(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",T1(t.onUploadProgress)),(t.cancelToken||t.signal)&&(p=s(_=>{h&&(r(!_||_.type?new bi(null,t,h):_),h.abort(),h=null)},"onCanceled"),t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p)));let P=G1(y);if(P&&xn.protocols.indexOf(P)===-1){r(new K("Unsupported protocol "+P+":",K.ERR_BAD_REQUEST,t));return}h.send(o||null)},"dispatchXhrRequest"))},Om={http:Cj,xhr:Lj};D.forEach(Om,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var S1=s(t=>`- ${t}`,"renderReason"),Mj=s(t=>D.isFunction(t)||t===null||t===!1,"isResolvedHandle"),Y1={getAdapter:t=>{t=D.isArray(t)?t:[t];let{length:e}=t,n,r,o={};for(let c=0;c`adapter ${p} `+(d===!1?"is not supported by the environment":"is not available in the build")),u=e?c.length>1?`since : +`+c.map(S1).join(` +`):" "+S1(c[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return r},adapters:Om};function Rm(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new bi(null,t)}s(Rm,"throwIfCancellationRequested");function E1(t){return Rm(t),t.headers=rn.from(t.headers),t.data=_m.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Y1.getAdapter(t.adapter||Fm.adapter)(t).then(s(function(r){return Rm(t),r.data=_m.call(t,t.transformResponse,r),r.headers=rn.from(r.headers),r},"onAdapterResolution"),s(function(r){return K1(r)||(Rm(t),r&&r.response&&(r.response.data=_m.call(t,t.transformResponse,r.response),r.response.headers=rn.from(r.response.headers))),Promise.reject(r)},"onAdapterRejection"))}s(E1,"dispatchRequest");var P1=s(t=>t instanceof rn?t.toJSON():t,"headersToObject");function Po(t,e){e=e||{};let n={};function r(m,h,y){return D.isPlainObject(m)&&D.isPlainObject(h)?D.merge.call({caseless:y},m,h):D.isPlainObject(h)?D.merge({},h):D.isArray(h)?h.slice():h}s(r,"getMergedValue");function o(m,h,y){if(D.isUndefined(h)){if(!D.isUndefined(m))return r(void 0,m,y)}else return r(m,h,y)}s(o,"mergeDeepProperties");function c(m,h){if(!D.isUndefined(h))return r(void 0,h)}s(c,"valueFromConfig2");function u(m,h){if(D.isUndefined(h)){if(!D.isUndefined(m))return r(void 0,m)}else return r(void 0,h)}s(u,"defaultToConfig2");function p(m,h,y){if(y in e)return r(m,h);if(y in t)return r(void 0,m)}s(p,"mergeDirectKeys");let d={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:p,headers:(m,h)=>o(P1(m),P1(h),!0)};return D.forEach(Object.keys(Object.assign({},t,e)),s(function(h){let y=d[h]||o,v=y(t[h],e[h],h);D.isUndefined(v)&&y!==p||(n[h]=v)},"computeConfigValue")),n}s(Po,"mergeConfig");var jm={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{jm[t]=s(function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t},"validator")});var A1={};jm.transitional=s(function(e,n,r){function o(c,u){return"[Axios v"+Bu+"] Transitional option '"+c+"'"+u+(r?". "+r:"")}return s(o,"formatMessage"),(c,u,p)=>{if(e===!1)throw new K(o(u," has been removed"+(n?" in "+n:"")),K.ERR_DEPRECATED);return n&&!A1[u]&&(A1[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(c,u,p):!0}},"transitional");function Nj(t,e,n){if(typeof t!="object")throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),o=r.length;for(;o-- >0;){let c=r[o],u=e[c];if(u){let p=t[c],d=p===void 0||u(p,c,t);if(d!==!0)throw new K("option "+c+" must be "+d,K.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new K("Unknown option "+c,K.ERR_BAD_OPTION)}}s(Nj,"assertOptions");var Im={assertOptions:Nj,validators:jm},Pr=Im.validators,Km=class Km{constructor(e){this.defaults=e,this.interceptors={request:new g1,response:new g1}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Po(this.defaults,n);let{transitional:r,paramsSerializer:o,headers:c}=n;r!==void 0&&Im.assertOptions(r,{silentJSONParsing:Pr.transitional(Pr.boolean),forcedJSONParsing:Pr.transitional(Pr.boolean),clarifyTimeoutError:Pr.transitional(Pr.boolean)},!1),o!=null&&(D.isFunction(o)?n.paramsSerializer={serialize:o}:Im.assertOptions(o,{encode:Pr.function,serialize:Pr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=c&&D.merge(c.common,c[n.method]);c&&D.forEach(["delete","get","head","post","put","patch","common"],_=>{delete c[_]}),n.headers=rn.concat(u,c);let p=[],d=!0;this.interceptors.request.forEach(s(function(T){typeof T.runWhen=="function"&&T.runWhen(n)===!1||(d=d&&T.synchronous,p.unshift(T.fulfilled,T.rejected))},"unshiftRequestInterceptors"));let m=[];this.interceptors.response.forEach(s(function(T){m.push(T.fulfilled,T.rejected)},"pushResponseInterceptors"));let h,y=0,v;if(!d){let _=[E1.bind(this),void 0];for(_.unshift.apply(_,p),_.push.apply(_,m),v=_.length,h=Promise.resolve(n);y{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](o);r._listeners=null}),this.promise.then=o=>{let c,u=new Promise(p=>{r.subscribe(p),c=p}).then(o);return u.cancel=s(function(){r.unsubscribe(c)},"reject"),u},e(s(function(c,u,p){r.reason||(r.reason=new bi(c,u,p),n(r.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ju(s(function(o){e=o},"executor")),cancel:e}}};s(ju,"CancelToken");var Dm=ju,kj=Dm;function qj(t){return s(function(n){return t.apply(null,n)},"wrap")}s(qj,"spread");function Fj(t){return D.isObject(t)&&t.isAxiosError===!0}s(Fj,"isAxiosError");var Lm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lm).forEach(([t,e])=>{Lm[e]=t});var Bj=Lm;function X1(t){let e=new Fu(t),n=D1(Fu.prototype.request,e);return D.extend(n,Fu.prototype,e,{allOwnKeys:!0}),D.extend(n,e,null,{allOwnKeys:!0}),n.create=s(function(o){return X1(Po(t,o))},"create"),n}s(X1,"createInstance");var Ue=X1(Fm);Ue.Axios=Fu;Ue.CanceledError=bi;Ue.CancelToken=kj;Ue.isCancel=K1;Ue.VERSION=Bu;Ue.toFormData=$u;Ue.AxiosError=K;Ue.Cancel=Ue.CanceledError;Ue.all=s(function(e){return Promise.all(e)},"all");Ue.spread=qj;Ue.isAxiosError=Fj;Ue.mergeConfig=Po;Ue.AxiosHeaders=rn;Ue.formToJSON=t=>W1(D.isHTMLForm(t)?new FormData(t):t);Ue.getAdapter=Y1.getAdapter;Ue.HttpStatusCode=Bj;Ue.default=Ue;Z1.exports=Ue});var nR=L((G5,tR)=>{"use strict";tR.exports=Error});var iR=L((Q5,rR)=>{"use strict";rR.exports=EvalError});var aR=L((V5,oR)=>{"use strict";oR.exports=RangeError});var cR=L((J5,sR)=>{"use strict";sR.exports=ReferenceError});var Gm=L((Y5,uR)=>{"use strict";uR.exports=SyntaxError});var Oo=L((X5,lR)=>{"use strict";lR.exports=TypeError});var dR=L((Z5,pR)=>{"use strict";pR.exports=URIError});var hR=L((eW,fR)=>{"use strict";fR.exports=s(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,n);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var yR=L((nW,gR)=>{"use strict";var mR=typeof Symbol<"u"&&Symbol,jj=hR();gR.exports=s(function(){return typeof mR!="function"||typeof Symbol!="function"||typeof mR("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:jj()},"hasNativeSymbols")});var vR=L((iW,xR)=>{"use strict";var Qm={__proto__:null,foo:{}},Uj=Object;xR.exports=s(function(){return{__proto__:Qm}.foo===Qm.foo&&!(Qm instanceof Uj)},"hasProto")});var _R=L((aW,wR)=>{"use strict";var Hj="Function.prototype.bind called on incompatible ",zj=Object.prototype.toString,$j=Math.max,Wj="[object Function]",bR=s(function(e,n){for(var r=[],o=0;o{"use strict";var Qj=_R();RR.exports=Function.prototype.bind||Qj});var SR=L((uW,TR)=>{"use strict";var Vj=Function.prototype.call,Jj=Object.prototype.hasOwnProperty,Yj=Wu();TR.exports=Yj.call(Vj,Jj)});var Ri=L((lW,OR)=>{"use strict";var pe,Xj=nR(),Zj=iR(),eU=aR(),tU=cR(),Mo=Gm(),Lo=Oo(),nU=dR(),CR=Function,Vm=s(function(t){try{return CR('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),wi=Object.getOwnPropertyDescriptor;if(wi)try{wi({},"")}catch{wi=null}var Jm=s(function(){throw new Lo},"throwTypeError"),rU=wi?function(){try{return arguments.callee,Jm}catch{try{return wi(arguments,"callee").get}catch{return Jm}}}():Jm,Io=yR()(),iU=vR()(),Ze=Object.getPrototypeOf||(iU?function(t){return t.__proto__}:null),Do={},oU=typeof Uint8Array>"u"||!Ze?pe:Ze(Uint8Array),_i={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":Io&&Ze?Ze([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":Do,"%AsyncGenerator%":Do,"%AsyncGeneratorFunction%":Do,"%AsyncIteratorPrototype%":Do,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Xj,"%eval%":eval,"%EvalError%":Zj,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":CR,"%GeneratorFunction%":Do,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Io&&Ze?Ze(Ze([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Io||!Ze?pe:Ze(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":eU,"%ReferenceError%":tU,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Io||!Ze?pe:Ze(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Io&&Ze?Ze(""[Symbol.iterator]()):pe,"%Symbol%":Io?Symbol:pe,"%SyntaxError%":Mo,"%ThrowTypeError%":rU,"%TypedArray%":oU,"%TypeError%":Lo,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":nU,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet};if(Ze)try{null.error}catch(t){ER=Ze(Ze(t)),_i["%Error.prototype%"]=ER}var ER,aU=s(function t(e){var n;if(e==="%AsyncFunction%")n=Vm("async function () {}");else if(e==="%GeneratorFunction%")n=Vm("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Vm("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&Ze&&(n=Ze(o.prototype))}return _i[e]=n,n},"doEval"),PR={__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"]},Za=Wu(),Ku=SR(),sU=Za.call(Function.call,Array.prototype.concat),cU=Za.call(Function.apply,Array.prototype.splice),AR=Za.call(Function.call,String.prototype.replace),Gu=Za.call(Function.call,String.prototype.slice),uU=Za.call(Function.call,RegExp.prototype.exec),lU=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pU=/\\(\\)?/g,dU=s(function(e){var n=Gu(e,0,1),r=Gu(e,-1);if(n==="%"&&r!=="%")throw new Mo("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Mo("invalid intrinsic syntax, expected opening `%`");var o=[];return AR(e,lU,function(c,u,p,d){o[o.length]=p?AR(d,pU,"$1"):u||c}),o},"stringToPath"),fU=s(function(e,n){var r=e,o;if(Ku(PR,r)&&(o=PR[r],r="%"+o[0]+"%"),Ku(_i,r)){var c=_i[r];if(c===Do&&(c=aU(r)),typeof c>"u"&&!n)throw new Lo("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:c}}throw new Mo("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");OR.exports=s(function(e,n){if(typeof e!="string"||e.length===0)throw new Lo("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Lo('"allowMissing" argument must be a boolean');if(uU(/^%?[^%]*%?$/,e)===null)throw new Mo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=dU(e),o=r.length>0?r[0]:"",c=fU("%"+o+"%",n),u=c.name,p=c.value,d=!1,m=c.alias;m&&(o=m[0],cU(r,sU([0,1],m)));for(var h=1,y=!0;h=r.length){var T=wi(p,v);y=!!T,y&&"get"in T&&!("originalValue"in T.get)?p=T.get:p=p[v]}else y=Ku(p,v),p=p[v];y&&!d&&(_i[u]=p)}}return p},"GetIntrinsic")});var Vu=L((dW,IR)=>{"use strict";var hU=Ri(),Qu=hU("%Object.defineProperty%",!0)||!1;if(Qu)try{Qu({},"a",{value:1})}catch{Qu=!1}IR.exports=Qu});var Ym=L((fW,DR)=>{"use strict";var mU=Ri(),Ju=mU("%Object.getOwnPropertyDescriptor%",!0);if(Ju)try{Ju([],"length")}catch{Ju=null}DR.exports=Ju});var kR=L((hW,NR)=>{"use strict";var LR=Vu(),gU=Gm(),No=Oo(),MR=Ym();NR.exports=s(function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new No("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new No("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new No("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new No("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new No("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new No("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,d=!!MR&&MR(e,n);if(LR)LR(e,n,{configurable:u===null&&d?d.configurable:!u,enumerable:o===null&&d?d.enumerable:!o,value:r,writable:c===null&&d?d.writable:!c});else if(p||!o&&!c&&!u)e[n]=r;else throw new gU("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty")});var BR=L((gW,FR)=>{"use strict";var Xm=Vu(),qR=s(function(){return!!Xm},"hasPropertyDescriptors");qR.hasArrayLengthDefineBug=s(function(){if(!Xm)return null;try{return Xm([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug");FR.exports=qR});var $R=L((xW,zR)=>{"use strict";var yU=Ri(),jR=kR(),xU=BR()(),UR=Ym(),HR=Oo(),vU=yU("%Math.floor%");zR.exports=s(function(e,n){if(typeof e!="function")throw new HR("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||vU(n)!==n)throw new HR("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,c=!0;if("length"in e&&UR){var u=UR(e,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(c=!1)}return(o||c||!r)&&(xU?jR(e,"length",n,!0,!0):jR(e,"length",n)),e},"setFunctionLength")});var JR=L((bW,Yu)=>{"use strict";var Zm=Wu(),Xu=Ri(),bU=$R(),wU=Oo(),GR=Xu("%Function.prototype.apply%"),QR=Xu("%Function.prototype.call%"),VR=Xu("%Reflect.apply%",!0)||Zm.call(QR,GR),WR=Vu(),_U=Xu("%Math.max%");Yu.exports=s(function(e){if(typeof e!="function")throw new wU("a function is required");var n=VR(Zm,QR,arguments);return bU(n,1+_U(0,e.length-(arguments.length-1)),!0)},"callBind");var KR=s(function(){return VR(Zm,GR,arguments)},"applyBind");WR?WR(Yu.exports,"apply",{value:KR}):Yu.exports.apply=KR});var eT=L((_W,ZR)=>{"use strict";var YR=Ri(),XR=JR(),RU=XR(YR("String.prototype.indexOf"));ZR.exports=s(function(e,n){var r=YR(e,!!n);return typeof r=="function"&&RU(e,".prototype.")>-1?XR(r):r},"callBoundIntrinsic")});var nT=L((TW,tT)=>{tT.exports=require("util").inspect});var _T=L((SW,wT)=>{var ug=typeof Map=="function"&&Map.prototype,eg=Object.getOwnPropertyDescriptor&&ug?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,el=ug&&eg&&typeof eg.get=="function"?eg.get:null,rT=ug&&Map.prototype.forEach,lg=typeof Set=="function"&&Set.prototype,tg=Object.getOwnPropertyDescriptor&&lg?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,tl=lg&&tg&&typeof tg.get=="function"?tg.get:null,iT=lg&&Set.prototype.forEach,TU=typeof WeakMap=="function"&&WeakMap.prototype,ts=TU?WeakMap.prototype.has:null,SU=typeof WeakSet=="function"&&WeakSet.prototype,ns=SU?WeakSet.prototype.has:null,EU=typeof WeakRef=="function"&&WeakRef.prototype,oT=EU?WeakRef.prototype.deref:null,PU=Boolean.prototype.valueOf,AU=Object.prototype.toString,CU=Function.prototype.toString,OU=String.prototype.match,pg=String.prototype.slice,Dr=String.prototype.replace,IU=String.prototype.toUpperCase,aT=String.prototype.toLowerCase,mT=RegExp.prototype.test,sT=Array.prototype.concat,Mn=Array.prototype.join,DU=Array.prototype.slice,cT=Math.floor,ig=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ng=Object.getOwnPropertySymbols,og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ko=typeof Symbol=="function"&&typeof Symbol.iterator=="object",pt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ko||!0)?Symbol.toStringTag:null,gT=Object.prototype.propertyIsEnumerable,uT=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function lT(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||mT.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-cT(-t):cT(t);if(r!==t){var o=String(r),c=pg.call(e,o.length+1);return Dr.call(o,n,"$&_")+"."+Dr.call(Dr.call(c,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Dr.call(e,n,"$&_")}s(lT,"addNumericSeparator");var ag=nT(),pT=ag.custom,dT=xT(pT)?pT:null;wT.exports=s(function t(e,n,r,o){var c=n||{};if(Ir(c,"quoteStyle")&&c.quoteStyle!=="single"&&c.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ir(c,"maxStringLength")&&(typeof c.maxStringLength=="number"?c.maxStringLength<0&&c.maxStringLength!==1/0:c.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Ir(c,"customInspect")?c.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ir(c,"indent")&&c.indent!==null&&c.indent!==" "&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ir(c,"numericSeparator")&&typeof c.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=c.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return bT(e,c);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return p?lT(e,d):d}if(typeof e=="bigint"){var m=String(e)+"n";return p?lT(e,m):m}var h=typeof c.depth>"u"?5:c.depth;if(typeof r>"u"&&(r=0),r>=h&&h>0&&typeof e=="object")return sg(e)?"[Array]":"[Object]";var y=JU(c,r);if(typeof o>"u")o=[];else if(vT(o,e)>=0)return"[Circular]";function v(je,be,Re){if(be&&(o=DU.call(o),o.push(be)),Re){var Te={depth:c.depth};return Ir(c,"quoteStyle")&&(Te.quoteStyle=c.quoteStyle),t(je,Te,r+1,o)}return t(je,c,r+1,o)}if(s(v,"inspect"),typeof e=="function"&&!fT(e)){var P=UU(e),_=Zu(e,v);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(_.length>0?" { "+Mn.call(_,", ")+" }":"")}if(xT(e)){var T=ko?Dr.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):og.call(e);return typeof e=="object"&&!ko?es(T):T}if(GU(e)){for(var I="<"+aT.call(String(e.nodeName)),N=e.attributes||[],H=0;H",I}if(sg(e)){if(e.length===0)return"[]";var j=Zu(e,v);return y&&!VU(j)?"["+cg(j,y)+"]":"[ "+Mn.call(j,", ")+" ]"}if(NU(e)){var G=Zu(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!gT.call(e,"cause")?"{ ["+String(e)+"] "+Mn.call(sT.call("[cause]: "+v(e.cause),G),", ")+" }":G.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Mn.call(G,", ")+" }"}if(typeof e=="object"&&u){if(dT&&typeof e[dT]=="function"&&ag)return ag(e,{depth:h-r});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(HU(e)){var te=[];return rT&&rT.call(e,function(je,be){te.push(v(be,e,!0)+" => "+v(je,e))}),hT("Map",el.call(e),te,y)}if(WU(e)){var Ee=[];return iT&&iT.call(e,function(je){Ee.push(v(je,e))}),hT("Set",tl.call(e),Ee,y)}if(zU(e))return rg("WeakMap");if(KU(e))return rg("WeakSet");if($U(e))return rg("WeakRef");if(qU(e))return es(v(Number(e)));if(BU(e))return es(v(ig.call(e)));if(FU(e))return es(PU.call(e));if(kU(e))return es(v(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===global)return"{ [object globalThis] }";if(!MU(e)&&!fT(e)){var Ie=Zu(e,v),Ke=uT?uT(e)===Object.prototype:e instanceof Object||e.constructor===Object,Ge=e instanceof Object?"":"null prototype",at=!Ke&&pt&&Object(e)===e&&pt in e?pg.call(Lr(e),8,-1):Ge?"Object":"",vn=Ke||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Le=vn+(at||Ge?"["+Mn.call(sT.call([],at||[],Ge||[]),": ")+"] ":"");return Ie.length===0?Le+"{}":y?Le+"{"+cg(Ie,y)+"}":Le+"{ "+Mn.call(Ie,", ")+" }"}return String(e)},"inspect_");function yT(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}s(yT,"wrapQuotes");function LU(t){return Dr.call(String(t),/"/g,""")}s(LU,"quote");function sg(t){return Lr(t)==="[object Array]"&&(!pt||!(typeof t=="object"&&pt in t))}s(sg,"isArray");function MU(t){return Lr(t)==="[object Date]"&&(!pt||!(typeof t=="object"&&pt in t))}s(MU,"isDate");function fT(t){return Lr(t)==="[object RegExp]"&&(!pt||!(typeof t=="object"&&pt in t))}s(fT,"isRegExp");function NU(t){return Lr(t)==="[object Error]"&&(!pt||!(typeof t=="object"&&pt in t))}s(NU,"isError");function kU(t){return Lr(t)==="[object String]"&&(!pt||!(typeof t=="object"&&pt in t))}s(kU,"isString");function qU(t){return Lr(t)==="[object Number]"&&(!pt||!(typeof t=="object"&&pt in t))}s(qU,"isNumber");function FU(t){return Lr(t)==="[object Boolean]"&&(!pt||!(typeof t=="object"&&pt in t))}s(FU,"isBoolean");function xT(t){if(ko)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!og)return!1;try{return og.call(t),!0}catch{}return!1}s(xT,"isSymbol");function BU(t){if(!t||typeof t!="object"||!ig)return!1;try{return ig.call(t),!0}catch{}return!1}s(BU,"isBigInt");var jU=Object.prototype.hasOwnProperty||function(t){return t in this};function Ir(t,e){return jU.call(t,e)}s(Ir,"has");function Lr(t){return AU.call(t)}s(Lr,"toStr");function UU(t){if(t.name)return t.name;var e=OU.call(CU.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}s(UU,"nameOf");function vT(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return bT(pg.call(t,0,e.maxStringLength),e)+r}var o=Dr.call(Dr.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,QU);return yT(o,"single",e)}s(bT,"inspectString");function QU(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+IU.call(e.toString(16))}s(QU,"lowbyte");function es(t){return"Object("+t+")"}s(es,"markBoxed");function rg(t){return t+" { ? }"}s(rg,"weakCollectionOf");function hT(t,e,n,r){var o=r?cg(n,r):Mn.call(n,", ");return t+" ("+e+") {"+o+"}"}s(hT,"collectionOf");function VU(t){for(var e=0;e=0)return!1;return!0}s(VU,"singleLineValues");function JU(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Mn.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Mn.call(Array(e+1),n)}}s(JU,"getIndent");function cg(t,e){if(t.length===0)return"";var n=` +`+e.prev+e.base;return n+Mn.call(t,","+n)+` +`+e.prev}s(cg,"indentedJoin");function Zu(t,e){var n=sg(t),r=[];if(n){r.length=t.length;for(var o=0;o{"use strict";var RT=Ri(),qo=eT(),YU=_T(),XU=Oo(),nl=RT("%WeakMap%",!0),rl=RT("%Map%",!0),ZU=qo("WeakMap.prototype.get",!0),eH=qo("WeakMap.prototype.set",!0),tH=qo("WeakMap.prototype.has",!0),nH=qo("Map.prototype.get",!0),rH=qo("Map.prototype.set",!0),iH=qo("Map.prototype.has",!0),dg=s(function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},"listGetNode"),oH=s(function(t,e){var n=dg(t,e);return n&&n.value},"listGet"),aH=s(function(t,e,n){var r=dg(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},"listSet"),sH=s(function(t,e){return!!dg(t,e)},"listHas");TT.exports=s(function(){var e,n,r,o={assert:function(c){if(!o.has(c))throw new XU("Side channel does not contain "+YU(c))},get:function(c){if(nl&&c&&(typeof c=="object"||typeof c=="function")){if(e)return ZU(e,c)}else if(rl){if(n)return nH(n,c)}else if(r)return oH(r,c)},has:function(c){if(nl&&c&&(typeof c=="object"||typeof c=="function")){if(e)return tH(e,c)}else if(rl){if(n)return iH(n,c)}else if(r)return sH(r,c);return!1},set:function(c,u){nl&&c&&(typeof c=="object"||typeof c=="function")?(e||(e=new nl),eH(e,c,u)):rl?(n||(n=new rl),rH(n,c,u)):(r||(r={key:{},next:null}),aH(r,c,u))}};return o},"getSideChannel")});var il=L((CW,ET)=>{"use strict";var cH=String.prototype.replace,uH=/%20/g,fg={RFC1738:"RFC1738",RFC3986:"RFC3986"};ET.exports={default:fg.RFC3986,formatters:{RFC1738:function(t){return cH.call(t,uH,"+")},RFC3986:function(t){return String(t)}},RFC1738:fg.RFC1738,RFC3986:fg.RFC3986}});var gg=L((OW,AT)=>{"use strict";var lH=il(),hg=Object.prototype.hasOwnProperty,Ti=Array.isArray,Nn=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),pH=s(function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Ti(r)){for(var o=[],c=0;c=mg?u.slice(d,d+mg):u,h=[],y=0;y=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||c===lH.RFC1738&&(v===40||v===41)){h[h.length]=m.charAt(y);continue}if(v<128){h[h.length]=Nn[v];continue}if(v<2048){h[h.length]=Nn[192|v>>6]+Nn[128|v&63];continue}if(v<55296||v>=57344){h[h.length]=Nn[224|v>>12]+Nn[128|v>>6&63]+Nn[128|v&63];continue}y+=1,v=65536+((v&1023)<<10|m.charCodeAt(y)&1023),h[h.length]=Nn[240|v>>18]+Nn[128|v>>12&63]+Nn[128|v>>6&63]+Nn[128|v&63]}p+=h.join("")}return p},"encode"),gH=s(function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o{"use strict";var OT=ST(),ol=gg(),rs=il(),wH=Object.prototype.hasOwnProperty,IT={brackets:s(function(e){return e+"[]"},"brackets"),comma:"comma",indices:s(function(e,n){return e+"["+n+"]"},"indices"),repeat:s(function(e){return e},"repeat")},kn=Array.isArray,_H=Array.prototype.push,DT=s(function(t,e){_H.apply(t,kn(e)?e:[e])},"pushToArray"),RH=Date.prototype.toISOString,CT=rs.default,We={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ol.encode,encodeValuesOnly:!1,format:CT,formatter:rs.formatters[CT],indices:!1,serializeDate:s(function(e){return RH.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},TH=s(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),yg={},SH=s(function t(e,n,r,o,c,u,p,d,m,h,y,v,P,_,T,I,N,H){for(var j=e,G=H,te=0,Ee=!1;(G=G.get(yg))!==void 0&&!Ee;){var Ie=G.get(e);if(te+=1,typeof Ie<"u"){if(Ie===te)throw new RangeError("Cyclic object value");Ee=!0}typeof G.get(yg)>"u"&&(te=0)}if(typeof h=="function"?j=h(n,j):j instanceof Date?j=P(j):r==="comma"&&kn(j)&&(j=ol.maybeMap(j,function(jt){return jt instanceof Date?P(jt):jt})),j===null){if(u)return m&&!I?m(n,We.encoder,N,"key",_):n;j=""}if(TH(j)||ol.isBuffer(j)){if(m){var Ke=I?n:m(n,We.encoder,N,"key",_);return[T(Ke)+"="+T(m(j,We.encoder,N,"value",_))]}return[T(n)+"="+T(String(j))]}var Ge=[];if(typeof j>"u")return Ge;var at;if(r==="comma"&&kn(j))I&&m&&(j=ol.maybeMap(j,m)),at=[{value:j.length>0?j.join(",")||null:void 0}];else if(kn(h))at=h;else{var vn=Object.keys(j);at=y?vn.sort(y):vn}var Le=d?n.replace(/\./g,"%2E"):n,je=o&&kn(j)&&j.length===1?Le+"[]":Le;if(c&&kn(j)&&j.length===0)return je+"[]";for(var be=0;be"u"?e.encodeDotInKeys===!0?!0:We.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:We.addQueryPrefix,allowDots:p,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:We.allowEmptyArrays,arrayFormat:u,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:We.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?We.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:We.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:We.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:We.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:We.encodeValuesOnly,filter:c,format:r,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:We.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:We.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:We.strictNullHandling}},"normalizeStringifyOptions");LT.exports=function(t,e){var n=t,r=EH(e),o,c;typeof r.filter=="function"?(c=r.filter,n=c("",n)):kn(r.filter)&&(c=r.filter,o=c);var u=[];if(typeof n!="object"||n===null)return"";var p=IT[r.arrayFormat],d=p==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var m=OT(),h=0;h0?P+v:""}});var qT=L((MW,kT)=>{"use strict";var Fo=gg(),xg=Object.prototype.hasOwnProperty,PH=Array.isArray,Be={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Fo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},AH=s(function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},"interpretNumericEntities"),NT=s(function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},"parseArrayValue"),CH="utf8=%26%2310003%3B",OH="utf8=%E2%9C%93",IH=s(function(e,n){var r={__proto__:null},o=n.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=n.parameterLimit===1/0?void 0:n.parameterLimit,u=o.split(n.delimiter,c),p=-1,d,m=n.charset;if(n.charsetSentinel)for(d=0;d-1&&(_=PH(_)?[_]:_);var T=xg.call(r,P);T&&n.duplicates==="combine"?r[P]=Fo.combine(r[P],_):(!T||n.duplicates==="last")&&(r[P]=_)}return r},"parseQueryStringValues"),DH=s(function(t,e,n,r){for(var o=r?e:NT(e,n),c=t.length-1;c>=0;--c){var u,p=t[c];if(p==="[]"&&n.parseArrays)u=n.allowEmptyArrays&&o===""?[]:[].concat(o);else{u=n.plainObjects?Object.create(null):{};var d=p.charAt(0)==="["&&p.charAt(p.length-1)==="]"?p.slice(1,-1):p,m=n.decodeDotInKeys?d.replace(/%2E/g,"."):d,h=parseInt(m,10);!n.parseArrays&&m===""?u={0:o}:!isNaN(h)&&p!==m&&String(h)===m&&h>=0&&n.parseArrays&&h<=n.arrayLimit?(u=[],u[h]=o):m!=="__proto__"&&(u[m]=o)}o=u}return o},"parseObject"),LH=s(function(e,n,r,o){if(e){var c=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,u=/(\[[^[\]]*])/,p=/(\[[^[\]]*])/g,d=r.depth>0&&u.exec(c),m=d?c.slice(0,d.index):c,h=[];if(m){if(!r.plainObjects&&xg.call(Object.prototype,m)&&!r.allowPrototypes)return;h.push(m)}for(var y=0;r.depth>0&&(d=p.exec(c))!==null&&y"u"?Be.charset:e.charset,r=typeof e.duplicates>"u"?Be.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:Be.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Be.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Be.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Be.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Be.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Be.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Be.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Be.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Be.decoder,delimiter:typeof e.delimiter=="string"||Fo.isRegExp(e.delimiter)?e.delimiter:Be.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Be.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Be.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Be.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Be.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Be.strictNullHandling}},"normalizeParseOptions");kT.exports=function(t,e){var n=MH(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?IH(t,n):t,o=n.plainObjects?Object.create(null):{},c=Object.keys(r),u=0;u{"use strict";var NH=MT(),kH=qT(),qH=il();FT.exports={formats:qH,parse:kH,stringify:NH}});var vg=L((qW,jT)=>{"use strict";var FH=s((t,e=3e4)=>new Promise(async(n,r)=>{let o=setTimeout(async()=>{r(new Error("Timeout exceeded. Please check your connections settings and try again"))},e);try{let c=await t();n(c)}catch(c){r(c)}finally{clearTimeout(o)}}),"executeWithTimeout");jT.exports=FH});var is=L((BW,UT)=>{"use strict";var BH={v2:2},jH={MultiHash:"MultiHash"},UH="On",HH="Off",zH="On (no default)";UT.exports={PARTITION_KEY_DEFINITION_VERSION:BH,PARTITION_KEY_KIND:jH,TTL_ON:UH,TTL_OFF:HH,TTL_ON_DEFAULT:zH}});var KT=L((jW,WT)=>{"use strict";var os=Yh(),an=w_(),HT=eR(),$H=BT(),WH=vg(),{TTL_ON_DEFAULT:KH,TTL_ON:GH,TTL_OFF:QH}=is(),on;WT.exports={connect:function(t,e,n){n()},disconnect:function(t,e,n){n()},testConnection:async function(t,e,n){e.clear(),on=os(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);try{return await WH(zT),n()}catch(r){return n(as(r))}},getDatabases:async function(t,e,n){on=os(t),e.clear(),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);try{let o=(await zT()).map(c=>c.id);return e.log("info",o,"All databases list",t.hiddenKeys),n(null,o)}catch(r){return e.log("error",r),n(as(r))}},getDocumentKinds:async function(t,e,n){on=os(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);try{let r=await $T(t.database);e.log("collections list",r,"Mapped collection list");let o=r.map(async u=>{let p=on.database(t.database).container(u.id),d=await Rg(p),m=Sg(d,t.recordSamplingSettings);e.log("info",{collectionItem:u},"Getting documents for current collectionItem",t.hiddenKeys);let h=await _g(p,m),y=Tg(h),v=YH(y,{sampleSize:20});return XH({bucketName:u.id,inference:v,isCustomInfer:!0,excludeDocKind:t.excludeDocKind},90)}),c=await Promise.all(o);n(null,c)}catch(r){return console.log(r),e.log("error",r),n(as(r))}},getDbCollectionsNames:async function(t,e,n){try{on=os(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys),e.log("info",{Database:t.database},"Getting collections list for current database",t.hiddenKeys);let r=await $T(t.database);e.log("info",{CollectionList:r},"Collection list for current database",t.hiddenKeys);let o=r.map(u=>u.id),c=await ZH(t,o);n(null,c)}catch(r){return console.log(r),e.log("error",r),n(as(r))}},getDbCollectionsData:async function(t,e,n){try{e.progress=e.progress||(()=>{}),on=os(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);let{recordSamplingSettings:r,fieldInference:o}=t;e.log("info",dz(r,o),"Reverse-Engineering sampling params",t.hiddenKeys);let c=t.collectionData.dataBaseNames;e.log("info",{CollectionList:c},"Selected collection list",t.hiddenKeys);let{resource:u}=await on.getDatabaseAccount(),p=await fz(t,e),d=Object.assign({accountID:t.accountKey,defaultConsistency:u.consistencyPolicy,preferredLocation:u.writableLocations[0]?u.writableLocations[0].name:"",...(t==null?void 0:t.includeAccountInformation)&&{resGrp:t.resourceGroupName,tenant:t.tenantId,subscription:t.subscriptionId}},p);e.log("info",d,"Model info",t.hiddenKeys);let m=c.map(async y=>{let v=on.database(t.database).container(y),P=await cz(v),_=await uz(v),T=await lz(v),I=await VH(v),N=await JH(I,e),{autopilot:H,throughput:j,capacityMode:G}=sz(N),te=oz(I),Ee=nz(I.indexingPolicy),Ie=Array.isArray(te)&&te.length>1,Ke=Object.assign({dbId:t.database,capacityMode:G,throughput:j,autopilot:H,partitionKey:te,uniqueKey:az(I),storedProcs:P,triggers:_,udfs:T,TTL:pz(I.defaultTtl),TTLseconds:I.defaultTtl,hierarchicalPartitionKey:Ie},Ee),Ge=await Rg(v),at=Sg(Ge,r);e.progress({message:"Load documents...",containerName:t.database,entityName:y});let vn=await _g(v,at);e.progress({message:"Documents have loaded.",containerName:t.database,entityName:y});let Le=Tg(vn),je=t.documentKinds[I.id].documentKindName||"*",be=t.collectionData.collections[y],Re=[];if(je!=="*")if(be)be.forEach(Te=>{let J=Le.filter(me=>me[je]===Te),Q={dbName:y,collectionName:Te,documents:J||[],indexes:[],views:[],validation:wg(te,Le),docType:je,bucketInfo:Ke};o.active==="field"&&(Q.documentTemplate=J[0]||null),Re.push(Q)});else{let Te={dbName:y,emptyBucket:!0,indexes:[],views:[],validation:wg(te,Le),bucketInfo:Ke};Re.push(Te)}else{let Te={dbName:y,collectionName:y,documents:Le||[],indexes:[],views:[],validation:wg(te,Le),docType:"type",bucketInfo:Ke};o.active==="field"&&(Te.documentTemplate=Le[0]||null),Re.push(Te)}return Re}),h=await Promise.all(m);return n(null,h,d)}catch(r){return e.progress({message:"Error of connecting to the database "+t.database+`. + `+r.message,containerName:t.database,entityName:""}),e.log("error",r),n(as(r))}}};async function VH(t){let{resource:e}=await t.read();return e}s(VH,"getCollectionById");async function JH(t,e){try{let n={query:"SELECT * FROM root r WHERE r.resource = @link",parameters:[{name:"@link",value:t._self}]},{resources:r}=await on.offers.query(n).fetchAll();return r.length>0&&r[0]}catch(n){e.log("error",{message:n.message,stack:n.stack},"[Warning] Error querying offers");return}}s(JH,"getOfferType");async function zT(){return(await on.databases.readAll().fetchAll()).resources}s(zT,"getDatabasesData");async function $T(t){let{resources:e}=await on.database(t).containers.readAll().fetchAll();return e}s($T,"listCollections");async function _g(t,e,n){let r=`SELECT TOP ${e} * FROM c`,o=[];try{let c=t.items.query(r,{enableCrossPartitionQuery:!0,maxItemCount:200});for(;c.hasMoreResults();){let{resources:u}=await c.fetchNext();o=o.concat(u)}}catch(c){console.log(c),n.log("error",c)}return o.filter(Boolean)}s(_g,"getDocuments");async function Rg(t){let e="SELECT COUNT(1) FROM c",{resources:n}=await t.items.query(e,{enableCrossPartitionQuery:!0}).fetchAll();return n[0].$1}s(Rg,"getDocumentsAmount");function Tg(t){let e=["_rid","_self","_etag","_attachments","_ts"];return t.map(n=>{for(let r in n)e.includes(r)&&delete n[r];return n})}s(Tg,"filterDocuments");function YH(t,e){function n(c){return{}.toString.call(c).split(" ")[1].slice(0,-1).toLowerCase()}s(n,"typeOf");let r=e.sampleSize||30,o={"#docs":0,$schema:"http://json-schema.org/schema#",properties:{}};t.forEach(c=>{o["#docs"]++;for(let u in c)o.properties.hasOwnProperty(u)?(o.properties[u]["#docs"]++,o.properties[u].samples.indexOf(c[u])===-1&&o.properties[u].samples.length=e&&p[d].samples.length){if(n.push(d),t.excludeDocKind.indexOf(d)===-1){if(p[d]["%docs"]===o.probability&&o.key==="type")continue;p[d]["%docs"]>=o.probability&&p[d].samples.length{let o=on.database(t.database).container(r),c=await Rg(o),u=Sg(c,t.recordSamplingSettings),p=await _g(o,u),d=Tg(p),m=t.documentKinds[r].documentKindName||"*",h=[];return m!=="*"&&(h=d.map(y=>y[m]),h=h.filter(y=>!!y),h=an.uniq(h)),ez(h,r)});return await Promise.all(n)}s(ZH,"handleBucket");function ez(t,e){let n=an.uniq(t);return{dbName:e,dbCollections:n}}s(ez,"prepareConnectionDataItem");var Sg=s((t,e)=>{if(e.active==="absolute")return Number(e.absolute.value);let n=Math.ceil(t*e.relative.value/100);return Math.min(n,e.maxValue)},"getSampleDocSize");function tz(t){return t.charAt(0).toUpperCase()+t.slice(1)}s(tz,"capitalizeFirstLetter");function nz(t){return{indexingMode:tz(t.indexingMode||""),indexingAutomatic:t.automatic===!0?"true":"false",includedPaths:(t.includedPaths||[]).map((e,n)=>({name:`Included (${n+1})`,indexIncludedPath:[bg(e.path)]})),excludedPaths:t.excludedPaths.map((e,n)=>({name:`Excluded (${n+1})`,indexExcludedPath:[bg(e.path)]})),spatialIndexes:(t.spatialIndexes||[]).map((e,n)=>({name:`Spatial (${n+1})`,indexIncludedPath:[bg(e.path)],dataTypes:(e.types||[]).map(r=>({spatialType:r}))})),compositeIndexes:(t.compositeIndexes||[]).map((e,n)=>{let r=e.map((o,c)=>({name:al(o.path),type:o.order||"ascending"}),{});return{name:`Composite (${n+1})`,compositeFieldPath:r}})}}s(nz,"getIndexes");var rz=s(t=>/\?$/.test(t)?"?":/\*$/.test(t)?"*":"","getIndexPathType"),bg=s(t=>{let e=rz(t),n=t.replace(/\/(\?|\*)$/,"");return{name:al(n),type:e}},"getIndexPath"),iz=s(t=>{let e=/^\"([\s\S]+)\"$/i;return e.test(t)&&t.match(e)[1]||t},"trimKey"),al=s(t=>(t||"").split("/").filter(Boolean).map(iz).map(e=>e==="[]"?0:e).join("."),"getKeyPath");function oz(t){return!t.partitionKey||!Array.isArray(t.partitionKey.paths)?"":t.partitionKey.paths.map(al)}s(oz,"getPartitionKey");function az(t){return t.uniqueKeyPolicy?Array.isArray(t.uniqueKeyPolicy.uniqueKeys)?t.uniqueKeyPolicy.uniqueKeys.map(e=>{if(Array.isArray(e.paths))return{attributePath:e.paths.map(al)}}).filter(Boolean):[]:[]}s(az,"getUniqueKeys");function sz(t){return t?an.get(t,"content.offerAutopilotSettings")?{autopilot:!0,throughput:an.get(t,"content.offerAutopilotSettings.maximumTierThroughput",""),capacityMode:"Provisioned throughput"}:{autopilot:!1,throughput:an.get(t,"content.offerThroughput",""),capacityMode:"Provisioned throughput"}:{capacityMode:"Serverless",autopilot:!1}}s(sz,"getOfferProps");async function cz(t){let{resources:e}=await t.scripts.storedProcedures.readAll().fetchAll();return e.map((n,r)=>({storedProcID:n.id,name:`New Stored procedure(${r+1})`,storedProcFunction:n.body}))}s(cz,"getStoredProcedures");async function uz(t){let{resources:e}=await t.scripts.triggers.readAll().fetchAll();return e.map((n,r)=>({triggerID:n.id,name:`New Trigger(${r+1})`,prePostTrigger:n.triggerType==="Pre"?"Pre-Trigger":"Post-Trigger",triggerOperation:n.triggerOperation,triggerFunction:n.body}))}s(uz,"getTriggers");async function lz(t){let{resources:e}=await t.scripts.userDefinedFunctions.readAll().fetchAll();return e.map((n,r)=>({udfID:n.id,name:`New UDFS(${r+1})`,udfFunction:n.body}))}s(lz,"getUdfs");function pz(t){return t?t===-1?KH:GH:QH}s(pz,"getTTL");function dz(t,e){let n={},r=t[t.active].value,o=t.active==="relative"?"%":" records max";return n.recordSampling=`${t.active} ${r}${o}`,n.fieldInference=e.active==="field"?"keep field order":"alphabetical order",n}s(dz,"getSamplingInfo");async function fz(t,e){if(t.disableSSL||!t.includeAccountInformation)return{};e.log("info",{},"Account additional info",t.hiddenKeys);try{let{clientId:n,appSecret:r,tenantId:o,subscriptionId:c,resourceGroupName:u,host:p}=t,d=/https:\/\/(.+)\.documents.+/i,m=d.test(p)?d.exec(p)[1]:"",h=`https://login.microsoftonline.com/${o}/oauth2/token`,{data:y}=await HT({method:"post",url:h,data:$H.stringify({grant_type:"client_credentials",client_id:n,client_secret:r,resource:"https://management.azure.com/"}),headers:{"Content-Type":"application/x-www-form-urlencoded"}}),v=`https://management.azure.com/subscriptions/${c}/resourceGroups/${u}/providers/Microsoft.DocumentDB/databaseAccounts/${m}?api-version=2015-04-08`,{data:P}=await HT({method:"get",url:v,headers:{Authorization:`${y.token_type} ${y.access_token}`}});return e.progress({message:"Getting account information",containerName:t.database,entityName:""}),{enableMultipleWriteLocations:P.properties.enableMultipleWriteLocations,enableAutomaticFailover:P.properties.enableAutomaticFailover,isVirtualNetworkFilterEnabled:P.properties.isVirtualNetworkFilterEnabled,virtualNetworkRules:P.properties.virtualNetworkRules.map(({id:_,ignoreMissingVNetServiceEndpoint:T})=>({virtualNetworkId:_,ignoreMissingVNetServiceEndpoint:T})),ipRangeFilter:P.properties.ipRangeFilter,tags:Object.entries(P.tags).map(([_,T])=>({tagName:_,tagValue:T})),locations:P.properties.locations.map(({id:_,locationName:T,failoverPriority:I,isZoneRedundant:N})=>({locationId:_,locationName:T,failoverPriority:I,isZoneRedundant:N}))}}catch(n){return e.log("error",{message:an.get(n,"response.data.error.message",n.message),stack:n.stack}),e.progress({message:"Error while getting account information",containerName:t.database}),{}}}s(fz,"getAdditionalAccountInfo");function as(t){return{message:t.message,stack:t.stack}}s(as,"mapError");function wg(t,e=[]){let n=s((u,p={})=>{if(an.isEmpty(u))return!0;let d=an.get(p,`${u[0]}`);return d!==void 0?n(an.tail(u),d):!1},"checkIfDocumentContainsPath"),r=s(u=>u.length===1?{[u[0]]:{primaryKey:!0,partitionKey:!0}}:{[u[0]]:{properties:r(an.tail(u))}},"getNestedObject"),o=s(u=>u.reduce((p,d)=>{if(!d||!an.isString(d))return p;let m=d.split(".");return m.length===0||!e.some(h=>n(m,h))?p:{...p,...r(m)}},{}),"getProperties");if(!Array.isArray(t))return!1;let c=o(t);return an.isEmpty(c)?!1:{jsonSchema:{properties:c}}}s(wg,"createSchemaByPartitionKeyPath")});var Eg=L((HW,GT)=>{"use strict";var{StoredProcedure:hz,UserDefinedFunction:mz,Trigger:gz}=Jh(),yz=Yh(),{TTL_ON_DEFAULT:xz,TTL_ON:vz,TTL_OFF:bz}=is(),wz=s(t=>({setUpDocumentClient(e){return yz(e)},createStoredProcs(e,n){return e.reduce(async(r,o)=>{await r;try{return await n.scripts.storedProcedures.create(o)}catch(c){if(c.code!==409)throw c;return await new hz(n,o.id,n.clientContext).replace(o)}},Promise.resolve())},createUDFs(e,n){return e.reduce(async(r,o)=>{await r;try{return await n.scripts.userDefinedFunctions.create(o)}catch(c){if(c.code!==409)throw c;return await new mz(n,o.id,n.clientContext).replace(o)}},Promise.resolve())},createTriggers(e,n){return e.reduce(async(r,o)=>{await r;try{return await n.scripts.triggers.create(o)}catch(c){if(c.code!==409)throw c;return await new gz(n,o.id,n.clientContext).replace(o)}},Promise.resolve())},getTTL(e){switch(e==null?void 0:e.TTL){case xz:return-1;case vz:return t.parseInt(e==null?void 0:e.TTLseconds)||-1;case bz:default:return 0}},getContainerThroughputProps(e){return(e==null?void 0:e.capacityMode)==="Serverless"?{}:e!=null&&e.autopilot?{maxThroughput:e.throughput||4e3}:{throughput:(e==null?void 0:e.throughput)||400}}}),"applyToInstanceHelper");GT.exports=wz});var YT=L(($W,JT)=>{"use strict";var _z=KT(),Rz=vg(),{TTL_ON:Tz,TTL_ON_DEFAULT:Sz}=is(),Ez=Eg(),QT=s(async(t,e)=>{try{await e.items.create(t)}catch(n){if(n.code!==409)throw n;await e.items.upsert(t)}},"createOrUpdate"),VT=s(t=>t.map(e=>Array.isArray(e.indexes)?{...e,indexes:e.indexes.map(n=>({...n,dataType:n.dataType||"String"}))}:e),"addDataType"),Pz=s(t=>Array.isArray(t.types)&&t.types.length?t:{...t,types:["Point","LineString","Polygon","MultiPolygon"]},"addSpatialTypes"),Az=s(t=>{let e={...t};return Array.isArray(e.includedPaths)&&(e.includedPaths=VT(e.includedPaths)),Array.isArray(e.excludedPaths)&&(e.excludedPaths=VT(e.excludedPaths)),Array.isArray(e.spatialIndexes)&&(e.spatialIndexes=e.spatialIndexes.map(Pz)),e},"updateIndexingPolicy");JT.exports={testConnection:_z.testConnection,async applyToInstance(t,e,n,r){let o=r.require("lodash");try{let c=Ez(o);e.progress=e.progress||(()=>{}),e.clear(),e.log("info",t,"Apply to instance connection settings",t.hiddenKeys);let u=c.setUpDocumentClient(t),p=Oz(t.script),d=o.get(t,"containerData[0]"),m=o.get(d,"dbId"),h=o.get(d,"name");if(!m)return n({message:"Database ID is required. Please, set it on container level."});let y=Cz(e,m,h);y("Create database if not exists...");let{database:v}=await Rz(()=>u.databases.createIfNotExists({id:m}));y("Create container if not exists ...");let P=[Tz,Sz].includes(d.TTL),{container:_,resource:T}=await v.containers.createIfNotExists({id:h,partitionKey:p.partitionKey,...P&&{defaultTtl:c.getTTL(d)},...p.uniqueKeyPolicy&&{uniqueKeyPolicy:p.uniqueKeyPolicy},...c.getContainerThroughputProps(d)});y("Add sample documents ..."),Array.isArray(p.sample)?await p.sample.reduce(async(j,G)=>(await j,QT(G,_)),Promise.resolve()):await QT(p.sample,_),y("Update indexing policy ..."),await _.replace({...T,indexingPolicy:Az(p.indexingPolicy)});let I=o.get(p,"Stored Procedures",[]);I.length&&(y("Upload stored procs ..."),await c.createStoredProcs(I,_));let N=o.get(p,"User Defined Functions",[]);N.length&&(y("Upload user defined functions ..."),await c.createUDFs(N,_));let H=o.get(p,"Triggers",[]);H.length&&(y("Upload triggers ..."),await c.createTriggers(H,_)),y("Applying to instance finished"),n(null)}catch(c){c.message=o.get(c,"response.data.error.message",c.message||c.name),e.log("error",c),n({message:c.message,stack:c.stack})}}};var Cz=s((t,e,n)=>r=>{t.progress({message:r,containerName:e,entityName:n}),t.log("info",{message:r},"Applying to instance")},"createLogger"),Oz=s(t=>{try{return JSON.parse(t)}catch{let[n,r]=t.split(/\n}\n\[/m),o=JSON.parse(n+"}"),c=JSON.parse("["+r);return{...o,sample:c}}},"parseScript")});var Ag=L((KW,eS)=>{"use strict";var qn=s((t,e)=>n=>e===void 0||e===""||Array.isArray(e)&&e.length===0?n:{...n,[t]:e},"add"),XT=s(t=>/^[0-9]/.test(t)?`"${t}"`:/^[a-z0-9_]*$/i.test(t)?t:`"${t}"`,"escapeName"),ZT=s(t=>/^\[\d*\]$/.test(t)?"[]":XT(t),"prepareName"),Pg=s((t=[])=>{let e=t[0];if(!e)return"";if(Array.isArray(e.path)&&e.path.length!==0){let r=e.name.split("/");return["",...r.slice(1,-1).map(ZT),""].join("/")+r[r.length-1]}let n=e.name.split("/");return n.slice(0,-1).map(r=>/^"/.test(r)&&/"$/.test(r)?r:XT(r)).concat(n[n.length-1]).join("/")},"getPath"),sl=s(t=>(t||[]).filter(e=>e.isActivated!==!1),"filterDeactivated"),Iz=s(t=>(e=[])=>sl(e).map(n=>t.flow(qn("path",Pg(n.indexIncludedPath)))({})).filter(n=>!t.isEmpty(n)),"getIncludedPath"),Dz=s(t=>(e=[])=>sl(e).map(n=>t.flow(qn("path",Pg(n.indexExcludedPath)))({})).filter(n=>!t.isEmpty(n)),"getExcludedPath"),Lz=s(t=>(e=[])=>sl(e).map(n=>{if(Array.isArray(n.compositeFieldPath))return t.uniqWith(n.compositeFieldPath.map(r=>({path:["",...r.name.split("/").slice(1).map(ZT)].join("/"),order:r.type||"ascending"})),(r,o)=>r.path===o.path).filter(r=>!t.isEmpty(r))}).filter(n=>!t.isEmpty(n)),"getCompositeIndexes"),Mz=s(t=>(e=[])=>sl(e).map(n=>t.flow(qn("path",Pg(n.indexIncludedPath)),qn("types",(n.dataTypes||[]).map(r=>r.spatialType).filter(Boolean)))({})).filter(n=>!t.isEmpty(n)&&n.path),"getSpatialIndexes"),Nz=s(t=>e=>{let n=e[1]||{};return t.flow(qn("automatic",n.indexingAutomatic==="true"),qn("indexingMode",n.indexingMode),qn("includedPaths",Iz(t)(n.includedPaths)),qn("excludedPaths",Dz(t)(n.excludedPaths)),qn("spatialIndexes",Mz(t)(n.spatialIndexes)),qn("compositeIndexes",Lz(t)(n.compositeIndexes)))({})},"getIndexPolicyScript");eS.exports=Nz});var Cg=L((QW,tS)=>{"use strict";var kz=s(t=>t?t.filter(e=>e.attributePath&&Array.isArray(e.attributePath)&&e.attributePath.length).map(e=>({paths:e.attributePath.map(n=>"/"+n.name.split(".").slice(1).join("/")).filter(Boolean)})).filter(e=>e.paths.length):[],"getUniqueKeys"),qz=s(t=>({uniqueKeyPolicy:{uniqueKeys:kz(t)}}),"getUniqueKeyPolicyScript");tS.exports={getUniqueKeyPolicyScript:qz}});var rS=L((JW,nS)=>{"use strict";var Fz=s((t,e)=>{switch(t){case"powershell":return e=e.replace(/[\u009B\u001B\u0008\0]/gu,"").replace(/\r(?!\n)/gu,"").replace(/(['‛‘’‚])/gu,"$1$1"),/[\u0085\s]/u.test(e)?e=e.replace(/(?`'${t}'`,"wrapInSingleQuotes");nS.exports={escapeShellCommand:Fz,wrapInSingleQuotes:Bz}});var oS=L((XW,iS)=>{"use strict";var jz=s(t=>t==="powershell"?" `\n ":["bash","zsh"].includes(t)?` \\ + `:" ","getCliParamsDelimiter");iS.exports={getCliParamsDelimiter:jz}});var Og=L((e7,aS)=>{"use strict";var{PARTITION_KEY_DEFINITION_VERSION:Uz,PARTITION_KEY_KIND:Hz}=is(),zz=s(t=>e=>{let n=s(c=>((c==null?void 0:c.name)||"").trim().replace(/\/$/,""),"fixNamePath"),r=t.get(e,"[0].partitionKey",[]);return t.get(e,"[0].hierarchicalPartitionKey",!1)?{paths:r.map(n),version:Uz.v2,kind:Hz.MultiHash}:n(r[0])},"getPartitionKey");aS.exports=zz});var cS=L((n7,sS)=>{"use strict";var $z="az cosmosdb sql",Wz="database",Kz="container",Gz="stored-procedure",Qz="trigger",Vz="user-defined-function",Jz="create";sS.exports={CLI:$z,DATABASE:Wz,CREATE:Jz,CONTAINER:Kz,STORED_PROCEDURE:Gz,TRIGGER:Qz,USER_DEFINED_FUNCTION:Vz}});var lS=L((r7,uS)=>{"use strict";var{wrapInSingleQuotes:Ig,escapeShellCommand:Yz}=rS(),Xz=Eg(),{getUniqueKeyPolicyScript:Zz}=Cg(),{getCliParamsDelimiter:e6}=oS(),t6=Ag(),n6=Og(),{CLI:ss,DATABASE:r6,CREATE:cs,CONTAINER:i6,STORED_PROCEDURE:o6,TRIGGER:a6,USER_DEFINED_FUNCTION:s6}=cS(),c6=s(t=>({modelData:e,containerData:n,shellName:r})=>{var y,v,P,_;let o=e6(r),c=s(T=>Ig(Yz(r,T)),"escapeAndWrapInQuotes"),u=c(((y=e[0])==null?void 0:y.accountName)||""),p=c(((v=n[0])==null?void 0:v.dbId)||""),d=c(((P=n[0])==null?void 0:P.name)||""),m=c(((_=e[0])==null?void 0:_.resGrp)||""),h={accountName:u,dbName:p,resourceGroup:m,containerName:d,escapeAndWrapInQuotes:c,cliParamsDelimiter:o};return y6([u6(h),l6(t)({containerData:n,...h}),...p6({containerData:n,...h}),...d6({containerData:n,...h}),...f6({containerData:n,...h})])},"buildAzureCLIScript"),u6=s(({accountName:t,dbName:e,resourceGroup:n,cliParamsDelimiter:r})=>{let o=`${ss} ${r6} ${cs}`,c=[`--account-name ${t}`,`--name ${e}`,`--resource-group ${n}`].join(r);return[o,c].join(r)},"getAzureCliDbCreateStatement"),l6=s(t=>({containerData:e,accountName:n,dbName:r,resourceGroup:o,containerName:c,escapeAndWrapInQuotes:u,cliParamsDelimiter:p})=>{let d=Xz(t),m=m6(t)(e),h=g6(d.getContainerThroughputProps(e[0])),y=`--idx ${u(JSON.stringify(t6(t)(e)))}`,v=h6(e[0],u),_=d.getTTL(e[0])!==0?`--ttl ${d.getTTL(e[0])}`:"",T=`${ss} ${i6} ${cs}`,I=[`--account-name ${n}`,`--database-name ${r}`,`--name ${c}`,`--resource-group ${o}`,...m].join(p);return[T,I,y,v,h,_].filter(Boolean).join(p)},"getAzureCliContainerCreateStatement"),p6=s(({containerData:t,accountName:e,dbName:n,resourceGroup:r,containerName:o,escapeAndWrapInQuotes:c,cliParamsDelimiter:u})=>{var m;let p=`${ss} ${o6} ${cs}`;return(((m=t[2])==null?void 0:m.storedProcs)||[]).map(h=>{let y=[`--account-name ${e}`,`--database-name ${n}`,`--container-name ${o}`,`--name ${h.storedProcID}`,`--resource-group ${r}`,`--body ${c(h.storedProcFunction)}`].join(u);return[p,y].join(u)})},"getAzureCliStoredProcedureStatements"),d6=s(({containerData:t,accountName:e,dbName:n,resourceGroup:r,containerName:o,escapeAndWrapInQuotes:c,cliParamsDelimiter:u})=>{var m;let p=`${ss} ${a6} ${cs}`;return(((m=t[3])==null?void 0:m.triggers)||[]).map(h=>{let y=`--operation ${h.triggerOperation}`,v=`--type ${h.prePostTrigger==="Pre-Trigger"?"Pre":"Post"}`,P=[`--account-name ${e}`,`--database-name ${n}`,`--container-name ${o}`,`--name ${h.triggerID}`,`--resource-group ${r}`,`--body ${c(h.triggerFunction)}`].join(u);return[p,P,y,v].join(u)})},"getAzureCliTriggerCreateStatements"),f6=s(({containerData:t,accountName:e,dbName:n,resourceGroup:r,containerName:o,escapeAndWrapInQuotes:c,cliParamsDelimiter:u})=>{var m;let p=`${ss} ${s6} ${cs}`;return(((m=t[4])==null?void 0:m.udfs)||[]).map(h=>{let y=[`--account-name ${e}`,`--database-name ${n}`,`--container-name ${o}`,`--name ${h.udfID}`,`--resource-group ${r}`,`--body ${c(h.udfFunction)}`].join(u);return[p,y].join(u)})},"getAzureCliUDFCreateStatements"),h6=s((t,e)=>{let n=(t==null?void 0:t.uniqueKey)||[];return n.length?`--unique-key-policy ${e(JSON.stringify(Zz(n)))}`:""},"getUniqueKeysPolicyParam"),m6=s(t=>e=>{let n=n6(t)(e);return typeof n=="string"?[`--partition-key-path ${Ig(n)}`]:typeof n=="object"?[`--partition-key-path ${Ig(n.paths[0])}`,`--partition-key-version ${n.version}`]:[]},"getPartitionKeyParams"),g6=s(t=>t.hasOwnProperty("throughput")?`--throughput ${t.throughput}`:t.hasOwnProperty("maxThroughput")?`--max-throughput ${t.maxThroughput}`:"","getThroughputParam"),y6=s((t=[])=>t.join(` + +`),"composeCLIStatements");uS.exports={buildAzureCLIScript:c6}});var pS=YT(),dS=Ag(),{getUniqueKeyPolicyScript:fS}=Cg(),{buildAzureCLIScript:x6}=lS(),hS=Og();module.exports={generateContainerScript(t,e,n,r){try{let o=r.require("lodash"),c=o.get(t,"options.additionalOptions",[]).find(m=>m.id==="INCLUDE_SAMPLES")||{},u=t.options.origin!=="ui",p=t.entities.map(m=>mS(JSON.parse(t.jsonData[m]),t.containerData[0],(t.entityData[m]||[])[0]||{}));if(t.options.targetScriptOptions&&t.options.targetScriptOptions.keyword==="containerSettingsJson"){let m=o.get(t.containerData,"[0].uniqueKey",[]),h={partitionKey:hS(o)(t.containerData),...m.length&&fS(m),indexingPolicy:dS(o)(t.containerData),...u&&{sample:p},...gS(o)(t.containerData)},y=JSON.stringify(h,null,2);return u||!c.value?n(null,y):n(null,[{title:"CosmosDB script",script:y},{title:"Sample data",script:JSON.stringify(p,null,2)}])}let d=x6(o)({...t,shellName:t.options.targetScriptOptions.keyword.split("azureCli")[1].toLowerCase()});return u||!c.value?n(null,d):n(null,[{title:"Azure CLI script",script:d},{title:"Sample data",script:JSON.stringify(p,null,2)}])}catch(o){let c={message:o.message,stack:o.stack};e.log("error",c,"CosmosDB w\\ SQL API forward engineering error"),n(c)}},generateScript(t,e,n,r){try{let o=r.require("lodash"),c=o.get(t.containerData,"[0].uniqueKey",[]),u={partitionKey:hS(o)(t.containerData),indexingPolicy:dS(o)(t.containerData),...c.length&&fS(c),sample:mS(JSON.parse(t.jsonData),t.containerData[0],t.entityData[0]),...gS(o)(t.containerData)};return n(null,JSON.stringify(u,null,2))}catch(o){let c={message:o.message,stack:o.stack};e.log("error",c,"CosmosDB w\\ SQL API forward engineering error"),n(c)}},applyToInstance:pS.applyToInstance,testConnection:pS.testConnection};var mS=s((t,e,n)=>{let r=e==null?void 0:e.docTypeName;return r?{...t,[r]:n.code||n.collectionName}:t},"updateSample"),Dg=s((t,e,n)=>r=>e.length?{...r,[t]:n(e)}:r,"add"),gS=s(t=>e=>t.flow(Dg("Stored Procedures",t.get(e,"[2].storedProcs",[]),w6),Dg("User Defined Functions",t.get(e,"[4].udfs",[]),v6),Dg("Triggers",t.get(e,"[3].triggers",[]),b6))(),"addItems"),v6=s(t=>t.map(e=>({id:e.udfID,body:e.udfFunction})),"mapUDFs"),b6=s(t=>t.map(e=>({id:e.triggerID,body:e.triggerFunction,triggerOperation:e.triggerOperation,triggerType:e.prePostTrigger==="Pre-Trigger"?"Pre":"Post"})),"mapTriggers"),w6=s(t=>t.map(e=>({id:e.storedProcID,body:e.storedProcFunction})),"mapStoredProcs"); +/*! Bundled license information: + +lodash/lodash.js: + (** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) +*/ diff --git a/forward_engineering/applyToInstance/applyToInstanceHelper.js b/forward_engineering/applyToInstance/applyToInstanceHelper.js deleted file mode 100644 index 9c4512e..0000000 --- a/forward_engineering/applyToInstance/applyToInstanceHelper.js +++ /dev/null @@ -1,84 +0,0 @@ -const { StoredProcedure, UserDefinedFunction, Trigger } = require('../../reverse_engineering/node_modules/@azure/cosmos'); -const setUpDocumentClient = require('../../reverse_engineering/helpers/setUpDocumentClient'); -const { TTL_ON_DEFAULT, TTL_ON, TTL_OFF } = require('../../shared/constants'); - -const applyToInstanceHelper = (_) => ({ - setUpDocumentClient(connectionInfo) { - return setUpDocumentClient(connectionInfo); - }, - - createStoredProcs(storedProcs, containerInstance) { - return storedProcs.reduce(async (next, proc) => { - await next; - - try { - return await containerInstance.scripts.storedProcedures.create(proc); - } catch (error) { - if (error.code !== 409) { - throw error; - } - const result = new StoredProcedure(containerInstance, proc.id, containerInstance.clientContext); - - return await result.replace(proc); - } - }, Promise.resolve()); - }, - - createUDFs(udfs, containerInstance) { - return udfs.reduce(async (next, udf) => { - await next; - - try { - return await containerInstance.scripts.userDefinedFunctions.create(udf); - } catch (error) { - if (error.code !== 409) { - throw error; - } - const result = new UserDefinedFunction(containerInstance, udf.id, containerInstance.clientContext); - - return await result.replace(udf); - } - }, Promise.resolve()); - }, - - createTriggers(triggers, containerInstance) { - return triggers.reduce(async (next, trigger) => { - await next; - - try { - return await containerInstance.scripts.triggers.create(trigger); - } catch (error) { - if (error.code !== 409) { - throw error; - } - const result = new Trigger(containerInstance, trigger.id, containerInstance.clientContext); - - return await result.replace(trigger); - } - }, Promise.resolve()); - }, - - getTTL(containerData) { - switch (containerData?.TTL) { - case TTL_ON_DEFAULT: - return -1; - case TTL_ON: - return _.parseInt(containerData?.TTLseconds) || -1; - case TTL_OFF: - default: - return 0; - } - }, - - getContainerThroughputProps(containerData) { - if (containerData?.capacityMode === "Serverless") { - return {}; - } - if (containerData?.autopilot) { - return { maxThroughput: containerData.throughput || 4000 }; - } - return { throughput: containerData?.throughput || 400 }; - } -}); - -module.exports = applyToInstanceHelper; \ No newline at end of file diff --git a/forward_engineering/applyToInstance/index.js b/forward_engineering/applyToInstance/index.js deleted file mode 100644 index 27e8d48..0000000 --- a/forward_engineering/applyToInstance/index.js +++ /dev/null @@ -1,174 +0,0 @@ -const reApi = require('../../reverse_engineering/api'); -const executeWithTimeout = require('../../reverse_engineering/helpers/executeWithTimeout'); -const { TTL_ON, TTL_ON_DEFAULT } = require('../../shared/constants'); -const applyToInstanceHelper = require('./applyToInstanceHelper'); - -const createOrUpdate = async (sample, container) => { - try { - await container.items.create(sample); - } catch (error) { - if (error.code !== 409) { - throw error; - } - - await container.items.upsert(sample); - } -}; - -const addDataType = (indexes) => { - return indexes.map(index => { - if (!Array.isArray(index.indexes)) { - return index; - } - - return { - ...index, - indexes: index.indexes.map(item => ({ - ...item, - dataType: item.dataType || 'String', - })), - }; - }); -}; - -const addSpatialTypes = (spatialIndex) => { - if (Array.isArray(spatialIndex.types) && spatialIndex.types.length) { - return spatialIndex; - } - - return { - ...spatialIndex, - types: [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - }; -}; - -const updateIndexingPolicy = (indexes) => { - const result = {...indexes}; - - if (Array.isArray(result.includedPaths)) { - result.includedPaths = addDataType(result.includedPaths); - } - - if (Array.isArray(result.excludedPaths)) { - result.excludedPaths = addDataType(result.excludedPaths); - } - - if (Array.isArray(result.spatialIndexes)) { - result.spatialIndexes = result.spatialIndexes.map(addSpatialTypes); - } - - return result; -}; - -module.exports = { - testConnection: reApi.testConnection, - async applyToInstance(connectionInfo, logger, callback, app) { - const _ = app.require('lodash'); - try { - const helper = applyToInstanceHelper(_); - logger.progress = logger.progress || (() => {}); - logger.clear(); - logger.log('info', connectionInfo, 'Apply to instance connection settings', connectionInfo.hiddenKeys); - const client = helper.setUpDocumentClient(connectionInfo); - const script = parseScript(connectionInfo.script); - const containerData = _.get(connectionInfo, 'containerData[0]'); - const databaseId = _.get(containerData, 'dbId'); - const containerId = _.get(containerData, 'name'); - - if (!databaseId) { - return callback({ - message: 'Database ID is required. Please, set it on container level.', - }); - } - - const progress = createLogger(logger, databaseId, containerId); - - progress('Create database if not exists...'); - - const { database } = await executeWithTimeout(() => client.databases.createIfNotExists({ id: databaseId })); - - progress('Create container if not exists ...'); - - const shouldIncludeTtl = [TTL_ON, TTL_ON_DEFAULT].includes(containerData.TTL); - const { container, resource: containerDef } = await database.containers.createIfNotExists({ - id: containerId, - partitionKey: script.partitionKey, - ...(shouldIncludeTtl && { defaultTtl: helper.getTTL(containerData) }), - ...(script.uniqueKeyPolicy && { uniqueKeyPolicy: script.uniqueKeyPolicy }), - ...helper.getContainerThroughputProps(containerData), - }); - - progress('Add sample documents ...'); - - if (Array.isArray(script.sample)) { - await script.sample.reduce(async (next, sample) => { - await next; - return createOrUpdate(sample, container); - }, Promise.resolve()); - } else { - await createOrUpdate(script.sample, container); - } - - progress('Update indexing policy ...'); - - await container.replace({ - ...containerDef, - indexingPolicy: updateIndexingPolicy(script.indexingPolicy), - }); - - const storedProcs = _.get(script, 'Stored Procedures', []); - if (storedProcs.length) { - progress('Upload stored procs ...'); - await helper.createStoredProcs(storedProcs, container); - } - - const udfs = _.get(script, 'User Defined Functions', []); - if (udfs.length) { - progress('Upload user defined functions ...'); - await helper.createUDFs(udfs, container); - } - - const triggers = _.get(script, 'Triggers', []); - if (triggers.length) { - progress('Upload triggers ...'); - await helper.createTriggers(triggers, container); - } - - progress('Applying to instance finished'); - - callback(null); - } catch (error) { - error.message = _.get(error, 'response.data.error.message', error.message || error.name); - logger.log('error', error); - callback({ - message: error.message, - stack: error.stack, - }); - } - } -}; - -const createLogger = (logger, containerName, entityName) => (message) => { - logger.progress({ message, containerName, entityName }); - logger.log('info', { message }, 'Applying to instance'); -}; - -const parseScript = script => { - try { - return JSON.parse(script); - } catch (err) { - const [ main, sample ] = script.split(/\n}\n\[/m); - const mainScript = JSON.parse(main + '}'); - const sampleScript = JSON.parse('[' + sample); - - return { - ...mainScript, - sample: sampleScript - } - } -}; diff --git a/forward_engineering/config.json b/forward_engineering/config.json index dbc683c..6b4191a 100644 --- a/forward_engineering/config.json +++ b/forward_engineering/config.json @@ -17,9 +17,7 @@ "level": { "entity": false }, - "targetFEKeywords": [ - "containerSettingsJson" - ] + "targetFEKeywords": ["containerSettingsJson"] } ], "options": [ @@ -68,10 +66,8 @@ } ], "splitView": { - "byAdditionalOptions": [ - "INCLUDE_SAMPLES" - ] + "byAdditionalOptions": ["INCLUDE_SAMPLES"] }, "applyScriptToInstance": true, "refresh": true -} \ No newline at end of file +} diff --git a/forward_engineering/helpers/azureCLIScriptHelpers/azureCLIConstants.js b/forward_engineering/helpers/azureCLIScriptHelpers/azureCLIConstants.js deleted file mode 100644 index e8fa463..0000000 --- a/forward_engineering/helpers/azureCLIScriptHelpers/azureCLIConstants.js +++ /dev/null @@ -1,17 +0,0 @@ -const CLI = 'az cosmosdb sql'; -const DATABASE = 'database'; -const CONTAINER = 'container'; -const STORED_PROCEDURE = 'stored-procedure'; -const TRIGGER = 'trigger'; -const USER_DEFINED_FUNCTION = 'user-defined-function'; -const CREATE = 'create'; - -module.exports = { - CLI, - DATABASE, - CREATE, - CONTAINER, - STORED_PROCEDURE, - TRIGGER, - USER_DEFINED_FUNCTION, -}; diff --git a/forward_engineering/helpers/azureCLIScriptHelpers/buildAzureCLIScript.js b/forward_engineering/helpers/azureCLIScriptHelpers/buildAzureCLIScript.js deleted file mode 100644 index fcc9613..0000000 --- a/forward_engineering/helpers/azureCLIScriptHelpers/buildAzureCLIScript.js +++ /dev/null @@ -1,206 +0,0 @@ -const { wrapInSingleQuotes, escapeShellCommand } = require('./escapeShellSpecialCharacters'); -const applyToInstanceHelper = require('../../applyToInstance/applyToInstanceHelper'); -const { getUniqueKeyPolicyScript } = require('../getUniqueKeyPolicyScript'); -const { getCliParamsDelimiter } = require('./getCliParamsDelimiter'); -const getIndexPolicyScript = require('../getIndexPolicyScript'); -const getPartitionKey = require('../getPartitionKey'); -const { - CLI, - DATABASE, - CREATE, - CONTAINER, - STORED_PROCEDURE, - TRIGGER, - USER_DEFINED_FUNCTION, -} = require('./azureCLIConstants'); - -const buildAzureCLIScript = - _ => - ({ modelData, containerData, shellName }) => { - const cliParamsDelimiter = getCliParamsDelimiter(shellName); - const escapeAndWrapInQuotes = string => wrapInSingleQuotes(escapeShellCommand(shellName, string)); - - const accountName = escapeAndWrapInQuotes(modelData[0]?.accountName || ''); - const dbName = escapeAndWrapInQuotes(containerData[0]?.dbId || ''); - const containerName = escapeAndWrapInQuotes(containerData[0]?.name || ''); - const resourceGroup = escapeAndWrapInQuotes(modelData[0]?.resGrp || ''); - const commonParams = { - accountName, - dbName, - resourceGroup, - containerName, - escapeAndWrapInQuotes, - cliParamsDelimiter, - }; - - return composeCLIStatements([ - getAzureCliDbCreateStatement(commonParams), - getAzureCliContainerCreateStatement(_)({ containerData, ...commonParams }), - ...getAzureCliStoredProcedureStatements({ containerData, ...commonParams }), - ...getAzureCliTriggerCreateStatements({ containerData, ...commonParams }), - ...getAzureCliUDFCreateStatements({ containerData, ...commonParams }), - ]); - }; - -const getAzureCliDbCreateStatement = ({ accountName, dbName, resourceGroup, cliParamsDelimiter }) => { - const cliStatement = `${CLI} ${DATABASE} ${CREATE}`; - const requiredParams = [ - `--account-name ${accountName}`, - `--name ${dbName}`, - `--resource-group ${resourceGroup}`, - ].join(cliParamsDelimiter); - - return [cliStatement, requiredParams].join(cliParamsDelimiter); -}; - -const getAzureCliContainerCreateStatement = - _ => - ({ containerData, accountName, dbName, resourceGroup, containerName, escapeAndWrapInQuotes, cliParamsDelimiter }) => { - const helper = applyToInstanceHelper(_); - - const partitionKeyParams = getPartitionKeyParams(_)(containerData); - const throughputParam = getThroughputParam(helper.getContainerThroughputProps(containerData[0])); - const indexingPolicyParam = `--idx ${escapeAndWrapInQuotes( - JSON.stringify(getIndexPolicyScript(_)(containerData)), - )}`; - const uniqueKeysPolicyParam = getUniqueKeysPolicyParam(containerData[0], escapeAndWrapInQuotes); - const ttl = helper.getTTL(containerData[0]); - const ttlParam = ttl !== 0 ? `--ttl ${helper.getTTL(containerData[0])}` : ''; - - const cliStatement = `${CLI} ${CONTAINER} ${CREATE}`; - const requiredParams = [ - `--account-name ${accountName}`, - `--database-name ${dbName}`, - `--name ${containerName}`, - `--resource-group ${resourceGroup}`, - ...partitionKeyParams, - ].join(cliParamsDelimiter); - - return [cliStatement, requiredParams, indexingPolicyParam, uniqueKeysPolicyParam, throughputParam, ttlParam] - .filter(Boolean) - .join(cliParamsDelimiter); - }; - -const getAzureCliStoredProcedureStatements = ({ - containerData, - accountName, - dbName, - resourceGroup, - containerName, - escapeAndWrapInQuotes, - cliParamsDelimiter, -}) => { - const cliStatement = `${CLI} ${STORED_PROCEDURE} ${CREATE}`; - const storedProcedureStatements = (containerData[2]?.storedProcs || []).map(proc => { - const requiredParams = [ - `--account-name ${accountName}`, - `--database-name ${dbName}`, - `--container-name ${containerName}`, - `--name ${proc.storedProcID}`, - `--resource-group ${resourceGroup}`, - `--body ${escapeAndWrapInQuotes(proc.storedProcFunction)}`, - ].join(cliParamsDelimiter); - - return [cliStatement, requiredParams].join(cliParamsDelimiter); - }); - - return storedProcedureStatements; -}; - -const getAzureCliTriggerCreateStatements = ({ - containerData, - accountName, - dbName, - resourceGroup, - containerName, - escapeAndWrapInQuotes, - cliParamsDelimiter, -}) => { - const cliStatement = `${CLI} ${TRIGGER} ${CREATE}`; - const triggerStatements = (containerData[3]?.triggers || []).map(trigger => { - const triggerOperation = `--operation ${trigger.triggerOperation}`; - const triggerType = `--type ${trigger.prePostTrigger === 'Pre-Trigger' ? 'Pre' : 'Post'}`; - - const requiredParams = [ - `--account-name ${accountName}`, - `--database-name ${dbName}`, - `--container-name ${containerName}`, - `--name ${trigger.triggerID}`, - `--resource-group ${resourceGroup}`, - `--body ${escapeAndWrapInQuotes(trigger.triggerFunction)}`, - ].join(cliParamsDelimiter); - - return [cliStatement, requiredParams, triggerOperation, triggerType].join(cliParamsDelimiter); - }); - - return triggerStatements; -}; - -const getAzureCliUDFCreateStatements = ({ - containerData, - accountName, - dbName, - resourceGroup, - containerName, - escapeAndWrapInQuotes, - cliParamsDelimiter, -}) => { - const cliStatement = `${CLI} ${USER_DEFINED_FUNCTION} ${CREATE}`; - const udfStatements = (containerData[4]?.udfs || []).map(udf => { - const requiredParams = [ - `--account-name ${accountName}`, - `--database-name ${dbName}`, - `--container-name ${containerName}`, - `--name ${udf.udfID}`, - `--resource-group ${resourceGroup}`, - `--body ${escapeAndWrapInQuotes(udf.udfFunction)}`, - ].join(cliParamsDelimiter); - - return [cliStatement, requiredParams].join(cliParamsDelimiter); - }); - - return udfStatements; -}; - -const getUniqueKeysPolicyParam = (containerData, escapeAndWrapInQuotes) => { - const uniqueKeys = containerData?.uniqueKey || []; - const uniqueKeysPolicyParam = uniqueKeys.length - ? `--unique-key-policy ${escapeAndWrapInQuotes(JSON.stringify(getUniqueKeyPolicyScript(uniqueKeys)))}` - : ''; - - return uniqueKeysPolicyParam; -}; - -const getPartitionKeyParams = _ => containerData => { - const partitionKey = getPartitionKey(_)(containerData); - if (typeof partitionKey === 'string') { - return [`--partition-key-path ${wrapInSingleQuotes(partitionKey)}`]; - } - - if (typeof partitionKey === 'object') { - return [ - `--partition-key-path ${wrapInSingleQuotes(partitionKey.paths[0])}`, - `--partition-key-version ${partitionKey.version}`, - ]; - } - - return []; -}; - -const getThroughputParam = props => { - if (props.hasOwnProperty('throughput')) { - return `--throughput ${props.throughput}`; - } - - if (props.hasOwnProperty('maxThroughput')) { - return `--max-throughput ${props.maxThroughput}`; - } - - return ''; -}; - -const composeCLIStatements = (statements = []) => { - return statements.join('\n\n'); -}; - -module.exports = { buildAzureCLIScript }; diff --git a/forward_engineering/helpers/azureCLIScriptHelpers/escapeShellSpecialCharacters.js b/forward_engineering/helpers/azureCLIScriptHelpers/escapeShellSpecialCharacters.js deleted file mode 100644 index d446a9b..0000000 --- a/forward_engineering/helpers/azureCLIScriptHelpers/escapeShellSpecialCharacters.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @param {"bash" | "zsh" | "powershell"} shell - * @param {string} command - * @return {string} - */ -const escapeShellCommand = (shell, command) => { - switch (shell) { - case 'powershell': - command = command - .replace(/[\u009B\u001B\u0008\0]/gu, '') - .replace(/\r(?!\n)/gu, '') - .replace(/(['‛‘’‚])/gu, '$1$1'); - - if (/[\u0085\s]/u.test(command)) { - command = command.replace(/(? `'${command}'`; - -module.exports = { escapeShellCommand, wrapInSingleQuotes }; diff --git a/forward_engineering/helpers/azureCLIScriptHelpers/getCliParamsDelimiter.js b/forward_engineering/helpers/azureCLIScriptHelpers/getCliParamsDelimiter.js deleted file mode 100644 index 9a45e5e..0000000 --- a/forward_engineering/helpers/azureCLIScriptHelpers/getCliParamsDelimiter.js +++ /dev/null @@ -1,11 +0,0 @@ -const getCliParamsDelimiter = shellName => { - if (shellName === 'powershell') { - return ' `\n\t'; - } - if (['bash', 'zsh'].includes(shellName)) { - return ' \\\n\t'; - } - return ' '; -}; - -module.exports = { getCliParamsDelimiter }; diff --git a/forward_engineering/helpers/getIndexPolicyScript.js b/forward_engineering/helpers/getIndexPolicyScript.js deleted file mode 100644 index 50481a0..0000000 --- a/forward_engineering/helpers/getIndexPolicyScript.js +++ /dev/null @@ -1,132 +0,0 @@ -const add = (key, value) => obj => { - if ( - value === undefined - || - value === '' - || - (Array.isArray(value) && value.length === 0) - ) { - return obj; - } - - return { - ...obj, - [key]: value - }; -}; - -const escapeName = (name) => { - if (/^[0-9]/.test(name)) { - return `"${name}"`; - } else if (/^[a-z0-9_]*$/i.test(name)) { - return name; - } else { - return `"${name}"`; - } -}; - -const prepareName = (name) => { - const isArrayIndex = /^\[\d*\]$/.test(name); - - if (isArrayIndex) { - return '[]'; - } - - return escapeName(name); -}; - -const getPath = (paths = []) => { - const pathItem = paths[0]; - - if(!pathItem) { - return ''; - } - - if (Array.isArray(pathItem.path) && pathItem.path.length !== 0) { - const name = pathItem.name.split('/'); - return ['', ...name.slice(1, -1).map(prepareName), ''].join('/') + name[name.length - 1]; - } - - const items = pathItem.name.split('/'); - return items.slice(0, -1).map(name => { - if (/^"/.test(name) && /"$/.test(name)) { - return name; - } - - return escapeName(name); - }).concat(items[items.length - 1]).join('/'); -}; - -const filterDeactivated = (items) => { - return (items || []).filter(item => { - return item.isActivated !== false; - }); -}; - -const getIndex = (_) => (item) => { - const precision = Number(item.indexPrecision); - return _.flow( - add('kind', item.kind), - add('dataType', item.dataType), - add('precision', isNaN(precision) ? undefined : Number(precision)), - )({}); -}; - -const getIncludedPath = (_) => (includedPaths = []) => { - return filterDeactivated(includedPaths).map(item => { - return _.flow( - add('path', getPath(item.indexIncludedPath)), - )({}); - }).filter(item => !_.isEmpty(item)); -}; - -const getExcludedPath = (_) => (excludedPaths = []) => { - return filterDeactivated(excludedPaths).map(item => { - return _.flow( - add('path', getPath(item.indexExcludedPath)), - )({}); - }).filter(item => !_.isEmpty(item)); -}; - -const getCompositeIndexes = (_) => (compositeIndexes = []) => { - return filterDeactivated(compositeIndexes).map(item => { - if (!Array.isArray(item.compositeFieldPath)) { - return; - } - - return _.uniqWith(item.compositeFieldPath.map(item => { - const path = item.name.split('/'); - - return { - path: ['', ...path.slice(1).map(prepareName)].join('/'), - order: item.type || 'ascending', - }; - }), (a, b) => a.path === b.path).filter(item => !_.isEmpty(item)); - }).filter(item => !_.isEmpty(item)); -}; - -const getSpatialIndexes = (_) => (spatialIndexes = []) => { - return filterDeactivated(spatialIndexes).map(item => { - return _.flow( - add('path', getPath(item.indexIncludedPath)), - add('types', (item.dataTypes || []).map(dataType => dataType.spatialType).filter(Boolean)), - )({}); - }).filter(item => !_.isEmpty(item) && item.path); -}; - -const getIndexPolicyScript = (_) => (containerData) => { - const indexTab = containerData[1] || {}; - - const indexScript = _.flow( - add('automatic', indexTab.indexingAutomatic === 'true'), - add('indexingMode', indexTab.indexingMode), - add('includedPaths', getIncludedPath(_)(indexTab.includedPaths)), - add('excludedPaths', getExcludedPath(_)(indexTab.excludedPaths)), - add('spatialIndexes', getSpatialIndexes(_)(indexTab.spatialIndexes)), - add('compositeIndexes', getCompositeIndexes(_)(indexTab.compositeIndexes)), - )({}); - - return indexScript; -}; - -module.exports = getIndexPolicyScript; diff --git a/forward_engineering/helpers/getPartitionKey.js b/forward_engineering/helpers/getPartitionKey.js deleted file mode 100644 index 6d8b4a9..0000000 --- a/forward_engineering/helpers/getPartitionKey.js +++ /dev/null @@ -1,19 +0,0 @@ -const { PARTITION_KEY_DEFINITION_VERSION, PARTITION_KEY_KIND } = require('../../shared/constants'); - -const getPartitionKey = _ => containerData => { - const fixNamePath = key => (key?.name || '').trim().replace(/\/$/, ''); - const partitionKeys = _.get(containerData, '[0].partitionKey', []); - const isHierarchical = _.get(containerData, '[0].hierarchicalPartitionKey', false); - - if (!isHierarchical) { - return fixNamePath(partitionKeys[0]); - } - - return { - paths: partitionKeys.map(fixNamePath), - version: PARTITION_KEY_DEFINITION_VERSION.v2, - kind: PARTITION_KEY_KIND.MultiHash, - }; -}; - -module.exports = getPartitionKey; diff --git a/forward_engineering/helpers/getUniqueKeyPolicyScript.js b/forward_engineering/helpers/getUniqueKeyPolicyScript.js deleted file mode 100644 index caf0820..0000000 --- a/forward_engineering/helpers/getUniqueKeyPolicyScript.js +++ /dev/null @@ -1,22 +0,0 @@ -const getUniqueKeys = uniqueKeys => { - if (!uniqueKeys) { - return []; - } - - return uniqueKeys - .filter( - uniqueKey => uniqueKey.attributePath && Array.isArray(uniqueKey.attributePath) && uniqueKey.attributePath.length, - ) - .map(uniqueKey => { - return { - paths: uniqueKey.attributePath.map(path => '/' + path.name.split('.').slice(1).join('/')).filter(Boolean), - }; - }) - .filter(path => path.paths.length); -}; - -const getUniqueKeyPolicyScript = uniqueKeys => { - return { uniqueKeyPolicy: { uniqueKeys: getUniqueKeys(uniqueKeys) } }; -}; - -module.exports = { getUniqueKeyPolicyScript }; diff --git a/jsonSchemaProperties.json b/jsonSchemaProperties.json index ea6a87b..f9220a2 100644 --- a/jsonSchemaProperties.json +++ b/jsonSchemaProperties.json @@ -1,4 +1,11 @@ { - "unneededFieldProps": ["collectionName", "name", "users", "indexes", "collectionUsers", "additionalPropertieserties"], + "unneededFieldProps": [ + "collectionName", + "name", + "users", + "indexes", + "collectionUsers", + "additionalPropertieserties" + ], "removeIfPropsNegative": ["partitionKey", "sortKey"] -} \ No newline at end of file +} diff --git a/localization/en.json b/localization/en.json index d3c7b12..931c857 100644 --- a/localization/en.json +++ b/localization/en.json @@ -134,9 +134,9 @@ "MONGODB_SCRIPT_WARNING_MESSAGE": "This view is not associated to a container (viewOn property).", "TYPE": {}, "MODAL_WINDOW___SELECTION_DOCUMENT_KIND_REVERSE_ENGINEERING_TITLE": "Select Item Type field", - "MODAL_WINDOW___SELECTION_DOCUMENT_KIND_REVERSE_ENGINEERING": "No item type separation", + "MODAL_WINDOW___SELECTION_DOCUMENT_KIND_REVERSE_ENGINEERING": "No item type separation", "CONTEXT_MENU___CONVERT_TO_PATTERN_FIELD": "Convert to Pattern Field", "CONTEXT_MENU___CONVERT_PATTERN_TO_REGULAR_FIELD": "Convert to Regular Field", "CENTRAL_PANE___FE_SCRIPT": "Cosmos DB script", "MAIN_MENU___FORWARD_DB_BUCKETS": "Cosmos DB script" -} \ No newline at end of file +} diff --git a/package.json b/package.json index d02a222..e570ca9 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,55 @@ { - "name": "CosmosDB-with-SQL-API", - "version": "0.1.39", - "versionDate": "2023-11-24", - "author": "hackolade", - "engines": { - "hackolade": "5.1.3", - "hackoladePlugin": "1.0.1" - }, - "contributes": { - "target": { - "applicationTarget": "COSMOSDB-SQL", - "title": "Cosmos DB w/ SQL API", - "versions": [ - ] - }, - "features": { - "nestedCollections": false, - "enableForwardEngineering": true - } - }, - "description": "Hackolade plugin for Azure Cosmos DB with SQL API" + "name": "CosmosDB-with-SQL-API", + "version": "0.2.1", + "author": "hackolade", + "engines": { + "hackolade": "5.1.3", + "hackoladePlugin": "1.0.1" + }, + "contributes": { + "target": { + "applicationTarget": "COSMOSDB-SQL", + "title": "Cosmos DB w/ SQL API", + "versions": [] + }, + "features": { + "nestedCollections": false, + "enableForwardEngineering": true + } + }, + "description": "Hackolade plugin for Azure Cosmos DB with SQL API", + "dependencies": { + "@azure/cosmos": "3.17.3", + "axios": "1.6.0", + "lodash": "4.17.21", + "qs": "6.12.1" + }, + "lint-staged": { + "*.{js,json}": "prettier --write" + }, + "simple-git-hooks": { + "pre-commit": "npx lint-staged", + "pre-push": "npx eslint ." + }, + "scripts": { + "lint": "eslint . --max-warnings=0", + "package": "node esbuild.package.js" + }, + "devDependencies": { + "@hackolade/hck-esbuild-plugins-pack": "0.0.1", + "@typescript-eslint/eslint-plugin": "7.11.0", + "@typescript-eslint/parser": "7.11.0", + "esbuild": "0.20.2", + "esbuild-plugin-clean": "1.0.1", + "eslint": "8.57.0", + "eslint-config-prettier": "9.1.0", + "eslint-formatter-teamcity": "^1.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-prettier": "5.1.3", + "eslint-plugin-unused-imports": "3.2.0", + "lint-staged": "14.0.1", + "prettier": "3.2.5", + "simple-git-hooks": "2.11.1" + }, + "release": true } \ No newline at end of file diff --git a/properties_pane/container_level/containerLevelConfig.json b/properties_pane/container_level/containerLevelConfig.json index 6004644..5122b89 100644 --- a/properties_pane/container_level/containerLevelConfig.json +++ b/properties_pane/container_level/containerLevelConfig.json @@ -128,33 +128,32 @@ making sure that you maintain a proper JSON format. [ { "lowerTab": "Details", - "containerLevelKeys": [{ - "labelName": "Item key", - "propertyName": "Item key", - "propertyKeyword": "id", - "defaultName": "id", - "propertyPrimaryKey": true, - "propertyType": "text", - "typeName": "Data type", - "typeOptions": ["string"], - "defaultType": "string", - "disabledFieldOption": true - },{ - "labelName": "Item type", - "propertyName": "Item type field name", - "propertyKeyword": "docType", - "defaultName": "type", - "propertyPrimaryKey": true, - "propertyType": "text", - "typeName": "Data type", - "typeOptions": [ - "string", - "number", - "boolean" - ], - "defaultType": "string", - "disabledFieldOption": false - }], + "containerLevelKeys": [ + { + "labelName": "Item key", + "propertyName": "Item key", + "propertyKeyword": "id", + "defaultName": "id", + "propertyPrimaryKey": true, + "propertyType": "text", + "typeName": "Data type", + "typeOptions": ["string"], + "defaultType": "string", + "disabledFieldOption": true + }, + { + "labelName": "Item type", + "propertyName": "Item type field name", + "propertyKeyword": "docType", + "defaultName": "type", + "propertyPrimaryKey": true, + "propertyType": "text", + "typeName": "Data type", + "typeOptions": ["string", "number", "boolean"], + "defaultType": "string", + "disabledFieldOption": false + } + ], "structure": [ { "propertyName": "Hierarchical partition key", @@ -192,22 +191,26 @@ making sure that you maintain a proper JSON format. }, "dependency": { "type": "not", - "values": [{ - "key": "hierarchicalPartitionKey", - "value": true - }] + "values": [ + { + "key": "hierarchicalPartitionKey", + "value": true + } + ] } }, { "propertyName": "Unique keys", "propertyKeyword": "uniqueKey", "propertyType": "group", - "structure": [{ - "propertyName": "Attribute path", - "propertyKeyword": "attributePath", - "propertyType": "fieldList", - "template": "orderedList" - }] + "structure": [ + { + "propertyName": "Attribute path", + "propertyKeyword": "attributePath", + "propertyType": "fieldList", + "template": "orderedList" + } + ] }, { "propertyName": "Description", @@ -231,10 +234,7 @@ making sure that you maintain a proper JSON format. "propertyKeyword": "capacityMode", "propertyTooltip": "Choose the capacity mode", "propertyType": "select", - "options": [ - "Provisioned throughput", - "Serverless" - ] + "options": ["Provisioned throughput", "Serverless"] }, { "propertyName": "Autoscale", @@ -296,11 +296,7 @@ making sure that you maintain a proper JSON format. "propertyKeyword": "TTL", "propertyTooltip": "Time to live", "propertyType": "select", - "options": [ - "Off", - "On (no default)", - "On" - ] + "options": ["Off", "On (no default)", "On"] }, { "propertyName": "TTL default seconds", @@ -328,10 +324,7 @@ making sure that you maintain a proper JSON format. "shouldValidate": false, "propertyTooltip": "Indexing mode: consistent, lazy, or none", "propertyType": "select", - "options": [ - "Consistent", - "None" - ] + "options": ["Consistent", "None"] }, { "propertyName": "Automatic", @@ -339,10 +332,7 @@ making sure that you maintain a proper JSON format. "shouldValidate": false, "propertyTooltip": "Automatic indexing: true or false", "propertyType": "select", - "options": [ - "true", - "false" - ] + "options": ["true", "false"] }, { "propertyName": "Included paths", @@ -510,17 +500,14 @@ making sure that you maintain a proper JSON format. "shouldValidate": false, "propertyTooltip": "Data type: String, Number, Point, Polygon, or LineString", "propertyType": "group", - "structure": [{ - "propertyName": "Type", - "propertyKeyword": "spatialType", - "propertyType": "select", - "options": [ - "Point", - "Polygon", - "MultiPolygon", - "LineString" - ] - }] + "structure": [ + { + "propertyName": "Type", + "propertyKeyword": "spatialType", + "propertyType": "select", + "options": ["Point", "Polygon", "MultiPolygon", "LineString"] + } + ] }, { "propertyName": "Description", @@ -530,7 +517,7 @@ making sure that you maintain a proper JSON format. "propertyType": "details", "template": "textarea" }, - + { "propertyName": "Comments", "propertyKeyword": "indexComments", @@ -573,10 +560,7 @@ making sure that you maintain a proper JSON format. "divider": "/", "front": true }, - "attributeList": [ - "ascending", - "descending" - ] + "attributeList": ["ascending", "descending"] }, { "propertyName": "Description", @@ -600,180 +584,177 @@ making sure that you maintain a proper JSON format. }, { "lowerTab": "Stored Procs", - "structure": [{ - "propertyName": "Stored Procs", - "propertyType": "group", - "propertyKeyword": "storedProcs", - "shouldValidate": false, - "propertyTooltip": "", - "structure": [ - { - "propertyName": "Name", - "propertyKeyword": "name", - "shouldValidate": false, - "propertyTooltip": "", - "propertyType": "text" - }, - { - "propertyName": "Id", - "propertyKeyword": "storedProcID", - "shouldValidate": false, - "propertyTooltip": "Stored procedure unique name", - "propertyType": "text" - }, - { - "propertyName": "Description", - "propertyKeyword": "storedProcDescription", - "shouldValidate": false, - "propertyTooltip": "description", - "propertyType": "details", - "template": "textarea" - }, - { - "propertyName": "Function", - "propertyKeyword": "storedProcFunction", - "shouldValidate": false, - "propertyTooltip": "description", - "propertyType": "details", - "template": "textarea", - "markdown": false - }, - { - "propertyName": "Comments", - "propertyKeyword": "storedProcComments", - "shouldValidate": false, - "propertyTooltip": "comments", - "propertyType": "details", - "template": "textarea" - } - ] - }] + "structure": [ + { + "propertyName": "Stored Procs", + "propertyType": "group", + "propertyKeyword": "storedProcs", + "shouldValidate": false, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "name", + "shouldValidate": false, + "propertyTooltip": "", + "propertyType": "text" + }, + { + "propertyName": "Id", + "propertyKeyword": "storedProcID", + "shouldValidate": false, + "propertyTooltip": "Stored procedure unique name", + "propertyType": "text" + }, + { + "propertyName": "Description", + "propertyKeyword": "storedProcDescription", + "shouldValidate": false, + "propertyTooltip": "description", + "propertyType": "details", + "template": "textarea" + }, + { + "propertyName": "Function", + "propertyKeyword": "storedProcFunction", + "shouldValidate": false, + "propertyTooltip": "description", + "propertyType": "details", + "template": "textarea", + "markdown": false + }, + { + "propertyName": "Comments", + "propertyKeyword": "storedProcComments", + "shouldValidate": false, + "propertyTooltip": "comments", + "propertyType": "details", + "template": "textarea" + } + ] + } + ] }, { "lowerTab": "Triggers", - "structure": [{ - "propertyName": "Triggers", - "propertyType": "group", - "propertyKeyword": "triggers", - "shouldValidate": false, - "propertyTooltip": "", - "structure": [ - { - "propertyName": "Name", - "propertyKeyword": "name", - "shouldValidate": false, - "propertyTooltip": "", - "propertyType": "text" - }, - { - "propertyName": "Id", - "propertyKeyword": "triggerID", - "shouldValidate": false, - "propertyTooltip": "Stored procedure unique name", - "propertyType": "text" - }, - { - "propertyName": "Description", - "propertyKeyword": "triggerDescription", - "shouldValidate": false, - "propertyTooltip": "description", - "propertyType": "details", - "template": "textarea" - }, - { - "propertyName": "Pre/Post", - "propertyKeyword": "prePostTrigger", - "shouldValidate": false, - "propertyTooltip": "Choose whether pre- or post-trigger", - "propertyType": "select", - "options": [ - "Pre-Trigger", - "Post-Trigger" - ] - }, - { - "propertyName": "Operation", - "propertyKeyword": "triggerOperation", - "shouldValidate": false, - "propertyTooltip": "Choose operation", - "propertyType": "select", - "options": [ - "All", - "Create", - "Delete", - "Replace", - "Update" - ] - }, - { - "propertyName": "Function", - "propertyKeyword": "triggerFunction", - "shouldValidate": false, - "propertyTooltip": "description", - "propertyType": "details", - "template": "textarea", - "markdown": false - }, - { - "propertyName": "Comments", - "propertyKeyword": "triggerComments", - "shouldValidate": false, - "propertyTooltip": "comments", - "propertyType": "details", - "template": "textarea" - } - ] - }] + "structure": [ + { + "propertyName": "Triggers", + "propertyType": "group", + "propertyKeyword": "triggers", + "shouldValidate": false, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "name", + "shouldValidate": false, + "propertyTooltip": "", + "propertyType": "text" + }, + { + "propertyName": "Id", + "propertyKeyword": "triggerID", + "shouldValidate": false, + "propertyTooltip": "Stored procedure unique name", + "propertyType": "text" + }, + { + "propertyName": "Description", + "propertyKeyword": "triggerDescription", + "shouldValidate": false, + "propertyTooltip": "description", + "propertyType": "details", + "template": "textarea" + }, + { + "propertyName": "Pre/Post", + "propertyKeyword": "prePostTrigger", + "shouldValidate": false, + "propertyTooltip": "Choose whether pre- or post-trigger", + "propertyType": "select", + "options": ["Pre-Trigger", "Post-Trigger"] + }, + { + "propertyName": "Operation", + "propertyKeyword": "triggerOperation", + "shouldValidate": false, + "propertyTooltip": "Choose operation", + "propertyType": "select", + "options": ["All", "Create", "Delete", "Replace", "Update"] + }, + { + "propertyName": "Function", + "propertyKeyword": "triggerFunction", + "shouldValidate": false, + "propertyTooltip": "description", + "propertyType": "details", + "template": "textarea", + "markdown": false + }, + { + "propertyName": "Comments", + "propertyKeyword": "triggerComments", + "shouldValidate": false, + "propertyTooltip": "comments", + "propertyType": "details", + "template": "textarea" + } + ] + } + ] }, { "lowerTab": "UDFs", - "structure": [{ - "propertyName": "UDFs", - "propertyType": "group", - "propertyKeyword": "udfs", - "shouldValidate": false, - "propertyTooltip": "", - "structure": [ - { - "propertyName": "Name", - "propertyKeyword": "name", - "shouldValidate": false, - "propertyTooltip": "", - "propertyType": "text" - }, - { - "propertyName": "Id", - "propertyKeyword": "udfID", - "shouldValidate": false, - "propertyTooltip": "Stored procedure unique name", - "propertyType": "text" - }, - { - "propertyName": "Description", - "propertyKeyword": "udfDescription", - "shouldValidate": false, - "propertyTooltip": "description", - "propertyType": "details", - "template": "textarea" - }, - { - "propertyName": "Function", - "propertyKeyword": "udfFunction", - "shouldValidate": false, - "propertyTooltip": "description", - "propertyType": "details", - "template": "textarea", - "markdown": false - }, - { - "propertyName": "Comments", - "propertyKeyword": "udfComments", - "shouldValidate": false, - "propertyTooltip": "comments", - "propertyType": "details", - "template": "textarea" - } - ] - }] + "structure": [ + { + "propertyName": "UDFs", + "propertyType": "group", + "propertyKeyword": "udfs", + "shouldValidate": false, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Name", + "propertyKeyword": "name", + "shouldValidate": false, + "propertyTooltip": "", + "propertyType": "text" + }, + { + "propertyName": "Id", + "propertyKeyword": "udfID", + "shouldValidate": false, + "propertyTooltip": "Stored procedure unique name", + "propertyType": "text" + }, + { + "propertyName": "Description", + "propertyKeyword": "udfDescription", + "shouldValidate": false, + "propertyTooltip": "description", + "propertyType": "details", + "template": "textarea" + }, + { + "propertyName": "Function", + "propertyKeyword": "udfFunction", + "shouldValidate": false, + "propertyTooltip": "description", + "propertyType": "details", + "template": "textarea", + "markdown": false + }, + { + "propertyName": "Comments", + "propertyKeyword": "udfComments", + "shouldValidate": false, + "propertyTooltip": "comments", + "propertyType": "details", + "template": "textarea" + } + ] + } + ] } ] diff --git a/properties_pane/defaultData.json b/properties_pane/defaultData.json index 14081be..4079f94 100644 --- a/properties_pane/defaultData.json +++ b/properties_pane/defaultData.json @@ -1,12 +1,12 @@ /* -* Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. -* -* The copyright to the computer software herein is the property of IntegrIT S.A. -* The software may be used and/or copied only with the written permission of -* IntegrIT S.A. or in accordance with the terms and conditions stipulated in -* the agreement/contract under which the software has been supplied. -* -*/ + * Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. + * + * The copyright to the computer software herein is the property of IntegrIT S.A. + * The software may be used and/or copied only with the written permission of + * IntegrIT S.A. or in accordance with the terms and conditions stipulated in + * the agreement/contract under which the software has been supplied. + * + */ { "model": { "modelName": "New model", @@ -85,4 +85,4 @@ "udfFunction": "", "udfComments": "" } -} \ No newline at end of file +} diff --git a/properties_pane/entity_level/entityLevelConfig.json b/properties_pane/entity_level/entityLevelConfig.json index c206387..5931c44 100644 --- a/properties_pane/entity_level/entityLevelConfig.json +++ b/properties_pane/entity_level/entityLevelConfig.json @@ -140,4 +140,4 @@ making sure that you maintain a proper JSON format. } ] } -] \ No newline at end of file +] diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index 037d82a..962b095 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -162,10 +162,12 @@ making sure that you maintain a proper JSON format. "propertyType": "text", "arrayItemDisabled": true, "enableForReference": true, - "disabledOnCondition": [{ + "disabledOnCondition": [ + { "key": "key", "value": true - }, { + }, + { "key": "documentKind", "value": true } @@ -286,13 +288,6 @@ making sure that you maintain a proper JSON format. "additionalItems", "comments" ], - "null": [ - "name", - "code", - "schemaId", - "description", - "type", - "comments" - ] + "null": ["name", "code", "schemaId", "description", "type", "comments"] } -} \ No newline at end of file +} diff --git a/properties_pane/model_level/modelLevelConfig.json b/properties_pane/model_level/modelLevelConfig.json index d75edf0..bee91a1 100644 --- a/properties_pane/model_level/modelLevelConfig.json +++ b/properties_pane/model_level/modelLevelConfig.json @@ -134,9 +134,7 @@ making sure that you maintain a proper JSON format. "propertyKeyword": "dbVendor", "propertyTooltip": "db vendor", "propertyType": "select", - "options": [ - "CosmosDB" - ], + "options": ["CosmosDB"], "disabledOption": true }, { @@ -144,13 +142,7 @@ making sure that you maintain a proper JSON format. "propertyKeyword": "apiExperience", "propertyTooltip": "Default experience", "propertyType": "select", - "options": [ - "SQL API", - "MongoDB API", - "Cassandra API", - "Gremlin API", - "Table API" - ], + "options": ["SQL API", "MongoDB API", "Cassandra API", "Gremlin API", "Table API"], "disabledOption": true }, { @@ -190,23 +182,23 @@ making sure that you maintain a proper JSON format. "propertyType": "select", "options": [ "", - "Central US", + "Central US", "East US", - "East US 2", - "North Central US", - "South Central US", - "West US", - "West US 2", - "West Central US", - "Canada East", + "East US 2", + "North Central US", + "South Central US", + "West US", + "West US 2", + "West Central US", + "Canada East", "Canada Central", "Mexico Central", - "Brazil South", - "North Europe", - "West Europe", + "Brazil South", + "North Europe", + "West Europe", "France Central", "France South", - "Germany Central", + "Germany Central", "Germany North", "Germany Northeast", "Germany West Central", @@ -215,25 +207,25 @@ making sure that you maintain a proper JSON format. "Spain Central", "Switzerland North", "Switzerland West", - "UK South", - "UK West", - "East Asia", - "Southeast Asia", + "UK South", + "UK West", + "East Asia", + "Southeast Asia", "Australia Central", "Australia Central 2", - "Australia East", - "Australia Southeast", - "China East", + "Australia East", + "Australia Southeast", + "China East", "Chine East 2", - "China North", - "China North 2", - "Central India", - "South India", - "West India", - "Japan East", - "Japan West", + "China North", + "China North 2", + "Central India", + "South India", + "West India", + "Japan East", + "Japan West", "Korea Central", - "Korea South", + "Korea South", "South Africa North", "South Africa West", "Israel Central", @@ -350,13 +342,7 @@ making sure that you maintain a proper JSON format. "propertyKeyword": "defaultConsistency", "propertyTooltip": "Default consistency policy level", "propertyType": "select", - "options": [ - "Session", - "Strong", - "Bounded staleness", - "Consistent prefix", - "Eventual" - ] + "options": ["Session", "Strong", "Bounded staleness", "Consistent prefix", "Eventual"] }, { "propertyName": "Enable automatic failover", @@ -427,4 +413,4 @@ making sure that you maintain a proper JSON format. } ] } -] \ No newline at end of file +] diff --git a/properties_pane/view_level/viewLevelConfig.json b/properties_pane/view_level/viewLevelConfig.json index 5f942d1..3dac373 100644 --- a/properties_pane/view_level/viewLevelConfig.json +++ b/properties_pane/view_level/viewLevelConfig.json @@ -139,4 +139,4 @@ making sure that you maintain a proper JSON format. } ] } -] \ No newline at end of file +] diff --git a/reverse_engineering/api.js b/reverse_engineering/api.js index 3fdbdae..ec68f85 100644 --- a/reverse_engineering/api.js +++ b/reverse_engineering/api.js @@ -1,816 +1,95 @@ -'use strict'; - -const setUpDocumentClient = require('./helpers/setUpDocumentClient'); -const _ = require('lodash'); -const axios = require('axios'); -const qs = require('qs'); -const executeWithTimeout = require('./helpers/executeWithTimeout'); -const { TTL_ON_DEFAULT, TTL_ON, TTL_OFF } = require('../shared/constants'); -let client; - -module.exports = { - connect: function (connectionInfo, logger, cb) { - cb(); - }, - - disconnect: function (connectionInfo, logger, cb) { - cb(); - }, - - testConnection: async function (connectionInfo, logger, cb) { - logger.clear(); - client = setUpDocumentClient(connectionInfo); - logger.log('info', connectionInfo, 'Reverse-Engineering connection settings', connectionInfo.hiddenKeys); - try { - await executeWithTimeout(getDatabasesData); - return cb(); - } catch (err) { - return cb(mapError(err)); - } - }, - - getDatabases: async function (connectionInfo, logger, cb) { - client = setUpDocumentClient(connectionInfo); - logger.clear(); - logger.log('info', connectionInfo, 'Reverse-Engineering connection settings', connectionInfo.hiddenKeys); - - try { - const dbsData = await getDatabasesData(); - const dbs = dbsData.map(item => item.id); - logger.log('info', dbs, 'All databases list', connectionInfo.hiddenKeys); - return cb(null, dbs); - } catch (err) { - logger.log('error', err); - return cb(mapError(err)); - } - }, - - getDocumentKinds: async function (connectionInfo, logger, cb) { - client = setUpDocumentClient(connectionInfo); - logger.log('info', connectionInfo, 'Reverse-Engineering connection settings', connectionInfo.hiddenKeys); - - try { - const collections = await listCollections(connectionInfo.database); - logger.log('collections list', collections, 'Mapped collection list'); - const documentKindsPromise = collections.map(async collectionData => { - const containerInstance = client.database(connectionInfo.database).container(collectionData.id); - - const documentsAmount = await getDocumentsAmount(containerInstance); - const size = getSampleDocSize(documentsAmount, connectionInfo.recordSamplingSettings); - logger.log( - 'info', - { collectionItem: collectionData }, - 'Getting documents for current collectionItem', - connectionInfo.hiddenKeys, - ); - - const documents = await getDocuments(containerInstance, size); - const filteredDocuments = filterDocuments(documents); - - const inferSchema = generateCustomInferSchema(filteredDocuments, { sampleSize: 20 }); - const documentsPackage = getDocumentKindDataFromInfer( - { - bucketName: collectionData.id, - inference: inferSchema, - isCustomInfer: true, - excludeDocKind: connectionInfo.excludeDocKind, - }, - 90, - ); - - return documentsPackage; - }); - const documentKinds = await Promise.all(documentKindsPromise); - cb(null, documentKinds); - } catch (err) { - console.log(err); - logger.log('error', err); - return cb(mapError(err)); - } - }, - - getDbCollectionsNames: async function (connectionInfo, logger, cb) { - try { - client = setUpDocumentClient(connectionInfo); - logger.log('info', connectionInfo, 'Reverse-Engineering connection settings', connectionInfo.hiddenKeys); - - logger.log( - 'info', - { Database: connectionInfo.database }, - 'Getting collections list for current database', - connectionInfo.hiddenKeys, - ); - const collections = await listCollections(connectionInfo.database); - - logger.log( - 'info', - { CollectionList: collections }, - 'Collection list for current database', - connectionInfo.hiddenKeys, - ); - const collectionNames = collections.map(item => item.id); - - const items = await handleBucket(connectionInfo, collectionNames); - cb(null, items); - } catch (err) { - console.log(err); - logger.log('error', err); - return cb(mapError(err)); - } - }, - - getDbCollectionsData: async function (data, logger, cb) { - try { - logger.progress = logger.progress || (() => {}); - client = setUpDocumentClient(data); - logger.log('info', data, 'Reverse-Engineering connection settings', data.hiddenKeys); - - const { recordSamplingSettings, fieldInference } = data; - logger.log( - 'info', - getSamplingInfo(recordSamplingSettings, fieldInference), - 'Reverse-Engineering sampling params', - data.hiddenKeys, - ); - - const bucketList = data.collectionData.dataBaseNames; - logger.log('info', { CollectionList: bucketList }, 'Selected collection list', data.hiddenKeys); - - const { resource: accountInfo } = await client.getDatabaseAccount(); - const additionalAccountInfo = await getAdditionalAccountInfo(data, logger); - const modelInfo = Object.assign( - { - accountID: data.accountKey, - defaultConsistency: accountInfo.consistencyPolicy, - preferredLocation: accountInfo.writableLocations[0] ? accountInfo.writableLocations[0].name : '', - ...(data?.includeAccountInformation && { - resGrp: data.resourceGroupName, - tenant: data.tenantId, - subscription: data.subscriptionId, - }), - }, - additionalAccountInfo, - ); - - logger.log('info', modelInfo, 'Model info', data.hiddenKeys); - const dbCollectionsPromise = bucketList.map(async bucketName => { - const containerInstance = client.database(data.database).container(bucketName); - const storedProcs = await getStoredProcedures(containerInstance); - const triggers = await getTriggers(containerInstance); - const udfs = await getUdfs(containerInstance); - const collection = await getCollectionById(containerInstance); - const offerInfo = await getOfferType(collection, logger); - const { autopilot, throughput, capacityMode } = getOfferProps(offerInfo); - const partitionKey = getPartitionKey(collection); - const indexes = getIndexes(collection.indexingPolicy); - const isHierarchicalPartitionKey = Array.isArray(partitionKey) && partitionKey.length > 1; - const bucketInfo = Object.assign( - { - dbId: data.database, - capacityMode, - throughput, - autopilot, - partitionKey, - uniqueKey: getUniqueKeys(collection), - storedProcs, - triggers, - udfs, - TTL: getTTL(collection.defaultTtl), - TTLseconds: collection.defaultTtl, - hierarchicalPartitionKey: isHierarchicalPartitionKey, - }, - indexes, - ); - - const documentsAmount = await getDocumentsAmount(containerInstance); - const size = getSampleDocSize(documentsAmount, recordSamplingSettings); - - logger.progress({ message: 'Load documents...', containerName: data.database, entityName: bucketName }); - const documents = await getDocuments(containerInstance, size); - logger.progress({ - message: 'Documents have loaded.', - containerName: data.database, - entityName: bucketName, - }); - const filteredDocuments = filterDocuments(documents); - const documentKindName = data.documentKinds[collection.id].documentKindName || '*'; - const docKindsList = data.collectionData.collections[bucketName]; - const collectionPackages = []; - - if (documentKindName !== '*') { - if (!docKindsList) { - const documentsPackage = { - dbName: bucketName, - emptyBucket: true, - indexes: [], - views: [], - validation: createSchemaByPartitionKeyPath(partitionKey, filteredDocuments), - bucketInfo, - }; - collectionPackages.push(documentsPackage); - } else { - docKindsList.forEach(docKindItem => { - const newArrayDocuments = filteredDocuments.filter(item => { - return item[documentKindName] == docKindItem; - }); - - const documentsPackage = { - dbName: bucketName, - collectionName: docKindItem, - documents: newArrayDocuments || [], - indexes: [], - views: [], - validation: createSchemaByPartitionKeyPath(partitionKey, filteredDocuments), - docType: documentKindName, - bucketInfo, - }; - - if (fieldInference.active === 'field') { - documentsPackage.documentTemplate = newArrayDocuments[0] || null; - } - - collectionPackages.push(documentsPackage); - }); - } - } else { - const documentsPackage = { - dbName: bucketName, - collectionName: bucketName, - documents: filteredDocuments || [], - indexes: [], - views: [], - validation: createSchemaByPartitionKeyPath(partitionKey, filteredDocuments), - docType: 'type', - bucketInfo, - }; - - if (fieldInference.active === 'field') { - documentsPackage.documentTemplate = filteredDocuments[0] || null; - } - - collectionPackages.push(documentsPackage); - } - - return collectionPackages; - }); - - const dbCollections = await Promise.all(dbCollectionsPromise); - return cb(null, dbCollections, modelInfo); - } catch (err) { - logger.progress({ - message: 'Error of connecting to the database ' + data.database + '.\n ' + err.message, - containerName: data.database, - entityName: '', - }); - logger.log('error', err); - return cb(mapError(err)); - } - }, -}; - -async function getCollectionById(containerInstance) { - const { resource: collection } = await containerInstance.read(); - return collection; -} - -async function getOfferType(collection, logger) { - try { - const querySpec = { - query: 'SELECT * FROM root r WHERE r.resource = @link', - parameters: [ - { - name: '@link', - value: collection._self, - }, - ], - }; - const { resources: offer } = await client.offers.query(querySpec).fetchAll(); - return offer.length > 0 && offer[0]; - } catch (e) { - logger.log('error', { message: e.message, stack: e.stack }, '[Warning] Error querying offers'); - - return; - } -} - -async function getDatabasesData() { - const dbResponse = await client.databases.readAll().fetchAll(); - return dbResponse.resources; -} - -async function listCollections(databaseId) { - const { resources: containers } = await client.database(databaseId).containers.readAll().fetchAll(); - return containers; -} - -async function getDocuments(container, maxItemCount) { - const query = `SELECT TOP ${maxItemCount} * FROM c`; - let documents = []; - try { - const docRequest = container.items.query(query, { enableCrossPartitionQuery: true, maxItemCount: 200 }); - while (docRequest.hasMoreResults()) { - const { resources: docs } = await docRequest.fetchNext(); - documents = documents.concat(docs); - } - } catch (err) { - console.log(err); - logger.log('error', err); - } - return documents.filter(Boolean); -} - -async function getDocumentsAmount(container) { - const query = `SELECT COUNT(1) FROM c`; - const { resources: amount } = await container.items.query(query, { enableCrossPartitionQuery: true }).fetchAll(); - return amount[0].$1; -} - -function filterDocuments(documents) { - const systemProperties = ['_rid', '_self', '_etag', '_attachments', '_ts']; - - return documents.map(item => { - for (let prop in item) { - if (systemProperties.includes(prop)) { - delete item[prop]; - } - } - return item; - }); -} - -function generateCustomInferSchema(documents, params) { - function typeOf(obj) { - return {}.toString.call(obj).split(' ')[1].slice(0, -1).toLowerCase(); - } - - let sampleSize = params.sampleSize || 30; - - let inferSchema = { - '#docs': 0, - '$schema': 'http://json-schema.org/schema#', - 'properties': {}, - }; - - documents.forEach(item => { - inferSchema['#docs']++; - - for (let prop in item) { - if (inferSchema.properties.hasOwnProperty(prop)) { - inferSchema.properties[prop]['#docs']++; - inferSchema.properties[prop]['samples'].indexOf(item[prop]) === -1 && - inferSchema.properties[prop]['samples'].length < sampleSize - ? inferSchema.properties[prop]['samples'].push(item[prop]) - : ''; - inferSchema.properties[prop]['type'] = typeOf(item[prop]); - } else { - inferSchema.properties[prop] = { - '#docs': 1, - '%docs': 100, - 'samples': [item[prop]], - 'type': typeOf(item[prop]), - }; - } - } - }); - - for (let prop in inferSchema.properties) { - inferSchema.properties[prop]['%docs'] = Math.round( - (inferSchema.properties[prop]['#docs'] / inferSchema['#docs']) * 100, - 2, - ); - } - return inferSchema; -} - -function getDocumentKindDataFromInfer(data, probability) { - let suggestedDocKinds = []; - let otherDocKinds = []; - let documentKind = { - key: '', - probability: 0, - }; - - if (data.isCustomInfer) { - let minCount = Infinity; - let inference = data.inference.properties; - - for (let key in inference) { - if (typeof inference[key].samples[0] === 'object') { - continue; - } - - if (inference[key]['%docs'] >= probability && inference[key].samples.length) { - suggestedDocKinds.push(key); - - if (data.excludeDocKind.indexOf(key) === -1) { - if (inference[key]['%docs'] === documentKind.probability && documentKind.key === 'type') { - continue; - } - - if (inference[key]['%docs'] >= documentKind.probability && inference[key].samples.length < minCount) { - minCount = inference[key].samples.length; - documentKind.probability = inference[key]['%docs']; - documentKind.key = key; - } - } - } else { - otherDocKinds.push(key); - } - } - } else { - let flavor = data.flavorValue ? data.flavorValue.split(',') : data.inference[0].Flavor.split(','); - if (flavor.length === 1) { - suggestedDocKinds = Object.keys(data.inference[0].properties); - let matсhedDocKind = flavor[0].match(/([\s\S]*?) \= "?([\s\S]*?)"?$/); - documentKind.key = matсhedDocKind.length ? matсhedDocKind[1] : ''; - } - } - - let documentKindData = { - bucketName: data.bucketName, - documentList: suggestedDocKinds, - documentKind: documentKind.key, - preSelectedDocumentKind: data.preSelectedDocumentKind, - otherDocKinds, - }; - - return documentKindData; -} - -async function handleBucket(connectionInfo, collectionsIds) { - const bucketItemsPromise = collectionsIds.map(async collectionId => { - const containerInstance = client.database(connectionInfo.database).container(collectionId); - - const documentsAmount = await getDocumentsAmount(containerInstance); - const size = getSampleDocSize(documentsAmount, connectionInfo.recordSamplingSettings); - - const documents = await getDocuments(containerInstance, size); - const filteredDocuments = filterDocuments(documents); - - const documentKind = connectionInfo.documentKinds[collectionId].documentKindName || '*'; - let documentTypes = []; - - if (documentKind !== '*') { - documentTypes = filteredDocuments.map(doc => { - return doc[documentKind]; - }); - documentTypes = documentTypes.filter(item => Boolean(item)); - documentTypes = _.uniq(documentTypes); - } - - return prepareConnectionDataItem(documentTypes, collectionId); - }); - return await Promise.all(bucketItemsPromise); -} - -function prepareConnectionDataItem(documentTypes, bucketName) { - let uniqueDocuments = _.uniq(documentTypes); - let connectionDataItem = { - dbName: bucketName, - dbCollections: uniqueDocuments, - }; - - return connectionDataItem; -} - -const getSampleDocSize = (count, recordSamplingSettings) => { - if (recordSamplingSettings.active === 'absolute') { - return Number(recordSamplingSettings.absolute.value); - } - - const limit = Math.ceil((count * recordSamplingSettings.relative.value) / 100); - - return Math.min(limit, recordSamplingSettings.maxValue); -}; - -function capitalizeFirstLetter(str) { - return str.charAt(0).toUpperCase() + str.slice(1); -} - -function getIndexes(indexingPolicy) { - return { - indexingMode: capitalizeFirstLetter(indexingPolicy.indexingMode || ''), - indexingAutomatic: indexingPolicy.automatic === true ? 'true' : 'false', - includedPaths: (indexingPolicy.includedPaths || []).map((index, i) => { - return { - name: `Included (${i + 1})`, - indexIncludedPath: [getIndexPath(index.path)], - }; - }), - excludedPaths: indexingPolicy.excludedPaths.map((index, i) => { - return { - name: `Excluded (${i + 1})`, - indexExcludedPath: [getIndexPath(index.path)], - }; - }), - spatialIndexes: (indexingPolicy.spatialIndexes || []).map((index, i) => { - return { - name: `Spatial (${i + 1})`, - indexIncludedPath: [getIndexPath(index.path)], - dataTypes: (index.types || []).map(spatialType => ({ - spatialType, - })), - }; - }), - compositeIndexes: (indexingPolicy.compositeIndexes || []).map((indexes, i) => { - const compositeFieldPath = indexes.map((index, i) => { - return { - name: getKeyPath(index.path), - type: index.order || 'ascending', - }; - }, {}); - - return { - name: `Composite (${i + 1})`, - compositeFieldPath, - }; - }), - }; -} - -const getIndexPathType = path => { - if (/\?$/.test(path)) { - return '?'; - } else if (/\*$/.test(path)) { - return '*'; - } else { - return ''; - } -}; - -const getIndexPath = path => { - const type = getIndexPathType(path); - const name = path.replace(/\/(\?|\*)$/, ''); - - return { - name: getKeyPath(name), - type, - }; -}; - -const trimKey = key => { - const trimRegexp = /^\"([\s\S]+)\"$/i; - - if (!trimRegexp.test(key)) { - return key; - } - - const result = key.match(trimRegexp); - - return result[1] || key; -}; - -const getKeyPath = keyPath => { - return (keyPath || '') - .split('/') - .filter(Boolean) - .map(trimKey) - .map(item => (item === '[]' ? 0 : item)) - .join('.'); -}; - -function getPartitionKey(collection) { - if (!collection.partitionKey) { - return ''; - } - if (!Array.isArray(collection.partitionKey.paths)) { - return ''; - } - return collection.partitionKey.paths.map(getKeyPath); -} - -function getUniqueKeys(collection) { - if (!collection.uniqueKeyPolicy) { - return []; - } - - if (!Array.isArray(collection.uniqueKeyPolicy.uniqueKeys)) { - return []; - } - - return collection.uniqueKeyPolicy.uniqueKeys - .map(item => { - if (!Array.isArray(item.paths)) { - return; - } - - return { - attributePath: item.paths.map(getKeyPath), - }; - }) - .filter(Boolean); -} - -function getOfferProps(offer) { - if (!offer) { - return { - capacityMode: 'Serverless', - autopilot: false, - }; - } - const isAutopilotOn = _.get(offer, 'content.offerAutopilotSettings'); - if (isAutopilotOn) { - return { - autopilot: true, - throughput: _.get(offer, 'content.offerAutopilotSettings.maximumTierThroughput', ''), - capacityMode: 'Provisioned throughput', - }; - } - return { - autopilot: false, - throughput: _.get(offer, 'content.offerThroughput', ''), - capacityMode: 'Provisioned throughput', - }; -} - -async function getStoredProcedures(containerInstance) { - const { resources } = await containerInstance.scripts.storedProcedures.readAll().fetchAll(); - return resources.map((item, i) => { - return { - storedProcID: item.id, - name: `New Stored procedure(${i + 1})`, - storedProcFunction: item.body, - }; - }); -} - -async function getTriggers(containerInstance) { - const { resources } = await containerInstance.scripts.triggers.readAll().fetchAll(); - return resources.map((item, i) => { - return { - triggerID: item.id, - name: `New Trigger(${i + 1})`, - prePostTrigger: item.triggerType === 'Pre' ? 'Pre-Trigger' : 'Post-Trigger', - triggerOperation: item.triggerOperation, - triggerFunction: item.body, - }; - }); -} - -async function getUdfs(containerInstance) { - const { resources } = await containerInstance.scripts.userDefinedFunctions.readAll().fetchAll(); - return resources.map((item, i) => { - return { - udfID: item.id, - name: `New UDFS(${i + 1})`, - udfFunction: item.body, - }; - }); -} - -function getTTL(defaultTTL) { - if (!defaultTTL) { - return TTL_OFF; - } - return defaultTTL === -1 ? TTL_ON_DEFAULT : TTL_ON; -} - -function getSamplingInfo(recordSamplingSettings, fieldInference) { - let samplingInfo = {}; - let value = recordSamplingSettings[recordSamplingSettings.active].value; - let unit = recordSamplingSettings.active === 'relative' ? '%' : ' records max'; - samplingInfo.recordSampling = `${recordSamplingSettings.active} ${value}${unit}`; - samplingInfo.fieldInference = fieldInference.active === 'field' ? 'keep field order' : 'alphabetical order'; - return samplingInfo; -} - -async function getAdditionalAccountInfo(connectionInfo, logger) { - if (connectionInfo.disableSSL || !connectionInfo.includeAccountInformation) { - return {}; - } - - logger.log('info', {}, 'Account additional info', connectionInfo.hiddenKeys); - - try { - const { clientId, appSecret, tenantId, subscriptionId, resourceGroupName, host } = connectionInfo; - const accNameRegex = /https:\/\/(.+)\.documents.+/i; - const accountName = accNameRegex.test(host) ? accNameRegex.exec(host)[1] : ''; - const tokenBaseURl = `https://login.microsoftonline.com/${tenantId}/oauth2/token`; - const { data: tokenData } = await axios({ - method: 'post', - url: tokenBaseURl, - data: qs.stringify({ - grant_type: 'client_credentials', - client_id: clientId, - client_secret: appSecret, - resource: 'https://management.azure.com/', - }), - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - }); - const dbAccountBaseUrl = `https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}?api-version=2015-04-08`; - const { data: accountData } = await axios({ - method: 'get', - url: dbAccountBaseUrl, - headers: { - 'Authorization': `${tokenData.token_type} ${tokenData.access_token}`, - }, - }); - logger.progress({ - message: 'Getting account information', - containerName: connectionInfo.database, - entityName: '', - }); - return { - enableMultipleWriteLocations: accountData.properties.enableMultipleWriteLocations, - enableAutomaticFailover: accountData.properties.enableAutomaticFailover, - isVirtualNetworkFilterEnabled: accountData.properties.isVirtualNetworkFilterEnabled, - virtualNetworkRules: accountData.properties.virtualNetworkRules.map( - ({ id, ignoreMissingVNetServiceEndpoint }) => ({ - virtualNetworkId: id, - ignoreMissingVNetServiceEndpoint, - }), - ), - ipRangeFilter: accountData.properties.ipRangeFilter, - tags: Object.entries(accountData.tags).map(([tagName, tagValue]) => ({ tagName, tagValue })), - locations: accountData.properties.locations.map(({ id, locationName, failoverPriority, isZoneRedundant }) => ({ - locationId: id, - locationName, - failoverPriority, - isZoneRedundant, - })), - }; - } catch (err) { - logger.log('error', { message: _.get(err, 'response.data.error.message', err.message), stack: err.stack }); - logger.progress({ - message: 'Error while getting account information', - containerName: connectionInfo.database, - }); - return {}; - } -} - -function mapError(error) { - return { - message: error.message, - stack: error.stack, - }; -} - -function createSchemaByPartitionKeyPath(path, documents = []) { - const checkIfDocumentContainsPath = (path, document = {}) => { - if (_.isEmpty(path)) { - return true; - } - const value = _.get(document, `${path[0]}`); - if (value !== undefined) { - return checkIfDocumentContainsPath(_.tail(path), value); - } - return false; - }; - - const getNestedObject = path => { - if (path.length === 1) { - return { - [path[0]]: { - primaryKey: true, - partitionKey: true, - }, - }; - } - return { - [path[0]]: { - properties: getNestedObject(_.tail(path)), - }, - }; - }; - - const getProperties = paths => { - return paths.reduce((result, path) => { - if (!path || !_.isString(path)) { - return result; - } - const namePath = path.split('.'); - - if (namePath.length === 0) { - return result; - } - - if (!documents.some(doc => checkIfDocumentContainsPath(namePath, doc))) { - return result; - } - - return { - ...result, - ...getNestedObject(namePath), - }; - }, {}); - }; - - if (!Array.isArray(path)) { - return false; - } - - const properties = getProperties(path); - - if (_.isEmpty(properties)) { - return false; - } - - return { - jsonSchema: { - properties, - }, - }; -} +"use strict";var yD=Object.create;var ia=Object.defineProperty;var xD=Object.getOwnPropertyDescriptor;var vD=Object.getOwnPropertyNames;var bD=Object.getPrototypeOf,wD=Object.prototype.hasOwnProperty;var s=(t,e)=>ia(t,"name",{value:e,configurable:!0});var ut=(t,e)=>()=>(t&&(e=t(t=0)),e);var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vx=(t,e)=>{for(var n in e)ia(t,n,{get:e[n],enumerable:!0})},Jx=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of vD(e))!wD.call(t,o)&&o!==n&&ia(t,o,{get:()=>e[o],enumerable:!(r=xD(e,o))||r.enumerable});return t};var Tp=(t,e,n)=>(n=t!=null?yD(bD(t)):{},Jx(e||!t||!t.__esModule?ia(n,"default",{value:t,enumerable:!0}):n,t)),Hr=t=>Jx(ia({},"__esModule",{value:!0}),t);function oa(){return Js>Ys.length-16&&(Yx.default.randomFillSync(Ys),Js=0),Ys.slice(Js,Js+=16)}var Yx,Ys,Js,Ep=ut(()=>{Yx=Tp(require("crypto")),Ys=new Uint8Array(256),Js=Ys.length;s(oa,"rng")});var Xx,Zx=ut(()=>{Xx=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function _D(t){return typeof t=="string"&&Xx.test(t)}var ur,aa=ut(()=>{Zx();s(_D,"validate");ur=_D});function RD(t,e=0){let n=(rt[t[e+0]]+rt[t[e+1]]+rt[t[e+2]]+rt[t[e+3]]+"-"+rt[t[e+4]]+rt[t[e+5]]+"-"+rt[t[e+6]]+rt[t[e+7]]+"-"+rt[t[e+8]]+rt[t[e+9]]+"-"+rt[t[e+10]]+rt[t[e+11]]+rt[t[e+12]]+rt[t[e+13]]+rt[t[e+14]]+rt[t[e+15]]).toLowerCase();if(!ur(n))throw TypeError("Stringified UUID is invalid");return n}var rt,lr,sa=ut(()=>{aa();rt=[];for(let t=0;t<256;++t)rt.push((t+256).toString(16).substr(1));s(RD,"stringify");lr=RD});function TD(t,e,n){let r=e&&n||0,o=e||new Array(16);t=t||{};let c=t.node||ev,u=t.clockseq!==void 0?t.clockseq:Sp;if(c==null||u==null){let v=t.random||(t.rng||oa)();c==null&&(c=ev=[v[0]|1,v[1],v[2],v[3],v[4],v[5]]),u==null&&(u=Sp=(v[6]<<8|v[7])&16383)}let p=t.msecs!==void 0?t.msecs:Date.now(),d=t.nsecs!==void 0?t.nsecs:Ap+1,m=p-Pp+(d-Ap)/1e4;if(m<0&&t.clockseq===void 0&&(u=u+1&16383),(m<0||p>Pp)&&t.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Pp=p,Ap=d,Sp=u,p+=122192928e5;let h=((p&268435455)*1e4+d)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=h&255;let y=p/4294967296*1e4&268435455;o[r++]=y>>>8&255,o[r++]=y&255,o[r++]=y>>>24&15|16,o[r++]=y>>>16&255,o[r++]=u>>>8|128,o[r++]=u&255;for(let v=0;v<6;++v)o[r+v]=c[v];return e||lr(o)}var ev,Sp,Pp,Ap,tv,nv=ut(()=>{Ep();sa();Pp=0,Ap=0;s(TD,"v1");tv=TD});function ED(t){if(!ur(t))throw TypeError("Invalid UUID");let e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=e&255,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=e&255,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=e&255,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=e&255,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=e&255,n}var Xs,Cp=ut(()=>{aa();s(ED,"parse");Xs=ED});function SD(t){t=unescape(encodeURIComponent(t));let e=[];for(let n=0;n{sa();Cp();s(SD,"stringToBytes");PD="6ba7b810-9dad-11d1-80b4-00c04fd430c8",AD="6ba7b811-9dad-11d1-80b4-00c04fd430c8";s(ca,"default")});function CD(t){return Array.isArray(t)?t=Buffer.from(t):typeof t=="string"&&(t=Buffer.from(t,"utf8")),rv.default.createHash("md5").update(t).digest()}var rv,iv,ov=ut(()=>{rv=Tp(require("crypto"));s(CD,"md5");iv=CD});var OD,av,sv=ut(()=>{Op();ov();OD=ca("v3",48,iv),av=OD});function ID(t,e,n){t=t||{};let r=t.random||(t.rng||oa)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=r[o];return e}return lr(r)}var cv,uv=ut(()=>{Ep();sa();s(ID,"v4");cv=ID});function DD(t){return Array.isArray(t)?t=Buffer.from(t):typeof t=="string"&&(t=Buffer.from(t,"utf8")),lv.default.createHash("sha1").update(t).digest()}var lv,pv,dv=ut(()=>{lv=Tp(require("crypto"));s(DD,"sha1");pv=DD});var LD,fv,hv=ut(()=>{Op();dv();LD=ca("v5",80,pv),fv=LD});var mv,gv=ut(()=>{mv="00000000-0000-0000-0000-000000000000"});function MD(t){if(!ur(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}var yv,xv=ut(()=>{aa();s(MD,"version");yv=MD});var vv={};Vx(vv,{NIL:()=>mv,parse:()=>Xs,stringify:()=>lr,v1:()=>tv,v3:()=>av,v4:()=>cv,v5:()=>fv,validate:()=>ur,version:()=>yv});var bv=ut(()=>{nv();sv();uv();hv();gv();xv();aa();sa();Cp()});var zr={};Vx(zr,{__addDisposableResource:()=>Uv,__assign:()=>Zs,__asyncDelegator:()=>Lv,__asyncGenerator:()=>Dv,__asyncValues:()=>Mv,__await:()=>qi,__awaiter:()=>Sv,__classPrivateFieldGet:()=>qv,__classPrivateFieldIn:()=>jv,__classPrivateFieldSet:()=>Bv,__createBinding:()=>tc,__decorate:()=>Rv,__disposeResources:()=>Hv,__esDecorate:()=>ND,__exportStar:()=>Av,__extends:()=>wv,__generator:()=>Pv,__importDefault:()=>Fv,__importStar:()=>kv,__makeTemplateObject:()=>Nv,__metadata:()=>Ev,__param:()=>Tv,__propKey:()=>FD,__read:()=>Dp,__rest:()=>_v,__runInitializers:()=>kD,__setFunctionName:()=>qD,__spread:()=>Cv,__spreadArray:()=>Iv,__spreadArrays:()=>Ov,__values:()=>ec,default:()=>UD});function wv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ip(t,e);function n(){this.constructor=t}s(n,"__"),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function _v(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o=0;p--)(u=t[p])&&(c=(o<3?u(c):o>3?u(e,n,c):u(e,n))||c);return o>3&&c&&Object.defineProperty(e,n,c),c}function Tv(t,e){return function(n,r){e(n,r,t)}}function ND(t,e,n,r,o,c){function u(N){if(N!==void 0&&typeof N!="function")throw new TypeError("Function expected");return N}s(u,"accept");for(var p=r.kind,d=p==="getter"?"get":p==="setter"?"set":"value",m=!e&&t?r.static?t:t.prototype:null,h=e||(m?Object.getOwnPropertyDescriptor(m,r.name):{}),y,v=!1,P=n.length-1;P>=0;P--){var _={};for(var E in r)_[E]=E==="access"?{}:r[E];for(var E in r.access)_.access[E]=r.access[E];_.addInitializer=function(N){if(v)throw new TypeError("Cannot add initializers after decoration has completed");c.push(u(N||null))};var I=(0,n[P])(p==="accessor"?{get:h.get,set:h.set}:h[d],_);if(p==="accessor"){if(I===void 0)continue;if(I===null||typeof I!="object")throw new TypeError("Object expected");(y=u(I.get))&&(h.get=y),(y=u(I.set))&&(h.set=y),(y=u(I.init))&&o.unshift(y)}else(y=u(I))&&(p==="field"?o.unshift(y):h[d]=y)}m&&Object.defineProperty(m,r.name,h),v=!0}function kD(t,e,n){for(var r=arguments.length>2,o=0;o0&&c[c.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!c||m[1]>c[0]&&m[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dp(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,c=[],u;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)c.push(o.value)}catch(p){u={error:p}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return c}function Cv(){for(var t=[],e=0;e1||p(v,P)})})}function p(v,P){try{d(r[v](P))}catch(_){y(c[0][3],_)}}function d(v){v.value instanceof qi?Promise.resolve(v.value.v).then(m,h):y(c[0][2],v)}function m(v){p("next",v)}function h(v){p("throw",v)}function y(v,P){v(P),c.shift(),c.length&&p(c[0][0],c[0][1])}}function Lv(t){var e,n;return e={},r("next"),r("throw",function(o){throw o}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(o,c){e[o]=t[o]?function(u){return(n=!n)?{value:qi(t[o](u)),done:!1}:c?c(u):u}:c}}function Mv(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof ec=="function"?ec(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(c){n[c]=t[c]&&function(u){return new Promise(function(p,d){u=t[c](u),o(p,d,u.done,u.value)})}}function o(c,u,p,d){Promise.resolve(d).then(function(m){c({value:m,done:p})},u)}}function Nv(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function kv(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&tc(e,t,n);return BD(e,t),e}function Fv(t){return t&&t.__esModule?t:{default:t}}function qv(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function Bv(t,e,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(t,n):o?o.value=n:e.set(t,n),n}function jv(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function Uv(t,e,n){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}function Hv(t){function e(r){t.error=t.hasError?new jD(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}s(e,"fail");function n(){for(;t.stack.length;){var r=t.stack.pop();try{var o=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(o).then(n,function(c){return e(c),n()})}catch(c){e(c)}}if(t.hasError)throw t.error}return s(n,"next"),n()}var Ip,Zs,tc,BD,jD,UD,$r=ut(()=>{Ip=s(function(t,e){return Ip=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Ip(t,e)},"extendStatics");s(wv,"__extends");Zs=s(function(){return Zs=Object.assign||s(function(e){for(var n,r=1,o=arguments.length;r{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.log=void 0;var zv=($r(),Hr(zr)),HD=require("node:os"),zD=zv.__importDefault(require("node:util")),$D=zv.__importStar(require("node:process"));function WD(t,...e){$D.stderr.write(`${zD.default.format(t,...e)}${HD.EOL}`)}s(WD,"log");nc.log=WD});var Vv=M(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var KD=$v(),Wv=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Kv,Lp=[],Mp=[],rc=[];Wv&&Np(Wv);var Gv=Object.assign(t=>Qv(t),{enable:Np,enabled:kp,disable:GD,log:KD.log});function Np(t){Kv=t,Lp=[],Mp=[];let e=/\*/g,n=t.split(",").map(r=>r.trim().replace(e,".*?"));for(let r of n)r.startsWith("-")?Mp.push(new RegExp(`^${r.substr(1)}$`)):Lp.push(new RegExp(`^${r}$`));for(let r of rc)r.enabled=kp(r.namespace)}s(Np,"enable");function kp(t){if(t.endsWith("*"))return!0;for(let e of Mp)if(e.test(t))return!1;for(let e of Lp)if(e.test(t))return!0;return!1}s(kp,"enabled");function GD(){let t=Kv||"";return Np(""),t}s(GD,"disable");function Qv(t){let e=Object.assign(n,{enabled:kp(t),destroy:QD,log:Gv.log,namespace:t,extend:VD});function n(...r){e.enabled&&(r.length>0&&(r[0]=`${t} ${r[0]}`),e.log(...r))}return s(n,"debug"),rc.push(e),e}s(Qv,"createDebugger");function QD(){let t=rc.indexOf(this);return t>=0?(rc.splice(t,1),!0):!1}s(QD,"destroy");function VD(t){let e=Qv(`${this.namespace}:${t}`);return e.log=this.log,e}s(VD,"extend");Fp.default=Gv});var sc=M(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.createClientLogger=kt.getLogLevel=kt.setLogLevel=kt.AzureLogger=void 0;var JD=($r(),Hr(zr)),ua=JD.__importDefault(Vv()),Yv=new Set,ic=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,ac;kt.AzureLogger=(0,ua.default)("azure");kt.AzureLogger.log=(...t)=>{ua.default.log(...t)};var qp=["verbose","info","warning","error"];ic&&(tb(ic)?Xv(ic):console.error(`AZURE_LOG_LEVEL set to unknown log level '${ic}'; logging is not enabled. Acceptable values: ${qp.join(", ")}.`));function Xv(t){if(t&&!tb(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${qp.join(",")}`);ac=t;let e=[];for(let n of Yv)eb(n)&&e.push(n.namespace);ua.default.enable(e.join(","))}s(Xv,"setLogLevel");kt.setLogLevel=Xv;function YD(){return ac}s(YD,"getLogLevel");kt.getLogLevel=YD;var Jv={verbose:400,info:300,warning:200,error:100};function XD(t){let e=kt.AzureLogger.extend(t);return Zv(kt.AzureLogger,e),{error:oc(e,"error"),warning:oc(e,"warning"),info:oc(e,"info"),verbose:oc(e,"verbose")}}s(XD,"createClientLogger");kt.createClientLogger=XD;function Zv(t,e){e.log=(...n)=>{t.log(...n)}}s(Zv,"patchLogMethod");function oc(t,e){let n=Object.assign(t.extend(e),{level:e});if(Zv(t,n),eb(n)){let r=ua.default.disable();ua.default.enable(r+","+n.namespace)}return Yv.add(n),n}s(oc,"createLogger");function eb(t){return!!(ac&&Jv[t.level]<=Jv[ac])}s(eb,"shouldEnable");function tb(t){return qp.includes(t)}s(tb,"isAzureLogLevel")});var rb=M((D6,nb)=>{"use strict";nb.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var n=typeof e.cycles=="boolean"?e.cycles:!1,r=e.cmp&&function(c){return function(u){return function(p,d){var m={key:p,value:u[p]},h={key:d,value:u[d]};return c(m,h)}}}(e.cmp),o=[];return s(function c(u){if(u&&u.toJSON&&typeof u.toJSON=="function"&&(u=u.toJSON()),u!==void 0){if(typeof u=="number")return isFinite(u)?""+u:"null";if(typeof u!="object")return JSON.stringify(u);var p,d;if(Array.isArray(u)){for(d="[",p=0;p{ib.exports=fn;function fn(t){this._comparator=t||fn.DEFAULT_COMPARATOR,this._elements=[]}s(fn,"PriorityQueue");fn.DEFAULT_COMPARATOR=function(t,e){return typeof t=="number"&&typeof e=="number"?t-e:(t=t.toString(),e=e.toString(),t==e?0:t>e?1:-1)};fn.prototype.isEmpty=function(){return this.size()===0};fn.prototype.peek=function(){if(this.isEmpty())throw new Error("PriorityQueue is empty");return this._elements[0]};fn.prototype.deq=function(){var t=this.peek(),e=this._elements.pop(),n=this.size();if(n===0)return t;this._elements[0]=e;for(var r=0;r=0&&(o=c),u=0&&(o=u),o===r)break;this._swap(o,r),r=o}return t};fn.prototype.enq=function(t){for(var e=this._elements.push(t),n=e-1;n>0;){var r=Math.floor((n-1)/2);if(this._compare(n,r)<=0)break;this._swap(r,n),n=r}return e};fn.prototype.size=function(){return this._elements.length};fn.prototype.forEach=function(t){return this._elements.forEach(t)};fn.prototype._compare=function(t,e){return this._comparator(this._elements[t],this._elements[e])};fn.prototype._swap=function(t,e){var n=this._elements[t];this._elements[t]=this._elements[e],this._elements[e]=n}});var sb=M((Bp,ab)=>{(function(t){"use strict";var e=s(function(r){setTimeout(r,0)},"nextTick");typeof process<"u"&&process&&typeof process.nextTick=="function"&&(e=process.nextTick);function n(r){var o={capacity:r||1,current:0,queue:[],firstHere:!1,take:function(){if(o.firstHere===!1){o.current++,o.firstHere=!0;var c=1}else var c=0;var u={n:1};typeof arguments[0]=="function"?u.task=arguments[0]:u.n=arguments[0],arguments.length>=2&&(typeof arguments[1]=="function"?u.task=arguments[1]:u.n=arguments[1]);var p=u.task;if(u.task=function(){p(o.leave)},o.current+u.n-c>o.capacity)return c===1&&(o.current--,o.firstHere=!1),o.queue.push(u);o.current+=u.n-c,u.task(o.leave),c===1&&(o.firstHere=!1)},leave:function(c){if(c=c||1,o.current-=c,!o.queue.length){if(o.current<0)throw new Error("leave called too many times.");return}var u=o.queue[0];u.n+o.current>o.capacity||(o.queue.shift(),o.current+=u.n,e(u.task))},available:function(c){return c=c||1,o.current+c<=o.capacity}};return o}s(n,"semaphore"),typeof Bp=="object"?ab.exports=n:typeof define=="function"&&define.amd?define(function(){return n}):t.semaphore=n})(Bp)});var Up=M(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.createEmptyPipeline=void 0;var cb=new Set(["Deserialize","Serialize","Retry","Sign"]),la=class la{constructor(e){var n;this._policies=[],this._policies=(n=e==null?void 0:e.slice(0))!==null&&n!==void 0?n:[],this._orderedPolicies=void 0}addPolicy(e,n={}){if(n.phase&&n.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(n.phase&&!cb.has(n.phase))throw new Error(`Invalid phase name: ${n.phase}`);if(n.afterPhase&&!cb.has(n.afterPhase))throw new Error(`Invalid afterPhase name: ${n.afterPhase}`);this._policies.push({policy:e,options:n}),this._orderedPolicies=void 0}removePolicy(e){let n=[];return this._policies=this._policies.filter(r=>e.name&&r.policy.name===e.name||e.phase&&r.options.phase===e.phase?(n.push(r.policy),!1):!0),this._orderedPolicies=void 0,n}sendRequest(e,n){return this.getOrderedPolicies().reduceRight((c,u)=>p=>u.sendRequest(p,c),c=>e.sendRequest(c))(n)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new la(this._policies)}static create(){return new la}orderPolicies(){let e=[],n=new Map;function r(_){return{name:_,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}s(r,"createPhase");let o=r("Serialize"),c=r("None"),u=r("Deserialize"),p=r("Retry"),d=r("Sign"),m=[o,c,u,p,d];function h(_){return _==="Retry"?p:_==="Serialize"?o:_==="Deserialize"?u:_==="Sign"?d:c}s(h,"getPhase");for(let _ of this._policies){let E=_.policy,I=_.options,N=E.name;if(n.has(N))throw new Error("Duplicate policy names not allowed in pipeline");let H={policy:E,dependsOn:new Set,dependants:new Set};I.afterPhase&&(H.afterPhase=h(I.afterPhase),H.afterPhase.hasAfterPolicies=!0),n.set(N,H),h(I.phase).policies.add(H)}for(let _ of this._policies){let{policy:E,options:I}=_,N=E.name,H=n.get(N);if(!H)throw new Error(`Missing node for policy ${N}`);if(I.afterPolicies)for(let j of I.afterPolicies){let J=n.get(j);J&&(H.dependsOn.add(J),J.dependants.add(H))}if(I.beforePolicies)for(let j of I.beforePolicies){let J=n.get(j);J&&(J.dependsOn.add(H),H.dependants.add(J))}}function y(_){_.hasRun=!0;for(let E of _.policies)if(!(E.afterPhase&&(!E.afterPhase.hasRun||E.afterPhase.policies.size))&&E.dependsOn.size===0){e.push(E.policy);for(let I of E.dependants)I.dependsOn.delete(E);n.delete(E.policy.name),_.policies.delete(E)}}s(y,"walkPhase");function v(){for(let _ of m){if(y(_),_.policies.size>0&&_!==c){c.hasRun||y(c);return}_.hasAfterPolicies&&y(c)}}s(v,"walkPhases");let P=0;for(;n.size>0;){P++;let _=e.length;if(v(),e.length<=_&&P>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};s(la,"HttpPipeline");var jp=la;function ZD(){return jp.create()}s(ZD,"createEmptyPipeline");cc.createEmptyPipeline=ZD});var Wr=M(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.logger=void 0;var eL=sc();uc.logger=(0,eL.createClientLogger)("core-rest-pipeline")});var ub=M(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.AbortError=void 0;var zp=class zp extends Error{constructor(e){super(e),this.name="AbortError"}};s(zp,"AbortError");var Hp=zp;lc.AbortError=Hp});var lb=M(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.AbortError=void 0;var tL=ub();Object.defineProperty(pc,"AbortError",{enumerable:!0,get:function(){return tL.AbortError}})});var $p=M(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.createAbortablePromise=void 0;var nL=lb();function rL(t,e){let{cleanupBeforeAbort:n,abortSignal:r,abortErrorMsg:o}=e??{};return new Promise((c,u)=>{function p(){u(new nL.AbortError(o??"The operation was aborted."))}s(p,"rejectOnAbort");function d(){r==null||r.removeEventListener("abort",m)}s(d,"removeListeners");function m(){n==null||n(),d(),p()}if(s(m,"onAbort"),r!=null&&r.aborted)return p();try{t(h=>{d(),c(h)},h=>{d(),u(h)})}catch(h){u(h)}r==null||r.addEventListener("abort",m)})}s(rL,"createAbortablePromise");dc.createAbortablePromise=rL});var pb=M(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.delay=void 0;var iL=$p(),oL="The delay was aborted.";function aL(t,e){let n,{abortSignal:r,abortErrorMsg:o}=e??{};return(0,iL.createAbortablePromise)(c=>{n=setTimeout(c,t)},{cleanupBeforeAbort:()=>clearTimeout(n),abortSignal:r,abortErrorMsg:o??oL})}s(aL,"delay");fc.delay=aL});var db=M(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.cancelablePromiseRace=void 0;async function sL(t,e){var n,r;let o=new AbortController;function c(){o.abort()}s(c,"abortHandler"),(n=e==null?void 0:e.abortSignal)===null||n===void 0||n.addEventListener("abort",c);try{return await Promise.race(t.map(u=>u({abortSignal:o.signal})))}finally{o.abort(),(r=e==null?void 0:e.abortSignal)===null||r===void 0||r.removeEventListener("abort",c)}}s(sL,"cancelablePromiseRace");hc.cancelablePromiseRace=sL});var fb=M(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.getRandomIntegerInclusive=void 0;function cL(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}s(cL,"getRandomIntegerInclusive");mc.getRandomIntegerInclusive=cL});var Wp=M(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.isObject=void 0;function uL(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}s(uL,"isObject");gc.isObject=uL});var mb=M(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.getErrorMessage=Bi.isError=void 0;var lL=Wp();function hb(t){if((0,lL.isObject)(t)){let e=typeof t.name=="string",n=typeof t.message=="string";return e&&n}return!1}s(hb,"isError");Bi.isError=hb;function pL(t){if(hb(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}s(pL,"getErrorMessage");Bi.getErrorMessage=pL});var yb=M(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.computeSha256Hash=ji.computeSha256Hmac=void 0;var gb=require("crypto");async function dL(t,e,n){let r=Buffer.from(t,"base64");return(0,gb.createHmac)("sha256",r).update(e).digest(n)}s(dL,"computeSha256Hmac");ji.computeSha256Hmac=dL;async function fL(t,e){return(0,gb.createHash)("sha256").update(t).digest(e)}s(fL,"computeSha256Hash");ji.computeSha256Hash=fL});var vb=M(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.objectHasProperty=pr.isObjectWithProperties=pr.isDefined=void 0;function Kp(t){return typeof t<"u"&&t!==null}s(Kp,"isDefined");pr.isDefined=Kp;function hL(t,e){if(!Kp(t)||typeof t!="object")return!1;for(let n of e)if(!xb(t,n))return!1;return!0}s(hL,"isObjectWithProperties");pr.isObjectWithProperties=hL;function xb(t,e){return Kp(t)&&typeof t=="object"&&e in t}s(xb,"objectHasProperty");pr.objectHasProperty=xb});var bb=M(yc=>{"use strict";var Gp;Object.defineProperty(yc,"__esModule",{value:!0});yc.randomUUID=void 0;var mL=require("crypto"),gL=typeof((Gp=globalThis==null?void 0:globalThis.crypto)===null||Gp===void 0?void 0:Gp.randomUUID)=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):mL.randomUUID;function yL(){return gL()}s(yL,"randomUUID");yc.randomUUID=yL});var wb=M(Ne=>{"use strict";var Qp,Vp,Jp,Yp;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.isReactNative=Ne.isNodeRuntime=Ne.isNode=Ne.isNodeLike=Ne.isBun=Ne.isDeno=Ne.isWebWorker=Ne.isBrowser=void 0;Ne.isBrowser=typeof window<"u"&&typeof window.document<"u";Ne.isWebWorker=typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((Qp=self.constructor)===null||Qp===void 0?void 0:Qp.name)==="DedicatedWorkerGlobalScope"||((Vp=self.constructor)===null||Vp===void 0?void 0:Vp.name)==="ServiceWorkerGlobalScope"||((Jp=self.constructor)===null||Jp===void 0?void 0:Jp.name)==="SharedWorkerGlobalScope");Ne.isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";Ne.isBun=typeof Bun<"u"&&typeof Bun.version<"u";Ne.isNodeLike=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!(!((Yp=globalThis.process.versions)===null||Yp===void 0)&&Yp.node);Ne.isNode=Ne.isNodeLike;Ne.isNodeRuntime=Ne.isNodeLike&&!Ne.isBun&&!Ne.isDeno;Ne.isReactNative=typeof navigator<"u"&&(navigator==null?void 0:navigator.product)==="ReactNative"});var _b=M(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.stringToUint8Array=Ui.uint8ArrayToString=void 0;function xL(t,e){return Buffer.from(t).toString(e)}s(xL,"uint8ArrayToString");Ui.uint8ArrayToString=xL;function vL(t,e){return Buffer.from(t,e)}s(vL,"stringToUint8Array");Ui.stringToUint8Array=vL});var Sn=M(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.stringToUint8Array=ne.uint8ArrayToString=ne.isWebWorker=ne.isReactNative=ne.isDeno=ne.isNodeRuntime=ne.isNodeLike=ne.isNode=ne.isBun=ne.isBrowser=ne.randomUUID=ne.objectHasProperty=ne.isObjectWithProperties=ne.isDefined=ne.computeSha256Hmac=ne.computeSha256Hash=ne.getErrorMessage=ne.isError=ne.isObject=ne.getRandomIntegerInclusive=ne.createAbortablePromise=ne.cancelablePromiseRace=ne.delay=void 0;var bL=pb();Object.defineProperty(ne,"delay",{enumerable:!0,get:function(){return bL.delay}});var wL=db();Object.defineProperty(ne,"cancelablePromiseRace",{enumerable:!0,get:function(){return wL.cancelablePromiseRace}});var _L=$p();Object.defineProperty(ne,"createAbortablePromise",{enumerable:!0,get:function(){return _L.createAbortablePromise}});var RL=fb();Object.defineProperty(ne,"getRandomIntegerInclusive",{enumerable:!0,get:function(){return RL.getRandomIntegerInclusive}});var TL=Wp();Object.defineProperty(ne,"isObject",{enumerable:!0,get:function(){return TL.isObject}});var Rb=mb();Object.defineProperty(ne,"isError",{enumerable:!0,get:function(){return Rb.isError}});Object.defineProperty(ne,"getErrorMessage",{enumerable:!0,get:function(){return Rb.getErrorMessage}});var Tb=yb();Object.defineProperty(ne,"computeSha256Hash",{enumerable:!0,get:function(){return Tb.computeSha256Hash}});Object.defineProperty(ne,"computeSha256Hmac",{enumerable:!0,get:function(){return Tb.computeSha256Hmac}});var Xp=vb();Object.defineProperty(ne,"isDefined",{enumerable:!0,get:function(){return Xp.isDefined}});Object.defineProperty(ne,"isObjectWithProperties",{enumerable:!0,get:function(){return Xp.isObjectWithProperties}});Object.defineProperty(ne,"objectHasProperty",{enumerable:!0,get:function(){return Xp.objectHasProperty}});var EL=bb();Object.defineProperty(ne,"randomUUID",{enumerable:!0,get:function(){return EL.randomUUID}});var dr=wb();Object.defineProperty(ne,"isBrowser",{enumerable:!0,get:function(){return dr.isBrowser}});Object.defineProperty(ne,"isBun",{enumerable:!0,get:function(){return dr.isBun}});Object.defineProperty(ne,"isNode",{enumerable:!0,get:function(){return dr.isNode}});Object.defineProperty(ne,"isNodeLike",{enumerable:!0,get:function(){return dr.isNodeLike}});Object.defineProperty(ne,"isNodeRuntime",{enumerable:!0,get:function(){return dr.isNodeRuntime}});Object.defineProperty(ne,"isDeno",{enumerable:!0,get:function(){return dr.isDeno}});Object.defineProperty(ne,"isReactNative",{enumerable:!0,get:function(){return dr.isReactNative}});Object.defineProperty(ne,"isWebWorker",{enumerable:!0,get:function(){return dr.isWebWorker}});var Eb=_b();Object.defineProperty(ne,"uint8ArrayToString",{enumerable:!0,get:function(){return Eb.uint8ArrayToString}});Object.defineProperty(ne,"stringToUint8Array",{enumerable:!0,get:function(){return Eb.stringToUint8Array}})});var nd=M(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.Sanitizer=void 0;var SL=Sn(),Zp="REDACTED",PL=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],AL=["api-version"],td=class td{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:n=[]}={}){e=PL.concat(e),n=AL.concat(n),this.allowedHeaderNames=new Set(e.map(r=>r.toLowerCase())),this.allowedQueryParameters=new Set(n.map(r=>r.toLowerCase()))}sanitize(e){let n=new Set;return JSON.stringify(e,(r,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(r==="headers")return this.sanitizeHeaders(o);if(r==="url")return this.sanitizeUrl(o);if(r==="query")return this.sanitizeQuery(o);if(r==="body")return;if(r==="response")return;if(r==="operationSpec")return;if(Array.isArray(o)||(0,SL.isObject)(o)){if(n.has(o))return"[Circular]";n.add(o)}return o},2)}sanitizeHeaders(e){let n={};for(let r of Object.keys(e))this.allowedHeaderNames.has(r.toLowerCase())?n[r]=e[r]:n[r]=Zp;return n}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let n={};for(let r of Object.keys(e))this.allowedQueryParameters.has(r.toLowerCase())?n[r]=e[r]:n[r]=Zp;return n}sanitizeUrl(e){if(typeof e!="string"||e===null)return e;let n=new URL(e);if(!n.search)return e;for(let[r]of n.searchParams)this.allowedQueryParameters.has(r.toLowerCase())||n.searchParams.set(r,Zp);return n.toString()}};s(td,"Sanitizer");var ed=td;xc.Sanitizer=ed});var rd=M(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.logPolicy=Kr.logPolicyName=void 0;var CL=Wr(),OL=nd();Kr.logPolicyName="logPolicy";function IL(t={}){var e;let n=(e=t.logger)!==null&&e!==void 0?e:CL.logger.info,r=new OL.Sanitizer({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:Kr.logPolicyName,async sendRequest(o,c){if(!n.enabled)return c(o);n(`Request: ${r.sanitize(o)}`);let u=await c(o);return n(`Response status code: ${u.status}`),n(`Headers: ${r.sanitize(u.headers)}`),u}}}s(IL,"logPolicy");Kr.logPolicy=IL});var id=M(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.redirectPolicy=Gr.redirectPolicyName=void 0;Gr.redirectPolicyName="redirectPolicy";var Sb=["GET","HEAD"];function DL(t={}){let{maxRetries:e=20}=t;return{name:Gr.redirectPolicyName,async sendRequest(n,r){let o=await r(n);return Pb(r,o,e)}}}s(DL,"redirectPolicy");Gr.redirectPolicy=DL;async function Pb(t,e,n,r=0){let{request:o,status:c,headers:u}=e,p=u.get("location");if(p&&(c===300||c===301&&Sb.includes(o.method)||c===302&&Sb.includes(o.method)||c===303&&o.method==="POST"||c===307)&&r{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.setPlatformSpecificData=Hi.getHeaderName=void 0;var Ab=($r(),Hr(zr)),od=Ab.__importStar(require("node:os")),LL=Ab.__importStar(require("node:process"));function ML(){return"User-Agent"}s(ML,"getHeaderName");Hi.getHeaderName=ML;function NL(t){let e=LL.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node),t.set("OS",`(${od.arch()}-${od.type()}-${od.release()})`)}s(NL,"setPlatformSpecificData");Hi.setPlatformSpecificData=NL});var fr=M(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.DEFAULT_RETRY_POLICY_COUNT=zi.SDK_VERSION=void 0;zi.SDK_VERSION="1.16.0";zi.DEFAULT_RETRY_POLICY_COUNT=3});var ad=M($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.getUserAgentValue=$i.getUserAgentHeaderName=void 0;var Ob=Cb(),kL=fr();function FL(t){let e=[];for(let[n,r]of t){let o=r?`${n}/${r}`:n;e.push(o)}return e.join(" ")}s(FL,"getUserAgentString");function qL(){return(0,Ob.getHeaderName)()}s(qL,"getUserAgentHeaderName");$i.getUserAgentHeaderName=qL;function BL(t){let e=new Map;e.set("core-rest-pipeline",kL.SDK_VERSION),(0,Ob.setPlatformSpecificData)(e);let n=FL(e);return t?`${t} ${n}`:n}s(BL,"getUserAgentValue");$i.getUserAgentValue=BL});var sd=M(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.userAgentPolicy=Qr.userAgentPolicyName=void 0;var Db=ad(),Ib=(0,Db.getUserAgentHeaderName)();Qr.userAgentPolicyName="userAgentPolicy";function jL(t={}){let e=(0,Db.getUserAgentValue)(t.userAgentPrefix);return{name:Qr.userAgentPolicyName,async sendRequest(n,r){return n.headers.has(Ib)||n.headers.set(Ib,e),r(n)}}}s(jL,"userAgentPolicy");Qr.userAgentPolicy=jL});var vc=M(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.isBlob=Pn.isReadableStream=Pn.isWebReadableStream=Pn.isNodeReadableStream=void 0;function Lb(t){return!!(t&&typeof t.pipe=="function")}s(Lb,"isNodeReadableStream");Pn.isNodeReadableStream=Lb;function Mb(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}s(Mb,"isWebReadableStream");Pn.isWebReadableStream=Mb;function UL(t){return Lb(t)||Mb(t)}s(UL,"isReadableStream");Pn.isReadableStream=UL;function HL(t){return typeof t.stream=="function"}s(HL,"isBlob");Pn.isBlob=HL});var cd=M(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.createFile=hr.createFileFromStream=hr.getRawContent=void 0;var zL=Sn(),$L=vc(),Nb={arrayBuffer:()=>{throw new Error("Not implemented")},slice:()=>{throw new Error("Not implemented")},text:()=>{throw new Error("Not implemented")}},bc=Symbol("rawContent");function WL(t){return typeof t[bc]=="function"}s(WL,"hasRawContent");function KL(t){return WL(t)?t[bc]():t.stream()}s(KL,"getRawContent");hr.getRawContent=KL;function GL(t,e,n={}){var r,o,c,u;return Object.assign(Object.assign({},Nb),{type:(r=n.type)!==null&&r!==void 0?r:"",lastModified:(o=n.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(c=n.webkitRelativePath)!==null&&c!==void 0?c:"",size:(u=n.size)!==null&&u!==void 0?u:-1,name:e,stream:()=>{let p=t();if((0,$L.isNodeReadableStream)(p))throw new Error("Not supported: a Node stream was provided as input to createFileFromStream.");return p},[bc]:t})}s(GL,"createFileFromStream");hr.createFileFromStream=GL;function QL(t,e,n={}){var r,o,c;return zL.isNodeLike?Object.assign(Object.assign({},Nb),{type:(r=n.type)!==null&&r!==void 0?r:"",lastModified:(o=n.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(c=n.webkitRelativePath)!==null&&c!==void 0?c:"",size:t.byteLength,name:e,arrayBuffer:async()=>t.buffer,stream:()=>new Blob([t]).stream(),[bc]:()=>t}):new File([t],e,n)}s(QL,"createFile");hr.createFile=QL});var qb=M(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.concat=void 0;var Qn=($r(),Hr(zr)),ud=require("node:stream"),VL=vc(),JL=cd();function kb(){return Qn.__asyncGenerator(this,arguments,s(function*(){let e=this.getReader();try{for(;;){let{done:n,value:r}=yield Qn.__await(e.read());if(n)return yield Qn.__await(void 0);yield yield Qn.__await(r)}}finally{e.releaseLock()}},"streamAsyncIterator_1"))}s(kb,"streamAsyncIterator");function YL(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=kb.bind(t)),t.values||(t.values=kb.bind(t))}s(YL,"makeAsyncIterable");function XL(t){return t instanceof ReadableStream?(YL(t),ud.Readable.fromWeb(t)):t}s(XL,"ensureNodeStream");function Fb(t){return t instanceof Uint8Array?ud.Readable.from(Buffer.from(t)):(0,VL.isBlob)(t)?Fb((0,JL.getRawContent)(t)):XL(t)}s(Fb,"toStream");async function ZL(t){return function(){let e=t.map(n=>typeof n=="function"?n():n).map(Fb);return ud.Readable.from(function(){return Qn.__asyncGenerator(this,arguments,function*(){var n,r,o,c;for(let m of e)try{for(var u=!0,p=(r=void 0,Qn.__asyncValues(m)),d;d=yield Qn.__await(p.next()),n=d.done,!n;u=!0){c=d.value,u=!1;let h=c;yield yield Qn.__await(h)}}catch(h){r={error:h}}finally{try{!u&&!n&&(o=p.return)&&(yield Qn.__await(o.call(p)))}finally{if(r)throw r.error}}})}())}}s(ZL,"concat");wc.concat=ZL});var ld=M(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.multipartPolicy=Jr.multipartPolicyName=void 0;var Vr=Sn(),eM=qb(),tM=vc();function nM(){return`----AzSDKFormBoundary${(0,Vr.randomUUID)()}`}s(nM,"generateBoundary");function rM(t){let e="";for(let[n,r]of t)e+=`${n}: ${r}\r +`;return e}s(rM,"encodeHeaders");function iM(t){return t instanceof Uint8Array?t.byteLength:(0,tM.isBlob)(t)?t.size===-1?void 0:t.size:void 0}s(iM,"getLength");function oM(t){let e=0;for(let n of t){let r=iM(n);if(r===void 0)return;e+=r}return e}s(oM,"getTotalLength");async function aM(t,e,n){let r=[(0,Vr.stringToUint8Array)(`--${n}`,"utf-8"),...e.flatMap(c=>[(0,Vr.stringToUint8Array)(`\r +`,"utf-8"),(0,Vr.stringToUint8Array)(rM(c.headers),"utf-8"),(0,Vr.stringToUint8Array)(`\r +`,"utf-8"),c.body,(0,Vr.stringToUint8Array)(`\r +--${n}`,"utf-8")]),(0,Vr.stringToUint8Array)(`--\r +\r +`,"utf-8")],o=oM(r);o&&t.headers.set("Content-Length",o),t.body=await(0,eM.concat)(r)}s(aM,"buildRequestBody");Jr.multipartPolicyName="multipartPolicy";var sM=70,cM=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function uM(t){if(t.length>sM)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!cM.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}s(uM,"assertValidBoundary");function lM(){return{name:Jr.multipartPolicyName,async sendRequest(t,e){var n;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,o=(n=t.headers.get("Content-Type"))!==null&&n!==void 0?n:"multipart/mixed",c=o.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!c)throw new Error(`Got multipart request body, but content-type header was not multipart: ${o}`);let[,u,p]=c;if(p&&r&&p!==r)throw new Error(`Multipart boundary was specified as ${p} in the header, but got ${r} in the request body`);return r??(r=p),r?uM(r):r=nM(),t.headers.set("Content-Type",`${u}; boundary=${r}`),await aM(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}s(lM,"multipartPolicy");Jr.multipartPolicy=lM});var pd=M(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.decompressResponsePolicy=Yr.decompressResponsePolicyName=void 0;Yr.decompressResponsePolicyName="decompressResponsePolicy";function pM(){return{name:Yr.decompressResponsePolicyName,async sendRequest(t,e){return t.method!=="HEAD"&&t.headers.set("Accept-Encoding","gzip,deflate"),e(t)}}}s(pM,"decompressResponsePolicy");Yr.decompressResponsePolicy=pM});var Bb=M(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.AbortError=void 0;var fd=class fd extends Error{constructor(e){super(e),this.name="AbortError"}};s(fd,"AbortError");var dd=fd;_c.AbortError=dd});var Tc=M(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.AbortError=void 0;var dM=Bb();Object.defineProperty(Rc,"AbortError",{enumerable:!0,get:function(){return dM.AbortError}})});var Ec=M(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.parseHeaderValueAsNumber=Wi.delay=void 0;var fM=Tc(),hM="The operation was aborted.";function mM(t,e,n){return new Promise((r,o)=>{let c,u,p=s(()=>o(new fM.AbortError(n!=null&&n.abortErrorMsg?n==null?void 0:n.abortErrorMsg:hM)),"rejectOnAbort"),d=s(()=>{n!=null&&n.abortSignal&&u&&n.abortSignal.removeEventListener("abort",u)},"removeListeners");if(u=s(()=>(c&&clearTimeout(c),d(),p()),"onAborted"),n!=null&&n.abortSignal&&n.abortSignal.aborted)return p();c=setTimeout(()=>{d(),r(e)},t),n!=null&&n.abortSignal&&n.abortSignal.addEventListener("abort",u)})}s(mM,"delay");Wi.delay=mM;function gM(t,e){let n=t.headers.get(e);if(!n)return;let r=Number(n);if(!Number.isNaN(r))return r}s(gM,"parseHeaderValueAsNumber");Wi.parseHeaderValueAsNumber=gM});var Sc=M(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.throttlingRetryStrategy=Ki.isThrottlingRetryResponse=void 0;var yM=Ec(),hd="Retry-After",xM=["retry-after-ms","x-ms-retry-after-ms",hd];function jb(t){if(t&&[429,503].includes(t.status))try{for(let o of xM){let c=(0,yM.parseHeaderValueAsNumber)(t,o);if(c===0||c)return c*(o===hd?1e3:1)}let e=t.headers.get(hd);if(!e)return;let r=Date.parse(e)-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0}catch{return}}s(jb,"getRetryAfterInMs");function vM(t){return Number.isFinite(jb(t))}s(vM,"isThrottlingRetryResponse");Ki.isThrottlingRetryResponse=vM;function bM(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=jb(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}s(bM,"throttlingRetryStrategy");Ki.throttlingRetryStrategy=bM});var Pc=M(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.isSystemError=mr.isExponentialRetryResponse=mr.exponentialRetryStrategy=void 0;var wM=Sn(),_M=Sc(),RM=1e3,TM=1e3*64;function EM(t={}){var e,n;let r=(e=t.retryDelayInMs)!==null&&e!==void 0?e:RM,o=(n=t.maxRetryDelayInMs)!==null&&n!==void 0?n:TM,c=r;return{name:"exponentialRetryStrategy",retry({retryCount:u,response:p,responseError:d}){let m=Hb(d),h=m&&t.ignoreSystemErrors,y=Ub(p),v=y&&t.ignoreHttpStatusCodes;if(p&&((0,_M.isThrottlingRetryResponse)(p)||!y)||v||h)return{skipStrategy:!0};if(d&&!m&&!y)return{errorToThrow:d};let _=c*Math.pow(2,u),E=Math.min(o,_);return c=E/2+(0,wM.getRandomIntegerInclusive)(0,E/2),{retryAfterInMs:c}}}}s(EM,"exponentialRetryStrategy");mr.exponentialRetryStrategy=EM;function Ub(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}s(Ub,"isExponentialRetryResponse");mr.isExponentialRetryResponse=Ub;function Hb(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}s(Hb,"isSystemError");mr.isSystemError=Hb});var Gi=M(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.retryPolicy=void 0;var SM=Ec(),PM=sc(),AM=Tc(),zb=fr(),$b=(0,PM.createClientLogger)("core-rest-pipeline retryPolicy"),CM="retryPolicy";function OM(t,e={maxRetries:zb.DEFAULT_RETRY_POLICY_COUNT}){let n=e.logger||$b;return{name:CM,async sendRequest(r,o){var c,u;let p,d,m=-1;e:for(;;){m+=1,p=void 0,d=void 0;try{n.info(`Retry ${m}: Attempting to send request`,r.requestId),p=await o(r),n.info(`Retry ${m}: Received a response from request`,r.requestId)}catch(h){if(n.error(`Retry ${m}: Received an error from request`,r.requestId),d=h,!h||d.name!=="RestError")throw h;p=d.response}if(!((c=r.abortSignal)===null||c===void 0)&&c.aborted)throw n.error(`Retry ${m}: Request aborted.`),new AM.AbortError;if(m>=((u=e.maxRetries)!==null&&u!==void 0?u:zb.DEFAULT_RETRY_POLICY_COUNT)){if(n.info(`Retry ${m}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),d)throw d;if(p)return p;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${m}: Processing ${t.length} retry strategies.`);t:for(let h of t){let y=h.logger||$b;y.info(`Retry ${m}: Processing retry strategy ${h.name}.`);let v=h.retry({retryCount:m,response:p,responseError:d});if(v.skipStrategy){y.info(`Retry ${m}: Skipped.`);continue t}let{errorToThrow:P,retryAfterInMs:_,redirectTo:E}=v;if(P)throw y.error(`Retry ${m}: Retry strategy ${h.name} throws error:`,P),P;if(_||_===0){y.info(`Retry ${m}: Retry strategy ${h.name} retries after ${_}`),await(0,SM.delay)(_,void 0,{abortSignal:r.abortSignal});continue e}if(E){y.info(`Retry ${m}: Retry strategy ${h.name} redirects to ${E}`),r.url=E;continue e}}if(d)throw n.info("None of the retry strategies could work with the received error. Throwing it."),d;if(p)return n.info("None of the retry strategies could work with the received response. Returning it."),p}}}}s(OM,"retryPolicy");Ac.retryPolicy=OM});var md=M(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.defaultRetryPolicy=Xr.defaultRetryPolicyName=void 0;var IM=Pc(),DM=Sc(),LM=Gi(),MM=fr();Xr.defaultRetryPolicyName="defaultRetryPolicy";function NM(t={}){var e;return{name:Xr.defaultRetryPolicyName,sendRequest:(0,LM.retryPolicy)([(0,DM.throttlingRetryStrategy)(),(0,IM.exponentialRetryStrategy)(t)],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:MM.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}s(NM,"defaultRetryPolicy");Xr.defaultRetryPolicy=NM});var pa=M(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.createHttpHeaders=void 0;function Cc(t){return t.toLowerCase()}s(Cc,"normalizeName");function*kM(t){for(let e of t.values())yield[e.name,e.value]}s(kM,"headerIterator");var yd=class yd{constructor(e){if(this._headersMap=new Map,e)for(let n of Object.keys(e))this.set(n,e[n])}set(e,n){this._headersMap.set(Cc(e),{name:e,value:String(n).trim()})}get(e){var n;return(n=this._headersMap.get(Cc(e)))===null||n===void 0?void 0:n.value}has(e){return this._headersMap.has(Cc(e))}delete(e){this._headersMap.delete(Cc(e))}toJSON(e={}){let n={};if(e.preserveCase)for(let r of this._headersMap.values())n[r.name]=r.value;else for(let[r,o]of this._headersMap)n[r]=o.value;return n}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return kM(this._headersMap)}};s(yd,"HttpHeadersImpl");var gd=yd;function FM(t){return new gd(t)}s(FM,"createHttpHeaders");Oc.createHttpHeaders=FM});var xd=M(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.formDataPolicy=Zr.formDataPolicyName=void 0;var Kb=Sn(),Wb=pa();Zr.formDataPolicyName="formDataPolicy";function qM(t){var e;let n={};for(let[r,o]of t.entries())(e=n[r])!==null&&e!==void 0||(n[r]=[]),n[r].push(o);return n}s(qM,"formDataToFormDataMap");function BM(){return{name:Zr.formDataPolicyName,async sendRequest(t,e){if(Kb.isNodeLike&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=qM(t.body),t.body=void 0),t.formData){let n=t.headers.get("Content-Type");n&&n.indexOf("application/x-www-form-urlencoded")!==-1?t.body=jM(t.formData):await UM(t.formData,t),t.formData=void 0}return e(t)}}}s(BM,"formDataPolicy");Zr.formDataPolicy=BM;function jM(t){let e=new URLSearchParams;for(let[n,r]of Object.entries(t))if(Array.isArray(r))for(let o of r)e.append(n,o.toString());else e.append(n,r.toString());return e.toString()}s(jM,"wwwFormUrlEncode");async function UM(t,e){let n=e.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",n??"multipart/form-data");let r=[];for(let[o,c]of Object.entries(t))for(let u of Array.isArray(c)?c:[c])if(typeof u=="string")r.push({headers:(0,Wb.createHttpHeaders)({"Content-Disposition":`form-data; name="${o}"`}),body:(0,Kb.stringToUint8Array)(u,"utf-8")});else{if(u==null||typeof u!="object")throw new Error(`Unexpected value for key ${o}: ${u}. Value should be serialized to string first.`);{let p=u.name||"blob",d=(0,Wb.createHttpHeaders)();d.set("Content-Disposition",`form-data; name="${o}"; filename="${p}"`),d.set("Content-Type",u.type||"application/octet-stream"),r.push({headers:d,body:u})}}e.multipartBody={parts:r}}s(UM,"prepareFormData")});var Qb=M((Yz,Gb)=>{var Qi=1e3,Vi=Qi*60,Ji=Vi*60,ei=Ji*24,HM=ei*7,zM=ei*365.25;Gb.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return $M(t);if(n==="number"&&isFinite(t))return e.long?KM(t):WM(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function $M(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*zM;case"weeks":case"week":case"w":return n*HM;case"days":case"day":case"d":return n*ei;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ji;case"minutes":case"minute":case"mins":case"min":case"m":return n*Vi;case"seconds":case"second":case"secs":case"sec":case"s":return n*Qi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}s($M,"parse");function WM(t){var e=Math.abs(t);return e>=ei?Math.round(t/ei)+"d":e>=Ji?Math.round(t/Ji)+"h":e>=Vi?Math.round(t/Vi)+"m":e>=Qi?Math.round(t/Qi)+"s":t+"ms"}s(WM,"fmtShort");function KM(t){var e=Math.abs(t);return e>=ei?Ic(t,e,ei,"day"):e>=Ji?Ic(t,e,Ji,"hour"):e>=Vi?Ic(t,e,Vi,"minute"):e>=Qi?Ic(t,e,Qi,"second"):t+" ms"}s(KM,"fmtLong");function Ic(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}s(Ic,"plural")});var vd=M((Zz,Vb)=>{function GM(t){n.debug=n,n.default=n,n.coerce=d,n.disable=c,n.enable=o,n.enabled=u,n.humanize=Qb(),n.destroy=m,Object.keys(t).forEach(h=>{n[h]=t[h]}),n.names=[],n.skips=[],n.formatters={};function e(h){let y=0;for(let v=0;v{if(Se==="%%")return"%";J++;let Ke=n.formatters[Ie];if(typeof Ke=="function"){let Ge=I[J];Se=Ke.call(N,Ge),I.splice(J,1),J--}return Se}),n.formatArgs.call(N,I),(N.log||n.log).apply(N,I)}return s(E,"debug"),E.namespace=h,E.useColors=n.useColors(),E.color=n.selectColor(h),E.extend=r,E.destroy=n.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>v!==null?v:(P!==n.namespaces&&(P=n.namespaces,_=n.enabled(h)),_),set:I=>{v=I}}),typeof n.init=="function"&&n.init(E),E}s(n,"createDebug");function r(h,y){let v=n(this.namespace+(typeof y>"u"?":":y)+h);return v.log=this.log,v}s(r,"extend");function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y,v=(typeof h=="string"?h:"").split(/[\s,]+/),P=v.length;for(y=0;y"-"+y)].join(",");return n.enable(""),h}s(c,"disable");function u(h){if(h[h.length-1]==="*")return!0;let y,v;for(y=0,v=n.skips.length;y{Ft.formatArgs=VM;Ft.save=JM;Ft.load=YM;Ft.useColors=QM;Ft.storage=XM();Ft.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ft.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function QM(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(QM,"useColors");function VM(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Dc.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}s(VM,"formatArgs");Ft.log=console.debug||console.log||(()=>{});function JM(t){try{t?Ft.storage.setItem("debug",t):Ft.storage.removeItem("debug")}catch{}}s(JM,"save");function YM(){let t;try{t=Ft.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}s(YM,"load");function XM(){try{return localStorage}catch{}}s(XM,"localstorage");Dc.exports=vd()(Ft);var{formatters:ZM}=Dc.exports;ZM.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Xb=M((n4,Yb)=>{"use strict";Yb.exports=(t,e=process.argv)=>{let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),o=e.indexOf("--");return r!==-1&&(o===-1||r{"use strict";var e2=require("os"),Zb=require("tty"),Vt=Xb(),{env:Je}=process,gr;Vt("no-color")||Vt("no-colors")||Vt("color=false")||Vt("color=never")?gr=0:(Vt("color")||Vt("colors")||Vt("color=true")||Vt("color=always"))&&(gr=1);"FORCE_COLOR"in Je&&(Je.FORCE_COLOR==="true"?gr=1:Je.FORCE_COLOR==="false"?gr=0:gr=Je.FORCE_COLOR.length===0?1:Math.min(parseInt(Je.FORCE_COLOR,10),3));function bd(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}s(bd,"translateLevel");function wd(t,e){if(gr===0)return 0;if(Vt("color=16m")||Vt("color=full")||Vt("color=truecolor"))return 3;if(Vt("color=256"))return 2;if(t&&!e&&gr===void 0)return 0;let n=gr||0;if(Je.TERM==="dumb")return n;if(process.platform==="win32"){let r=e2.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Je)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Je)||Je.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Je)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Je.TEAMCITY_VERSION)?1:0;if(Je.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Je){let r=parseInt((Je.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Je.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Je.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Je.TERM)||"COLORTERM"in Je?1:n}s(wd,"supportsColor");function t2(t){let e=wd(t,t&&t.isTTY);return bd(e)}s(t2,"getSupportLevel");e0.exports={supportsColor:t2,stdout:bd(wd(!0,Zb.isatty(1))),stderr:bd(wd(!0,Zb.isatty(2)))}});var r0=M((it,Mc)=>{var n2=require("tty"),Lc=require("util");it.init=u2;it.log=a2;it.formatArgs=i2;it.save=s2;it.load=c2;it.useColors=r2;it.destroy=Lc.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");it.colors=[6,2,3,4,5,1];try{let t=t0();t&&(t.stderr||t).level>=2&&(it.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}it.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let n=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,c)=>c.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),t[n]=r,t},{});function r2(){return"colors"in it.inspectOpts?!!it.inspectOpts.colors:n2.isatty(process.stderr.fd)}s(r2,"useColors");function i2(t){let{namespace:e,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),c=` ${o};1m${e} \x1B[0m`;t[0]=c+t[0].split(` +`).join(` +`+c),t.push(o+"m+"+Mc.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=o2()+e+" "+t[0]}s(i2,"formatArgs");function o2(){return it.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(o2,"getDate");function a2(...t){return process.stderr.write(Lc.format(...t)+` +`)}s(a2,"log");function s2(t){t?process.env.DEBUG=t:delete process.env.DEBUG}s(s2,"save");function c2(){return process.env.DEBUG}s(c2,"load");function u2(t){t.inspectOpts={};let e=Object.keys(it.inspectOpts);for(let n=0;ne.trim()).join(" ")};n0.O=function(t){return this.inspectOpts.colors=this.useColors,Lc.inspect(t,this.inspectOpts)}});var da=M((a4,_d)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?_d.exports=Jb():_d.exports=r0()});var a0=M(Tt=>{"use strict";var l2=Tt&&Tt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),p2=Tt&&Tt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i0=Tt&&Tt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&l2(e,t,n);return p2(e,t),e};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.req=Tt.json=Tt.toBuffer=void 0;var d2=i0(require("http")),f2=i0(require("https"));async function o0(t){let e=0,n=[];for await(let r of t)e+=r.length,n.push(r);return Buffer.concat(n,e)}s(o0,"toBuffer");Tt.toBuffer=o0;async function h2(t){let n=(await o0(t)).toString("utf8");try{return JSON.parse(n)}catch(r){let o=r;throw o.message+=` (input: ${n})`,o}}s(h2,"json");Tt.json=h2;function m2(t,e={}){let r=((typeof t=="string"?t:t.href).startsWith("https:")?f2:d2).request(t,e),o=new Promise((c,u)=>{r.once("response",c).once("error",u).end()});return r.then=o.then.bind(o),r}s(m2,"req");Tt.req=m2});var Ed=M(qt=>{"use strict";var c0=qt&&qt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),g2=qt&&qt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u0=qt&&qt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&c0(e,t,n);return g2(e,t),e},y2=qt&&qt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&c0(e,t,n)};Object.defineProperty(qt,"__esModule",{value:!0});qt.Agent=void 0;var x2=u0(require("net")),s0=u0(require("http")),v2=require("https");y2(a0(),qt);var An=Symbol("AgentBaseInternalState"),Td=class Td extends s0.Agent{constructor(e){super(e),this[An]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` +`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let n=new x2.Socket({writable:!1});return this.sockets[e].push(n),this.totalSocketCount++,n}decrementSockets(e,n){if(!this.sockets[e]||n===null)return;let r=this.sockets[e],o=r.indexOf(n);o!==-1&&(r.splice(o,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?v2.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)},c=this.getName(o),u=this.incrementSockets(c);Promise.resolve().then(()=>this.connect(e,o)).then(p=>{if(this.decrementSockets(c,u),p instanceof s0.Agent)return p.addRequest(e,o);this[An].currentSocket=p,super.createSocket(e,n,r)},p=>{this.decrementSockets(c,u),r(p)})}createConnection(){let e=this[An].currentSocket;if(this[An].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[An].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[An]&&(this[An].defaultPort=e)}get protocol(){return this[An].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[An]&&(this[An].protocol=e)}};s(Td,"Agent");var Rd=Td;qt.Agent=Rd});var l0=M(Yi=>{"use strict";var b2=Yi&&Yi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.parseProxyResponse=void 0;var w2=b2(da()),Nc=(0,w2.default)("https-proxy-agent:parse-proxy-response");function _2(t){return new Promise((e,n)=>{let r=0,o=[];function c(){let h=t.read();h?m(h):t.once("readable",c)}s(c,"read");function u(){t.removeListener("end",p),t.removeListener("error",d),t.removeListener("readable",c)}s(u,"cleanup");function p(){u(),Nc("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}s(p,"onend");function d(h){u(),Nc("onerror %o",h),n(h)}s(d,"onerror");function m(h){o.push(h),r+=h.length;let y=Buffer.concat(o,r),v=y.indexOf(`\r +\r +`);if(v===-1){Nc("have not received end of HTTP headers yet..."),c();return}let P=y.slice(0,v).toString("ascii").split(`\r +`),_=P.shift();if(!_)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let E=_.split(" "),I=+E[1],N=E.slice(2).join(" "),H={};for(let j of P){if(!j)continue;let J=j.indexOf(":");if(J===-1)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${j}"`));let te=j.slice(0,J).toLowerCase(),Se=j.slice(J+1).trimStart(),Ie=H[te];typeof Ie=="string"?H[te]=[Ie,Se]:Array.isArray(Ie)?Ie.push(Se):H[te]=Se}Nc("got proxy server response: %o %o",_,H),u(),e({connect:{statusCode:I,statusText:N,headers:H},buffered:y})}s(m,"ondata"),t.on("error",d),t.on("end",p),c()})}s(_2,"parseProxyResponse");Yi.parseProxyResponse=_2});var m0=M(Jt=>{"use strict";var R2=Jt&&Jt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),T2=Jt&&Jt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),f0=Jt&&Jt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&R2(e,t,n);return T2(e,t),e},h0=Jt&&Jt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.HttpsProxyAgent=void 0;var fa=f0(require("net")),p0=f0(require("tls")),E2=h0(require("assert")),S2=h0(da()),P2=Ed(),A2=require("url"),C2=l0(),ha=(0,S2.default)("https-proxy-agent"),Sd=class Sd extends P2.Agent{constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new A2.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},ha("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?d0(n,"headers"):null,host:r,port:o}}async connect(e,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;if(r.protocol==="https:"){ha("Creating `tls.Socket`: %o",this.connectOpts);let v=this.connectOpts.servername||this.connectOpts.host;o=p0.connect({...this.connectOpts,servername:v&&fa.isIP(v)?void 0:v})}else ha("Creating `net.Socket`: %o",this.connectOpts),o=fa.connect(this.connectOpts);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},u=fa.isIPv6(n.host)?`[${n.host}]`:n.host,p=`CONNECT ${u}:${n.port} HTTP/1.1\r +`;if(r.username||r.password){let v=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(v).toString("base64")}`}c.Host=`${u}:${n.port}`,c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let v of Object.keys(c))p+=`${v}: ${c[v]}\r +`;let d=(0,C2.parseProxyResponse)(o);o.write(`${p}\r +`);let{connect:m,buffered:h}=await d;if(e.emit("proxyConnect",m),this.emit("proxyConnect",m,e),m.statusCode===200){if(e.once("socket",O2),n.secureEndpoint){ha("Upgrading socket connection to TLS");let v=n.servername||n.host;return p0.connect({...d0(n,"host","path","port"),socket:o,servername:fa.isIP(v)?void 0:v})}return o}o.destroy();let y=new fa.Socket({writable:!1});return y.readable=!0,e.once("socket",v=>{ha("Replaying proxy buffer for failed request"),(0,E2.default)(v.listenerCount("data")>0),v.push(h),v.push(null)}),y}};s(Sd,"HttpsProxyAgent");var kc=Sd;kc.protocols=["http","https"];Jt.HttpsProxyAgent=kc;function O2(t){t.resume()}s(O2,"resume");function d0(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}s(d0,"omit")});var x0=M(Yt=>{"use strict";var I2=Yt&&Yt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),D2=Yt&&Yt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),y0=Yt&&Yt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&I2(e,t,n);return D2(e,t),e},L2=Yt&&Yt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.HttpProxyAgent=void 0;var M2=y0(require("net")),N2=y0(require("tls")),k2=L2(da()),F2=require("events"),q2=Ed(),g0=require("url"),Xi=(0,k2.default)("http-proxy-agent"),Pd=class Pd extends q2.Agent{constructor(e,n){super(n),this.proxy=typeof e=="string"?new g0.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},Xi("Creating new HttpProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...n?B2(n,"headers"):null,host:r,port:o}}addRequest(e,n){e._header=null,this.setRequestProps(e,n),super.addRequest(e,n)}setRequestProps(e,n){let{proxy:r}=this,o=n.secureEndpoint?"https:":"http:",c=e.getHeader("host")||"localhost",u=`${o}//${c}`,p=new g0.URL(e.path,u);n.port!==80&&(p.port=String(n.port)),e.path=String(p);let d=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(r.username||r.password){let m=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;d["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}d["Proxy-Connection"]||(d["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(d)){let h=d[m];h&&e.setHeader(m,h)}}async connect(e,n){e._header=null,e.path.includes("://")||this.setRequestProps(e,n);let r,o;Xi("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Xi("Patching connection write() output buffer with updated header"),r=e.outputData[0].data,o=r.indexOf(`\r +\r +`)+4,e.outputData[0].data=e._header+r.substring(o),Xi("Output buffer: %o",e.outputData[0].data));let c;return this.proxy.protocol==="https:"?(Xi("Creating `tls.Socket`: %o",this.connectOpts),c=N2.connect(this.connectOpts)):(Xi("Creating `net.Socket`: %o",this.connectOpts),c=M2.connect(this.connectOpts)),await(0,F2.once)(c,"connect"),c}};s(Pd,"HttpProxyAgent");var Fc=Pd;Fc.protocols=["http","https"];Yt.HttpProxyAgent=Fc;function B2(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}s(B2,"omit")});var Ad=M(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.proxyPolicy=gt.getDefaultProxySettings=gt.loadNoProxy=gt.globalNoProxyList=gt.proxyPolicyName=void 0;var j2=m0(),U2=x0(),H2=Wr(),z2="HTTPS_PROXY",$2="HTTP_PROXY",W2="ALL_PROXY",K2="NO_PROXY";gt.proxyPolicyName="proxyPolicy";gt.globalNoProxyList=[];var w0=!1,G2=new Map;function qc(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}s(qc,"getEnvironmentValue");function _0(){if(!process)return;let t=qc(z2),e=qc(W2),n=qc($2);return t||e||n}s(_0,"loadEnvironmentProxyValue");function Q2(t,e,n){if(e.length===0)return!1;let r=new URL(t).hostname;if(n!=null&&n.has(r))return n.get(r);let o=!1;for(let c of e)c[0]==="."?(r.endsWith(c)||r.length===c.length-1&&r===c.slice(1))&&(o=!0):r===c&&(o=!0);return n==null||n.set(r,o),o}s(Q2,"isBypassed");function R0(){let t=qc(K2);return w0=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}s(R0,"loadNoProxy");gt.loadNoProxy=R0;function V2(t){if(!t&&(t=_0(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}s(V2,"getDefaultProxySettings");gt.getDefaultProxySettings=V2;function J2(){let t=_0();return t?new URL(t):void 0}s(J2,"getDefaultProxySettingsInternal");function v0(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}s(v0,"getUrlFromProxySettings");function b0(t,e,n){if(t.agent)return;let o=new URL(t.url).protocol!=="https:";t.tlsSettings&&H2.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let c=t.headers.toJSON();o?(e.httpProxyAgent||(e.httpProxyAgent=new U2.HttpProxyAgent(n,{headers:c})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new j2.HttpsProxyAgent(n,{headers:c})),t.agent=e.httpsProxyAgent)}s(b0,"setProxyAgentOnRequest");function Y2(t,e){w0||gt.globalNoProxyList.push(...R0());let n=t?v0(t):J2(),r={};return{name:gt.proxyPolicyName,async sendRequest(o,c){var u;return!o.proxySettings&&n&&!Q2(o.url,(u=e==null?void 0:e.customNoProxyList)!==null&&u!==void 0?u:gt.globalNoProxyList,e!=null&&e.customNoProxyList?void 0:G2)?b0(o,r,n):o.proxySettings&&b0(o,r,v0(o.proxySettings)),c(o)}}}s(Y2,"proxyPolicy");gt.proxyPolicy=Y2});var Cd=M(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.setClientRequestIdPolicy=ti.setClientRequestIdPolicyName=void 0;ti.setClientRequestIdPolicyName="setClientRequestIdPolicy";function X2(t="x-ms-client-request-id"){return{name:ti.setClientRequestIdPolicyName,async sendRequest(e,n){return e.headers.has(t)||e.headers.set(t,e.requestId),n(e)}}}s(X2,"setClientRequestIdPolicy");ti.setClientRequestIdPolicy=X2});var Od=M(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.tlsPolicy=ni.tlsPolicyName=void 0;ni.tlsPolicyName="tlsPolicy";function Z2(t){return{name:ni.tlsPolicyName,sendRequest:async(e,n)=>(e.tlsSettings||(e.tlsSettings=t),n(e))}}s(Z2,"tlsPolicy");ni.tlsPolicy=Z2});var Id=M(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.TracingContextImpl=Cn.createTracingContext=Cn.knownContextKeys=void 0;Cn.knownContextKeys={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function eN(t={}){let e=new Bc(t.parentContext);return t.span&&(e=e.setValue(Cn.knownContextKeys.span,t.span)),t.namespace&&(e=e.setValue(Cn.knownContextKeys.namespace,t.namespace)),e}s(eN,"createTracingContext");Cn.createTracingContext=eN;var Zi=class Zi{constructor(e){this._contextMap=e instanceof Zi?new Map(e._contextMap):new Map}setValue(e,n){let r=new Zi(this);return r._contextMap.set(e,n),r}getValue(e){return this._contextMap.get(e)}deleteValue(e){let n=new Zi(this);return n._contextMap.delete(e),n}};s(Zi,"TracingContextImpl");var Bc=Zi;Cn.TracingContextImpl=Bc});var T0=M(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.state=void 0;jc.state={instrumenterImplementation:void 0}});var Dd=M(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.getInstrumenter=On.useInstrumenter=On.createDefaultInstrumenter=On.createDefaultTracingSpan=void 0;var tN=Id(),Uc=T0();function E0(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}}}s(E0,"createDefaultTracingSpan");On.createDefaultTracingSpan=E0;function S0(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:E0(),tracingContext:(0,tN.createTracingContext)({parentContext:e.tracingContext})}),withContext(t,e,...n){return e(...n)}}}s(S0,"createDefaultInstrumenter");On.createDefaultInstrumenter=S0;function nN(t){Uc.state.instrumenterImplementation=t}s(nN,"useInstrumenter");On.useInstrumenter=nN;function rN(){return Uc.state.instrumenterImplementation||(Uc.state.instrumenterImplementation=S0()),Uc.state.instrumenterImplementation}s(rN,"getInstrumenter");On.getInstrumenter=rN});var P0=M(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.createTracingClient=void 0;var Hc=Dd(),Ld=Id();function iN(t){let{namespace:e,packageName:n,packageVersion:r}=t;function o(m,h,y){var v;let P=(0,Hc.getInstrumenter)().startSpan(m,Object.assign(Object.assign({},y),{packageName:n,packageVersion:r,tracingContext:(v=h==null?void 0:h.tracingOptions)===null||v===void 0?void 0:v.tracingContext})),_=P.tracingContext,E=P.span;_.getValue(Ld.knownContextKeys.namespace)||(_=_.setValue(Ld.knownContextKeys.namespace,e)),E.setAttribute("az.namespace",_.getValue(Ld.knownContextKeys.namespace));let I=Object.assign({},h,{tracingOptions:Object.assign(Object.assign({},h==null?void 0:h.tracingOptions),{tracingContext:_})});return{span:E,updatedOptions:I}}s(o,"startSpan");async function c(m,h,y,v){let{span:P,updatedOptions:_}=o(m,h,v);try{let E=await u(_.tracingOptions.tracingContext,()=>Promise.resolve(y(_,P)));return P.setStatus({status:"success"}),E}catch(E){throw P.setStatus({status:"error",error:E}),E}finally{P.end()}}s(c,"withSpan");function u(m,h,...y){return(0,Hc.getInstrumenter)().withContext(m,h,...y)}s(u,"withContext");function p(m){return(0,Hc.getInstrumenter)().parseTraceparentHeader(m)}s(p,"parseTraceparentHeader");function d(m){return(0,Hc.getInstrumenter)().createRequestHeaders(m)}return s(d,"createRequestHeaders"),{startSpan:o,withSpan:c,withContext:u,parseTraceparentHeader:p,createRequestHeaders:d}}s(iN,"createTracingClient");zc.createTracingClient=iN});var A0=M(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.createTracingClient=eo.useInstrumenter=void 0;var oN=Dd();Object.defineProperty(eo,"useInstrumenter",{enumerable:!0,get:function(){return oN.useInstrumenter}});var aN=P0();Object.defineProperty(eo,"createTracingClient",{enumerable:!0,get:function(){return aN.createTracingClient}})});var C0=M($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.custom=void 0;var sN=require("node:util");$c.custom=sN.inspect.custom});var Kc=M(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.isRestError=no.RestError=void 0;var cN=Sn(),uN=C0(),lN=nd(),pN=new lN.Sanitizer,Wc=class Wc extends Error{constructor(e,n={}){super(e),this.name="RestError",this.code=n.code,this.statusCode=n.statusCode,this.request=n.request,this.response=n.response,Object.setPrototypeOf(this,Wc.prototype)}[uN.custom](){return`RestError: ${this.message} + ${pN.sanitize(this)}`}};s(Wc,"RestError");var to=Wc;no.RestError=to;to.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";to.PARSE_ERROR="PARSE_ERROR";function dN(t){return t instanceof to?!0:(0,cN.isError)(t)&&t.name==="RestError"}s(dN,"isRestError");no.isRestError=dN});var Md=M(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.tracingPolicy=ri.tracingPolicyName=void 0;var fN=A0(),hN=fr(),mN=ad(),Gc=Wr(),ma=Sn(),gN=Kc();ri.tracingPolicyName="tracingPolicy";function yN(t={}){let e=(0,mN.getUserAgentValue)(t.userAgentPrefix),n=xN();return{name:ri.tracingPolicyName,async sendRequest(r,o){var c,u;if(!n||!(!((c=r.tracingOptions)===null||c===void 0)&&c.tracingContext))return o(r);let{span:p,tracingContext:d}=(u=vN(n,r,e))!==null&&u!==void 0?u:{};if(!p||!d)return o(r);try{let m=await n.withContext(d,o,r);return wN(p,m),m}catch(m){throw bN(p,m),m}}}}s(yN,"tracingPolicy");ri.tracingPolicy=yN;function xN(){try{return(0,fN.createTracingClient)({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:hN.SDK_VERSION})}catch(t){Gc.logger.warning(`Error when creating the TracingClient: ${(0,ma.getErrorMessage)(t)}`);return}}s(xN,"tryCreateTracingClient");function vN(t,e,n){try{let{span:r,updatedOptions:o}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":e.method,"http.url":e.url,requestId:e.requestId}});if(!r.isRecording()){r.end();return}n&&r.setAttribute("http.user_agent",n);let c=t.createRequestHeaders(o.tracingOptions.tracingContext);for(let[u,p]of Object.entries(c))e.headers.set(u,p);return{span:r,tracingContext:o.tracingOptions.tracingContext}}catch(r){Gc.logger.warning(`Skipping creating a tracing span due to an error: ${(0,ma.getErrorMessage)(r)}`);return}}s(vN,"tryCreateSpan");function bN(t,e){try{t.setStatus({status:"error",error:(0,ma.isError)(e)?e:void 0}),(0,gN.isRestError)(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(n){Gc.logger.warning(`Skipping tracing span processing due to an error: ${(0,ma.getErrorMessage)(n)}`)}}s(bN,"tryProcessError");function wN(t,e){try{t.setAttribute("http.status_code",e.status);let n=e.headers.get("x-ms-request-id");n&&t.setAttribute("serviceRequestId",n),t.setStatus({status:"success"}),t.end()}catch(n){Gc.logger.warning(`Skipping tracing span processing due to an error: ${(0,ma.getErrorMessage)(n)}`)}}s(wN,"tryProcessResponse")});var D0=M(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.createPipelineFromOptions=void 0;var _N=rd(),RN=Up(),TN=id(),EN=sd(),O0=ld(),SN=pd(),PN=md(),AN=xd(),I0=Sn(),CN=Ad(),ON=Cd(),IN=Od(),DN=Md();function LN(t){var e;let n=(0,RN.createEmptyPipeline)();return I0.isNodeLike&&(t.tlsOptions&&n.addPolicy((0,IN.tlsPolicy)(t.tlsOptions)),n.addPolicy((0,CN.proxyPolicy)(t.proxyOptions)),n.addPolicy((0,SN.decompressResponsePolicy)())),n.addPolicy((0,AN.formDataPolicy)(),{beforePolicies:[O0.multipartPolicyName]}),n.addPolicy((0,EN.userAgentPolicy)(t.userAgentOptions)),n.addPolicy((0,ON.setClientRequestIdPolicy)((e=t.telemetryOptions)===null||e===void 0?void 0:e.clientRequestIdHeaderName)),n.addPolicy((0,O0.multipartPolicy)(),{afterPhase:"Deserialize"}),n.addPolicy((0,PN.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),n.addPolicy((0,DN.tracingPolicy)(t.userAgentOptions),{afterPhase:"Retry"}),I0.isNodeLike&&n.addPolicy((0,TN.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),n.addPolicy((0,_N.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),n}s(LN,"createPipelineFromOptions");Qc.createPipelineFromOptions=LN});var q0=M(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.createNodeHttpClient=ro.getBodyLength=void 0;var qd=($r(),Hr(zr)),Nd=qd.__importStar(require("node:http")),kd=qd.__importStar(require("node:https")),L0=qd.__importStar(require("node:zlib")),MN=require("node:stream"),M0=Tc(),NN=pa(),xa=Kc(),ga=Wr(),kN={};function ya(t){return t&&typeof t.pipe=="function"}s(ya,"isReadableStream");function N0(t){return new Promise(e=>{t.on("close",e),t.on("end",e),t.on("error",e)})}s(N0,"isStreamComplete");function k0(t){return t&&typeof t.byteLength=="number"}s(k0,"isArrayBuffer");var Bd=class Bd extends MN.Transform{_transform(e,n,r){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),r()}catch(o){r(o)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}};s(Bd,"ReportTransform");var Vc=Bd,jd=class jd{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var n,r,o;let c=new AbortController,u;if(e.abortSignal){if(e.abortSignal.aborted)throw new M0.AbortError("The operation was aborted.");u=s(y=>{y.type==="abort"&&c.abort()},"abortListener"),e.abortSignal.addEventListener("abort",u)}e.timeout>0&&setTimeout(()=>{c.abort()},e.timeout);let p=e.headers.get("Accept-Encoding"),d=(p==null?void 0:p.includes("gzip"))||(p==null?void 0:p.includes("deflate")),m=typeof e.body=="function"?e.body():e.body;if(m&&!e.headers.has("Content-Length")){let y=F0(m);y!==null&&e.headers.set("Content-Length",y)}let h;try{if(m&&e.onUploadProgress){let I=e.onUploadProgress,N=new Vc(I);N.on("error",H=>{ga.logger.error("Error in upload progress",H)}),ya(m)?m.pipe(N):N.end(m),m=N}let y=await this.makeRequest(e,c,m),v=FN(y),_={status:(n=y.statusCode)!==null&&n!==void 0?n:0,headers:v,request:e};if(e.method==="HEAD")return y.resume(),_;h=d?qN(y,v):y;let E=e.onDownloadProgress;if(E){let I=new Vc(E);I.on("error",N=>{ga.logger.error("Error in download progress",N)}),h.pipe(I),h=I}return!((r=e.streamResponseStatusCodes)===null||r===void 0)&&r.has(Number.POSITIVE_INFINITY)||!((o=e.streamResponseStatusCodes)===null||o===void 0)&&o.has(_.status)?_.readableStreamBody=h:_.bodyAsText=await BN(h),_}finally{if(e.abortSignal&&u){let y=Promise.resolve();ya(m)&&(y=N0(m));let v=Promise.resolve();ya(h)&&(v=N0(h)),Promise.all([y,v]).then(()=>{var P;u&&((P=e.abortSignal)===null||P===void 0||P.removeEventListener("abort",u))}).catch(P=>{ga.logger.warning("Error when cleaning up abortListener on httpRequest",P)})}}}makeRequest(e,n,r){var o;let c=new URL(e.url),u=c.protocol!=="https:";if(u&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let d={agent:(o=e.agent)!==null&&o!==void 0?o:this.getOrCreateAgent(e,u),hostname:c.hostname,path:`${c.pathname}${c.search}`,port:c.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise((m,h)=>{let y=u?Nd.request(d,m):kd.request(d,m);y.once("error",v=>{var P;h(new xa.RestError(v.message,{code:(P=v.code)!==null&&P!==void 0?P:xa.RestError.REQUEST_SEND_ERROR,request:e}))}),n.signal.addEventListener("abort",()=>{let v=new M0.AbortError("The operation was aborted.");y.destroy(v),h(v)}),r&&ya(r)?r.pipe(y):r?typeof r=="string"||Buffer.isBuffer(r)?y.end(r):k0(r)?y.end(ArrayBuffer.isView(r)?Buffer.from(r.buffer):Buffer.from(r)):(ga.logger.error("Unrecognized body type",r),h(new xa.RestError("Unrecognized body type"))):y.end()})}getOrCreateAgent(e,n){var r;let o=e.disableKeepAlive;if(n)return o?Nd.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Nd.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(o&&!e.tlsSettings)return kd.globalAgent;let c=(r=e.tlsSettings)!==null&&r!==void 0?r:kN,u=this.cachedHttpsAgents.get(c);return u&&u.options.keepAlive===!o||(ga.logger.info("No cached TLS Agent exist, creating a new Agent"),u=new kd.Agent(Object.assign({keepAlive:!o},c)),this.cachedHttpsAgents.set(c,u)),u}}};s(jd,"NodeHttpClient");var Fd=jd;function FN(t){let e=(0,NN.createHttpHeaders)();for(let n of Object.keys(t.headers)){let r=t.headers[n];Array.isArray(r)?r.length>0&&e.set(n,r[0]):r&&e.set(n,r)}return e}s(FN,"getResponseHeaders");function qN(t,e){let n=e.get("Content-Encoding");if(n==="gzip"){let r=L0.createGunzip();return t.pipe(r),r}else if(n==="deflate"){let r=L0.createInflate();return t.pipe(r),r}return t}s(qN,"getDecodedResponseStream");function BN(t){return new Promise((e,n)=>{let r=[];t.on("data",o=>{Buffer.isBuffer(o)?r.push(o):r.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(r).toString("utf8"))}),t.on("error",o=>{o&&(o==null?void 0:o.name)==="AbortError"?n(o):n(new xa.RestError(`Error reading response as text: ${o.message}`,{code:xa.RestError.PARSE_ERROR}))})})}s(BN,"streamToText");function F0(t){return t?Buffer.isBuffer(t)?t.length:ya(t)?null:k0(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}s(F0,"getBodyLength");ro.getBodyLength=F0;function jN(){return new Fd}s(jN,"createNodeHttpClient");ro.createNodeHttpClient=jN});var B0=M(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.createDefaultHttpClient=void 0;var UN=q0();function HN(){return(0,UN.createNodeHttpClient)()}s(HN,"createDefaultHttpClient");Jc.createDefaultHttpClient=HN});var j0=M(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.createPipelineRequest=void 0;var zN=pa(),$N=Sn(),Hd=class Hd{constructor(e){var n,r,o,c,u,p,d;this.url=e.url,this.body=e.body,this.headers=(n=e.headers)!==null&&n!==void 0?n:(0,zN.createHttpHeaders)(),this.method=(r=e.method)!==null&&r!==void 0?r:"GET",this.timeout=(o=e.timeout)!==null&&o!==void 0?o:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=(c=e.disableKeepAlive)!==null&&c!==void 0?c:!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=(u=e.withCredentials)!==null&&u!==void 0?u:!1,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||(0,$N.randomUUID)(),this.allowInsecureConnection=(p=e.allowInsecureConnection)!==null&&p!==void 0?p:!1,this.enableBrowserStreams=(d=e.enableBrowserStreams)!==null&&d!==void 0?d:!1}};s(Hd,"PipelineRequestImpl");var Ud=Hd;function WN(t){return new Ud(t)}s(WN,"createPipelineRequest");Yc.createPipelineRequest=WN});var U0=M(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.exponentialRetryPolicy=io.exponentialRetryPolicyName=void 0;var KN=Pc(),GN=Gi(),QN=fr();io.exponentialRetryPolicyName="exponentialRetryPolicy";function VN(t={}){var e;return(0,GN.retryPolicy)([(0,KN.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreSystemErrors:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:QN.DEFAULT_RETRY_POLICY_COUNT})}s(VN,"exponentialRetryPolicy");io.exponentialRetryPolicy=VN});var H0=M(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.systemErrorRetryPolicy=ii.systemErrorRetryPolicyName=void 0;var JN=Pc(),YN=Gi(),XN=fr();ii.systemErrorRetryPolicyName="systemErrorRetryPolicy";function ZN(t={}){var e;return{name:ii.systemErrorRetryPolicyName,sendRequest:(0,YN.retryPolicy)([(0,JN.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreHttpStatusCodes:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:XN.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}s(ZN,"systemErrorRetryPolicy");ii.systemErrorRetryPolicy=ZN});var z0=M(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.throttlingRetryPolicy=oi.throttlingRetryPolicyName=void 0;var e3=Sc(),t3=Gi(),n3=fr();oi.throttlingRetryPolicyName="throttlingRetryPolicy";function r3(t={}){var e;return{name:oi.throttlingRetryPolicyName,sendRequest:(0,t3.retryPolicy)([(0,e3.throttlingRetryStrategy)()],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:n3.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}s(r3,"throttlingRetryPolicy");oi.throttlingRetryPolicy=r3});var zd=M(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.createTokenCycler=ai.DEFAULT_CYCLER_OPTIONS=void 0;var i3=Ec();ai.DEFAULT_CYCLER_OPTIONS={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function o3(t,e,n){async function r(){if(Date.now()t.getToken(d,m),"tryGetAccessToken"),c.retryIntervalInMs,(h=r==null?void 0:r.expiresOnTimestamp)!==null&&h!==void 0?h:Date.now()).then(v=>(n=null,r=v,o=m.tenantId,r)).catch(v=>{throw n=null,r=null,o=void 0,v})),n}return s(p,"refresh"),async(d,m)=>o!==m.tenantId||!!m.claims||u.mustRefresh?p(d,m):(u.shouldRefresh&&p(d,m),r)}s(a3,"createTokenCycler");ai.createTokenCycler=a3});var $0=M(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.bearerTokenAuthenticationPolicy=si.bearerTokenAuthenticationPolicyName=void 0;var s3=zd(),c3=Wr();si.bearerTokenAuthenticationPolicyName="bearerTokenAuthenticationPolicy";async function u3(t){let{scopes:e,getAccessToken:n,request:r}=t,o={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},c=await n(e,o);c&&t.request.headers.set("Authorization",`Bearer ${c.token}`)}s(u3,"defaultAuthorizeRequest");function l3(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}s(l3,"getChallenge");function p3(t){var e;let{credential:n,scopes:r,challengeCallbacks:o}=t,c=t.logger||c3.logger,u=Object.assign({authorizeRequest:(e=o==null?void 0:o.authorizeRequest)!==null&&e!==void 0?e:u3,authorizeRequestOnChallenge:o==null?void 0:o.authorizeRequestOnChallenge},o),p=n?(0,s3.createTokenCycler)(n):()=>Promise.resolve(null);return{name:si.bearerTokenAuthenticationPolicyName,async sendRequest(d,m){if(!d.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await u.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:d,getAccessToken:p,logger:c});let h,y;try{h=await m(d)}catch(v){y=v,h=v.response}if(u.authorizeRequestOnChallenge&&(h==null?void 0:h.status)===401&&l3(h)&&await u.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:d,response:h,getAccessToken:p,logger:c}))return m(d);if(y)throw y;return h}}}s(p3,"bearerTokenAuthenticationPolicy");si.bearerTokenAuthenticationPolicy=p3});var W0=M(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.ndJsonPolicy=ci.ndJsonPolicyName=void 0;ci.ndJsonPolicyName="ndJsonPolicy";function d3(){return{name:ci.ndJsonPolicyName,async sendRequest(t,e){if(typeof t.body=="string"&&t.body.startsWith("[")){let n=JSON.parse(t.body);Array.isArray(n)&&(t.body=n.map(r=>JSON.stringify(r)+` +`).join(""))}return e(t)}}}s(d3,"ndJsonPolicy");ci.ndJsonPolicy=d3});var G0=M(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.auxiliaryAuthenticationHeaderPolicy=yr.auxiliaryAuthenticationHeaderPolicyName=void 0;var f3=zd(),h3=Wr();yr.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var K0="x-ms-authorization-auxiliary";async function m3(t){var e,n;let{scopes:r,getAccessToken:o,request:c}=t,u={abortSignal:c.abortSignal,tracingOptions:c.tracingOptions};return(n=(e=await o(r,u))===null||e===void 0?void 0:e.token)!==null&&n!==void 0?n:""}s(m3,"sendAuthorizeRequest");function g3(t){let{credentials:e,scopes:n}=t,r=t.logger||h3.logger,o=new WeakMap;return{name:yr.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(c,u){if(!c.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return r.info(`${yr.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),u(c);let p=[];for(let m of e){let h=o.get(m);h||(h=(0,f3.createTokenCycler)(m),o.set(m,h)),p.push(m3({scopes:Array.isArray(n)?n:[n],request:c,getAccessToken:h,logger:r}))}let d=(await Promise.all(p)).filter(m=>!!m);return d.length===0?(r.warning(`None of the auxiliary tokens are valid. ${K0} header will not be set.`),u(c)):(c.headers.set(K0,d.map(m=>`Bearer ${m}`).join(", ")),u(c))}}}s(g3,"auxiliaryAuthenticationHeaderPolicy");yr.auxiliaryAuthenticationHeaderPolicy=g3});var pw=M(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.createFileFromStream=U.createFile=U.auxiliaryAuthenticationHeaderPolicyName=U.auxiliaryAuthenticationHeaderPolicy=U.ndJsonPolicyName=U.ndJsonPolicy=U.bearerTokenAuthenticationPolicyName=U.bearerTokenAuthenticationPolicy=U.formDataPolicyName=U.formDataPolicy=U.tlsPolicyName=U.tlsPolicy=U.userAgentPolicyName=U.userAgentPolicy=U.defaultRetryPolicy=U.tracingPolicyName=U.tracingPolicy=U.retryPolicy=U.throttlingRetryPolicyName=U.throttlingRetryPolicy=U.systemErrorRetryPolicyName=U.systemErrorRetryPolicy=U.redirectPolicyName=U.redirectPolicy=U.getDefaultProxySettings=U.proxyPolicyName=U.proxyPolicy=U.multipartPolicyName=U.multipartPolicy=U.logPolicyName=U.logPolicy=U.setClientRequestIdPolicyName=U.setClientRequestIdPolicy=U.exponentialRetryPolicyName=U.exponentialRetryPolicy=U.decompressResponsePolicyName=U.decompressResponsePolicy=U.isRestError=U.RestError=U.createPipelineRequest=U.createHttpHeaders=U.createDefaultHttpClient=U.createPipelineFromOptions=U.createEmptyPipeline=void 0;var y3=Up();Object.defineProperty(U,"createEmptyPipeline",{enumerable:!0,get:function(){return y3.createEmptyPipeline}});var x3=D0();Object.defineProperty(U,"createPipelineFromOptions",{enumerable:!0,get:function(){return x3.createPipelineFromOptions}});var v3=B0();Object.defineProperty(U,"createDefaultHttpClient",{enumerable:!0,get:function(){return v3.createDefaultHttpClient}});var b3=pa();Object.defineProperty(U,"createHttpHeaders",{enumerable:!0,get:function(){return b3.createHttpHeaders}});var w3=j0();Object.defineProperty(U,"createPipelineRequest",{enumerable:!0,get:function(){return w3.createPipelineRequest}});var Q0=Kc();Object.defineProperty(U,"RestError",{enumerable:!0,get:function(){return Q0.RestError}});Object.defineProperty(U,"isRestError",{enumerable:!0,get:function(){return Q0.isRestError}});var V0=pd();Object.defineProperty(U,"decompressResponsePolicy",{enumerable:!0,get:function(){return V0.decompressResponsePolicy}});Object.defineProperty(U,"decompressResponsePolicyName",{enumerable:!0,get:function(){return V0.decompressResponsePolicyName}});var J0=U0();Object.defineProperty(U,"exponentialRetryPolicy",{enumerable:!0,get:function(){return J0.exponentialRetryPolicy}});Object.defineProperty(U,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return J0.exponentialRetryPolicyName}});var Y0=Cd();Object.defineProperty(U,"setClientRequestIdPolicy",{enumerable:!0,get:function(){return Y0.setClientRequestIdPolicy}});Object.defineProperty(U,"setClientRequestIdPolicyName",{enumerable:!0,get:function(){return Y0.setClientRequestIdPolicyName}});var X0=rd();Object.defineProperty(U,"logPolicy",{enumerable:!0,get:function(){return X0.logPolicy}});Object.defineProperty(U,"logPolicyName",{enumerable:!0,get:function(){return X0.logPolicyName}});var Z0=ld();Object.defineProperty(U,"multipartPolicy",{enumerable:!0,get:function(){return Z0.multipartPolicy}});Object.defineProperty(U,"multipartPolicyName",{enumerable:!0,get:function(){return Z0.multipartPolicyName}});var $d=Ad();Object.defineProperty(U,"proxyPolicy",{enumerable:!0,get:function(){return $d.proxyPolicy}});Object.defineProperty(U,"proxyPolicyName",{enumerable:!0,get:function(){return $d.proxyPolicyName}});Object.defineProperty(U,"getDefaultProxySettings",{enumerable:!0,get:function(){return $d.getDefaultProxySettings}});var ew=id();Object.defineProperty(U,"redirectPolicy",{enumerable:!0,get:function(){return ew.redirectPolicy}});Object.defineProperty(U,"redirectPolicyName",{enumerable:!0,get:function(){return ew.redirectPolicyName}});var tw=H0();Object.defineProperty(U,"systemErrorRetryPolicy",{enumerable:!0,get:function(){return tw.systemErrorRetryPolicy}});Object.defineProperty(U,"systemErrorRetryPolicyName",{enumerable:!0,get:function(){return tw.systemErrorRetryPolicyName}});var nw=z0();Object.defineProperty(U,"throttlingRetryPolicy",{enumerable:!0,get:function(){return nw.throttlingRetryPolicy}});Object.defineProperty(U,"throttlingRetryPolicyName",{enumerable:!0,get:function(){return nw.throttlingRetryPolicyName}});var _3=Gi();Object.defineProperty(U,"retryPolicy",{enumerable:!0,get:function(){return _3.retryPolicy}});var rw=Md();Object.defineProperty(U,"tracingPolicy",{enumerable:!0,get:function(){return rw.tracingPolicy}});Object.defineProperty(U,"tracingPolicyName",{enumerable:!0,get:function(){return rw.tracingPolicyName}});var R3=md();Object.defineProperty(U,"defaultRetryPolicy",{enumerable:!0,get:function(){return R3.defaultRetryPolicy}});var iw=sd();Object.defineProperty(U,"userAgentPolicy",{enumerable:!0,get:function(){return iw.userAgentPolicy}});Object.defineProperty(U,"userAgentPolicyName",{enumerable:!0,get:function(){return iw.userAgentPolicyName}});var ow=Od();Object.defineProperty(U,"tlsPolicy",{enumerable:!0,get:function(){return ow.tlsPolicy}});Object.defineProperty(U,"tlsPolicyName",{enumerable:!0,get:function(){return ow.tlsPolicyName}});var aw=xd();Object.defineProperty(U,"formDataPolicy",{enumerable:!0,get:function(){return aw.formDataPolicy}});Object.defineProperty(U,"formDataPolicyName",{enumerable:!0,get:function(){return aw.formDataPolicyName}});var sw=$0();Object.defineProperty(U,"bearerTokenAuthenticationPolicy",{enumerable:!0,get:function(){return sw.bearerTokenAuthenticationPolicy}});Object.defineProperty(U,"bearerTokenAuthenticationPolicyName",{enumerable:!0,get:function(){return sw.bearerTokenAuthenticationPolicyName}});var cw=W0();Object.defineProperty(U,"ndJsonPolicy",{enumerable:!0,get:function(){return cw.ndJsonPolicy}});Object.defineProperty(U,"ndJsonPolicyName",{enumerable:!0,get:function(){return cw.ndJsonPolicyName}});var uw=G0();Object.defineProperty(U,"auxiliaryAuthenticationHeaderPolicy",{enumerable:!0,get:function(){return uw.auxiliaryAuthenticationHeaderPolicy}});Object.defineProperty(U,"auxiliaryAuthenticationHeaderPolicyName",{enumerable:!0,get:function(){return uw.auxiliaryAuthenticationHeaderPolicyName}});var lw=cd();Object.defineProperty(U,"createFile",{enumerable:!0,get:function(){return lw.createFile}});Object.defineProperty(U,"createFileFromStream",{enumerable:!0,get:function(){return lw.createFileFromStream}})});var fw=M((o8,dw)=>{var{EventEmitter:T3}=require("events"),Wd=class Wd{constructor(){this.eventEmitter=new T3,this.onabort=null,this.aborted=!1,this.reason=void 0}toString(){return"[object AbortSignal]"}get[Symbol.toStringTag](){return"AbortSignal"}removeEventListener(e,n){this.eventEmitter.removeListener(e,n)}addEventListener(e,n){this.eventEmitter.on(e,n)}dispatchEvent(e){let n={type:e,target:this},r=`on${e}`;typeof this[r]=="function"&&this[r](n),this.eventEmitter.emit(e,n)}throwIfAborted(){if(this.aborted)throw this.reason}static abort(e){let n=new va;return n.abort(),n.signal}static timeout(e){let n=new va;return setTimeout(()=>n.abort(new Error("TimeoutError")),e),n.signal}};s(Wd,"AbortSignal");var Xc=Wd,Kd=class Kd{constructor(){this.signal=new Xc}abort(e){this.signal.aborted||(this.signal.aborted=!0,e?this.signal.reason=e:this.signal.reason=new Error("AbortError"),this.signal.dispatchEvent("abort"))}toString(){return"[object AbortController]"}get[Symbol.toStringTag](){return"AbortController"}};s(Kd,"AbortController");var va=Kd;dw.exports={AbortController:va,AbortSignal:Xc}});var hw=M(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});function E3(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:""}s(E3,"getUserAgent");Gd.getUserAgent=E3});var gw=M((u8,mw)=>{"use strict";var R=class R extends Array{constructor(e,n){if(super(e),this.sign=n,e>R.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(e){var n=Math.floor,r=Number.isFinite;if(typeof e=="number"){if(e===0)return R.__zero();if(R.__isOneDigitInt(e))return 0>e?R.__oneDigit(-e,!0):R.__oneDigit(e,!1);if(!r(e)||n(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return R.__fromDouble(e)}if(typeof e=="string"){let o=R.__fromString(e);if(o===null)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return o}if(typeof e=="boolean")return e===!0?R.__oneDigit(1,!1):R.__zero();if(typeof e=="object"){if(e.constructor===R)return e;let o=R.__toPrimitive(e);return R.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){let e=["BigInt["];for(let n of this)e.push((n&&(n>>>0).toString(16))+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36>>=12;let y=m-12,v=12<=m?0:p<<20+m,P=20+m;for(0>>30-y,v=p<>>30-P,P-=30;let _=R.__decideRounding(e,P,d,p);if((_===1||_===0&&(1&v)==1)&&(v=v+1>>>0,v===0&&(h++,h>>>20!=0&&(h=0,u++,1023=R.__kMaxLengthBits)throw new RangeError("BigInt too big");if(e.length===1&&e.__digit(0)===2){let u=1+(0|r/30),p=e.sign&&(1&r)!=0,d=new R(u,p);d.__initializeDigits();let m=1<>=1;r!==0;r>>=1)c=R.multiply(c,c),1&r&&(o===null?o=c:o=R.multiply(o,c));return o}static multiply(e,n){if(e.length===0)return e;if(n.length===0)return n;let r=e.length+n.length;30<=e.__clzmsd()+n.__clzmsd()&&r--;let o=new R(r,e.sign!==n.sign);o.__initializeDigits();for(let c=0;cR.__absoluteCompare(e,n))return R.__zero();let r=e.sign!==n.sign,o=n.__unsignedDigit(0),c;if(n.length===1&&32767>=o){if(o===1)return r===e.sign?e:R.unaryMinus(e);c=R.__absoluteDivSmall(e,o,null)}else c=R.__absoluteDivLarge(e,n,!0,!1);return c.sign=r,c.__trim()}static remainder(e,n){if(n.length===0)throw new RangeError("Division by zero");if(0>R.__absoluteCompare(e,n))return e;let r=n.__unsignedDigit(0);if(n.length===1&&32767>=r){if(r===1)return R.__zero();let c=R.__absoluteModSmall(e,r);return c===0?R.__zero():R.__oneDigit(c,e.sign)}let o=R.__absoluteDivLarge(e,n,!1,!0);return o.sign=e.sign,o.__trim()}static add(e,n){let r=e.sign;return r===n.sign?R.__absoluteAdd(e,n,r):0<=R.__absoluteCompare(e,n)?R.__absoluteSub(e,n,r):R.__absoluteSub(n,e,!r)}static subtract(e,n){let r=e.sign;return r===n.sign?0<=R.__absoluteCompare(e,n)?R.__absoluteSub(e,n,r):R.__absoluteSub(n,e,!r):R.__absoluteAdd(e,n,r)}static leftShift(e,n){return n.length===0||e.length===0?e:n.sign?R.__rightShiftByAbsolute(e,n):R.__leftShiftByAbsolute(e,n)}static signedRightShift(e,n){return n.length===0||e.length===0?e:n.sign?R.__leftShiftByAbsolute(e,n):R.__rightShiftByAbsolute(e,n)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,n){return 0>R.__compareToBigInt(e,n)}static lessThanOrEqual(e,n){return 0>=R.__compareToBigInt(e,n)}static greaterThan(e,n){return 0e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return R.__zero();if(e>=R.__kMaxLengthBits)return n;let o=0|(e+29)/30;if(n.lengthe)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return R.__zero();if(n.sign){if(e>R.__kMaxLengthBits)throw new RangeError("BigInt too big");return R.__truncateAndSubFromPowerOfTwo(e,n,!1)}if(e>=R.__kMaxLengthBits)return n;let o=0|(e+29)/30;if(n.length>>c))?n:R.__truncateToNBits(e,n)}static ADD(e,n){if(e=R.__toPrimitive(e),n=R.__toPrimitive(n),typeof e=="string")return typeof n!="string"&&(n=n.toString()),e+n;if(typeof n=="string")return e.toString()+n;if(e=R.__toNumeric(e),n=R.__toNumeric(n),R.__isBigInt(e)&&R.__isBigInt(n))return R.add(e,n);if(typeof e=="number"&&typeof n=="number")return e+n;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,n){return R.__compare(e,n,0)}static LE(e,n){return R.__compare(e,n,1)}static GT(e,n){return R.__compare(e,n,2)}static GE(e,n){return R.__compare(e,n,3)}static EQ(e,n){for(;;){if(R.__isBigInt(e))return R.__isBigInt(n)?R.equal(e,n):R.EQ(n,e);if(typeof e=="number"){if(R.__isBigInt(n))return R.__equalToNumber(n,e);if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="string"){if(R.__isBigInt(n))return e=R.__fromString(e),e!==null&&R.equal(e,n);if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="boolean"){if(R.__isBigInt(n))return R.__equalToNumber(n,+e);if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="symbol"){if(R.__isBigInt(n))return!1;if(typeof n!="object")return e==n;n=R.__toPrimitive(n)}else if(typeof e=="object"){if(typeof n=="object"&&n.constructor!==R)return e==n;e=R.__toPrimitive(e)}else return e==n}}static NE(e,n){return!R.EQ(e,n)}static __zero(){return new R(0,!1)}static __oneDigit(e,n){let r=new R(1,n);return r.__setDigit(0,e),r}__copy(){let e=new R(this.length,this.sign);for(let n=0;nn)c=-n-1;else{if(r===0)return-1;r--,o=e.__digit(r),c=29}let u=1<>>20,r=n-1023,o=(0|r/30)+1,c=new R(o,0>e),u=1048575&R.__kBitConversionInts[1]|1048576,p=R.__kBitConversionInts[0],d=20,m=r%30,h,y=0;if(m<20){let v=d-m;y=v+32,h=u>>>v,u=u<<32-v|p>>>v,p<<=32-v}else if(m===20)y=32,h=u,u=p,p=0;else{let v=m-d;y=32-v,h=u<>>32-v,u=p<>>2,u=u<<30|p>>>2,p<<=30):h=0,c.__setDigit(v,h);return c.__trim()}static __isWhitespace(e){return 13>=e&&9<=e||(159>=e?e==32:131071>=e?e==160||e==5760:196607>=e?(e&=131071,10>=e||e==40||e==41||e==47||e==95||e==4096):e==65279)}static __fromString(e,n=0){let r=0,o=e.length,c=0;if(c===o)return R.__zero();let u=e.charCodeAt(c);for(;R.__isWhitespace(u);){if(++c===o)return R.__zero();u=e.charCodeAt(c)}if(u===43){if(++c===o)return null;u=e.charCodeAt(c),r=1}else if(u===45){if(++c===o)return null;u=e.charCodeAt(c),r=-1}if(n===0){if(n=10,u===48){if(++c===o)return R.__zero();if(u=e.charCodeAt(c),u===88||u===120){if(n=16,++c===o)return null;u=e.charCodeAt(c)}else if(u===79||u===111){if(n=8,++c===o)return null;u=e.charCodeAt(c)}else if(u===66||u===98){if(n=2,++c===o)return null;u=e.charCodeAt(c)}}}else if(n===16&&u===48){if(++c===o)return R.__zero();if(u=e.charCodeAt(c),u===88||u===120){if(++c===o)return null;u=e.charCodeAt(c)}}if(r!=0&&n!==10)return null;for(;u===48;){if(++c===o)return R.__zero();u=e.charCodeAt(c)}let p=o-c,d=R.__kMaxBitsPerChar[n],m=R.__kBitsPerCharTableMultiplier-1;if(p>1073741824/d)return null;let h=d*p+m>>>R.__kBitsPerCharTableShift,y=new R(0|(h+29)/30,!1),v=10>n?n:10,P=10>>0>>0>>R.__kBitsPerCharTableShift)/30;y.__inplaceMultiplyAdd(N,I,H)}while(!_)}else{d>>=R.__kBitsPerCharTableShift;let _=[],E=[],I=!1;do{let N=0,H=0;for(;;){let j;if(u-48>>>0>>0>>m-u)}if(c!==0){if(o>=e.length)throw new Error("implementation bug");e.__setDigit(o++,c)}for(;o>>1)+(85&o),o=(51&o>>>2)+(51&o),o=(15&o>>>4)+(15&o);let c=o,u=n-1,p=e.__digit(r-1),d=R.__clz30(p),m=0|(30*r-d+c-1)/c;if(e.sign&&m++,268435456>>H,P=30-H;P>=c;)h[y--]=R.__kConversionChars[v&u],v>>>=c,P-=c}let _=(v|p<>>c-P;v!==0;)h[y--]=R.__kConversionChars[v&u],v>>>=c;if(e.sign&&(h[y--]="-"),y!=-1)throw new Error("implementation bug");return h.join("")}static __toStringGeneric(e,n,r){let o=e.length;if(o===0)return"";if(o===1){let E=e.__unsignedDigit(0).toString(n);return r===!1&&e.sign&&(E="-"+E),E}let c=30*o-R.__clz30(e.__digit(o-1)),u=R.__kMaxBitsPerChar[n],p=u-1,d=c*R.__kBitsPerCharTableMultiplier;d+=p-1,d=0|d/p;let m=d+1>>1,h=R.exponentiate(R.__oneDigit(n,!1),R.__oneDigit(m,!1)),y,v,P=h.__unsignedDigit(0);if(h.length===1&&32767>=P){y=new R(e.length,!1),y.__initializeDigits();let E=0;for(let I=2*e.length-1;0<=I;I--){let N=E<<15|e.__halfDigit(I);y.__setHalfDigit(I,0|N/P),E=0|N%P}v=E.toString(n)}else{let E=R.__absoluteDivLarge(e,h,!0,!0);y=E.quotient;let I=E.remainder.__trim();v=R.__toStringGeneric(I,n,!0)}y.__trim();let _=R.__toStringGeneric(y,n,!0);for(;v.lengtho?R.__absoluteLess(r):0}static __compareToNumber(e,n){if(R.__isOneDigitInt(n)){let r=e.sign,o=0>n;if(r!==o)return R.__unequalSign(r);if(e.length===0){if(o)throw new Error("implementation bug");return n===0?0:-1}if(1c?R.__absoluteGreater(r):un)return R.__unequalSign(r);if(n===0)throw new Error("implementation bug: should be handled elsewhere");if(e.length===0)return-1;R.__kBitConversionDouble[0]=n;let o=2047&R.__kBitConversionInts[1]>>>20;if(o==2047)throw new Error("implementation bug: handled elsewhere");let c=o-1023;if(0>c)return R.__absoluteGreater(r);let u=e.length,p=e.__digit(u-1),d=R.__clz30(p),m=30*u-d,h=c+1;if(mh)return R.__absoluteGreater(r);let y=1048576|1048575&R.__kBitConversionInts[1],v=R.__kBitConversionInts[0],P=20,_=29-d;if(_!==(0|(m-1)%30))throw new Error("implementation bug");let E,I=0;if(20>_){let N=P-_;I=N+32,E=y>>>N,y=y<<32-N|v>>>N,v<<=32-N}else if(_===20)I=32,E=y,y=v,v=0;else{let N=_-P;I=32-N,E=y<>>32-N,y=v<>>=0,E>>>=0,p>E)return R.__absoluteGreater(r);if(p>>2,y=y<<30|v>>>2,v<<=30):E=0;let H=e.__unsignedDigit(N);if(H>E)return R.__absoluteGreater(r);if(Hn&&e.__unsignedDigit(0)===r(n):R.__compareToDouble(e,n)===0}static __comparisonResultToBool(e,n){return n===0?0>e:n===1?0>=e:n===2?0n;case 3:return e>=n}if(R.__isBigInt(e)&&typeof n=="string")return n=R.__fromString(n),n!==null&&R.__comparisonResultToBool(R.__compareToBigInt(e,n),r);if(typeof e=="string"&&R.__isBigInt(n))return e=R.__fromString(e),e!==null&&R.__comparisonResultToBool(R.__compareToBigInt(e,n),r);if(e=R.__toNumeric(e),n=R.__toNumeric(n),R.__isBigInt(e)){if(R.__isBigInt(n))return R.__comparisonResultToBool(R.__compareToBigInt(e,n),r);if(typeof n!="number")throw new Error("implementation bug");return R.__comparisonResultToBool(R.__compareToNumber(e,n),r)}if(typeof e!="number")throw new Error("implementation bug");if(R.__isBigInt(n))return R.__comparisonResultToBool(R.__compareToNumber(n,e),2^r);if(typeof n!="number")throw new Error("implementation bug");return r===0?en:r===3?e>=n:void 0}__clzmsd(){return R.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,n,r){if(e.length>>30,c.__setDigit(p,1073741823&d)}for(;p>>30,c.__setDigit(p,1073741823&d)}return p>>30,o.__setDigit(u,1073741823&p)}for(;u>>30,o.__setDigit(u,1073741823&p)}return o.__trim()}static __absoluteAddOne(e,n,r=null){let o=e.length;r===null?r=new R(o,n):r.sign=n;let c=1;for(let u=0;u>>30,r.__setDigit(u,1073741823&p)}return c!=0&&r.__setDigitGrow(o,1),r}static __absoluteSubOne(e,n){let r=e.length;n=n||r;let o=new R(n,!1),c=1;for(let u=0;u>>30,o.__setDigit(u,1073741823&p)}if(c!=0)throw new Error("implementation bug");for(let u=r;uo?0:e.__unsignedDigit(o)>n.__unsignedDigit(o)?1:-1}static __multiplyAccumulate(e,n,r,o){if(n===0)return;let c=32767&n,u=n>>>15,p=0,d=0;for(let m,h=0;h>>15,_=R.__imul(v,c),E=R.__imul(v,u),I=R.__imul(P,c),N=R.__imul(P,u);m+=d+_+p,p=m>>>30,m&=1073741823,m+=((32767&E)<<15)+((32767&I)<<15),p+=m>>>30,d=N+(E>>>15)+(I>>>15),r.__setDigit(o,1073741823&m)}for(;p!=0||d!==0;o++){let m=r.__digit(o);m+=p+d,d=0,p=m>>>30,r.__setDigit(o,1073741823&m)}}static __internalMultiplyAdd(e,n,r,o,c){let u=r,p=0;for(let d=0;d>>15,n),v=h+((32767&y)<<15)+p+u;u=v>>>30,p=y>>>15,c.__setDigit(d,1073741823&v)}if(c.length>o)for(c.__setDigit(o++,u+p);othis.length&&(r=this.length);let o=32767&e,c=e>>>15,u=0,p=n;for(let d=0;d>>15,v=R.__imul(h,o),P=R.__imul(h,c),_=R.__imul(y,o),E=R.__imul(y,c),I=p+v+u;u=I>>>30,I&=1073741823,I+=((32767&P)<<15)+((32767&_)<<15),u+=I>>>30,p=E+(P>>>15)+(_>>>15),this.__setDigit(d,1073741823&I)}if(u!=0||p!==0)throw new Error("implementation bug")}static __absoluteDivSmall(e,n,r=null){r===null&&(r=new R(e.length,!1));let o=0;for(let c,u=2*e.length-1;0<=u;u-=2){c=(o<<15|e.__halfDigit(u))>>>0;let p=0|c/n;o=0|c%n,c=(o<<15|e.__halfDigit(u-1))>>>0;let d=0|c/n;o=0|c%n,r.__setDigit(u>>>1,p<<15|d)}return r}static __absoluteModSmall(e,n){let r=0;for(let o=2*e.length-1;0<=o;o--)r=0|((r<<15|e.__halfDigit(o))>>>0)%n;return r}static __absoluteDivLarge(e,n,r,o){let c=n.__halfDigitLength(),u=n.length,p=e.__halfDigitLength()-c,d=null;r&&(d=new R(p+2>>>1,!1),d.__initializeDigits());let m=new R(c+2>>>1,!1);m.__initializeDigits();let h=R.__clz15(n.__halfDigit(c-1));0>>0;_=0|H/v;let j=0|H%v,J=n.__halfDigit(c-2),te=y.__halfDigit(E+c-2);for(;R.__imul(_,J)>>>0>(j<<16|te)>>>0&&(_--,j+=v,!(32767>>1,P|_))}if(o)return y.__inplaceRightShift(h),r?{quotient:d,remainder:y}:y;if(r)return d;throw new Error("unreachable")}static __clz15(e){return R.__clz30(e)-15}__inplaceAdd(e,n,r){let o=0;for(let c=0;c>>15,this.__setHalfDigit(n+c,32767&u)}return o}__inplaceSub(e,n,r){let o=0;if(1&n){n>>=1;let c=this.__digit(n),u=32767&c,p=0;for(;p>>1;p++){let h=e.__digit(p),y=(c>>>15)-(32767&h)-o;o=1&y>>>15,this.__setDigit(n+p,(32767&y)<<15|32767&u),c=this.__digit(n+p+1),u=(32767&c)-(h>>>15)-o,o=1&u>>>15}let d=e.__digit(p),m=(c>>>15)-(32767&d)-o;if(o=1&m>>>15,this.__setDigit(n+p,(32767&m)<<15|32767&u),n+p+1>=this.length)throw new RangeError("out of bounds");!(1&r)&&(c=this.__digit(n+p+1),u=(32767&c)-(d>>>15)-o,o=1&u>>>15,this.__setDigit(n+e.length,1073709056&c|32767&u))}else{n>>=1;let c=0;for(;c>>15;let P=(h>>>15)-(y>>>15)-o;o=1&P>>>15,this.__setDigit(n+c,(32767&P)<<15|32767&v)}let u=this.__digit(n+c),p=e.__digit(c),d=(32767&u)-(32767&p)-o;o=1&d>>>15;let m=0;!(1&r)&&(m=(u>>>15)-(p>>>15)-o,o=1&m>>>15),this.__setDigit(n+c,(32767&m)<<15|32767&d)}return o}__inplaceRightShift(e){if(e===0)return;let n=this.__digit(0)>>>e,r=this.length-1;for(let o=0;o>>e}this.__setDigit(r,n)}static __specialLeftShift(e,n,r){let o=e.length,c=new R(o+r,!1);if(n===0){for(let p=0;p>>30-n}return 0r)throw new RangeError("BigInt too big");let o=0|r/30,c=r%30,u=e.length,p=c!==0&&e.__digit(u-1)>>>30-c!=0,d=u+o+(p?1:0),m=new R(d,e.sign);if(c===0){let h=0;for(;h>>30-c}if(p)m.__setDigit(u+o,h);else if(h!==0)throw new Error("implementation bug")}return m.__trim()}static __rightShiftByAbsolute(e,n){let r=e.length,o=e.sign,c=R.__toShiftAmount(n);if(0>c)return R.__rightShiftByMaximum(o);let u=0|c/30,p=c%30,d=r-u;if(0>=d)return R.__rightShiftByMaximum(o);let m=!1;if(o){if(e.__digit(u)&(1<>>p,v=r-u-1;for(let P=0;P>>p}h.__setDigit(v,y)}return m&&(h=R.__absoluteAddOne(h,!0,h)),h.__trim()}static __rightShiftByMaximum(e){return e?R.__oneDigit(1,!0):R.__zero()}static __toShiftAmount(e){if(1R.__kMaxLengthBits?-1:n}static __toPrimitive(e,n="default"){if(typeof e!="object"||e.constructor===R)return e;if(typeof Symbol<"u"&&typeof Symbol.toPrimitive=="symbol"){let c=e[Symbol.toPrimitive];if(c){let u=c(n);if(typeof u!="object")return u;throw new TypeError("Cannot convert object to primitive value")}}let r=e.valueOf;if(r){let c=r.call(e);if(typeof c!="object")return c}let o=e.toString;if(o){let c=o.call(e);if(typeof c!="object")return c}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return R.__isBigInt(e)?e:+e}static __isBigInt(e){return typeof e=="object"&&e!==null&&e.constructor===R}static __truncateToNBits(e,n){let r=0|(e+29)/30,o=new R(r,n.sign),c=r-1;for(let p=0;p>>p}return o.__setDigit(c,u),o.__trim()}static __truncateAndSubFromPowerOfTwo(e,n,r){var o=Math.min;let c=0|(e+29)/30,u=new R(c,r),p=0,d=c-1,m=0;for(let P=o(d,n.length);p>>30,u.__setDigit(p,1073741823&_)}for(;p>>P;let _=1<<32-P;v=_-h-m,v&=_-1}return u.__setDigit(d,v),u.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,n){this[e]=0|n}__setDigitGrow(e,n){this[e]=0|n}__halfDigitLength(){let e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,n){let r=e>>>1,o=this.__digit(r),c=1&e?32767&o|n<<15:1073709056&o|32767&n;this.__setDigit(r,c)}static __digitPow(e,n){let r=1;for(;0>>=1,e*=e;return r}static __isOneDigitInt(e){return(1073741823&e)===e}};s(R,"JSBI");var Ye=R;Ye.__kMaxLength=33554432,Ye.__kMaxLengthBits=Ye.__kMaxLength<<5,Ye.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],Ye.__kBitsPerCharTableShift=5,Ye.__kBitsPerCharTableMultiplier=1<>>0)/Math.LN2)},Ye.__imul=Math.imul||function(t,e){return 0|t*e},mw.exports=Ye});var xw=M(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});var oo=new WeakMap,Zc=new WeakMap,eu=class eu{constructor(){this.onabort=null,oo.set(this,[]),Zc.set(this,!1)}get aborted(){if(!Zc.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Zc.get(this)}static get none(){return new eu}addEventListener(e,n){if(!oo.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");oo.get(this).push(n)}removeEventListener(e,n){if(!oo.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let r=oo.get(this),o=r.indexOf(n);o>-1&&r.splice(o,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};s(eu,"AbortSignal");var ba=eu;function yw(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=oo.get(t);e&&e.slice().forEach(n=>{n.call(t,{type:"abort"})}),Zc.set(t,!0)}s(yw,"abortSignal");var Jd=class Jd extends Error{constructor(e){super(e),this.name="AbortError"}};s(Jd,"AbortError");var Qd=Jd,Yd=class Yd{constructor(e){if(this._signal=new ba,!!e){Array.isArray(e)||(e=arguments);for(let n of e)n.aborted?this.abort():n.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){yw(this._signal)}static timeout(e){let n=new ba,r=setTimeout(yw,e,n);return typeof r.unref=="function"&&r.unref(),n}};s(Yd,"AbortController");var Vd=Yd;wa.AbortController=Vd;wa.AbortError=Qd;wa.AbortSignal=ba});var o_=M(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});var kw=require("crypto"),Of=(bv(),Hr(vv)),Ba=sc(),vr=($r(),Hr(zr)),S3=rb(),P3=ob(),A3=sb(),go=pw(),C3=fw(),O3=hw(),I3=gw(),D3=xw();function Pu(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}s(Pu,"_interopDefaultLegacy");var L3=Pu(S3),M3=Pu(P3),vw=Pu(A3),fe=Pu(I3),Fw="/_partitionKey",A={HttpHeaders:{Authorization:"authorization",ETag:"etag",MethodOverride:"X-HTTP-Method",Slug:"Slug",ContentType:"Content-Type",LastModified:"Last-Modified",ContentEncoding:"Content-Encoding",CharacterSet:"CharacterSet",UserAgent:"User-Agent",IfModifiedSince:"If-Modified-Since",IfMatch:"If-Match",IfNoneMatch:"If-None-Match",ContentLength:"Content-Length",AcceptEncoding:"Accept-Encoding",KeepAlive:"Keep-Alive",CacheControl:"Cache-Control",TransferEncoding:"Transfer-Encoding",ContentLanguage:"Content-Language",ContentLocation:"Content-Location",ContentMd5:"Content-Md5",ContentRange:"Content-Range",Accept:"Accept",AcceptCharset:"Accept-Charset",AcceptLanguage:"Accept-Language",IfRange:"If-Range",IfUnmodifiedSince:"If-Unmodified-Since",MaxForwards:"Max-Forwards",ProxyAuthorization:"Proxy-Authorization",AcceptRanges:"Accept-Ranges",ProxyAuthenticate:"Proxy-Authenticate",RetryAfter:"Retry-After",SetCookie:"Set-Cookie",WwwAuthenticate:"Www-Authenticate",Origin:"Origin",Host:"Host",AccessControlAllowOrigin:"Access-Control-Allow-Origin",AccessControlAllowHeaders:"Access-Control-Allow-Headers",KeyValueEncodingFormat:"application/x-www-form-urlencoded",WrapAssertionFormat:"wrap_assertion_format",WrapAssertion:"wrap_assertion",WrapScope:"wrap_scope",SimpleToken:"SWT",HttpDate:"date",Prefer:"Prefer",Location:"Location",Referer:"referer",A_IM:"A-IM",Query:"x-ms-documentdb-query",IsQuery:"x-ms-documentdb-isquery",IsQueryPlan:"x-ms-cosmos-is-query-plan-request",SupportedQueryFeatures:"x-ms-cosmos-supported-query-features",QueryVersion:"x-ms-cosmos-query-version",Continuation:"x-ms-continuation",PageSize:"x-ms-max-item-count",ItemCount:"x-ms-item-count",ActivityId:"x-ms-activity-id",PreTriggerInclude:"x-ms-documentdb-pre-trigger-include",PreTriggerExclude:"x-ms-documentdb-pre-trigger-exclude",PostTriggerInclude:"x-ms-documentdb-post-trigger-include",PostTriggerExclude:"x-ms-documentdb-post-trigger-exclude",IndexingDirective:"x-ms-indexing-directive",SessionToken:"x-ms-session-token",ConsistencyLevel:"x-ms-consistency-level",XDate:"x-ms-date",CollectionPartitionInfo:"x-ms-collection-partition-info",CollectionServiceInfo:"x-ms-collection-service-info",RetryAfterInMilliseconds:"x-ms-retry-after-ms",RetryAfterInMs:"x-ms-retry-after-ms",IsFeedUnfiltered:"x-ms-is-feed-unfiltered",ResourceTokenExpiry:"x-ms-documentdb-expiry-seconds",EnableScanInQuery:"x-ms-documentdb-query-enable-scan",EmitVerboseTracesInQuery:"x-ms-documentdb-query-emit-traces",EnableCrossPartitionQuery:"x-ms-documentdb-query-enablecrosspartition",ParallelizeCrossPartitionQuery:"x-ms-documentdb-query-parallelizecrosspartitionquery",ResponseContinuationTokenLimitInKB:"x-ms-documentdb-responsecontinuationtokenlimitinkb",PopulateQueryMetrics:"x-ms-documentdb-populatequerymetrics",QueryMetrics:"x-ms-documentdb-query-metrics",Version:"x-ms-version",OwnerFullName:"x-ms-alt-content-path",OwnerId:"x-ms-content-path",PartitionKey:"x-ms-documentdb-partitionkey",PartitionKeyRangeID:"x-ms-documentdb-partitionkeyrangeid",MaxEntityCount:"x-ms-root-entity-max-count",CurrentEntityCount:"x-ms-root-entity-current-count",CollectionQuotaInMb:"x-ms-collection-quota-mb",CollectionCurrentUsageInMb:"x-ms-collection-usage-mb",MaxMediaStorageUsageInMB:"x-ms-max-media-storage-usage-mb",CurrentMediaStorageUsageInMB:"x-ms-media-storage-usage-mb",RequestCharge:"x-ms-request-charge",PopulateQuotaInfo:"x-ms-documentdb-populatequotainfo",MaxResourceQuota:"x-ms-resource-quota",OfferType:"x-ms-offer-type",OfferThroughput:"x-ms-offer-throughput",AutoscaleSettings:"x-ms-cosmos-offer-autopilot-settings",DisableRUPerMinuteUsage:"x-ms-documentdb-disable-ru-per-minute-usage",IsRUPerMinuteUsed:"x-ms-documentdb-is-ru-per-minute-used",OfferIsRUPerMinuteThroughputEnabled:"x-ms-offer-is-ru-per-minute-throughput-enabled",IndexTransformationProgress:"x-ms-documentdb-collection-index-transformation-progress",LazyIndexingProgress:"x-ms-documentdb-collection-lazy-indexing-progress",IsUpsert:"x-ms-documentdb-is-upsert",SubStatus:"x-ms-substatus",EnableScriptLogging:"x-ms-documentdb-script-enable-logging",ScriptLogResults:"x-ms-documentdb-script-log-results",ALLOW_MULTIPLE_WRITES:"x-ms-cosmos-allow-tentative-writes",IsBatchRequest:"x-ms-cosmos-is-batch-request",IsBatchAtomic:"x-ms-cosmos-batch-atomic",BatchContinueOnError:"x-ms-cosmos-batch-continue-on-error",DedicatedGatewayPerRequestCacheStaleness:"x-ms-dedicatedgateway-max-age",ForceRefresh:"x-ms-force-refresh"},WritableLocations:"writableLocations",ReadableLocations:"readableLocations",LocationUnavailableExpirationTimeInMs:5*60*1e3,ENABLE_MULTIPLE_WRITABLE_LOCATIONS:"enableMultipleWriteLocations",DefaultUnavailableLocationExpirationTimeMS:5*60*1e3,ThrottleRetryCount:"x-ms-throttle-retry-count",ThrottleRetryWaitTimeInMs:"x-ms-throttle-retry-wait-time-ms",CurrentVersion:"2020-07-15",AzureNamespace:"Azure.Cosmos",AzurePackageName:"@azure/cosmos",SDKName:"azure-cosmos-js",SDKVersion:"3.17.3",DefaultMaxBulkRequestBodySizeInBytes:220201,Quota:{CollectionSize:"collectionSize"},Path:{Root:"/",DatabasesPathSegment:"dbs",CollectionsPathSegment:"colls",UsersPathSegment:"users",DocumentsPathSegment:"docs",PermissionsPathSegment:"permissions",StoredProceduresPathSegment:"sprocs",TriggersPathSegment:"triggers",UserDefinedFunctionsPathSegment:"udfs",ConflictsPathSegment:"conflicts",AttachmentsPathSegment:"attachments",PartitionKeyRangesPathSegment:"pkranges",SchemasPathSegment:"schemas",OffersPathSegment:"offers",TopologyPathSegment:"topology",DatabaseAccountPathSegment:"databaseaccount"},PartitionKeyRange:{MinInclusive:"minInclusive",MaxExclusive:"maxExclusive",Id:"id"},QueryRangeConstants:{MinInclusive:"minInclusive",MaxExclusive:"maxExclusive",min:"min"},EffectiveParitionKeyConstants:{MinimumInclusiveEffectivePartitionKey:"",MaximumExclusiveEffectivePartitionKey:"FF"},EffectivePartitionKeyConstants:{MinimumInclusiveEffectivePartitionKey:"",MaximumExclusiveEffectivePartitionKey:"FF"}};w.ResourceType=void 0;(function(t){t.none="",t.database="dbs",t.offer="offers",t.user="users",t.permission="permissions",t.container="colls",t.conflicts="conflicts",t.sproc="sprocs",t.udf="udfs",t.trigger="triggers",t.item="docs",t.pkranges="pkranges",t.partitionkey="partitionKey"})(w.ResourceType||(w.ResourceType={}));w.HTTPMethod=void 0;(function(t){t.get="GET",t.patch="PATCH",t.post="POST",t.put="PUT",t.delete="DELETE"})(w.HTTPMethod||(w.HTTPMethod={}));w.OperationType=void 0;(function(t){t.Create="create",t.Replace="replace",t.Upsert="upsert",t.Delete="delete",t.Read="read",t.Query="query",t.Execute="execute",t.Batch="batch",t.Patch="patch"})(w.OperationType||(w.OperationType={}));var co;(function(t){t.PrimaryMaster="PRIMARY_MASTER",t.SecondaryMaster="SECONDARY_MASTER",t.PrimaryReadOnly="PRIMARY_READONLY",t.SecondaryReadOnly="SECONDARY_READONLY"})(co||(co={}));var bw;(function(t){t.Item="ITEM",t.StoredProcedure="STORED_PROCEDURE",t.UserDefinedFunction="USER_DEFINED_FUNCTION",t.Trigger="TRIGGER"})(bw||(bw={}));var ww;(function(t){t[t.ScopeAccountReadValue=1]="ScopeAccountReadValue",t[t.ScopeAccountListDatabasesValue=2]="ScopeAccountListDatabasesValue",t[t.ScopeDatabaseReadValue=4]="ScopeDatabaseReadValue",t[t.ScopeDatabaseReadOfferValue=8]="ScopeDatabaseReadOfferValue",t[t.ScopeDatabaseListContainerValue=16]="ScopeDatabaseListContainerValue",t[t.ScopeContainerReadValue=32]="ScopeContainerReadValue",t[t.ScopeContainerReadOfferValue=64]="ScopeContainerReadOfferValue",t[t.ScopeAccountCreateDatabasesValue=1]="ScopeAccountCreateDatabasesValue",t[t.ScopeAccountDeleteDatabasesValue=2]="ScopeAccountDeleteDatabasesValue",t[t.ScopeDatabaseDeleteValue=4]="ScopeDatabaseDeleteValue",t[t.ScopeDatabaseReplaceOfferValue=8]="ScopeDatabaseReplaceOfferValue",t[t.ScopeDatabaseCreateContainerValue=16]="ScopeDatabaseCreateContainerValue",t[t.ScopeDatabaseDeleteContainerValue=32]="ScopeDatabaseDeleteContainerValue",t[t.ScopeContainerReplaceValue=64]="ScopeContainerReplaceValue",t[t.ScopeContainerDeleteValue=128]="ScopeContainerDeleteValue",t[t.ScopeContainerReplaceOfferValue=256]="ScopeContainerReplaceOfferValue",t[t.ScopeAccountReadAllAccessValue=65535]="ScopeAccountReadAllAccessValue",t[t.ScopeDatabaseReadAllAccessValue=124]="ScopeDatabaseReadAllAccessValue",t[t.ScopeContainersReadAllAccessValue=96]="ScopeContainersReadAllAccessValue",t[t.ScopeAccountWriteAllAccessValue=65535]="ScopeAccountWriteAllAccessValue",t[t.ScopeDatabaseWriteAllAccessValue=508]="ScopeDatabaseWriteAllAccessValue",t[t.ScopeContainersWriteAllAccessValue=448]="ScopeContainersWriteAllAccessValue",t[t.ScopeContainerExecuteQueriesValue=1]="ScopeContainerExecuteQueriesValue",t[t.ScopeContainerReadFeedsValue=2]="ScopeContainerReadFeedsValue",t[t.ScopeContainerReadStoredProceduresValue=4]="ScopeContainerReadStoredProceduresValue",t[t.ScopeContainerReadUserDefinedFunctionsValue=8]="ScopeContainerReadUserDefinedFunctionsValue",t[t.ScopeContainerReadTriggersValue=16]="ScopeContainerReadTriggersValue",t[t.ScopeContainerReadConflictsValue=32]="ScopeContainerReadConflictsValue",t[t.ScopeItemReadValue=64]="ScopeItemReadValue",t[t.ScopeStoredProcedureReadValue=128]="ScopeStoredProcedureReadValue",t[t.ScopeUserDefinedFunctionReadValue=256]="ScopeUserDefinedFunctionReadValue",t[t.ScopeTriggerReadValue=512]="ScopeTriggerReadValue",t[t.ScopeContainerCreateItemsValue=1]="ScopeContainerCreateItemsValue",t[t.ScopeContainerReplaceItemsValue=2]="ScopeContainerReplaceItemsValue",t[t.ScopeContainerUpsertItemsValue=4]="ScopeContainerUpsertItemsValue",t[t.ScopeContainerDeleteItemsValue=8]="ScopeContainerDeleteItemsValue",t[t.ScopeContainerCreateStoredProceduresValue=16]="ScopeContainerCreateStoredProceduresValue",t[t.ScopeContainerReplaceStoredProceduresValue=32]="ScopeContainerReplaceStoredProceduresValue",t[t.ScopeContainerDeleteStoredProceduresValue=64]="ScopeContainerDeleteStoredProceduresValue",t[t.ScopeContainerExecuteStoredProceduresValue=128]="ScopeContainerExecuteStoredProceduresValue",t[t.ScopeContainerCreateTriggersValue=256]="ScopeContainerCreateTriggersValue",t[t.ScopeContainerReplaceTriggersValue=512]="ScopeContainerReplaceTriggersValue",t[t.ScopeContainerDeleteTriggersValue=1024]="ScopeContainerDeleteTriggersValue",t[t.ScopeContainerCreateUserDefinedFunctionsValue=2048]="ScopeContainerCreateUserDefinedFunctionsValue",t[t.ScopeContainerReplaceUserDefinedFunctionsValue=4096]="ScopeContainerReplaceUserDefinedFunctionsValue",t[t.ScopeContainerDeleteUserDefinedFunctionSValue=8192]="ScopeContainerDeleteUserDefinedFunctionSValue",t[t.ScopeContainerDeleteCONFLICTSValue=16384]="ScopeContainerDeleteCONFLICTSValue",t[t.ScopeItemReplaceValue=65536]="ScopeItemReplaceValue",t[t.ScopeItemUpsertValue=131072]="ScopeItemUpsertValue",t[t.ScopeItemDeleteValue=262144]="ScopeItemDeleteValue",t[t.ScopeStoredProcedureReplaceValue=1048576]="ScopeStoredProcedureReplaceValue",t[t.ScopeStoredProcedureDeleteValue=2097152]="ScopeStoredProcedureDeleteValue",t[t.ScopeStoredProcedureExecuteValue=4194304]="ScopeStoredProcedureExecuteValue",t[t.ScopeUserDefinedFunctionReplaceValue=8388608]="ScopeUserDefinedFunctionReplaceValue",t[t.ScopeUserDefinedFunctionDeleteValue=16777216]="ScopeUserDefinedFunctionDeleteValue",t[t.ScopeTriggerReplaceValue=33554432]="ScopeTriggerReplaceValue",t[t.ScopeTriggerDeleteValue=67108864]="ScopeTriggerDeleteValue",t[t.ScopeContainerReadAllAccessValue=4294967295]="ScopeContainerReadAllAccessValue",t[t.ScopeItemReadAllAccessValue=65]="ScopeItemReadAllAccessValue",t[t.ScopeContainerWriteAllAccessValue=4294967295]="ScopeContainerWriteAllAccessValue",t[t.ScopeItemWriteAllAccessValue=458767]="ScopeItemWriteAllAccessValue",t[t.NoneValue=0]="NoneValue"})(ww||(ww={}));w.SasTokenPermissionKind=void 0;(function(t){t[t.ContainerCreateItems=1]="ContainerCreateItems",t[t.ContainerReplaceItems=2]="ContainerReplaceItems",t[t.ContainerUpsertItems=4]="ContainerUpsertItems",t[t.ContainerDeleteItems=128]="ContainerDeleteItems",t[t.ContainerExecuteQueries=1]="ContainerExecuteQueries",t[t.ContainerReadFeeds=2]="ContainerReadFeeds",t[t.ContainerCreateStoreProcedure=16]="ContainerCreateStoreProcedure",t[t.ContainerReadStoreProcedure=4]="ContainerReadStoreProcedure",t[t.ContainerReplaceStoreProcedure=32]="ContainerReplaceStoreProcedure",t[t.ContainerDeleteStoreProcedure=64]="ContainerDeleteStoreProcedure",t[t.ContainerCreateTriggers=256]="ContainerCreateTriggers",t[t.ContainerReadTriggers=16]="ContainerReadTriggers",t[t.ContainerReplaceTriggers=512]="ContainerReplaceTriggers",t[t.ContainerDeleteTriggers=1024]="ContainerDeleteTriggers",t[t.ContainerCreateUserDefinedFunctions=2048]="ContainerCreateUserDefinedFunctions",t[t.ContainerReadUserDefinedFunctions=8]="ContainerReadUserDefinedFunctions",t[t.ContainerReplaceUserDefinedFunctions=4096]="ContainerReplaceUserDefinedFunctions",t[t.ContainerDeleteUserDefinedFunctions=8192]="ContainerDeleteUserDefinedFunctions",t[t.ContainerExecuteStoredProcedure=128]="ContainerExecuteStoredProcedure",t[t.ContainerReadConflicts=32]="ContainerReadConflicts",t[t.ContainerDeleteConflicts=16384]="ContainerDeleteConflicts",t[t.ContainerReadAny=64]="ContainerReadAny",t[t.ContainerFullAccess=4294967295]="ContainerFullAccess",t[t.ItemReadAny=65536]="ItemReadAny",t[t.ItemFullAccess=65]="ItemFullAccess",t[t.ItemRead=64]="ItemRead",t[t.ItemReplace=65536]="ItemReplace",t[t.ItemUpsert=131072]="ItemUpsert",t[t.ItemDelete=262144]="ItemDelete",t[t.StoreProcedureRead=128]="StoreProcedureRead",t[t.StoreProcedureReplace=1048576]="StoreProcedureReplace",t[t.StoreProcedureDelete=2097152]="StoreProcedureDelete",t[t.StoreProcedureExecute=4194304]="StoreProcedureExecute",t[t.UserDefinedFuntionRead=256]="UserDefinedFuntionRead",t[t.UserDefinedFuntionReplace=8388608]="UserDefinedFuntionReplace",t[t.UserDefinedFuntionDelete=16777216]="UserDefinedFuntionDelete",t[t.TriggerRead=512]="TriggerRead",t[t.TriggerReplace=33554432]="TriggerReplace",t[t.TriggerDelete=67108864]="TriggerDelete"})(w.SasTokenPermissionKind||(w.SasTokenPermissionKind={}));var qw=new RegExp("^[/]+"),Bw=new RegExp("[/]+$"),N3=new RegExp("[/\\\\?#]"),k3=new RegExp("[/\\\\#]");function F3(t){return JSON.stringify(t).replace(/[\u007F-\uFFFF]/g,e=>"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4))}s(F3,"jsonStringifyAndEscapeNonASCII");function _w(t){if(t.length===0)return{type:void 0,objectBody:void 0};t[t.length-1]!=="/"&&(t=t+"/"),t[0]!=="/"&&(t="/"+t);let e=t.split("/"),n,r;return e.length%2===0?(n=e[e.length-2],r=e[e.length-3]):(n=e[e.length-3],r=e[e.length-2]),{type:r,objectBody:{id:n,self:t}}}s(_w,"parseLink");function If(t){return t===w.OperationType.Read||t===w.OperationType.Query}s(If,"isReadRequest");function q3(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}s(q3,"sleep");function Xd(t){return t.split("/").slice(0,4).join("/")}s(Xd,"getContainerLink");function fo(t){return t.replace(qw,"").replace(Bw,"")}s(fo,"trimSlashes");function B3(t){let e=[],n=0,r=s(()=>{throw new Error("Path "+t+" is invalid at index "+n)},"throwError"),o=s(()=>{let u=t[n],p=++n;for(;p=t.indexOf(u,p),p===-1&&r(),t[p-1]==="\\";)++p;let d=t.substr(n,p-n);return n=p+1,d},"getEscapedToken"),c=s(()=>{let u=t.indexOf("/",n),p=null;return u===-1?(p=t.substr(n),n=t.length):(p=t.substr(n,u-n),n=u),p=p.trim(),p},"getToken");for(;n{let[u,...p]=c.split("=");return o[u]=p.join("="),o},{});if(!n||!r)throw new Error("Could not parse the provided connection string");return{endpoint:n,key:r}}s(H3,"parseConnectionString");var vt={Ok:200,Created:201,Accepted:202,NoContent:204,NotModified:304,BadRequest:400,Unauthorized:401,Forbidden:403,NotFound:404,MethodNotAllowed:405,RequestTimeout:408,Conflict:409,Gone:410,PreconditionFailed:412,RequestEntityTooLarge:413,TooManyRequests:429,RetryWith:449,InternalServerError:500,ServiceUnavailable:503,ENOTFOUND:"ENOTFOUND",OperationPaused:1200,OperationCancelled:1201},ho={Unknown:0,CrossPartitionQueryNotServable:1004,PartitionKeyRangeGone:1002,ReadSessionNotAvailable:1002,WriteForbidden:3,DatabaseAccountNotFound:1008};function Df(t){return t=Dn(t),yi(t),A.Path.DatabasesPathSegment+"/"+t}s(Df,"createDatabaseUri");function ja(t,e){return e=Dn(e),yi(e),Df(t)+"/"+A.Path.CollectionsPathSegment+"/"+e}s(ja,"createDocumentCollectionUri");function Uw(t,e){return e=Dn(e),yi(e),Df(t)+"/"+A.Path.UsersPathSegment+"/"+e}s(Uw,"createUserUri");function z3(t,e,n){return n=Dn(n),j3(n),ja(t,e)+"/"+A.Path.DocumentsPathSegment+"/"+n}s(z3,"createDocumentUri");function $3(t,e,n){return n=Dn(n),yi(n),Uw(t,e)+"/"+A.Path.PermissionsPathSegment+"/"+n}s($3,"createPermissionUri");function W3(t,e,n){return n=Dn(n),yi(n),ja(t,e)+"/"+A.Path.StoredProceduresPathSegment+"/"+n}s(W3,"createStoredProcedureUri");function K3(t,e,n){return n=Dn(n),yi(n),ja(t,e)+"/"+A.Path.TriggersPathSegment+"/"+n}s(K3,"createTriggerUri");function G3(t,e,n){return n=Dn(n),yi(n),ja(t,e)+"/"+A.Path.UserDefinedFunctionsPathSegment+"/"+n}s(G3,"createUserDefinedFunctionUri");function hi(t,e){if(e&&e.paths&&e.paths.length>0){let n=[];return e.paths.forEach(r=>{let o=B3(r),c=t;for(let u of o)if(typeof c=="object"&&u in c)c=c[u];else{c=void 0;break}n.push(c)}),n.length===1&&n[0]===void 0?Sa(e):n}}s(hi,"extractPartitionKey");function Sa(t){return t.systemKey===!0?[]:[{}]}s(Sa,"undefinedPartitionKey");async function Hw(t,e){return kw.createHmac("sha256",Buffer.from(t,"base64")).update(e).digest("base64")}s(Hw,"hmac");async function Q3(t,e,n=w.ResourceType.none,r="",o=new Date){if(t.startsWith("type=sas&"))return{[A.HttpHeaders.Authorization]:encodeURIComponent(t),[A.HttpHeaders.XDate]:o.toUTCString()};let c=await V3(t,e,n,r,o);return{[A.HttpHeaders.Authorization]:c,[A.HttpHeaders.XDate]:o.toUTCString()}}s(Q3,"generateHeaders");async function V3(t,e,n,r="",o=new Date){let c="master",u="1.0",p=e.toLowerCase()+` +`+n.toLowerCase()+` +`+r+` +`+o.toUTCString().toLowerCase()+` + +`,d=await Hw(t,p);return encodeURIComponent("type="+c+"&ver="+u+"&sig="+d)}s(V3,"signature");async function J3(t,e,n,r,o,c){if(t.permissionFeed){t.resourceTokens={};for(let u of t.permissionFeed){let p=U3(u.resource);if(!p)throw new Error(`authorization error: ${p} is an invalid resourceId in permissionFeed`);t.resourceTokens[p]=u._token}}t.key?await zw(e,r,o,c,t.key):t.resourceTokens?c[A.HttpHeaders.Authorization]=encodeURIComponent(Y3(t.resourceTokens,n,r)):t.tokenProvider&&(c[A.HttpHeaders.Authorization]=encodeURIComponent(await t.tokenProvider({verb:e,path:n,resourceId:r,resourceType:o,headers:c})))}s(J3,"setAuthorizationHeader");async function zw(t,e,n,r,o){n===w.ResourceType.offer&&(e=e&&e.toLowerCase()),r=Object.assign(r,await Q3(o,t,n,e))}s(zw,"setAuthorizationTokenHeaderUsingMasterKey");function Y3(t,e,n){if(t&&Object.keys(t).length>0){if(!e&&!n)return t[Object.keys(t)[0]];if(n&&t[n])return t[n];if(!e||e.length<4)return null;e=Dn(e);let r=e&&e.split("/")||[];if(r.length===6){let c=r.slice(0,4).map(decodeURIComponent).join("/");if(t[c])return t[c]}let o=r.length%2===0?r.length-1:r.length-2;for(;o>0;o-=2){let c=decodeURI(r[o]);if(t[c])return t[c]}}return null}s(Y3,"getAuthorizationTokenUsingResourceTokens");var X3=Ba.createClientLogger("cosmosdb");function Z3(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s(Z3,"javaScriptFriendlyJSONStringify");function Lf(t){return typeof t=="object"?Z3(t):t}s(Lf,"bodyFromData");var Rw="application/json";async function ek({clientOptions:t,defaultHeaders:e,verb:n,path:r,resourceId:o,resourceType:c,options:u={},partitionKeyRangeId:p,useMultipleWriteLocations:d,partitionKey:m}){let h=Object.assign({[A.HttpHeaders.ResponseContinuationTokenLimitInKB]:1,[A.HttpHeaders.EnableCrossPartitionQuery]:!0},e);return d&&(h[A.HttpHeaders.ALLOW_MULTIPLE_WRITES]=!0),u.continuationTokenLimitInKB&&(h[A.HttpHeaders.ResponseContinuationTokenLimitInKB]=u.continuationTokenLimitInKB),u.continuationToken?h[A.HttpHeaders.Continuation]=u.continuationToken:u.continuation&&(h[A.HttpHeaders.Continuation]=u.continuation),u.preTriggerInclude&&(h[A.HttpHeaders.PreTriggerInclude]=u.preTriggerInclude.constructor===Array?u.preTriggerInclude.join(","):u.preTriggerInclude),u.postTriggerInclude&&(h[A.HttpHeaders.PostTriggerInclude]=u.postTriggerInclude.constructor===Array?u.postTriggerInclude.join(","):u.postTriggerInclude),u.offerType&&(h[A.HttpHeaders.OfferType]=u.offerType),u.offerThroughput&&(h[A.HttpHeaders.OfferThroughput]=u.offerThroughput),u.maxItemCount&&(h[A.HttpHeaders.PageSize]=u.maxItemCount),u.accessCondition&&(u.accessCondition.type==="IfMatch"?h[A.HttpHeaders.IfMatch]=u.accessCondition.condition:h[A.HttpHeaders.IfNoneMatch]=u.accessCondition.condition),u.useIncrementalFeed&&(h[A.HttpHeaders.A_IM]="Incremental Feed"),u.indexingDirective&&(h[A.HttpHeaders.IndexingDirective]=u.indexingDirective),u.consistencyLevel&&(h[A.HttpHeaders.ConsistencyLevel]=u.consistencyLevel),u.maxIntegratedCacheStalenessInMs&&c===w.ResourceType.item&&(typeof u.maxIntegratedCacheStalenessInMs=="number"?h[A.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness]=u.maxIntegratedCacheStalenessInMs.toString():(X3.error(`RangeError: maxIntegratedCacheStalenessInMs "${u.maxIntegratedCacheStalenessInMs}" is not a valid parameter.`),h[A.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness]="null")),u.resourceTokenExpirySeconds&&(h[A.HttpHeaders.ResourceTokenExpiry]=u.resourceTokenExpirySeconds),u.sessionToken&&(h[A.HttpHeaders.SessionToken]=u.sessionToken),u.enableScanInQuery&&(h[A.HttpHeaders.EnableScanInQuery]=u.enableScanInQuery),u.populateQuotaInfo&&(h[A.HttpHeaders.PopulateQuotaInfo]=u.populateQuotaInfo),u.populateQueryMetrics&&(h[A.HttpHeaders.PopulateQueryMetrics]=u.populateQueryMetrics),u.maxDegreeOfParallelism!==void 0&&(h[A.HttpHeaders.ParallelizeCrossPartitionQuery]=!0),u.populateQuotaInfo&&(h[A.HttpHeaders.PopulateQuotaInfo]=!0),m!==void 0&&!h[A.HttpHeaders.PartitionKey]&&((m===null||!Array.isArray(m))&&(m=[m]),h[A.HttpHeaders.PartitionKey]=F3(m)),(t.key||t.tokenProvider)&&(h[A.HttpHeaders.XDate]=new Date().toUTCString()),(n===w.HTTPMethod.post||n===w.HTTPMethod.put)&&(h[A.HttpHeaders.ContentType]||(h[A.HttpHeaders.ContentType]=Rw)),h[A.HttpHeaders.Accept]||(h[A.HttpHeaders.Accept]=Rw),p!==void 0&&(h[A.HttpHeaders.PartitionKeyRangeID]=p),u.enableScriptLogging&&(h[A.HttpHeaders.EnableScriptLogging]=u.enableScriptLogging),u.disableRUPerMinuteUsage&&(h[A.HttpHeaders.DisableRUPerMinuteUsage]=!0),(t.key||t.resourceTokens||t.tokenProvider||t.permissionFeed)&&await J3(t,n,r,o,c,h),h}s(ek,"getHeaders");var $w=Of.v4;function tk(t,e,n){let r=n.localeCompare(t)>=0,o=n.localeCompare(e)<0;return r&&o}s(tk,"isKeyInRange");var In={Create:"Create",Upsert:"Upsert",Read:"Read",Delete:"Delete",Replace:"Replace",Patch:"Patch"};function nk(t){return t.operationType!=="Patch"&&t.resourceBody!==void 0}s(nk,"hasResource");function rk(t,e){let n=nk(t)?sk(t.resourceBody,e):t.partitionKey&&t.partitionKey.replace(/[[\]"']/g,"")||t.partitionKey;return n==="{}"&&t.partitionKey==="[{}]"?{}:n==="null"&&t.partitionKey==="[null]"?null:n==="0"&&t.partitionKey==="[0]"?0:n}s(rk,"getPartitionKeyToHash");function ik(t,e,n={}){if((t.operationType===In.Create||t.operationType===In.Upsert)&&(t.resourceBody.id===void 0||t.resourceBody.id==="")&&!n.disableAutomaticIdGeneration&&(t.resourceBody.id=$w()),"partitionKey"in t){let r=hi(t,{paths:["/partitionKey"]});return Object.assign(Object.assign({},t),{partitionKey:JSON.stringify(r)})}else if(t.operationType===In.Create||t.operationType===In.Replace||t.operationType===In.Upsert){let r=hi(t.resourceBody,e);return Object.assign(Object.assign({},t),{partitionKey:JSON.stringify(r)})}else if(t.operationType===In.Read||t.operationType===In.Delete)return Object.assign(Object.assign({},t),{partitionKey:"[{}]"});return t}s(ik,"decorateOperation");function ok(t){if((t==null?void 0:t.operations)===void 0||t.operations.length<1)return[];let e=Tw(t.operations[0]),n=Object.assign(Object.assign({},t),{operations:[t.operations[0]],indexes:[t.indexes[0]]}),r=[];r.push(n);for(let o=1;oA.DefaultMaxBulkRequestBodySizeInBytes&&(n=Object.assign(Object.assign({},t),{operations:[],indexes:[]}),r.push(n),e=0),n.operations.push(c),n.indexes.push(t.indexes[o]),e+=u}return r}s(ok,"splitBatchBasedOnBodySize");function Tw(t){return new TextEncoder().encode(Lf(t)).length}s(Tw,"calculateObjectSizeInBytes");function ak(t,e={}){return(t.operationType===In.Create||t.operationType===In.Upsert)&&(t.resourceBody.id===void 0||t.resourceBody.id==="")&&!e.disableAutomaticIdGeneration&&(t.resourceBody.id=$w()),t}s(ak,"decorateBatchOperation");function sk(t,e){let n=e.split("/"),r=t;for(let o of n)if(o in r)r=r[o];else return o!=="_partitionKey"&&console.warn(`Partition key not found, using undefined: ${e} at ${o}`),"{}";return r}s(sk,"deepFind");var ck={add:"add",replace:"replace",remove:"remove",set:"set",incr:"incr"};w.ConnectionMode=void 0;(function(t){t[t.Gateway=0]="Gateway"})(w.ConnectionMode||(w.ConnectionMode={}));var Ew=Object.freeze({connectionMode:w.ConnectionMode.Gateway,requestTimeout:6e4,enableEndpointDiscovery:!0,preferredLocations:[],retryOptions:{maxRetryAttemptCount:9,fixedRetryIntervalInMilliseconds:0,maxWaitTimeInSeconds:30},useMultipleWriteLocations:!0,endpointRefreshRateInMs:3e5,enableBackgroundEndpointRefreshing:!0});w.ConsistencyLevel=void 0;(function(t){t.Strong="Strong",t.BoundedStaleness="BoundedStaleness",t.Session="Session",t.Eventual="Eventual",t.ConsistentPrefix="ConsistentPrefix"})(w.ConsistencyLevel||(w.ConsistencyLevel={}));var Ff=class Ff{constructor(e,n){this.writableLocations=[],this.readableLocations=[],this.databasesLink="/dbs/",this.mediaLink="/media/",this.maxMediaStorageUsageInMB=n[A.HttpHeaders.MaxMediaStorageUsageInMB],this.currentMediaStorageUsageInMB=n[A.HttpHeaders.CurrentMediaStorageUsageInMB],this.consistencyPolicy=e.userConsistencyPolicy?e.userConsistencyPolicy.defaultConsistencyLevel:w.ConsistencyLevel.Session,e[A.WritableLocations]&&e.id!=="localhost"&&(this.writableLocations=e[A.WritableLocations]),e[A.ReadableLocations]&&e.id!=="localhost"&&(this.readableLocations=e[A.ReadableLocations]),e[A.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]&&(this.enableMultipleWritableLocations=e[A.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]===!0||e[A.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]==="true")}get DatabasesLink(){return this.databasesLink}get MediaLink(){return this.mediaLink}get MaxMediaStorageUsageInMB(){return this.maxMediaStorageUsageInMB}get CurrentMediaStorageUsageInMB(){return this.currentMediaStorageUsageInMB}get ConsistencyPolicy(){return this.consistencyPolicy}};s(Ff,"DatabaseAccount");var tu=Ff;w.DataType=void 0;(function(t){t.Number="Number",t.String="String",t.Point="Point",t.LineString="LineString",t.Polygon="Polygon",t.MultiPolygon="MultiPolygon"})(w.DataType||(w.DataType={}));w.IndexingMode=void 0;(function(t){t.consistent="consistent",t.lazy="lazy",t.none="none"})(w.IndexingMode||(w.IndexingMode={}));w.SpatialType=void 0;(function(t){t.LineString="LineString",t.MultiPolygon="MultiPolygon",t.Point="Point",t.Polygon="Polygon"})(w.SpatialType||(w.SpatialType={}));w.IndexKind=void 0;(function(t){t.Range="Range",t.Spatial="Spatial"})(w.IndexKind||(w.IndexKind={}));w.PermissionMode=void 0;(function(t){t.None="none",t.Read="read",t.All="all"})(w.PermissionMode||(w.PermissionMode={}));w.TriggerOperation=void 0;(function(t){t.All="all",t.Create="create",t.Update="update",t.Delete="delete",t.Replace="replace"})(w.TriggerOperation||(w.TriggerOperation={}));w.TriggerType=void 0;(function(t){t.Pre="pre",t.Post="post"})(w.TriggerType||(w.TriggerType={}));w.UserDefinedFunctionType=void 0;(function(t){t.Javascript="Javascript"})(w.UserDefinedFunctionType||(w.UserDefinedFunctionType={}));w.GeospatialType=void 0;(function(t){t.Geography="Geography",t.Geometry="Geometry"})(w.GeospatialType||(w.GeospatialType={}));var qf=class qf extends Error{};s(qf,"ErrorResponse");var nu=qf,Bf=class Bf{constructor(e,n,r,o){this.resource=e,this.headers=n,this.statusCode=r,this.substatus=o}get requestCharge(){return Number(this.headers[A.HttpHeaders.RequestCharge])||0}get activityId(){return this.headers[A.HttpHeaders.ActivityId]}get etag(){return this.headers[A.HttpHeaders.ETag]}};s(Bf,"ResourceResponse");var ot=Bf,jf=class jf{constructor(e,n,r){this.resources=e,this.headers=n,this.hasMoreResults=r}get continuation(){return this.continuationToken}get continuationToken(){return this.headers[A.HttpHeaders.Continuation]}get queryMetrics(){return this.headers[A.HttpHeaders.QueryMetrics]}get requestCharge(){return this.headers[A.HttpHeaders.RequestCharge]}get activityId(){return this.headers[A.HttpHeaders.ActivityId]}};s(jf,"FeedResponse");var mo=jf,rf="TimeoutError",Uf=class Uf extends Error{constructor(e="Timeout Error"){super(e),this.code=rf,this.name=rf}};s(Uf,"TimeoutError");var ru=Uf,Ru=class Ru{constructor(e){this.requestCharge=e}add(...e){let n=this.requestCharge;for(let r of e){if(r==null)throw new Error("clientSideMetrics has null or undefined item(s)");n+=r.requestCharge}return new Ru(n)}static createFromArray(...e){if(e==null)throw new Error("clientSideMetricsArray is null or undefined item(s)");return this.zero.add(...e)}};s(Ru,"ClientSideMetrics");var Yn=Ru;Yn.zero=new Yn(0);var ue={RetrievedDocumentCount:"retrievedDocumentCount",RetrievedDocumentSize:"retrievedDocumentSize",OutputDocumentCount:"outputDocumentCount",OutputDocumentSize:"outputDocumentSize",IndexHitRatio:"indexUtilizationRatio",IndexHitDocumentCount:"indexHitDocumentCount",TotalQueryExecutionTimeInMs:"totalExecutionTimeInMs",QueryCompileTimeInMs:"queryCompileTimeInMs",LogicalPlanBuildTimeInMs:"queryLogicalPlanBuildTimeInMs",PhysicalPlanBuildTimeInMs:"queryPhysicalPlanBuildTimeInMs",QueryOptimizationTimeInMs:"queryOptimizationTimeInMs",IndexLookupTimeInMs:"indexLookupTimeInMs",DocumentLoadTimeInMs:"documentLoadTimeInMs",VMExecutionTimeInMs:"VMExecutionTimeInMs",DocumentWriteTimeInMs:"writeOutputTimeInMs",QueryEngineTimes:"queryEngineTimes",SystemFunctionExecuteTimeInMs:"systemFunctionExecuteTimeInMs",UserDefinedFunctionExecutionTimeInMs:"userFunctionExecuteTimeInMs",RetrievedDocumentCountText:"Retrieved Document Count",RetrievedDocumentSizeText:"Retrieved Document Size",OutputDocumentCountText:"Output Document Count",OutputDocumentSizeText:"Output Document Size",IndexUtilizationText:"Index Utilization",TotalQueryExecutionTimeText:"Total Query Execution Time",QueryPreparationTimesText:"Query Preparation Times",QueryCompileTimeText:"Query Compilation Time",LogicalPlanBuildTimeText:"Logical Plan Build Time",PhysicalPlanBuildTimeText:"Physical Plan Build Time",QueryOptimizationTimeText:"Query Optimization Time",QueryEngineTimesText:"Query Engine Times",IndexLookupTimeText:"Index Lookup Time",DocumentLoadTimeText:"Document Load Time",WriteOutputTimeText:"Document Write Time",RuntimeExecutionTimesText:"Runtime Execution Times",TotalExecutionTimeText:"Query Engine Execution Time",SystemFunctionExecuteTimeText:"System Function Execution Time",UserDefinedFunctionExecutionTimeText:"User-defined Function Execution Time",ClientSideQueryMetricsText:"Client Side Metrics",RetriesText:"Retry Count",RequestChargeText:"Request Charge",FetchExecutionRangesText:"Partition Execution Timeline",SchedulingMetricsText:"Scheduling Metrics"},li=1e4,uk=1/li,Mf=li*1e3,lk=1/Mf,Ww=Mf*60,pk=1/Ww,Nf=Ww*60,dk=1/Nf,Kw=Nf*24,fk=1/Kw,Gw=1e3,Qw=Gw*60,Vw=Qw*60,hk=Vw*24,Sw=Number.MAX_SAFE_INTEGER/li,Pw=Number.MIN_SAFE_INTEGER/li,$e=class $e{constructor(e,n,r,o,c){if(!Number.isInteger(e))throw new Error("days is not an integer");if(!Number.isInteger(n))throw new Error("hours is not an integer");if(!Number.isInteger(r))throw new Error("minutes is not an integer");if(!Number.isInteger(o))throw new Error("seconds is not an integer");if(!Number.isInteger(c))throw new Error("milliseconds is not an integer");let u=(e*3600*24+n*3600+r*60+o)*1e3+c;if(u>Sw||u=0?this._ticks:-this._ticks)}equals(e){return $e.isTimeSpan(e)?this._ticks===e._ticks:!1}negate(){return $e.fromTicks(-this._ticks)}days(){return Math.floor(this._ticks/Kw)}hours(){return Math.floor(this._ticks/Nf)}milliseconds(){return Math.floor(this._ticks/li)}seconds(){return Math.floor(this._ticks/Mf)}ticks(){return this._ticks}totalDays(){return this._ticks*fk}totalHours(){return this._ticks*dk}totalMilliseconds(){return this._ticks*uk}totalMinutes(){return this._ticks*pk}totalSeconds(){return this._ticks*lk}static fromTicks(e){let n=new $e(0,0,0,0,0);return n._ticks=e,n}static isTimeSpan(e){return e._ticks}static additionDoesOverflow(e,n){let r=e+n;return e!==r-n||n!==r-e}static subtractionDoesUnderflow(e,n){let r=e-n;return e!==r+n||n!==e-r}static compare(e,n){return e._ticks>n._ticks?1:e._ticksSw||r=this.fetchFunctions.length?(this.state=en.STATES.ended,{result:void 0,headers:n}):this.current():{result:this.resources[this.currentIndex],headers:n}}else return this.state=en.STATES.ended,{result:void 0,headers:Xe()}}hasMoreResults(){return this.state===en.STATES.start||this.continuationToken!==void 0||this.currentIndex=this.fetchFunctions.length)return{headers:Xe(),result:void 0};let e=this.options.continuationToken||this.options.continuation;if(this.options.continuationToken=this.continuationToken,this.currentPartitionIndex>=this.fetchFunctions.length)return{headers:Xe(),result:void 0};let n,r;try{let o;this.nextFetchFunction!==void 0?(Aw.verbose("using prefetch"),o=this.nextFetchFunction,this.nextFetchFunction=void 0):(Aw.verbose("using fresh fetch"),o=this.fetchFunctions[this.currentPartitionIndex](this.options));let c=await o;if(n=c.result,r=c.headers,this.continuationToken=r[A.HttpHeaders.Continuation],this.continuationToken||++this.currentPartitionIndex,this.options&&this.options.bufferItems===!0){let u=this.fetchFunctions[this.currentPartitionIndex];this.nextFetchFunction=u?u(Object.assign(Object.assign({},this.options),{continuationToken:this.continuationToken})):void 0}}catch(o){throw this.state=en.STATES.ended,o}if(this.state=en.STATES.inProgress,this.currentIndex=0,this.options.continuationToken=e,this.options.continuation=e,A.HttpHeaders.QueryMetrics in r){let o=r[A.HttpHeaders.QueryMetrics],c=Er.createFromDelimitedString(o);if(A.HttpHeaders.RequestCharge in r){let u=Number(r[A.HttpHeaders.RequestCharge])||0;c=new Er(c.retrievedDocumentCount,c.retrievedDocumentSize,c.outputDocumentCount,c.outputDocumentSize,c.indexHitDocumentCount,c.totalQueryExecutionTime,c.queryPreparationTimes,c.indexLookupTime,c.documentLoadTime,c.vmExecutionTime,c.runtimeExecutionTimes,c.documentWriteTime,new Yn(u))}r[A.HttpHeaders.QueryMetrics]={},r[A.HttpHeaders.QueryMetrics][0]=c}return{result:n,headers:r}}_canFetchMore(){return this.state===en.STATES.start||this.continuationToken&&this.state===en.STATES.inProgress||this.currentPartitionIndext===e?0:t>e?1:-1},number:{ord:4,compFunc:(t,e)=>t===e?0:t>e?1:-1},string:{ord:5,compFunc:(t,e)=>t===e?0:t>e?1:-1}}),$f=class $f{constructor(e){this.sortOrder=e}targetPartitionKeyRangeDocProdComparator(e,n){let r=e.getTargetParitionKeyRange().minInclusive,o=n.getTargetParitionKeyRange().minInclusive;return r===o?0:r>o?1:-1}compare(e,n){if(e.gotSplit())return-1;if(n.gotSplit())return 1;let r=this.getOrderByItems(e.peekBufferedItems()[0]),o=this.getOrderByItems(n.peekBufferedItems()[0]);this.validateOrderByItems(r,o);for(let c=0;c"u")throw new Error("Cannot find the comparison function");return d(e,r)}compareOrderByItem(e,n){let r=this.getType(e),o=this.getType(n);return this.compareValue(e.item,r,n.item,o)}validateOrderByItems(e,n){if(e.length!==n.length)throw new Error(`Expected ${e.length}, but got ${n.length}.`);if(e.length!==this.sortOrder.length)throw new Error("orderByItems cannot have a different size than sort orders.");for(let r=0;r0&&(this.value=e.max)}getResult(){return this.value}};s(Wf,"MaxAggregator");var cf=Wf,Kf=class Kf{constructor(){this.value=void 0,this.comparer=new Aa(["Ascending"])}aggregate(e){if(this.value===void 0)this.value=e.min;else{let n=e.min===null?"NoValue":typeof e.min,r=this.value===null?"NoValue":typeof this.value;this.comparer.compareValue(e.min,n,this.value,r)<0&&(this.value=e.min)}}getResult(){return this.value}};s(Kf,"MinAggregator");var uf=Kf,Gf=class Gf{aggregate(e){e!==void 0&&(this.sum===void 0?this.sum=e:this.sum+=e)}getResult(){return this.sum}};s(Gf,"SumAggregator");var lf=Gf,Qf=class Qf{aggregate(e){this.value===void 0&&(this.value=e)}getResult(){return this.value}};s(Qf,"StaticValueAggregator");var pf=Qf;function Jw(t){switch(t){case"Average":return new af;case"Count":return new sf;case"Max":return new cf;case"Min":return new uf;case"Sum":return new lf;default:return new pf}}s(Jw,"createAggregator");var Et;(function(t){t[t.Done=0]="Done",t[t.Exception=1]="Exception",t[t.Result=2]="Result"})(Et||(Et={}));var Vf=class Vf{constructor(e,n){e!==void 0?(this.feedResponse=e,this.fetchResultType=Et.Result):(this.error=n,this.fetchResultType=Et.Exception)}};s(Vf,"FetchResult");var iu=Vf,Ra=class Ra{constructor(e,n,r,o,c){this.clientContext=e,this.generation=0,this.fetchFunction=async u=>{let p=Q(this.collectionLink,w.ResourceType.item),d=X(this.collectionLink);return this.clientContext.queryFeed({path:p,resourceType:w.ResourceType.item,resourceId:d,resultFn:m=>m.Documents,query:this.query,options:u,partitionKeyRangeId:this.targetPartitionKeyRange.id})},this.collectionLink=n,this.query=r,this.targetPartitionKeyRange=o,this.fetchResults=[],this.allFetched=!1,this.err=void 0,this.previousContinuationToken=void 0,this.continuationToken=void 0,this.respHeaders=Xe(),this.internalExecutionContext=new Pa(c,this.fetchFunction)}peekBufferedItems(){let e=[];for(let n=0,r=!1;n{this.fetchResults.push(new iu(r,void 0))}),n!=null&&A.HttpHeaders.QueryMetrics in n){let r=n[A.HttpHeaders.QueryMetrics][0];n[A.HttpHeaders.QueryMetrics]={},n[A.HttpHeaders.QueryMetrics][this.targetPartitionKeyRange.id]=r}return{result:e,headers:n}}catch(e){if(Ra._needPartitionKeyRangeCacheRefresh(e)){let n=new iu(void 0,e);return this.fetchResults.push(n),{result:[n],headers:e.headers}}else throw this._updateStates(e,e.resources===void 0),e}}getTargetParitionKeyRange(){return this.targetPartitionKeyRange}async nextItem(){if(this.err)throw this._updateStates(this.err,void 0),this.err;try{let{result:e,headers:n}=await this.current(),r=this.fetchResults.shift();if(this._updateStates(void 0,e===void 0),r.feedResponse!==e)throw new Error(`Expected ${r.feedResponse} to equal ${e}`);switch(r.fetchResultType){case Et.Done:return{result:void 0,headers:n};case Et.Exception:throw r.error.headers=n,r.error;case Et.Result:return{result:r.feedResponse,headers:n}}}catch(e){throw this._updateStates(e,e.item===void 0),e}}async current(){if(this.fetchResults.length>0){let r=this.fetchResults[0];switch(r.fetchResultType){case Et.Done:return{result:void 0,headers:this._getAndResetActiveResponseHeaders()};case Et.Exception:throw r.error.headers=this._getAndResetActiveResponseHeaders(),r.error;case Et.Result:return{result:r.feedResponse,headers:this._getAndResetActiveResponseHeaders()}}}if(this.allFetched)return{result:void 0,headers:this._getAndResetActiveResponseHeaders()};let{result:e,headers:n}=await this.bufferMore();return gn(this.respHeaders,n),e===void 0?{result:void 0,headers:this.respHeaders}:this.current()}};s(Ra,"DocumentProducer");var df=Ra,Ta=class Ta{constructor(e,n,r,o){this.min=e,this.max=n,this.isMinInclusive=r,this.isMaxInclusive=o}overlaps(e){let n=this,r=e;return n===void 0||r===void 0||n.isEmpty()||r.isEmpty()?!1:n.min<=r.max||r.min<=n.max?!(n.min===r.max&&!(n.isMinInclusive&&r.isMaxInclusive)||r.min===n.max&&!(r.isMinInclusive&&n.isMaxInclusive)):!1}isFullRange(){return this.min===A.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey&&this.max===A.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey&&this.isMinInclusive===!0&&this.isMaxInclusive===!1}isEmpty(){return!(this.isMinInclusive&&this.isMaxInclusive)&&this.min===this.max}static parsePartitionKeyRange(e){return new Ta(e[A.PartitionKeyRange.MinInclusive],e[A.PartitionKeyRange.MaxExclusive],!0,!1)}static parseFromDict(e){return new Ta(e.min,e.max,e.isMinInclusive,e.isMaxInclusive)}};s(Ta,"QueryRange");var mi=Ta,Jf=class Jf{constructor(e,n){this.orderedPartitionKeyRanges=e,this.orderedRanges=e.map(r=>new mi(r[A.PartitionKeyRange.MinInclusive],r[A.PartitionKeyRange.MaxExclusive],!0,!1)),this.orderedPartitionInfo=n}getOrderedParitionKeyRanges(){return this.orderedPartitionKeyRanges}getOverlappingRanges(e){let n=Array.isArray(e)?e:[e],r={};for(let c of n){if(c.isEmpty())continue;if(c.isFullRange())return this.orderedPartitionKeyRanges;let u=this.orderedRanges.findIndex(d=>{if(c.min>d.min&&c.min=0;d--){let m=this.orderedRanges[d];if(c.max>m.min&&c.maxthis.orderedRanges.length)throw new Error("error in collection routing map, queried value is greater than the end range.");for(let d=u;dr[c]).sort((c,u)=>c[A.PartitionKeyRange.MinInclusive].localeCompare(u[A.PartitionKeyRange.MinInclusive]))}};s(Jf,"InMemoryCollectionRoutingMap");var ff=Jf;function gk(t,e){let n=t[0][A.PartitionKeyRange.MinInclusive],r=e[0][A.PartitionKeyRange.MinInclusive];return n>r?1:nu[0]),c=r.map(u=>u[1]);if(xk(o))return new ff(o,c)}s(yk,"createCompleteRoutingMap");function xk(t){let e=!1;if(t.length>0){let n=t[0],r=t[t.length-1];e=n[A.PartitionKeyRange.MinInclusive]===A.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey,e=e&&r[A.PartitionKeyRange.MaxExclusive]===A.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey;for(let o=1;ou[A.PartitionKeyRange.MinInclusive])throw Error("Ranges overlap");break}}}return e}s(xk,"isCompleteSetOfRange");var Yf=class Yf{constructor(e){this.clientContext=e,this.collectionRoutingMapByCollectionId={}}async onCollectionRoutingMap(e){let n=X(e);return this.collectionRoutingMapByCollectionId[n]===void 0&&(this.collectionRoutingMapByCollectionId[n]=this.requestCollectionRoutingMap(e)),this.collectionRoutingMapByCollectionId[n]}async getOverlappingRanges(e,n){return(await this.onCollectionRoutingMap(e)).getOverlappingRanges(n)}async requestCollectionRoutingMap(e){let{resources:n}=await this.clientContext.queryPartitionKeyRanges(e).fetchAll();return yk(n.map(r=>[r,!0]))}};s(Yf,"PartitionKeyRangeCache");var hf=Yf,vk=A.PartitionKeyRange,ui=class ui{constructor(e){this.partitionKeyRangeCache=new hf(e)}static _secondRangeIsAfterFirstRange(e,n){if(typeof e.max>"u")throw new Error("range1 must have max");if(typeof n.min>"u")throw new Error("range2 must have min");return e.max>n.min?!1:!(e.max===n.min&&e.isMaxInclusive&&n.isMinInclusive)}static _isSortedAndNonOverlapping(e){for(let n=1;n=n?e:n}static _stringCompare(e,n){return e===n?0:e>n?1:-1}static _subtractRange(e,n){let r=this._stringMax(n[vk.MaxExclusive],e.min),o=this._stringCompare(r,e.min)===0?e.isMinInclusive:!1;return new mi(r,e.max,o,e.isMaxInclusive)}async getOverlappingRanges(e,n){if(!ui._isSortedAndNonOverlapping(n))throw new Error("the list of ranges is not a non-overlapping sorted ranges");let r=[];if(n.length===0)return r;let o=await this.partitionKeyRangeCache.onCollectionRoutingMap(e),c=0,u=n[c];for(;;){if(u.isEmpty()){if(++c>=n.length)return r;u=n[c];continue}let p;r.length>0?p=ui._subtractRange(u,r[r.length-1]):p=u;let d=o.getOverlappingRanges(p);if(d.length<=0)throw new Error(`error: returned overlapping ranges for queryRange ${p} is empty`);r=r.concat(d);let m=mi.parsePartitionKeyRange(r[r.length-1]);if(!m)throw new Error("expected lastKnowTargetRange to be truthy");if(ui._stringCompare(u.max,m.max)>0)throw new Error(`error: returned overlapping ranges ${d} does not contain the requested range ${p}`);if(++c>=n.length)return r;for(u=n[c];ui._stringCompare(u.max,m.max)<=0;){if(++c>=n.length)return r;u=n[c]}}}};s(ui,"SmartRoutingMapProvider");var ou=ui,bk=Ba.createClientLogger("parallelQueryExecutionContextBase"),mf;(function(t){t.started="started",t.inProgress="inProgress",t.ended="ended"})(mf||(mf={}));var Vn=class Vn{constructor(e,n,r,o,c){this.clientContext=e,this.collectionLink=n,this.query=r,this.options=o,this.partitionedQueryExecutionInfo=c,this.clientContext=e,this.collectionLink=n,this.query=r,this.options=o,this.partitionedQueryExecutionInfo=c,this.err=void 0,this.state=Vn.STATES.started,this.routingProvider=new ou(this.clientContext),this.sortOrders=this.partitionedQueryExecutionInfo.queryInfo.orderBy,this.requestContinuation=o?o.continuationToken||o.continuation:null,this.respHeaders=Xe(),this.orderByPQ=new M3.default((p,d)=>this.documentProducerComparator(d,p)),this.sem=vw.default(1);let u=s(async()=>{try{let p=await this._onTargetPartitionRanges();this.waitingForInternalExecutionContexts=p.length;let d=o.maxDegreeOfParallelism===void 0||o.maxDegreeOfParallelism<1?p.length:Math.min(o.maxDegreeOfParallelism,p.length);bk.info("Query starting against "+p.length+" ranges with parallelism of "+d);let m=vw.default(d),h=[],y=[];if(this.requestContinuation)throw new Error("Continuation tokens are not yet supported for cross partition queries");h=p,h.forEach(v=>{y.push(this._createTargetPartitionQueryExecutionContext(v))}),y.forEach(v=>{let P=s(async()=>{try{let{result:_,headers:E}=await v.current();if(this._mergeWithActiveResponseHeaders(E),_===void 0)return;try{this.orderByPQ.enq(v)}catch(I){this.err=I}}catch(_){this._mergeWithActiveResponseHeaders(_.headers),this.err=_}finally{m.leave(),this._decrementInitiationLock()}},"throttledFunc");m.take(P)})}catch(p){this.err=p,this.sem.leave();return}},"createDocumentProducersAndFillUpPriorityQueueFunc");this.sem.take(u)}_decrementInitiationLock(){this.waitingForInternalExecutionContexts=this.waitingForInternalExecutionContexts-1,this.waitingForInternalExecutionContexts===0&&(this.sem.leave(),this.orderByPQ.size()===0&&(this.state=Vn.STATES.inProgress))}_mergeWithActiveResponseHeaders(e){gn(this.respHeaders,e)}_getAndResetActiveResponseHeaders(){let e=this.respHeaders;return this.respHeaders=Xe(),e}async _onTargetPartitionRanges(){let n=this.partitionedQueryExecutionInfo.queryRanges.map(r=>mi.parseFromDict(r));return this.routingProvider.getOverlappingRanges(this.collectionLink,n)}async _getReplacementPartitionKeyRanges(e){let n=e.targetPartitionKeyRange;this.routingProvider=new ou(this.clientContext);let r=mi.parsePartitionKeyRange(n);return this.routingProvider.getOverlappingRanges(this.collectionLink,[r])}async _repairExecutionContext(e){let n=this.orderByPQ.deq();try{let r=await this._getReplacementPartitionKeyRanges(n),o=[];r.forEach(p=>{let d=this._createTargetPartitionQueryExecutionContext(p,n.continuationToken);o.push(d)});let c=s(async(p,d)=>{try{let{result:m}=await p.current();m===void 0||this.orderByPQ.enq(p),await d()}catch(m){this.err=m;return}},"checkAndEnqueueDocumentProducer"),u=s(async p=>{if(p.length>0){let d=p.shift();await c(d,async()=>{await u(p)})}else return e()},"checkAndEnqueueDocumentProducers");await u(o)}catch(r){throw this.err=r,r}}static _needPartitionKeyRangeCacheRefresh(e){return e.code===vt.Gone&&"substatus"in e&&e.substatus===ho.PartitionKeyRangeGone}async _repairExecutionContextIfNeeded(e,n){let r=this.orderByPQ.peek();try{await r.current(),n()}catch(o){if(Vn._needPartitionKeyRangeCacheRefresh(o))return this._repairExecutionContext(e);throw this.err=o,o}}async nextItem(){if(this.err)throw this.err;return new Promise((e,n)=>{this.sem.take(()=>{if(this.err){this.sem.leave(),this.err.headers=this._getAndResetActiveResponseHeaders(),n(this.err);return}if(this.orderByPQ.size()===0)return this.state=Vn.STATES.ended,this.sem.leave(),e({result:void 0,headers:this._getAndResetActiveResponseHeaders()});let r=s(()=>(this.sem.leave(),e(this.nextItem())),"ifCallback"),o=s(async()=>{let c;try{c=this.orderByPQ.deq()}catch(d){this.err=d,this.sem.leave(),this.err.headers=this._getAndResetActiveResponseHeaders(),n(this.err);return}let u,p;try{let d=await c.nextItem();if(u=d.result,p=d.headers,this._mergeWithActiveResponseHeaders(p),u===void 0)return this.err=new Error("Extracted DocumentProducer from the priority queue doesn't have any buffered item!"),this.sem.leave(),e({result:void 0,headers:this._getAndResetActiveResponseHeaders()})}catch(d){this.err=new Error(`Extracted DocumentProducer from the priority queue fails to get the buffered item. Due to ${JSON.stringify(d)}`),this.err.headers=this._getAndResetActiveResponseHeaders(),this.sem.leave(),n(this.err);return}try{let{result:d,headers:m}=await c.current();if(this._mergeWithActiveResponseHeaders(m),d!==void 0)try{if(typeof c.fetchResults[0]>"u")throw new Error("Extracted DocumentProducer from PQ is invalid state with no result!");this.orderByPQ.enq(c)}catch(h){this.err=h}}catch(d){Vn._needPartitionKeyRangeCacheRefresh(d)?this.orderByPQ.enq(c):(this.err=d,n(this.err))}finally{this.sem.leave()}return e({result:u,headers:this._getAndResetActiveResponseHeaders()})},"elseCallback");this._repairExecutionContextIfNeeded(r,o).catch(n)})})}hasMoreResults(){return!(this.state===Vn.STATES.ended||this.err!==void 0)}_createTargetPartitionQueryExecutionContext(e,n){let r=this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery,o,c=this.query;typeof c=="string"?o={query:c}:o=c,r&&(o=JSON.parse(JSON.stringify(o)),r=r.replace("{documentdb-formattableorderbyquery-filter}","true"),o.query=r);let p=Object.assign({},this.options);return p.continuationToken=n,new df(this.clientContext,this.collectionLink,o,e,p)}};s(Vn,"ParallelQueryExecutionContextBase");var Ca=Vn;Ca.STATES=mf;var Xf=class Xf extends Ca{documentProducerComparator(e,n){return e.generation-n.generation}};s(Xf,"ParallelQueryExecutionContext");var gf=Xf,Zf=class Zf extends Ca{constructor(e,n,r,o,c){super(e,n,r,o,c),this.orderByComparator=new Aa(this.sortOrders)}documentProducerComparator(e,n){return this.orderByComparator.compare(e,n)}};s(Zf,"OrderByQueryExecutionContext");var yf=Zf,eh=class eh{constructor(e,n,r){this.executionContext=e,this.offset=n,this.limit=r}async nextItem(){let e=Xe();for(;this.offset>0;){let{headers:n}=await this.executionContext.nextItem();this.offset--,gn(e,n)}if(this.limit>0){let{result:n,headers:r}=await this.executionContext.nextItem();return this.limit--,gn(e,r),{result:n,headers:e}}return{result:void 0,headers:Xe()}}hasMoreResults(){return(this.offset>0||this.limit>0)&&this.executionContext.hasMoreResults()}};s(eh,"OffsetLimitEndpointComponent");var au=eh,th=class th{constructor(e){this.executionContext=e}async nextItem(){let{result:e,headers:n}=await this.executionContext.nextItem();return{result:e!==void 0?e.payload:void 0,headers:n}}hasMoreResults(){return this.executionContext.hasMoreResults()}};s(th,"OrderByEndpointComponent");var xf=th;async function wk(t){let e=kw.createHash("sha256");return e.update(t,"utf8"),e.digest("hex")}s(wk,"digest");async function Au(t){let e=L3.default(t);return wk(e)}s(Au,"hashObject");var nh=class nh{constructor(e){this.executionContext=e}async nextItem(){let{headers:e,result:n}=await this.executionContext.nextItem();if(n){let r=await Au(n);if(r===this.hashedLastResult)return{result:void 0,headers:e};this.hashedLastResult=r}return{result:n,headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()}};s(nh,"OrderedDistinctEndpointComponent");var vf=nh,rh=class rh{constructor(e){this.executionContext=e,this.hashedResults=new Set}async nextItem(){let{headers:e,result:n}=await this.executionContext.nextItem();if(n){let r=await Au(n);if(this.hashedResults.has(r))return{result:void 0,headers:e};this.hashedResults.add(r)}return{result:n,headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()}};s(rh,"UnorderedDistinctEndpointComponent");var bf=rh,Yw="__empty__",wf=s(t=>Object.keys(t).length>0?t.item2?t.item2:t.item:null,"extractAggregateResult"),ih=class ih{constructor(e,n){this.executionContext=e,this.queryInfo=n,this.groupings=new Map,this.aggregateResultArray=[],this.completed=!1}async nextItem(){if(this.aggregateResultArray.length>0)return{result:this.aggregateResultArray.pop(),headers:Xe()};if(this.completed)return{result:void 0,headers:Xe()};let e=Xe();for(;this.executionContext.hasMoreResults();){let{result:n,headers:r}=await this.executionContext.nextItem();if(gn(e,r),n){let o=n.groupByItems?await Au(n.groupByItems):Yw,c=this.groupings.get(o),u=n.payload;if(c)Object.keys(u).map(p=>{let d=u[p]?u[p]:new Map().set("item2",null),m=wf(d);c.get(p).aggregate(m)});else{let p=new Map;this.groupings.set(o,p),Object.keys(u).map(d=>{let m=this.queryInfo.groupByAliasToAggregateType[d],h=Jw(m);if(p.set(d,h),m){let y=wf(u[d]);h.aggregate(y)}else h.aggregate(u[d])})}}}for(let n of this.groupings.values()){let r={};for(let[o,c]of n.entries())r[o]=c.getResult();this.aggregateResultArray.push(r)}return this.completed=!0,{result:this.aggregateResultArray.pop(),headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()||this.aggregateResultArray.length>0}};s(ih,"GroupByEndpointComponent");var _f=ih,oh=class oh{constructor(e,n){this.executionContext=e,this.queryInfo=n,this.aggregators=new Map,this.aggregateResultArray=[],this.completed=!1,this.aggregateType=this.queryInfo.aggregates[0]}async nextItem(){if(this.aggregateResultArray.length>0)return{result:this.aggregateResultArray.pop(),headers:Xe()};if(this.completed)return{result:void 0,headers:Xe()};let e=Xe();for(;this.executionContext.hasMoreResults();){let{result:n,headers:r}=await this.executionContext.nextItem();if(gn(e,r),n){let o=Yw,c=n;if(n.groupByItems&&(c=n.payload,o=await Au(n.groupByItems)),this.aggregators.get(o)||this.aggregators.set(o,Jw(this.aggregateType)),this.aggregateType){let p=wf(c[0]);p===null&&(this.completed=!0),this.aggregators.get(o).aggregate(p)}else this.aggregators.get(o).aggregate(c)}}if(this.completed)return{result:void 0,headers:e};for(let n of this.aggregators.values())this.aggregateResultArray.push(n.getResult());return this.completed=!0,{result:this.aggregateResultArray.pop(),headers:e}}hasMoreResults(){return this.executionContext.hasMoreResults()||this.aggregateResultArray.length>0}};s(oh,"GroupByValueEndpointComponent");var Rf=oh,Tu=class Tu{constructor(e,n,r,o,c){this.clientContext=e,this.collectionLink=n,this.query=r,this.options=o,this.partitionedQueryExecutionInfo=c,this.endpoint=null,this.pageSize=o.maxItemCount,this.pageSize===void 0&&(this.pageSize=Tu.DEFAULT_PAGE_SIZE);let u=c.queryInfo.orderBy;Array.isArray(u)&&u.length>0?this.endpoint=new xf(new yf(this.clientContext,this.collectionLink,this.query,this.options,this.partitionedQueryExecutionInfo)):this.endpoint=new gf(this.clientContext,this.collectionLink,this.query,this.options,this.partitionedQueryExecutionInfo),(Object.keys(c.queryInfo.groupByAliasToAggregateType).length>0||c.queryInfo.aggregates.length>0||c.queryInfo.groupByExpressions.length>0)&&(c.queryInfo.hasSelectValue?this.endpoint=new Rf(this.endpoint,c.queryInfo):this.endpoint=new _f(this.endpoint,c.queryInfo));let p=c.queryInfo.top;typeof p=="number"&&(this.endpoint=new au(this.endpoint,0,p));let d=c.queryInfo.limit,m=c.queryInfo.offset;typeof d=="number"&&typeof m=="number"&&(this.endpoint=new au(this.endpoint,m,d));let h=c.queryInfo.distinctType;h==="Ordered"&&(this.endpoint=new vf(this.endpoint)),h==="Unordered"&&(this.endpoint=new bf(this.endpoint))}async nextItem(){return this.endpoint.nextItem()}hasMoreResults(){return this.endpoint.hasMoreResults()}async fetchMore(){return typeof this.endpoint.fetchMore=="function"?this.endpoint.fetchMore():(this.fetchBuffer=[],this.fetchMoreRespHeaders=Xe(),this._fetchMoreImplementation())}async _fetchMoreImplementation(){try{let{result:e,headers:n}=await this.endpoint.nextItem();if(gn(this.fetchMoreRespHeaders,n),e===void 0){if(this.fetchBuffer.length===0)return{result:void 0,headers:this.fetchMoreRespHeaders};{let r=this.fetchBuffer;return this.fetchBuffer=[],{result:r,headers:this.fetchMoreRespHeaders}}}else if(this.fetchBuffer.push(e),this.fetchBuffer.length>=this.pageSize){let r=this.fetchBuffer.slice(0,this.pageSize);return this.fetchBuffer=this.fetchBuffer.splice(this.pageSize),{result:r,headers:this.fetchMoreRespHeaders}}else return this._fetchMoreImplementation()}catch(e){if(gn(this.fetchMoreRespHeaders,e.headers),e.headers=this.fetchMoreRespHeaders,e)throw e}}};s(Tu,"PipelinedQueryExecutionContext");var su=Tu;su.DEFAULT_PAGE_SIZE=10;var ah=class ah{constructor(e,n,r,o,c,u){this.clientContext=e,this.query=n,this.options=r,this.fetchFunctions=o,this.resourceLink=c,this.resourceType=u,this.query=n,this.fetchFunctions=o,this.options=r||{},this.resourceLink=c,this.fetchAllLastResHeaders=Xe(),this.reset(),this.isInitialized=!1}getAsyncIterator(){return vr.__asyncGenerator(this,arguments,s(function*(){for(this.reset(),this.queryPlanPromise=this.fetchQueryPlan();this.queryExecutionContext.hasMoreResults();){let n;try{n=yield vr.__await(this.queryExecutionContext.fetchMore())}catch(o){if(this.needsQueryPlan(o)){yield vr.__await(this.createPipelinedExecutionContext());try{n=yield vr.__await(this.queryExecutionContext.fetchMore())}catch(c){this.handleSplitError(c)}}else throw o}let r=new mo(n.result,n.headers,this.queryExecutionContext.hasMoreResults());n.result!==void 0&&(yield yield vr.__await(r))}},"getAsyncIterator_1"))}hasMoreResults(){return this.queryExecutionContext.hasMoreResults()}async fetchAll(){this.reset(),this.fetchAllTempResources=[];let e;try{e=await this.toArrayImplementation()}catch(n){this.handleSplitError(n)}return e}async fetchNext(){this.queryPlanPromise=this.fetchQueryPlan(),this.isInitialized||await this.init();let e;try{e=await this.queryExecutionContext.fetchMore()}catch(n){if(this.needsQueryPlan(n)){await this.createPipelinedExecutionContext();try{e=await this.queryExecutionContext.fetchMore()}catch(r){this.handleSplitError(r)}}else throw n}return new mo(e.result,e.headers,this.queryExecutionContext.hasMoreResults())}reset(){this.queryPlanPromise=void 0,this.queryExecutionContext=new Pa(this.options,this.fetchFunctions)}async toArrayImplementation(){for(this.queryPlanPromise=this.fetchQueryPlan(),this.isInitialized||await this.init();this.queryExecutionContext.hasMoreResults();){let e;try{e=await this.queryExecutionContext.nextItem()}catch(o){if(this.needsQueryPlan(o))await this.createPipelinedExecutionContext(),e=await this.queryExecutionContext.nextItem();else throw o}let{result:n,headers:r}=e;gn(this.fetchAllLastResHeaders,r),n!==void 0&&this.fetchAllTempResources.push(n)}return new mo(this.fetchAllTempResources,this.fetchAllLastResHeaders,this.queryExecutionContext.hasMoreResults())}async createPipelinedExecutionContext(){let e=await this.queryPlanPromise;if(e instanceof Error)throw e;let n=e.result,r=n.queryInfo;if(r.aggregates.length>0&&r.hasSelectValue===!1)throw new Error("Aggregate queries must use the VALUE keyword");this.queryExecutionContext=new su(this.clientContext,this.resourceLink,this.query,this.options,n)}async fetchQueryPlan(){return!this.queryPlanPromise&&this.resourceType===w.ResourceType.item?this.clientContext.getQueryPlan(Q(this.resourceLink)+"/docs",w.ResourceType.item,this.resourceLink,this.query,this.options).catch(e=>e):this.queryPlanPromise}needsQueryPlan(e){var n;if(!((n=e.body)===null||n===void 0)&&n.additionalErrorInfo||e.message.includes("Cross partition query only supports"))return e.code===vt.BadRequest&&this.resourceType===w.ResourceType.item;throw e}async init(){if(this.isInitialized!==!0)return this.initPromise===void 0&&(this.initPromise=this._init()),this.initPromise}async _init(){this.options.forceQueryPlan===!0&&this.resourceType===w.ResourceType.item&&await this.createPipelinedExecutionContext(),this.isInitialized=!0}handleSplitError(e){if(e.code===410){let n=new Error("Encountered partition split and could not recover. This request is retryable");throw n.code=503,n.originalError=e,n}else throw e}};s(ah,"QueryIterator");var St=ah,sh=class sh extends ot{constructor(e,n,r,o){super(e,n,r),this.conflict=o}};s(sh,"ConflictResponse");var Oa=sh,ch=class ch{constructor(e,n,r,o){this.container=e,this.id=n,this.clientContext=r,this.partitionKey=o,this.partitionKey=o}get url(){return`/${this.container.url}/${A.Path.ConflictsPathSegment}/${this.id}`}async read(e){let n=Q(this.url,w.ResourceType.conflicts),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.user,resourceId:r,options:e});return new Oa(o.result,o.headers,o.code,this)}async delete(e){if(this.partitionKey===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();this.partitionKey=Sa(c)}let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.conflicts,resourceId:r,options:e,partitionKey:this.partitionKey});return new Oa(o.result,o.headers,o.code,this)}};s(ch,"Conflict");var cu=ch,uh=class uh{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=Q(this.container.url,w.ResourceType.conflicts),o=X(this.container.url);return new St(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.conflicts,resourceId:o,resultFn:u=>u.Conflicts,query:e,options:c}))}readAll(e){return this.query(void 0,e)}};s(uh,"Conflicts");var uu=uh;w.ConflictResolutionMode=void 0;(function(t){t.Custom="Custom",t.LastWriterWins="LastWriterWins"})(w.ConflictResolutionMode||(w.ConflictResolutionMode={}));var lh=class lh extends ot{constructor(e,n,r,o,c){super(e,n,r,o),this.item=c}};s(lh,"ItemResponse");var Jn=lh,ph=class ph{constructor(e,n,r,o){this.container=e,this.id=n,this.clientContext=o,this.partitionKey=r}get url(){return z3(this.container.database.id,this.container.id,this.id)}async read(e={}){if(this.partitionKey===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();this.partitionKey=Sa(c)}let n=Q(this.url),r=X(this.url),o;try{o=await this.clientContext.read({path:n,resourceType:w.ResourceType.item,resourceId:r,options:e,partitionKey:this.partitionKey})}catch(c){if(c.code!==vt.NotFound)throw c;o=c}return new Jn(o.result,o.headers,o.code,o.substatus,this)}async replace(e,n={}){if(this.partitionKey===void 0){let{resource:p}=await this.container.readPartitionKeyDefinition();this.partitionKey=hi(e,p)}let r={};if(!nf(e,r))throw r;let o=Q(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.item,resourceId:c,options:n,partitionKey:this.partitionKey});return new Jn(u.result,u.headers,u.code,u.substatus,this)}async delete(e={}){if(this.partitionKey===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();this.partitionKey=Sa(c)}let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.item,resourceId:r,options:e,partitionKey:this.partitionKey});return new Jn(o.result,o.headers,o.code,o.substatus,this)}async patch(e,n={}){if(this.partitionKey===void 0){let{resource:u}=await this.container.readPartitionKeyDefinition();this.partitionKey=hi(e,u)}let r=Q(this.url),o=X(this.url),c=await this.clientContext.patch({body:e,path:r,resourceType:w.ResourceType.item,resourceId:o,options:n,partitionKey:this.partitionKey});return new Jn(c.result,c.headers,c.code,c.substatus,this)}};s(ph,"Item");var yo=ph,dh=class dh{constructor(e,n,r,o){this.result=e,this.count=n,this.statusCode=r,this.headers=Object.freeze(o)}get requestCharge(){let e=this.headers[A.HttpHeaders.RequestCharge];return e?parseInt(e,10):null}get activityId(){return this.headers[A.HttpHeaders.ActivityId]}get continuation(){return this.etag}get sessionToken(){return this.headers[A.HttpHeaders.SessionToken]}get etag(){return this.headers[A.HttpHeaders.ETag]}};s(dh,"ChangeFeedResponse");var lu=dh,Eu=class Eu{constructor(e,n,r,o,c){this.clientContext=e,this.resourceId=n,this.resourceLink=r,this.partitionKey=o,this.changeFeedOptions=c;let u=o!==void 0;this.isPartitionSpecified=u;let p=!0;c.continuation&&(this.nextIfNoneMatch=c.continuation,p=!1),c.startTime&&(this.ifModifiedSince=c.startTime.toUTCString(),p=!1),p&&!c.startFromBeginning&&(this.nextIfNoneMatch=Eu.IfNoneMatchAllHeaderValue)}get hasMoreResults(){return this.lastStatusCode!==vt.NotModified}getAsyncIterator(){return vr.__asyncGenerator(this,arguments,s(function*(){do{let n=yield vr.__await(this.fetchNext());n.count>0&&(yield yield vr.__await(n))}while(this.hasMoreResults)},"getAsyncIterator_1"))}async fetchNext(){let e=await this.getFeedResponse();return this.lastStatusCode=e.statusCode,this.nextIfNoneMatch=e.headers[A.HttpHeaders.ETag],e}async getFeedResponse(){if(!this.isPartitionSpecified)throw new Error("Container is partitioned, but no partition key or partition key range id was specified.");let e={initialHeaders:{},useIncrementalFeed:!0};typeof this.changeFeedOptions.maxItemCount=="number"&&(e.maxItemCount=this.changeFeedOptions.maxItemCount),this.changeFeedOptions.sessionToken&&(e.sessionToken=this.changeFeedOptions.sessionToken),this.nextIfNoneMatch&&(e.accessCondition={type:A.HttpHeaders.IfNoneMatch,condition:this.nextIfNoneMatch}),this.ifModifiedSince&&(e.initialHeaders[A.HttpHeaders.IfModifiedSince]=this.ifModifiedSince);let n=await this.clientContext.queryFeed({path:this.resourceLink,resourceType:w.ResourceType.item,resourceId:this.resourceId,resultFn:r=>r?r.Documents:[],query:void 0,options:e,partitionKey:this.partitionKey});return new lu(n.result,n.result?n.result.length:0,n.code,n.headers)}};s(Eu,"ChangeFeedIterator");var Ia=Eu;Ia.IfNoneMatchAllHeaderValue="*";var Oe={Undefined:"00",Null:"01",False:"02",True:"03",MinNumber:"04",Number:"05",MaxNumber:"06",MinString:"07",String:"08",MaxString:"09",Int64:"0a",Int32:"0b",Int16:"0c",Int8:"0d",Uint64:"0e",Uint32:"0f",Uint16:"10",Uint8:"11",Binary:"12",Guid:"13",Float:"14",Infinity:"FF"};function Xw(t){let e=_k(t),n=Buffer.from(Oe.Number,"hex"),r=fe.default.asUintN(64,fe.default.signedRightShift(e,fe.default.BigInt(56)));n=Buffer.concat([n,Buffer.from(r.toString(16),"hex")]),e=fe.default.asUintN(64,fe.default.leftShift(fe.default.BigInt(e),fe.default.BigInt(8)));let o=fe.default.BigInt(0),c,u;do u=o.toString(16).padStart(2,"0"),u!=="00"&&(n=Buffer.concat([n,Buffer.from(u,"hex")])),c=fe.default.asUintN(64,fe.default.signedRightShift(e,fe.default.BigInt(56))),o=fe.default.asUintN(64,fe.default.bitwiseOr(c,fe.default.BigInt(1))),e=fe.default.asUintN(64,fe.default.leftShift(e,fe.default.BigInt(7)));while(fe.default.notEqual(e,fe.default.BigInt(0)));return u=fe.default.asUintN(64,fe.default.bitwiseAnd(o,fe.default.BigInt(254))).toString(16).padStart(2,"0"),u!=="00"&&(n=Buffer.concat([n,Buffer.from(u,"hex")])),n}s(Xw,"writeNumberForBinaryEncodingJSBI");function _k(t){let e=e_(t),n=fe.default.BigInt(9223372036854776e3);return e("00"+e.toString(16)).slice(-2)).join("")}s(Rk,"buf2hex");function Tk(t){let e=Buffer.from(Oe.String,"hex"),n=100,r=[...Buffer.from(t)],o=t.length<=n;for(let c=0;c<(o?r.length:n+1);c++){let u=r[c];u<255&&u++,e=Buffer.concat([e,Buffer.from(u.toString(16),"hex")])}return o&&(e=Buffer.concat([e,Buffer.from(Oe.Undefined,"hex")])),e}s(Tk,"writeStringForBinaryEncoding");function _e(t,e){return(t&65535)*e+(((t>>>16)*e&65535)<<16)}s(_e,"_x86Multiply");function yt(t,e){return t<>>32-e}s(yt,"_x86Rotl");function _a(t){return t^=t>>>16,t=_e(t,2246822507),t^=t>>>13,t=_e(t,3266489909),t^=t>>>16,t}s(_a,"_x86Fmix");function xr(t,e){t=[t[0]>>>16,t[0]&65535,t[1]>>>16,t[1]&65535],e=[e[0]>>>16,e[0]&65535,e[1]>>>16,e[1]&65535];let n=[0,0,0,0];return n[3]+=t[3]+e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}s(xr,"_x64Add");function Zt(t,e){t=[t[0]>>>16,t[0]&65535,t[1]>>>16,t[1]&65535],e=[e[0]>>>16,e[0]&65535,e[1]>>>16,e[1]&65535];let n=[0,0,0,0];return n[3]+=t[3]*e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}s(Zt,"_x64Multiply");function so(t,e){return e%=64,e===32?[t[1],t[0]]:e<32?[t[0]<>>32-e,t[1]<>>32-e]:(e-=32,[t[1]<>>32-e,t[0]<>>32-e])}s(so,"_x64Rotl");function Bt(t,e){return e%=64,e===0?t:e<32?[t[0]<>>32-e,t[1]<>>1]),t=Zt(t,[4283543511,3981806797]),t=Ce(t,[0,t[0]>>>1]),t=Zt(t,[3301882366,444984403]),t=Ce(t,[0,t[0]>>>1]),t}s(Cw,"_x64Fmix");function Ek(t,e){e=e||0;let n=t.length%4,r=t.length-n,o=e,c=0,u=3432918353,p=461845907,d=0;for(let m=0;m>>0}s(Ek,"x86Hash32");function Sk(t,e){e=e||0;let n=t.length%16,r=t.length-n,o=e,c=e,u=e,p=e,d=0,m=0,h=0,y=0,v=597399067,P=2869860233,_=951274213,E=2716044179,I=0;for(let N=0;N>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(p>>>0).toString(16)).slice(-8)}s(Sk,"x86Hash128");function Pk(t,e){e=e||0;let n=t.length%16,r=t.length-n,o=[0,e],c=[0,e],u=[0,0],p=[0,0],d=[2277735313,289559509],m=[1291169091,658871167],h=0;for(let E=0;E>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8),"hex"),v=Ow(y).toString("hex"),P=Buffer.from(("00000000"+(c[0]>>>0).toString(16)).slice(-8)+("00000000"+(c[1]>>>0).toString(16)).slice(-8),"hex"),_=Ow(P).toString("hex");return v+_}s(Pk,"x64Hash128");function Ow(t){let e=Buffer.allocUnsafe(t.length);for(let n=0,r=t.length-1;n<=r;++n,--r)e[n]=t[r],e[r]=t[n];return e}s(Ow,"reverse$1");var t_={version:"3.0.0",x86:{hash32:Ek,hash128:Sk},x64:{hash128:Pk},inputValidation:!0},n_=100;function Ak(t){let e=Ck(t),n=t_.x86.hash32(e),r=Xw(n),o=Ok(t);return Buffer.concat([r,o]).toString("hex").toUpperCase()}s(Ak,"hashV1PartitionKey");function Ck(t){let e;switch(typeof t){case"string":{let n=t.substr(0,n_);return e=Buffer.concat([Buffer.from(Oe.String,"hex"),Buffer.from(n),Buffer.from(Oe.Undefined,"hex")]),e}case"number":{let n=Zw(t);return e=Buffer.concat([Buffer.from(Oe.Number,"hex"),n]),e}case"boolean":{let n=t?Oe.True:Oe.False;return Buffer.from(n,"hex")}case"object":return t===null?Buffer.from(Oe.Null,"hex"):Buffer.from(Oe.Undefined,"hex");case"undefined":return Buffer.from(Oe.Undefined,"hex");default:throw new Error(`Unexpected type: ${typeof t}`)}}s(Ck,"prefixKeyByType$1");function Ok(t){switch(typeof t){case"string":{let e=t.substr(0,n_);return Tk(e)}case"number":return Xw(t);case"boolean":{let e=t?Oe.True:Oe.False;return Buffer.from(e,"hex")}case"object":return t===null?Buffer.from(Oe.Null,"hex"):Buffer.from(Oe.Undefined,"hex");case"undefined":return Buffer.from(Oe.Undefined,"hex");default:throw new Error(`Unexpected type: ${typeof t}`)}}s(Ok,"encodeByType");function Ik(t){let e=Dk(t),n=t_.x64.hash128(e),r=Lk(Buffer.from(n,"hex"));return r[0]&=63,r.toString("hex").toUpperCase()}s(Ik,"hashV2PartitionKey");function Dk(t){let e;switch(typeof t){case"string":return e=Buffer.concat([Buffer.from(Oe.String,"hex"),Buffer.from(t),Buffer.from(Oe.Infinity,"hex")]),e;case"number":{let n=Zw(t);return e=Buffer.concat([Buffer.from(Oe.Number,"hex"),n]),e}case"boolean":{let n=t?Oe.True:Oe.False;return Buffer.from(n,"hex")}case"object":return t===null?Buffer.from(Oe.Null,"hex"):Buffer.from(Oe.Undefined,"hex");case"undefined":return Buffer.from(Oe.Undefined,"hex");default:throw new Error(`Unexpected type: ${typeof t}`)}}s(Dk,"prefixKeyByType");function Lk(t){let e=Buffer.allocUnsafe(t.length);for(let n=0,r=t.length-1;n<=r;++n,--r)e[n]=t[r],e[r]=t[n];return e}s(Lk,"reverse");var Iw=Of.v4;function Zd(t){let e=typeof t;return t&&!(e==="string"||e==="boolean"||e==="number")}s(Zd,"isChangeFeedOptions");var fh=class fh{constructor(e,n){this.container=e,this.clientContext=n}query(e,n={}){let r=Q(this.container.url,w.ResourceType.item),o=X(this.container.url),c=s(u=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.item,resourceId:o,resultFn:p=>p?p.Documents:[],query:e,options:u,partitionKey:n.partitionKey}),"fetchFunction");return new St(this.clientContext,e,n,c,this.container.url,w.ResourceType.item)}readChangeFeed(e,n){return Zd(e)?this.changeFeed(e):this.changeFeed(e,n)}changeFeed(e,n){let r;!n&&Zd(e)?(r=void 0,n=e):e!==void 0&&!Zd(e)&&(r=e),n||(n={});let o=Q(this.container.url,w.ResourceType.item),c=X(this.container.url);return new Ia(this.clientContext,c,o,r,n)}readAll(e){return this.query("SELECT * from c",e)}async create(e,n={}){(e.id===void 0||e.id==="")&&!n.disableAutomaticIdGeneration&&(e.id=Iw());let{resource:r}=await this.container.readPartitionKeyDefinition(),o=hi(e,r),c={};if(!nf(e,c))throw c;let u=Q(this.container.url,w.ResourceType.item),p=X(this.container.url),d=await this.clientContext.create({body:e,path:u,resourceType:w.ResourceType.item,resourceId:p,options:n,partitionKey:o}),m=new yo(this.container,d.result.id,o,this.clientContext);return new Jn(d.result,d.headers,d.code,d.substatus,m)}async upsert(e,n={}){let{resource:r}=await this.container.readPartitionKeyDefinition(),o=hi(e,r);(e.id===void 0||e.id==="")&&!n.disableAutomaticIdGeneration&&(e.id=Iw());let c={};if(!nf(e,c))throw c;let u=Q(this.container.url,w.ResourceType.item),p=X(this.container.url),d=await this.clientContext.upsert({body:e,path:u,resourceType:w.ResourceType.item,resourceId:p,options:n,partitionKey:o}),m=new yo(this.container,d.result.id,o,this.clientContext);return new Jn(d.result,d.headers,d.code,d.substatus,m)}async bulk(e,n,r){let{resources:o}=await this.container.readPartitionKeyRanges().fetchAll(),{resource:c}=await this.container.getPartitionKeyDefinition(),u=o.map(m=>({min:m.minInclusive,max:m.maxExclusive,rangeId:m.id,indexes:[],operations:[]}));e.map(m=>ik(m,c,r)).forEach((m,h)=>{let y=c.paths[0].replace("/",""),v=c.version&&c.version===2,P=rk(m,y),_=v?Ik(P):Ak(P),E=u.find(I=>tk(I.min,I.max,_));E.operations.push(m),E.indexes.push(h)});let p=Q(this.container.url,w.ResourceType.item),d=[];return await Promise.all(u.filter(m=>m.operations.length).flatMap(m=>ok(m)).map(async m=>{if(m.operations.length>100)throw new Error("Cannot run bulk request with more than 100 operations per partition");try{(await this.clientContext.bulk({body:m.operations,partitionKeyRangeId:m.rangeId,path:p,resourceId:this.container.url,bulkOptions:n,options:r})).result.forEach((y,v)=>{d[m.indexes[v]]=y})}catch(h){throw h.code===410?new Error("Partition key error. Either the partitions have split or an operation has an unsupported partitionKey type"):new Error(`Bulk request errored with: ${h.message}`)}})),d}async batch(e,n="[{}]",r){e.map(c=>ak(c,r));let o=Q(this.container.url,w.ResourceType.item);if(e.length>100)throw new Error("Cannot run batch request with more than 100 operations per partition");try{return await this.clientContext.batch({body:e,partitionKey:n,path:o,resourceId:this.container.url,options:r})}catch(c){throw new Error(`Batch request error: ${c.message}`)}}};s(fh,"Items");var pu=fh,hh=class hh extends ot{constructor(e,n,r,o){super(e,n,r),this.storedProcedure=o}get sproc(){return this.storedProcedure}};s(hh,"StoredProcedureResponse");var pi=hh,mh=class mh{constructor(e,n,r){this.container=e,this.id=n,this.clientContext=r}get url(){return W3(this.container.database.id,this.container.id,this.id)}async read(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.sproc,resourceId:r,options:e});return new pi(o.result,o.headers,o.code,this)}async replace(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=Q(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.sproc,resourceId:c,options:n});return new pi(u.result,u.headers,u.code,this)}async delete(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.sproc,resourceId:r,options:e});return new pi(o.result,o.headers,o.code,this)}async execute(e,n,r){if(e===void 0){let{resource:c}=await this.container.readPartitionKeyDefinition();e=Sa(c)}let o=await this.clientContext.execute({sprocLink:this.url,params:n,options:r,partitionKey:e});return new ot(o.result,o.headers,o.code)}};s(mh,"StoredProcedure");var Da=mh,gh=class gh{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=Q(this.container.url,w.ResourceType.sproc),o=X(this.container.url);return new St(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.sproc,resourceId:o,resultFn:u=>u.StoredProcedures,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=Q(this.container.url,w.ResourceType.sproc),c=X(this.container.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.sproc,resourceId:c,options:n}),p=new Da(this.container,u.result.id,this.clientContext);return new pi(u.result,u.headers,u.code,p)}};s(gh,"StoredProcedures");var du=gh,yh=class yh extends ot{constructor(e,n,r,o){super(e,n,r),this.trigger=o}};s(yh,"TriggerResponse");var di=yh,xh=class xh{constructor(e,n,r){this.container=e,this.id=n,this.clientContext=r}get url(){return K3(this.container.database.id,this.container.id,this.id)}async read(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.trigger,resourceId:r,options:e});return new di(o.result,o.headers,o.code,this)}async replace(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=Q(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.trigger,resourceId:c,options:n});return new di(u.result,u.headers,u.code,this)}async delete(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.trigger,resourceId:r,options:e});return new di(o.result,o.headers,o.code,this)}};s(xh,"Trigger");var La=xh,vh=class vh{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=Q(this.container.url,w.ResourceType.trigger),o=X(this.container.url);return new St(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.trigger,resourceId:o,resultFn:u=>u.Triggers,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=Q(this.container.url,w.ResourceType.trigger),c=X(this.container.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.trigger,resourceId:c,options:n}),p=new La(this.container,u.result.id,this.clientContext);return new di(u.result,u.headers,u.code,p)}};s(vh,"Triggers");var fu=vh,bh=class bh extends ot{constructor(e,n,r,o){super(e,n,r),this.userDefinedFunction=o}get udf(){return this.userDefinedFunction}};s(bh,"UserDefinedFunctionResponse");var fi=bh,wh=class wh{constructor(e,n,r){this.container=e,this.id=n,this.clientContext=r}get url(){return G3(this.container.database.id,this.container.id,this.id)}async read(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.udf,resourceId:r,options:e});return new fi(o.result,o.headers,o.code,this)}async replace(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=Q(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.udf,resourceId:c,options:n});return new fi(u.result,u.headers,u.code,this)}async delete(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.udf,resourceId:r,options:e});return new fi(o.result,o.headers,o.code,this)}};s(wh,"UserDefinedFunction");var Ma=wh,_h=class _h{constructor(e,n){this.container=e,this.clientContext=n}query(e,n){let r=Q(this.container.url,w.ResourceType.udf),o=X(this.container.url);return new St(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.udf,resourceId:o,resultFn:u=>u.UserDefinedFunctions,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){e.body&&(e.body=e.body.toString());let r={};if(!lt(e,r))throw r;let o=Q(this.container.url,w.ResourceType.udf),c=X(this.container.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.udf,resourceId:c,options:n}),p=new Ma(this.container,u.result.id,this.clientContext);return new fi(u.result,u.headers,u.code,p)}};s(_h,"UserDefinedFunctions");var hu=_h,Rh=class Rh{constructor(e,n){this.container=e,this.clientContext=n}storedProcedure(e){return new Da(this.container,e,this.clientContext)}trigger(e){return new La(this.container,e,this.clientContext)}userDefinedFunction(e){return new Ma(this.container,e,this.clientContext)}get storedProcedures(){return this.$sprocs||(this.$sprocs=new du(this.container,this.clientContext)),this.$sprocs}get triggers(){return this.$triggers||(this.$triggers=new fu(this.container,this.clientContext)),this.$triggers}get userDefinedFunctions(){return this.$udfs||(this.$udfs=new hu(this.container,this.clientContext)),this.$udfs}};s(Rh,"Scripts");var mu=Rh,Th=class Th extends ot{constructor(e,n,r,o){super(e,n,r),this.container=o}};s(Th,"ContainerResponse");var br=Th,Eh=class Eh extends ot{constructor(e,n,r,o){super(e,n,r),this.offer=o}};s(Eh,"OfferResponse");var gi=Eh,Sh=class Sh{constructor(e,n,r){this.client=e,this.id=n,this.clientContext=r}get url(){return`/${A.Path.OffersPathSegment}/${this.id}`}async read(e){let n=await this.clientContext.read({path:this.url,resourceType:w.ResourceType.offer,resourceId:this.id,options:e});return new gi(n.result,n.headers,n.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=await this.clientContext.replace({body:e,path:this.url,resourceType:w.ResourceType.offer,resourceId:this.id,options:n});return new gi(o.result,o.headers,o.code,this)}};s(Sh,"Offer");var xo=Sh,Ph=class Ph{constructor(e,n){this.client=e,this.clientContext=n}query(e,n){return new St(this.clientContext,e,n,r=>this.clientContext.queryFeed({path:"/offers",resourceType:w.ResourceType.offer,resourceId:"",resultFn:o=>o.Offers,query:e,options:r}))}readAll(e){return this.query(void 0,e)}};s(Ph,"Offers");var gu=Ph,Ah=class Ah{constructor(e,n,r){this.database=e,this.id=n,this.clientContext=r}get items(){return this.$items||(this.$items=new pu(this,this.clientContext)),this.$items}get scripts(){return this.$scripts||(this.$scripts=new mu(this,this.clientContext)),this.$scripts}get conflicts(){return this.$conflicts||(this.$conflicts=new uu(this,this.clientContext)),this.$conflicts}get url(){return ja(this.database.id,this.id)}item(e,n){return new yo(this,e,n,this.clientContext)}conflict(e,n){return new cu(this,e,this.clientContext,n)}async read(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.container,resourceId:r,options:e});return this.clientContext.partitionKeyDefinitionCache[this.url]=o.result.partitionKey,new br(o.result,o.headers,o.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=Q(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.container,resourceId:c,options:n});return new br(u.result,u.headers,u.code,this)}async delete(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.container,resourceId:r,options:e});return new br(o.result,o.headers,o.code,this)}async getPartitionKeyDefinition(){return this.readPartitionKeyDefinition()}async readPartitionKeyDefinition(){if(this.url in this.clientContext.partitionKeyDefinitionCache)return new ot(this.clientContext.partitionKeyDefinitionCache[this.url],{},0);let{headers:e,statusCode:n}=await this.read();return new ot(this.clientContext.partitionKeyDefinitionCache[this.url],e,n)}async readOffer(e={}){let{resource:n}=await this.read(),r="/offers",o=n._self,c=await this.clientContext.queryFeed({path:r,resourceId:"",resourceType:w.ResourceType.offer,query:`SELECT * from root where root.resource = "${o}"`,resultFn:p=>p.Offers,options:e}),u=c.result[0]?new xo(this.database.client,c.result[0].id,this.clientContext):void 0;return new gi(c.result[0],c.headers,c.code,u)}async getQueryPlan(e){let n=Q(this.url);return this.clientContext.getQueryPlan(n+"/docs",w.ResourceType.item,X(this.url),e)}readPartitionKeyRanges(e){return e=e||{},this.clientContext.queryPartitionKeyRanges(this.url,void 0,e)}async deleteAllItemsForPartitionKey(e,n){let r=Q(this.url),o=X(this.url);r=r+"/operations/partitionkeydelete";let c=await this.clientContext.delete({path:r,resourceType:w.ResourceType.container,resourceId:o,options:n,partitionKey:e,method:w.HTTPMethod.post});return new br(c.result,c.headers,c.code,this)}};s(Ah,"Container");var Na=Ah;function r_(t){if(t.throughput){if(t.maxThroughput)throw console.log("should be erroring"),new Error("Cannot specify `throughput` with `maxThroughput`");if(t.autoUpgradePolicy)throw new Error("Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead")}}s(r_,"validateOffer");var Ch=class Ch{constructor(e,n){this.database=e,this.clientContext=n}query(e,n){let r=Q(this.database.url,w.ResourceType.container),o=X(this.database.url);return new St(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.container,resourceId:o,resultFn:u=>u.DocumentCollections,query:e,options:c}))}async create(e,n={}){let r={};if(!lt(e,r))throw r;let o=Q(this.database.url,w.ResourceType.container),c=X(this.database.url);if(r_(e),e.maxThroughput){let d={maxThroughput:e.maxThroughput};e.autoUpgradePolicy&&(d.autoUpgradePolicy=e.autoUpgradePolicy);let m=JSON.stringify(d);n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.AutoscaleSettings]:m}),delete e.maxThroughput,delete e.autoUpgradePolicy}if(e.throughput&&(n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.OfferThroughput]:e.throughput}),delete e.throughput),typeof e.partitionKey=="string"){if(!e.partitionKey.startsWith("/"))throw new Error("Partition key must start with '/'");e.partitionKey={paths:[e.partitionKey]}}(!e.partitionKey||!e.partitionKey.paths)&&(e.partitionKey={paths:[Fw]});let u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.container,resourceId:c,options:n}),p=new Na(this.database,u.result.id,this.clientContext);return new br(u.result,u.headers,u.code,p)}async createIfNotExists(e,n){if(!e||e.id===null||e.id===void 0)throw new Error("body parameter must be an object with an id property");try{return await this.database.container(e.id).read(n)}catch(r){if(r.code===vt.NotFound){let o=await this.create(e,n);return gn(o.headers,r.headers),o}else throw r}}readAll(e){return this.query(void 0,e)}};s(Ch,"Containers");var yu=Ch,Oh=class Oh extends ot{constructor(e,n,r,o){super(e,n,r),this.permission=o}};s(Oh,"PermissionResponse");var wr=Oh,Ih=class Ih{constructor(e,n,r){this.user=e,this.id=n,this.clientContext=r}get url(){return $3(this.user.database.id,this.user.id,this.id)}async read(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.permission,resourceId:r,options:e});return new wr(o.result,o.headers,o.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=Q(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.permission,resourceId:c,options:n});return new wr(u.result,u.headers,u.code,this)}async delete(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.permission,resourceId:r,options:e});return new wr(o.result,o.headers,o.code,this)}};s(Ih,"Permission");var vo=Ih,Dh=class Dh{constructor(e,n){this.user=e,this.clientContext=n}query(e,n){let r=Q(this.user.url,w.ResourceType.permission),o=X(this.user.url);return new St(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.permission,resourceId:o,resultFn:u=>u.Permissions,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){let r={};if(!lt(e,r))throw r;let o=Q(this.user.url,w.ResourceType.permission),c=X(this.user.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.permission,resourceId:c,options:n}),p=new vo(this.user,u.result.id,this.clientContext);return new wr(u.result,u.headers,u.code,p)}async upsert(e,n){let r={};if(!lt(e,r))throw r;let o=Q(this.user.url,w.ResourceType.permission),c=X(this.user.url),u=await this.clientContext.upsert({body:e,path:o,resourceType:w.ResourceType.permission,resourceId:c,options:n}),p=new vo(this.user,u.result.id,this.clientContext);return new wr(u.result,u.headers,u.code,p)}};s(Dh,"Permissions");var xu=Dh,Lh=class Lh extends ot{constructor(e,n,r,o){super(e,n,r),this.user=o}};s(Lh,"UserResponse");var _r=Lh,Mh=class Mh{constructor(e,n,r){this.database=e,this.id=n,this.clientContext=r,this.permissions=new xu(this,this.clientContext)}get url(){return Uw(this.database.id,this.id)}permission(e){return new vo(this,e,this.clientContext)}async read(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.user,resourceId:r,options:e});return new _r(o.result,o.headers,o.code,this)}async replace(e,n){let r={};if(!lt(e,r))throw r;let o=Q(this.url),c=X(this.url),u=await this.clientContext.replace({body:e,path:o,resourceType:w.ResourceType.user,resourceId:c,options:n});return new _r(u.result,u.headers,u.code,this)}async delete(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.user,resourceId:r,options:e});return new _r(o.result,o.headers,o.code,this)}};s(Mh,"User");var bo=Mh,Nh=class Nh{constructor(e,n){this.database=e,this.clientContext=n}query(e,n){let r=Q(this.database.url,w.ResourceType.user),o=X(this.database.url);return new St(this.clientContext,e,n,c=>this.clientContext.queryFeed({path:r,resourceType:w.ResourceType.user,resourceId:o,resultFn:u=>u.Users,query:e,options:c}))}readAll(e){return this.query(void 0,e)}async create(e,n){let r={};if(!lt(e,r))throw r;let o=Q(this.database.url,w.ResourceType.user),c=X(this.database.url),u=await this.clientContext.create({body:e,path:o,resourceType:w.ResourceType.user,resourceId:c,options:n}),p=new bo(this.database,u.result.id,this.clientContext);return new _r(u.result,u.headers,u.code,p)}async upsert(e,n){let r={};if(!lt(e,r))throw r;let o=Q(this.database.url,w.ResourceType.user),c=X(this.database.url),u=await this.clientContext.upsert({body:e,path:o,resourceType:w.ResourceType.user,resourceId:c,options:n}),p=new bo(this.database,u.result.id,this.clientContext);return new _r(u.result,u.headers,u.code,p)}};s(Nh,"Users");var vu=Nh,kh=class kh extends ot{constructor(e,n,r,o){super(e,n,r),this.database=o}};s(kh,"DatabaseResponse");var wo=kh,Fh=class Fh{constructor(e,n,r){this.client=e,this.id=n,this.clientContext=r,this.containers=new yu(this,this.clientContext),this.users=new vu(this,this.clientContext)}get url(){return Df(this.id)}container(e){return new Na(this,e,this.clientContext)}user(e){return new bo(this,e,this.clientContext)}async read(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.read({path:n,resourceType:w.ResourceType.database,resourceId:r,options:e});return new wo(o.result,o.headers,o.code,this)}async delete(e){let n=Q(this.url),r=X(this.url),o=await this.clientContext.delete({path:n,resourceType:w.ResourceType.database,resourceId:r,options:e});return new wo(o.result,o.headers,o.code,this)}async readOffer(e={}){let{resource:n}=await this.read(),r="/offers",o=n._self,c=await this.clientContext.queryFeed({path:r,resourceId:"",resourceType:w.ResourceType.offer,query:`SELECT * from root where root.resource = "${o}"`,resultFn:p=>p.Offers,options:e}),u=c.result[0]?new xo(this.client,c.result[0].id,this.clientContext):void 0;return new gi(c.result[0],c.headers,c.code,u)}};s(Fh,"Database");var ka=Fh,qh=class qh{constructor(e,n){this.client=e,this.clientContext=n}query(e,n){let r=s(o=>this.clientContext.queryFeed({path:"/dbs",resourceType:w.ResourceType.database,resourceId:"",resultFn:c=>c.Databases,query:e,options:o}),"cb");return new St(this.clientContext,e,n,r)}async create(e,n={}){let r={};if(!lt(e,r))throw r;if(r_(e),e.maxThroughput){let p={maxThroughput:e.maxThroughput};e.autoUpgradePolicy&&(p.autoUpgradePolicy=e.autoUpgradePolicy);let d=JSON.stringify(p);n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.AutoscaleSettings]:d}),delete e.maxThroughput,delete e.autoUpgradePolicy}e.throughput&&(n.initialHeaders=Object.assign({},n.initialHeaders,{[A.HttpHeaders.OfferThroughput]:e.throughput}),delete e.throughput);let c=await this.clientContext.create({body:e,path:"/dbs",resourceType:w.ResourceType.database,resourceId:void 0,options:n}),u=new ka(this.client,e.id,this.clientContext);return new wo(c.result,c.headers,c.code,u)}async createIfNotExists(e,n){if(!e||e.id===null||e.id===void 0)throw new Error("body parameter must be an object with an id property");try{return await this.client.database(e.id).read(n)}catch(r){if(r.code===vt.NotFound){let o=await this.create(e,n);return gn(o.headers,r.headers),o}else throw r}}readAll(e){return this.query(void 0,e)}};s(qh,"Databases");var bu=qh;w.PluginOn=void 0;(function(t){t.request="request",t.operation="operation"})(w.PluginOn||(w.PluginOn={}));async function hn(t,e,n){if(!t.plugins)return e(t,void 0);let r=0,o=s(c=>++r>=c.plugins.length?e(t,void 0):c.plugins[r].on!==n?o(t):c.plugins[r].plugin(c,o),"_");return t.plugins[r].on!==n?o(t):t.plugins[r].plugin(t,o)}s(hn,"executePlugins");var Mk=10004,Nk=10009,kk=10013,Fk=10014,qk=10022,Bk=10035,jk=10036,Uk=10048,Hk=10054,zk=10058,$k=10060,Wk=10061,Kk=10063,Gk=10064,Qk=10065,Vk="ECONNRESET",Jk="EPIPE",Yk=[Mk,Nk,kk,Fk,qk,Bk,jk,Uk,Hk,zk,$k,Wk,Kk,Gk,Qk,Vk,rf,Jk];function Xk(t,e){return(t===w.OperationType.Read||t===w.OperationType.Query)&&Yk.indexOf(e)!==-1}s(Xk,"needsRetry");var Bh=class Bh{constructor(e){this.operationType=e,this.maxTries=10,this.currentRetryAttemptCount=0,this.retryAfterInMs=1e3}async shouldRetry(e){return e&&this.currentRetryAttemptCount=this.maxTries?!1:(this.currentRetryAttemptCount++,If(this.operationType)?await this.globalEndpointManager.markCurrentLocationUnavailableForRead(r):await this.globalEndpointManager.markCurrentLocationUnavailableForWrite(r),n.retryCount=this.currentRetryAttemptCount,n.clearSessionTokenNotAvailable=!1,n.retryRequestOnPreferredLocations=!1,!0)}};s(Ea,"EndpointDiscoveryRetryPolicy");var Fa=Ea;Fa.maxTries=120;Fa.retryAfterInMs=1e3;var jh=class jh{constructor(e=9,n=0,r=30){this.maxTries=e,this.fixedRetryIntervalInMs=n,this.currentRetryAttemptCount=0,this.cummulativeWaitTimeinMs=0,this.retryAfterInMs=0,this.timeoutInMs=r*1e3,this.currentRetryAttemptCount=0,this.cummulativeWaitTimeinMs=0}async shouldRetry(e){return e&&this.currentRetryAttemptCountr.length?!1:(this.currentRetryAttemptCount++,n.retryCount++,n.retryRequestOnPreferredLocations=this.currentRetryAttemptCount>1,n.clearSessionTokenNotAvailable=this.currentRetryAttemptCount===r.length,!0)}else return this.currentRetryAttemptCount>1?!1:(this.currentRetryAttemptCount++,n.retryCount++,n.retryRequestOnPreferredLocations=!1,n.clearSessionTokenNotAvailable=!0,!0)}};s(Uh,"SessionRetryPolicy");var Sf=Uh;async function i_({retryContext:t={retryCount:0},retryPolicies:e,requestContext:n,executeRequest:r}){e||(e={endpointDiscoveryRetryPolicy:new Fa(n.globalEndpointManager,n.operationType),resourceThrottleRetryPolicy:new Ef(n.connectionPolicy.retryOptions.maxRetryAttemptCount,n.connectionPolicy.retryOptions.fixedRetryIntervalInMilliseconds,n.connectionPolicy.retryOptions.maxWaitTimeInSeconds),sessionReadRetryPolicy:new Sf(n.globalEndpointManager,n.resourceType,n.operationType,n.connectionPolicy),defaultRetryPolicy:new Tf(n.operationType)}),t&&t.clearSessionTokenNotAvailable&&(n.client.clearSessionToken(n.path),delete n.headers["x-ms-session-token"]),n.endpoint=await n.globalEndpointManager.resolveServiceEndpoint(n.resourceType,n.operationType);try{let o=await r(n);return o.headers[A.ThrottleRetryCount]=e.resourceThrottleRetryPolicy.currentRetryAttemptCount,o.headers[A.ThrottleRetryWaitTimeInMs]=e.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs,o}catch(o){let c=null,u=o.headers||{};o.code===vt.ENOTFOUND||o.code==="REQUEST_SEND_ERROR"||o.code===vt.Forbidden&&(o.substatus===ho.DatabaseAccountNotFound||o.substatus===ho.WriteForbidden)?c=e.endpointDiscoveryRetryPolicy:o.code===vt.TooManyRequests?c=e.resourceThrottleRetryPolicy:o.code===vt.NotFound&&o.substatus===ho.ReadSessionNotAvailable?c=e.sessionReadRetryPolicy:c=e.defaultRetryPolicy;let p=await c.shouldRetry(o,t,n.endpoint);if(p){n.retryCount++;let d=p[1];return d!==void 0&&(n.endpoint=d),await q3(c.retryAfterInMs),i_({executeRequest:r,requestContext:n,retryContext:t,retryPolicies:e})}else throw u[A.ThrottleRetryCount]=e.resourceThrottleRetryPolicy.currentRetryAttemptCount,u[A.ThrottleRetryWaitTimeInMs]=e.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs,o.headers=Object.assign(Object.assign({},o.headers),u),o}}s(i_,"execute");var Pf,Dw=require("https"),Zk=require("tls");Zk.DEFAULT_MIN_VERSION?Pf=new Dw.Agent({keepAlive:!0,minVersion:"TLSv1.2"}):Pf=new Dw.Agent({keepAlive:!0,secureProtocol:"TLSv1_2_method"});var eF=require("http"),tF=new eF.Agent({keepAlive:!0}),ef;function nF(){return ef||(ef=go.createDefaultHttpClient()),ef}s(nF,"getCachedDefaultHttpClient");var rF=Ba.createClientLogger("RequestHandler");async function iF(t){return hn(t,oF,w.PluginOn.request)}s(iF,"executeRequest");async function oF(t){let e=new C3.AbortController,n=e.signal,r=t.options&&t.options.abortSignal;r&&(r.aborted?e.abort():r.addEventListener("abort",()=>{e.abort()}));let o=setTimeout(()=>{e.abort()},t.connectionPolicy.requestTimeout),c;t.body&&(t.body=Lf(t.body));let u=nF(),p=fo(t.endpoint)+t.path,d=go.createHttpHeaders(t.headers),m=go.createPipelineRequest({url:p,headers:d,method:t.method,abortSignal:n,body:t.body});if(t.requestAgent)m.agent=t.requestAgent;else{let P=new URL(p);m.agent=P.protocol==="http"?tF:Pf}try{t.pipeline?c=await t.pipeline.sendRequest(u,m):c=await u.sendRequest(m)}catch(P){throw P.name==="AbortError"?r&&r.aborted===!0?(clearTimeout(o),P):new ru(`Timeout Error! Request took more than ${t.connectionPolicy.requestTimeout} ms`):P}clearTimeout(o);let h=c.status===204||c.status===304||c.bodyAsText===""?null:JSON.parse(c.bodyAsText),y=c.headers.toJSON(),v=y[A.HttpHeaders.SubStatus]?parseInt(y[A.HttpHeaders.SubStatus],10):void 0;if(c.status>=400){let P=new nu(h.message);throw rF.warning(c.status+" "+t.endpoint+" "+t.path+" "+h.message),P.code=c.status,P.body=h,P.headers=y,A.HttpHeaders.ActivityId in y&&(P.activityId=y[A.HttpHeaders.ActivityId]),A.HttpHeaders.SubStatus in y&&(P.substatus=v),A.HttpHeaders.RetryAfterInMs in y&&(P.retryAfterInMs=parseInt(y[A.HttpHeaders.RetryAfterInMs],10),Object.defineProperty(P,"retryAfterInMilliseconds",{get:()=>P.retryAfterInMs})),P}return{headers:y,result:h,code:c.status,substatus:v}}s(oF,"httpRequest");async function aF(t){if(t.body&&(t.body=Lf(t.body),!t.body))throw new Error("parameter data must be a javascript object, string, or Buffer");return i_({requestContext:t,executeRequest:iF})}s(aF,"request");var Xt={request:aF};function sF(t){return Buffer.from(t,"base64").toString("binary")}s(sF,"atob");var tn=class tn{constructor(e,n,r,o){if(this.version=e,this.globalLsn=n,this.localLsnByregion=r,this.sessionToken=o,!this.sessionToken){let c=[];for(let[p,d]of this.localLsnByregion.entries())c.push(`${p}${tn.REGION_PROGRESS_SEPARATOR}${d}`);let u=c.join(tn.SEGMENT_SEPARATOR);u===""?this.sessionToken=`${this.version}${tn.SEGMENT_SEPARATOR}${this.globalLsn}`:this.sessionToken=`${this.version}${tn.SEGMENT_SEPARATOR}${this.globalLsn}${tn.SEGMENT_SEPARATOR}${u}`}}static create(e){let[n,r,...o]=e.split(tn.SEGMENT_SEPARATOR),c=parseInt(n,10),u=parseFloat(r);if(typeof c!="number"||typeof u!="number")return null;let p=new Map;for(let d of o){let[m,h]=d.split(tn.REGION_PROGRESS_SEPARATOR);if(!m||!h)return null;let y=parseInt(m,10),v;try{v=h}catch{return null}if(typeof y!="number")return null;p.set(y,v)}return new tn(c,u,p,e)}equals(e){return e?this.version===e.version&&this.globalLsn===e.globalLsn&&this.areRegionProgressEqual(e.localLsnByregion):!1}merge(e){if(e==null)throw new Error("other (Vector Session Token) must not be null");if(this.version===e.version&&this.localLsnByregion.size!==e.localLsnByregion.size)throw new Error(`Compared session tokens ${this.sessionToken} and ${e.sessionToken} have unexpected regions`);let[n,r]=this.versione?t:e:t.length>e.length?t:e}s(cF,"max");var mn=class mn{constructor(e=new Map,n=new Map){this.collectionNameToCollectionResourceId=e,this.collectionResourceIdToSessionTokens=n}get(e){if(!e)throw new Error("request cannot be null");let n=Xd(fo(e.resourceAddress)),r=this.getPartitionKeyRangeIdToTokenMap(n);return mn.getCombinedSessionTokenString(r)}remove(e){let n,r=fo(e.resourceAddress),o=Xd(r);o&&(n=this.collectionNameToCollectionResourceId.get(o),this.collectionNameToCollectionResourceId.delete(o)),n!==void 0&&this.collectionResourceIdToSessionTokens.delete(n)}set(e,n){if(!n||mn.isReadingFromMaster(e.resourceType,e.operationType))return;let r=n[A.HttpHeaders.SessionToken];if(!r)return;let o=this.getContainerName(e,n),c=e.isNameBased&&n[A.HttpHeaders.OwnerId]||e.resourceId;if(c&&o&&this.validateOwnerID(c)){this.collectionResourceIdToSessionTokens.has(c)||this.collectionResourceIdToSessionTokens.set(c,new Map),this.collectionNameToCollectionResourceId.has(o)||this.collectionNameToCollectionResourceId.set(o,c);let u=this.collectionResourceIdToSessionTokens.get(c);mn.compareAndSetToken(r,u)}}validateOwnerID(e){return sF(e.replace(/-/g,"/")).length===8}getPartitionKeyRangeIdToTokenMap(e){let n=null;return e&&this.collectionNameToCollectionResourceId.has(e)&&(n=this.collectionResourceIdToSessionTokens.get(this.collectionNameToCollectionResourceId.get(e))),n}static getCombinedSessionTokenString(e){if(!e||e.size===0)return mn.EMPTY_SESSION_TOKEN;let n="";for(let[r,o]of e.entries())n+=r+mn.SESSION_TOKEN_PARTITION_SPLITTER+o.toString()+mn.SESSION_TOKEN_SEPARATOR;return n.slice(0,-1)}static compareAndSetToken(e,n){if(!e)return;let r=e.split(mn.SESSION_TOKEN_SEPARATOR);for(let o of r){let c=o.split(mn.SESSION_TOKEN_PARTITION_SPLITTER);if(c.length!==2)return;let u=c[0],p=qa.create(c[1]),d=n.get(u)?n.get(u).merge(p):p;n.set(u,d)}}static isReadingFromMaster(e,n){return e===A.Path.OffersPathSegment||e===A.Path.DatabasesPathSegment||e===A.Path.UsersPathSegment||e===A.Path.PermissionsPathSegment||e===A.Path.TopologyPathSegment||e===A.Path.DatabaseAccountPathSegment||e===A.Path.PartitionKeyRangesPathSegment||e===A.Path.CollectionsPathSegment&&n===w.OperationType.Query}getContainerName(e,n){let r=n[A.HttpHeaders.OwnerFullName];return r||(r=fo(e.resourceAddress)),Xd(r)}};s(mn,"SessionContainer");var _o=mn;_o.EMPTY_SESSION_TOKEN="";_o.SESSION_TOKEN_SEPARATOR=",";_o.SESSION_TOKEN_PARTITION_SPLITTER=":";function uF(t){return new URL(t)}s(uF,"checkURL");function lF(t){return new URL(t).href.replace(/\/$/,"")}s(lF,"sanitizeEndpoint");var pF=Of.v4,tf=Ba.createClientLogger("ClientContext"),Lw="application/query+json",Hh=class Hh{constructor(e,n){if(this.cosmosClientOptions=e,this.globalEndpointManager=n,this.connectionPolicy=e.connectionPolicy,this.sessionContainer=new _o,this.partitionKeyDefinitionCache={},this.pipeline=null,e.aadCredentials){this.pipeline=go.createEmptyPipeline();let o=`${lF(e.endpoint)}/.default`;this.pipeline.addPolicy(go.bearerTokenAuthenticationPolicy({credential:e.aadCredentials,scopes:o,challengeCallbacks:{async authorizeRequest({request:c,getAccessToken:u}){let m=`type=aad&ver=1.0&sig=${(await u([o],{})).token}`;c.headers.set("Authorization",m)}}}))}}async read({path:e,resourceType:n,resourceId:r,options:o={},partitionKey:c}){try{let u=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.get,path:e,operationType:w.OperationType.Read,resourceId:r,options:o,resourceType:n,partitionKey:c});u.headers=await this.buildHeaders(u),this.applySessionToken(u),u.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(u.resourceType,u.operationType);let p=await hn(u,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,e,w.OperationType.Read,p.headers),p}catch(u){throw this.captureSessionToken(u,e,w.OperationType.Upsert,u.headers),u}}async queryFeed({path:e,resourceType:n,resourceId:r,resultFn:o,query:c,options:u,partitionKeyRangeId:p,partitionKey:d}){let m=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.get,path:e,operationType:w.OperationType.Query,partitionKeyRangeId:p,resourceId:r,resourceType:n,options:u,body:c,partitionKey:d}),h=pF();c!==void 0&&(m.method=w.HTTPMethod.post),m.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(m.resourceType,m.operationType),m.headers=await this.buildHeaders(m),c!==void 0&&(m.headers[A.HttpHeaders.IsQuery]="true",m.headers[A.HttpHeaders.ContentType]=Lw,typeof c=="string"&&(m.body={query:c})),this.applySessionToken(m),tf.info("query "+h+" started"+(m.partitionKeyRangeId?" pkrid: "+m.partitionKeyRangeId:"")),tf.verbose(m);let y=Date.now(),v=await Xt.request(m);return tf.info("query "+h+" finished - "+(Date.now()-y)+"ms"),this.captureSessionToken(void 0,e,w.OperationType.Query,v.headers),this.processQueryFeedResponse(v,!!c,o)}async getQueryPlan(e,n,r,o,c={}){let u=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,path:e,operationType:w.OperationType.Read,resourceId:r,resourceType:n,options:c,body:o});u.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(u.resourceType,u.operationType),u.headers=await this.buildHeaders(u),u.headers[A.HttpHeaders.IsQueryPlan]="True",u.headers[A.HttpHeaders.QueryVersion]="1.4",u.headers[A.HttpHeaders.SupportedQueryFeatures]="NonValueAggregate, Aggregate, Distinct, MultipleOrderBy, OffsetAndLimit, OrderBy, Top, CompositeAggregate, GroupBy, MultipleAggregates",u.headers[A.HttpHeaders.ContentType]=Lw,typeof o=="string"&&(u.body={query:o}),this.applySessionToken(u);let p=await Xt.request(u);return this.captureSessionToken(void 0,e,w.OperationType.Query,p.headers),p}queryPartitionKeyRanges(e,n,r){let o=Q(e,w.ResourceType.pkranges),c=X(e),u=s(p=>this.queryFeed({path:o,resourceType:w.ResourceType.pkranges,resourceId:c,resultFn:d=>d.PartitionKeyRanges,query:n,options:p}),"cb");return new St(this,n,r,u)}async delete({path:e,resourceType:n,resourceId:r,options:o={},partitionKey:c,method:u=w.HTTPMethod.delete}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:u,operationType:w.OperationType.Delete,path:e,resourceType:n,options:o,resourceId:r,partitionKey:c});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return _w(e).type!=="colls"?this.captureSessionToken(void 0,e,w.OperationType.Delete,d.headers):this.clearSessionToken(e),d}catch(p){throw this.captureSessionToken(p,e,w.OperationType.Upsert,p.headers),p}}async patch({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.patch,operationType:w.OperationType.Patch,path:n,resourceType:r,body:e,resourceId:o,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Patch,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}async create({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Create,path:n,resourceType:r,resourceId:o,body:e,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Create,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}processQueryFeedResponse(e,n,r){return n?{result:r(e.result),headers:e.headers,code:e.code}:{result:r(e.result).map(c=>c),headers:e.headers,code:e.code}}applySessionToken(e){let n=this.getSessionParams(e.path);if(e.headers&&e.headers[A.HttpHeaders.SessionToken])return;let r=e.headers[A.HttpHeaders.ConsistencyLevel];if(r&&r===w.ConsistencyLevel.Session&&n.resourceAddress){let o=this.sessionContainer.get(n);o&&(e.headers[A.HttpHeaders.SessionToken]=o)}}async replace({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.put,operationType:w.OperationType.Replace,path:n,resourceType:r,body:e,resourceId:o,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Replace,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}async upsert({body:e,path:n,resourceType:r,resourceId:o,options:c={},partitionKey:u}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Upsert,path:n,resourceType:r,body:e,resourceId:o,options:c,partitionKey:u});p.headers=await this.buildHeaders(p),p.headers[A.HttpHeaders.IsUpsert]=!0,this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Upsert,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}async execute({sprocLink:e,params:n,options:r={},partitionKey:o}){n!=null&&!Array.isArray(n)&&(n=[n]);let c=Q(e),u=X(e),p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Execute,path:c,resourceType:w.ResourceType.sproc,options:r,resourceId:u,body:n,partitionKey:o});return p.headers=await this.buildHeaders(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType),hn(p,Xt.request,w.PluginOn.operation)}async getDatabaseAccount(e={}){let n=e.urlConnection||this.cosmosClientOptions.endpoint,r=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{endpoint:n,method:w.HTTPMethod.get,operationType:w.OperationType.Read,path:"",resourceType:w.ResourceType.none,options:e});r.headers=await this.buildHeaders(r);let{result:o,headers:c}=await hn(r,Xt.request,w.PluginOn.operation);return{result:new tu(o,c),headers:c}}getWriteEndpoint(){return this.globalEndpointManager.getWriteEndpoint()}getReadEndpoint(){return this.globalEndpointManager.getReadEndpoint()}getWriteEndpoints(){return this.globalEndpointManager.getWriteEndpoints()}getReadEndpoints(){return this.globalEndpointManager.getReadEndpoints()}async batch({body:e,path:n,partitionKey:r,resourceId:o,options:c={}}){try{let u=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Batch,path:n,body:e,resourceType:w.ResourceType.item,resourceId:o,options:c,partitionKey:r});u.headers=await this.buildHeaders(u),u.headers[A.HttpHeaders.IsBatchRequest]=!0,u.headers[A.HttpHeaders.IsBatchAtomic]=!0,this.applySessionToken(u),u.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(u.resourceType,u.operationType);let p=await hn(u,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Batch,p.headers),p}catch(u){throw this.captureSessionToken(u,n,w.OperationType.Upsert,u.headers),u}}async bulk({body:e,path:n,partitionKeyRangeId:r,resourceId:o,bulkOptions:c={},options:u={}}){try{let p=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:w.HTTPMethod.post,operationType:w.OperationType.Batch,path:n,body:e,resourceType:w.ResourceType.item,resourceId:o,options:u});p.headers=await this.buildHeaders(p),p.headers[A.HttpHeaders.IsBatchRequest]=!0,p.headers[A.HttpHeaders.PartitionKeyRangeID]=r,p.headers[A.HttpHeaders.IsBatchAtomic]=!1,p.headers[A.HttpHeaders.BatchContinueOnError]=c.continueOnError||!1,this.applySessionToken(p),p.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(p.resourceType,p.operationType);let d=await hn(p,Xt.request,w.PluginOn.operation);return this.captureSessionToken(void 0,n,w.OperationType.Batch,d.headers),d}catch(p){throw this.captureSessionToken(p,n,w.OperationType.Upsert,p.headers),p}}captureSessionToken(e,n,r,o){let c=this.getSessionParams(n);c.operationType=r,(!e||!this.isMasterResource(c.resourceType)&&(e.code===vt.PreconditionFailed||e.code===vt.Conflict||e.code===vt.NotFound&&e.substatus!==ho.ReadSessionNotAvailable))&&this.sessionContainer.set(c,o)}clearSessionToken(e){let n=this.getSessionParams(e);this.sessionContainer.remove(n)}getSessionParams(e){let r=null,o=_w(e);r=o.objectBody.self;let c=o.type;return{resourceId:null,resourceAddress:r,resourceType:c,isNameBased:!0}}isMasterResource(e){return e===A.Path.OffersPathSegment||e===A.Path.DatabasesPathSegment||e===A.Path.UsersPathSegment||e===A.Path.PermissionsPathSegment||e===A.Path.TopologyPathSegment||e===A.Path.DatabaseAccountPathSegment||e===A.Path.PartitionKeyRangesPathSegment||e===A.Path.CollectionsPathSegment}buildHeaders(e){return ek({clientOptions:this.cosmosClientOptions,defaultHeaders:Object.assign(Object.assign({},this.cosmosClientOptions.defaultHeaders),e.options.initialHeaders),verb:e.method,path:e.path,resourceId:e.resourceId,resourceType:e.resourceType,options:e.options,partitionKeyRangeId:e.partitionKeyRangeId,useMultipleWriteLocations:this.connectionPolicy.useMultipleWriteLocations,partitionKey:e.partitionKey})}getContextDerivedPropsForRequestCreation(){return{globalEndpointManager:this.globalEndpointManager,requestAgent:this.cosmosClientOptions.agent,connectionPolicy:this.connectionPolicy,client:this,plugins:this.cosmosClientOptions.plugins,pipeline:this.pipeline}}};s(Hh,"ClientContext");var wu=Hh;function dF(t){let e=`${O3.getUserAgent()} ${A.SDKName}/${A.SDKVersion}`;return t?e+" "+t:e}s(dF,"getUserAgent");var Su=class Su{constructor(e,n){this.readDatabaseAccount=n,this.writeableLocations=[],this.readableLocations=[],this.unavailableReadableLocations=[],this.unavailableWriteableLocations=[],this.options=e,this.defaultEndpoint=e.endpoint,this.enableEndpointDiscovery=e.connectionPolicy.enableEndpointDiscovery,this.isRefreshing=!1,this.preferredLocations=this.options.connectionPolicy.preferredLocations}async getReadEndpoint(){return this.resolveServiceEndpoint(w.ResourceType.item,w.OperationType.Read)}async getWriteEndpoint(){return this.resolveServiceEndpoint(w.ResourceType.item,w.OperationType.Replace)}async getReadEndpoints(){return this.readableLocations.map(e=>e.databaseAccountEndpoint)}async getWriteEndpoints(){return this.writeableLocations.map(e=>e.databaseAccountEndpoint)}async markCurrentLocationUnavailableForRead(e){await this.refreshEndpointList();let n=this.readableLocations.find(r=>r.databaseAccountEndpoint===e);n&&(n.unavailable=!0,n.lastUnavailabilityTimestampInMs=Date.now(),this.unavailableReadableLocations.push(n))}async markCurrentLocationUnavailableForWrite(e){await this.refreshEndpointList();let n=this.writeableLocations.find(r=>r.databaseAccountEndpoint===e);n&&(n.unavailable=!0,n.lastUnavailabilityTimestampInMs=Date.now(),this.unavailableWriteableLocations.push(n))}canUseMultipleWriteLocations(e,n){let r=this.options.connectionPolicy.useMultipleWriteLocations;return e&&(r=r&&(e===w.ResourceType.item||e===w.ResourceType.sproc&&n===w.OperationType.Execute)),r}async resolveServiceEndpoint(e,n){if(!this.options.connectionPolicy.enableEndpointDiscovery)return this.defaultEndpoint;if(e===w.ResourceType.none)return this.defaultEndpoint;if(this.readableLocations.length===0||this.writeableLocations.length===0){let{resource:c}=await this.readDatabaseAccount({urlConnection:this.defaultEndpoint});this.writeableLocations=c.writableLocations,this.readableLocations=c.readableLocations}let r=If(n)?this.readableLocations:this.writeableLocations,o;if(this.preferredLocations&&this.preferredLocations.length>0){for(let c of this.preferredLocations)if(o=r.find(u=>u.unavailable!==!0&&Mw(u.name)===Mw(c)),o)break}return o||(o=r.find(c=>c.unavailable!==!0)),o?o.databaseAccountEndpoint:this.defaultEndpoint}async refreshEndpointList(){if(!this.isRefreshing&&this.enableEndpointDiscovery){this.isRefreshing=!0;let e=await this.getDatabaseAccountFromAnyEndpoint();e&&(this.refreshStaleUnavailableLocations(),this.refreshEndpoints(e)),this.isRefreshing=!1}}refreshEndpoints(e){for(let n of e.writableLocations)this.writeableLocations.find(o=>o.name===n.name)||this.writeableLocations.push(n);for(let n of e.readableLocations)this.readableLocations.find(o=>o.name===n.name)||this.readableLocations.push(n)}refreshStaleUnavailableLocations(){let e=Date.now();this.updateLocation(e,this.unavailableReadableLocations,this.readableLocations),this.unavailableReadableLocations=this.cleanUnavailableLocationList(e,this.unavailableReadableLocations),this.updateLocation(e,this.unavailableWriteableLocations,this.writeableLocations),this.unavailableWriteableLocations=this.cleanUnavailableLocationList(e,this.unavailableWriteableLocations)}updateLocation(e,n,r){for(let o of n){let c=r.find(u=>u.name===o.name);c&&e-c.lastUnavailabilityTimestampInMs>A.LocationUnavailableExpirationTimeInMs&&(c.unavailable=!1)}}cleanUnavailableLocationList(e,n){return n.filter(r=>!(r&&e-r.lastUnavailabilityTimestampInMs>=A.LocationUnavailableExpirationTimeInMs))}async getDatabaseAccountFromAnyEndpoint(){try{let e={urlConnection:this.defaultEndpoint},{resource:n}=await this.readDatabaseAccount(e);return n}catch{}if(this.preferredLocations)for(let e of this.preferredLocations)try{let r={urlConnection:Su.getLocationalEndpoint(this.defaultEndpoint,e)},{resource:o}=await this.readDatabaseAccount(r);if(o)return o}catch{}}static getLocationalEndpoint(e,n){let r=new URL(e);if(r.hostname){let o=r.hostname.toString().toLowerCase().split(".");if(o){let c=o[0],u=c+"-"+n.replace(" ","");return e.toLowerCase().replace(c,u)}}return null}};s(Su,"GlobalEndpointManager");var _u=Su;function Mw(t){return t.split(" ").join("").toLowerCase()}s(Mw,"normalizeEndpoint");var zh=class zh{constructor(e){var n,r;if(typeof e=="string"&&(e=H3(e)),!uF(e.endpoint))throw new Error("Invalid endpoint specified");e.connectionPolicy=Object.assign({},Ew,e.connectionPolicy),e.defaultHeaders=e.defaultHeaders||{},e.defaultHeaders[A.HttpHeaders.CacheControl]="no-cache",e.defaultHeaders[A.HttpHeaders.Version]=A.CurrentVersion,e.consistencyLevel!==void 0&&(e.defaultHeaders[A.HttpHeaders.ConsistencyLevel]=e.consistencyLevel),e.defaultHeaders[A.HttpHeaders.UserAgent]=dF(e.userAgentSuffix);let c=new _u(e,async u=>this.getDatabaseAccount(u));this.clientContext=new wu(e,c),!((n=e.connectionPolicy)===null||n===void 0)&&n.enableEndpointDiscovery&&(!((r=e.connectionPolicy)===null||r===void 0)&&r.enableBackgroundEndpointRefreshing)&&this.backgroundRefreshEndpointList(c,e.connectionPolicy.endpointRefreshRateInMs||Ew.endpointRefreshRateInMs),this.databases=new bu(this,this.clientContext),this.offers=new gu(this,this.clientContext)}async getDatabaseAccount(e){let n=await this.clientContext.getDatabaseAccount(e);return new ot(n.result,n.headers,n.code)}getWriteEndpoint(){return this.clientContext.getWriteEndpoint()}getReadEndpoint(){return this.clientContext.getReadEndpoint()}getWriteEndpoints(){return this.clientContext.getWriteEndpoints()}getReadEndpoints(){return this.clientContext.getReadEndpoints()}database(e){return new ka(this,e,this.clientContext)}offer(e){return new xo(this,e,this.clientContext)}dispose(){clearTimeout(this.endpointRefresher)}async backgroundRefreshEndpointList(e,n){this.endpointRefresher=setInterval(()=>{try{e.refreshEndpointList()}catch(r){console.warn("Failed to refresh endpoints",r)}},n),this.endpointRefresher.unref&&typeof this.endpointRefresher.unref=="function"&&this.endpointRefresher.unref()}};s(zh,"CosmosClient");var Af=zh,$h=class $h{};s($h,"SasTokenProperties");var Cf=$h;function fF(t){let e=new Uint8Array(t.length);for(let n=0;n0){if(typeof e.resourceKind!="string"&&e.resourceKind!=="ITEM")throw new Error(`illegalArgumentException : ${e.resourceKind} is an invalid partition key value range`);e.partitionKeyValueRanges.forEach(u=>{r+=`${fF(u)},`})}if(e.controlPlaneReaderScope===0&&(e.controlPlaneReaderScope+=w.SasTokenPermissionKind.ContainerReadAny,e.controlPlaneWriterScope+=w.SasTokenPermissionKind.ContainerReadAny),e.dataPlaneReaderScope===0&&e.dataPlaneWriterScope===0&&(e.dataPlaneReaderScope=w.SasTokenPermissionKind.ContainerFullAccess,e.dataPlaneWriterScope=w.SasTokenPermissionKind.ContainerFullAccess),typeof e.keyType!="number"||typeof e.keyType===void 0)switch(e.keyType){case co.PrimaryMaster:e.keyType=1;break;case co.SecondaryMaster:e.keyType=2;break;case co.PrimaryReadOnly:e.keyType=3;break;case co.SecondaryReadOnly:e.keyType=4;break;default:throw new Error(`illegalArgumentException : ${e.keyType} is an invalid key type`)}let o=e.user+` +`+e.userTag+` +`+e.resourcePath+` +`+r+` +`+Nw(e.startTime).toString(16)+` +`+Nw(e.expiryTime).toString(16)+` +`+e.keyType+` +`+e.controlPlaneReaderScope.toString(16)+` +`+e.controlPlaneWriterScope.toString(16)+` +`+e.dataPlaneReaderScope.toString(16)+` +`+e.dataPlaneWriterScope.toString(16)+` +`;return"type=sas&ver=1.0&sig="+await Hw(t,Buffer.from(o).toString("base64"))+";"+Buffer.from(o).toString("base64")}s(hF,"createAuthorizationSasToken");function Nw(t){return Math.round(t.getTime()/1e3)}s(Nw,"utcsecondsSinceEpoch");Object.defineProperty(w,"RestError",{enumerable:!0,get:function(){return go.RestError}});Object.defineProperty(w,"AbortError",{enumerable:!0,get:function(){return D3.AbortError}});w.BulkOperationType=In;w.ChangeFeedIterator=Ia;w.ChangeFeedResponse=lu;w.ClientContext=wu;w.ClientSideMetrics=Yn;w.Conflict=cu;w.ConflictResponse=Oa;w.Conflicts=uu;w.Constants=A;w.Container=Na;w.ContainerResponse=br;w.Containers=yu;w.CosmosClient=Af;w.DEFAULT_PARTITION_KEY_PATH=Fw;w.Database=ka;w.DatabaseAccount=tu;w.DatabaseResponse=wo;w.Databases=bu;w.ErrorResponse=nu;w.FeedResponse=mo;w.GlobalEndpointManager=_u;w.Item=yo;w.ItemResponse=Jn;w.Items=pu;w.Offer=xo;w.OfferResponse=gi;w.Offers=gu;w.PatchOperationType=ck;w.Permission=vo;w.PermissionResponse=wr;w.Permissions=xu;w.QueryIterator=St;w.QueryMetrics=Er;w.QueryMetricsConstants=ue;w.QueryPreparationTimes=Rr;w.ResourceResponse=ot;w.RuntimeExecutionTimes=Tr;w.SasTokenProperties=Cf;w.Scripts=mu;w.StatusCodes=vt;w.StoredProcedure=Da;w.StoredProcedureResponse=pi;w.StoredProcedures=du;w.TimeSpan=ve;w.TimeoutError=ru;w.Trigger=La;w.TriggerResponse=di;w.Triggers=fu;w.User=bo;w.UserDefinedFunction=Ma;w.UserDefinedFunctionResponse=fi;w.UserDefinedFunctions=hu;w.UserResponse=_r;w.Users=vu;w.createAuthorizationSasToken=hF;w.extractPartitionKey=hi;w.setAuthorizationTokenHeaderUsingMasterKey=zw});var s_=M((m8,a_)=>{"use strict";var{CosmosClient:mF}=o_();function gF(t){if(/:\d+/.test(t.host))return t.host;if(t.port)return t.host+":"+(t.port||"443")}s(gF,"getEndpoint");function yF(t){let e=gF(t),n=t.accountKey,r={requestTimeout:3e4};return t.disableSSL&&(process.env.NODE_TLS_REJECT_UNAUTHORIZED=0),new mF({endpoint:e,key:n,connectionPolicy:r})}s(yF,"setUpDocumentClient");a_.exports=yF});var c_=M((Ro,Ua)=>{(function(){var t,e="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",p=500,d="__lodash_placeholder__",m=1,h=2,y=4,v=1,P=2,_=1,E=2,I=4,N=8,H=16,j=32,J=64,te=128,Se=256,Ie=512,Ke=30,Ge="...",at=800,vn=16,Le=1,je=2,be=3,Re=1/0,Te=9007199254740991,V=17976931348623157e292,G=NaN,me=4294967295,jt=me-1,et=me>>>1,bn=[["ary",te],["bind",_],["bindKey",E],["curry",N],["curryRight",H],["flip",Ie],["partial",j],["partialRight",J],["rearg",Se]],wn="[object Arguments]",dt="[object Array]",Ct="[object AsyncFunction]",_n="[object Boolean]",Fn="[object Date]",tt="[object DOMException]",os="[object Error]",as="[object Function]",xg="[object GeneratorFunction]",sn="[object Map]",qo="[object Number]",MT="[object Null]",qn="[object Object]",vg="[object Promise]",NT="[object Proxy]",Bo="[object RegExp]",cn="[object Set]",jo="[object String]",ss="[object Symbol]",kT="[object Undefined]",Uo="[object WeakMap]",FT="[object WeakSet]",Ho="[object ArrayBuffer]",Ti="[object DataView]",rl="[object Float32Array]",il="[object Float64Array]",ol="[object Int8Array]",al="[object Int16Array]",sl="[object Int32Array]",cl="[object Uint8Array]",ul="[object Uint8ClampedArray]",ll="[object Uint16Array]",pl="[object Uint32Array]",qT=/\b__p \+= '';/g,BT=/\b(__p \+=) '' \+/g,jT=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bg=/&(?:amp|lt|gt|quot|#39);/g,wg=/[&<>"']/g,UT=RegExp(bg.source),HT=RegExp(wg.source),zT=/<%-([\s\S]+?)%>/g,$T=/<%([\s\S]+?)%>/g,_g=/<%=([\s\S]+?)%>/g,WT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KT=/^\w*$/,GT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dl=/[\\^$.*+?()[\]{}|]/g,QT=RegExp(dl.source),fl=/^\s+/,VT=/\s/,JT=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,YT=/\{\n\/\* \[wrapped with (.+)\] \*/,XT=/,? & /,ZT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eE=/[()=,{}\[\]\/\s]/,tE=/\\(\\)?/g,nE=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rg=/\w*$/,rE=/^[-+]0x[0-9a-f]+$/i,iE=/^0b[01]+$/i,oE=/^\[object .+?Constructor\]$/,aE=/^0o[0-7]+$/i,sE=/^(?:0|[1-9]\d*)$/,cE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cs=/($^)/,uE=/['\n\r\u2028\u2029\\]/g,us="\\ud800-\\udfff",lE="\\u0300-\\u036f",pE="\\ufe20-\\ufe2f",dE="\\u20d0-\\u20ff",Tg=lE+pE+dE,Eg="\\u2700-\\u27bf",Sg="a-z\\xdf-\\xf6\\xf8-\\xff",fE="\\xac\\xb1\\xd7\\xf7",hE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mE="\\u2000-\\u206f",gE=" \\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",Pg="A-Z\\xc0-\\xd6\\xd8-\\xde",Ag="\\ufe0e\\ufe0f",Cg=fE+hE+mE+gE,hl="['\u2019]",yE="["+us+"]",Og="["+Cg+"]",ls="["+Tg+"]",Ig="\\d+",xE="["+Eg+"]",Dg="["+Sg+"]",Lg="[^"+us+Cg+Ig+Eg+Sg+Pg+"]",ml="\\ud83c[\\udffb-\\udfff]",vE="(?:"+ls+"|"+ml+")",Mg="[^"+us+"]",gl="(?:\\ud83c[\\udde6-\\uddff]){2}",yl="[\\ud800-\\udbff][\\udc00-\\udfff]",Ei="["+Pg+"]",Ng="\\u200d",kg="(?:"+Dg+"|"+Lg+")",bE="(?:"+Ei+"|"+Lg+")",Fg="(?:"+hl+"(?:d|ll|m|re|s|t|ve))?",qg="(?:"+hl+"(?:D|LL|M|RE|S|T|VE))?",Bg=vE+"?",jg="["+Ag+"]?",wE="(?:"+Ng+"(?:"+[Mg,gl,yl].join("|")+")"+jg+Bg+")*",_E="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",RE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ug=jg+Bg+wE,TE="(?:"+[xE,gl,yl].join("|")+")"+Ug,EE="(?:"+[Mg+ls+"?",ls,gl,yl,yE].join("|")+")",SE=RegExp(hl,"g"),PE=RegExp(ls,"g"),xl=RegExp(ml+"(?="+ml+")|"+EE+Ug,"g"),AE=RegExp([Ei+"?"+Dg+"+"+Fg+"(?="+[Og,Ei,"$"].join("|")+")",bE+"+"+qg+"(?="+[Og,Ei+kg,"$"].join("|")+")",Ei+"?"+kg+"+"+Fg,Ei+"+"+qg,RE,_E,Ig,TE].join("|"),"g"),CE=RegExp("["+Ng+us+Tg+Ag+"]"),OE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,IE=["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"],DE=-1,Pe={};Pe[rl]=Pe[il]=Pe[ol]=Pe[al]=Pe[sl]=Pe[cl]=Pe[ul]=Pe[ll]=Pe[pl]=!0,Pe[wn]=Pe[dt]=Pe[Ho]=Pe[_n]=Pe[Ti]=Pe[Fn]=Pe[os]=Pe[as]=Pe[sn]=Pe[qo]=Pe[qn]=Pe[Bo]=Pe[cn]=Pe[jo]=Pe[Uo]=!1;var Ee={};Ee[wn]=Ee[dt]=Ee[Ho]=Ee[Ti]=Ee[_n]=Ee[Fn]=Ee[rl]=Ee[il]=Ee[ol]=Ee[al]=Ee[sl]=Ee[sn]=Ee[qo]=Ee[qn]=Ee[Bo]=Ee[cn]=Ee[jo]=Ee[ss]=Ee[cl]=Ee[ul]=Ee[ll]=Ee[pl]=!0,Ee[os]=Ee[as]=Ee[Uo]=!1;var LE={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ME={"&":"&","<":"<",">":">",'"':""","'":"'"},NE={"&":"&","<":"<",">":">",""":'"',"'":"'"},kE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},FE=parseFloat,qE=parseInt,Hg=typeof global=="object"&&global&&global.Object===Object&&global,BE=typeof self=="object"&&self&&self.Object===Object&&self,Qe=Hg||BE||Function("return this")(),vl=typeof Ro=="object"&&Ro&&!Ro.nodeType&&Ro,Lr=vl&&typeof Ua=="object"&&Ua&&!Ua.nodeType&&Ua,zg=Lr&&Lr.exports===vl,bl=zg&&Hg.process,Ut=function(){try{var C=Lr&&Lr.require&&Lr.require("util").types;return C||bl&&bl.binding&&bl.binding("util")}catch{}}(),$g=Ut&&Ut.isArrayBuffer,Wg=Ut&&Ut.isDate,Kg=Ut&&Ut.isMap,Gg=Ut&&Ut.isRegExp,Qg=Ut&&Ut.isSet,Vg=Ut&&Ut.isTypedArray;function Ot(C,k,L){switch(L.length){case 0:return C.call(k);case 1:return C.call(k,L[0]);case 2:return C.call(k,L[0],L[1]);case 3:return C.call(k,L[0],L[1],L[2])}return C.apply(k,L)}s(Ot,"apply");function jE(C,k,L,$){for(var re=-1,ge=C==null?0:C.length;++re-1}s(ps,"arrayIncludes");function wl(C,k,L){for(var $=-1,re=C==null?0:C.length;++$-1;);return L}s(ny,"charsStartIndex");function ry(C,k){for(var L=C.length;L--&&Si(k,C[L],0)>-1;);return L}s(ry,"charsEndIndex");function VE(C,k){for(var L=C.length,$=0;L--;)C[L]===k&&++$;return $}s(VE,"countHolders");var JE=El(LE),YE=El(ME);function XE(C){return"\\"+kE[C]}s(XE,"escapeStringChar");function ZE(C,k){return C==null?t:C[k]}s(ZE,"getValue");function Pi(C){return CE.test(C)}s(Pi,"hasUnicode");function eS(C){return OE.test(C)}s(eS,"hasUnicodeWord");function tS(C){for(var k,L=[];!(k=C.next()).done;)L.push(k.value);return L}s(tS,"iteratorToArray");function Cl(C){var k=-1,L=Array(C.size);return C.forEach(function($,re){L[++k]=[re,$]}),L}s(Cl,"mapToArray");function iy(C,k){return function(L){return C(k(L))}}s(iy,"overArg");function tr(C,k){for(var L=-1,$=C.length,re=0,ge=[];++L<$;){var He=C[L];(He===k||He===d)&&(C[L]=d,ge[re++]=L)}return ge}s(tr,"replaceHolders");function fs(C){var k=-1,L=Array(C.size);return C.forEach(function($){L[++k]=$}),L}s(fs,"setToArray");function nS(C){var k=-1,L=Array(C.size);return C.forEach(function($){L[++k]=[$,$]}),L}s(nS,"setToPairs");function rS(C,k,L){for(var $=L-1,re=C.length;++$-1}s(US,"listCacheHas");function HS(i,a){var l=this.__data__,f=As(l,i);return f<0?(++this.size,l.push([i,a])):l[f][1]=a,this}s(HS,"listCacheSet"),Bn.prototype.clear=qS,Bn.prototype.delete=BS,Bn.prototype.get=jS,Bn.prototype.has=US,Bn.prototype.set=HS;function jn(i){var a=-1,l=i==null?0:i.length;for(this.clear();++a=a?i:a)),i}s(Fr,"baseClamp");function Wt(i,a,l,f,g,b){var T,S=a&m,O=a&h,F=a&y;if(l&&(T=g?l(i,f,g,b):l(i)),T!==t)return T;if(!De(i))return i;var q=ie(i);if(q){if(T=KP(i),!S)return bt(i,T)}else{var B=ct(i),z=B==as||B==xg;if(cr(i))return jy(i,S);if(B==qn||B==wn||z&&!g){if(T=O||z?{}:ox(i),!S)return O?NP(i,iP(T,i)):MP(i,gy(T,i))}else{if(!Ee[B])return g?i:{};T=GP(i,B,S)}}b||(b=new ln);var W=b.get(i);if(W)return W;b.set(i,T),Mx(i)?i.forEach(function(ee){T.add(Wt(ee,a,l,ee,i,b))}):Dx(i)&&i.forEach(function(ee,ce){T.set(ce,Wt(ee,a,l,ce,i,b))});var Z=F?O?tp:ep:O?_t:Ve,ae=q?t:Z(i);return Ht(ae||i,function(ee,ce){ae&&(ce=ee,ee=i[ce]),Vo(T,ce,Wt(ee,a,l,ce,i,b))}),T}s(Wt,"baseClone");function oP(i){var a=Ve(i);return function(l){return yy(l,i,a)}}s(oP,"baseConforms");function yy(i,a,l){var f=l.length;if(i==null)return!f;for(i=we(i);f--;){var g=l[f],b=a[g],T=i[g];if(T===t&&!(g in i)||!b(T))return!1}return!0}s(yy,"baseConformsTo");function xy(i,a,l){if(typeof i!="function")throw new zt(o);return na(function(){i.apply(t,l)},a)}s(xy,"baseDelay");function Jo(i,a,l,f){var g=-1,b=ps,T=!0,S=i.length,O=[],F=a.length;if(!S)return O;l&&(a=Ae(a,It(l))),f?(b=wl,T=!1):a.length>=n&&(b=zo,T=!1,a=new kr(a));e:for(;++gg?0:g+l),f=f===t||f>g?g:oe(f),f<0&&(f+=g),f=l>f?0:kx(f);l0&&l(S)?a>1?nt(S,a-1,l,f,g):er(g,S):f||(g[g.length]=S)}return g}s(nt,"baseFlatten");var kl=Ky(),wy=Ky(!0);function Rn(i,a){return i&&kl(i,a,Ve)}s(Rn,"baseForOwn");function Fl(i,a){return i&&wy(i,a,Ve)}s(Fl,"baseForOwnRight");function Os(i,a){return Zn(a,function(l){return Wn(i[l])})}s(Os,"baseFunctions");function qr(i,a){a=ar(a,i);for(var l=0,f=a.length;i!=null&&la}s(ql,"baseGt");function cP(i,a){return i!=null&&xe.call(i,a)}s(cP,"baseHas");function uP(i,a){return i!=null&&a in we(i)}s(uP,"baseHasIn");function lP(i,a,l){return i>=st(a,l)&&i=120&&q.length>=120)?new kr(T&&q):t}q=i[0];var B=-1,z=S[0];e:for(;++B-1;)S!==i&&ws.call(S,O,1),ws.call(i,O,1);return i}s(zl,"basePullAll");function Dy(i,a){for(var l=i?a.length:0,f=l-1;l--;){var g=a[l];if(l==f||g!==b){var b=g;$n(g)?ws.call(i,g,1):Gl(i,g)}}return i}s(Dy,"basePullAt");function $l(i,a){return i+Ts(dy()*(a-i+1))}s($l,"baseRandom");function RP(i,a,l,f){for(var g=-1,b=ze(Rs((a-i)/(l||1)),0),T=L(b);b--;)T[f?b:++g]=i,i+=l;return T}s(RP,"baseRange");function Wl(i,a){var l="";if(!i||a<1||a>Te)return l;do a%2&&(l+=i),a=Ts(a/2),a&&(i+=i);while(a);return l}s(Wl,"baseRepeat");function se(i,a){return cp(cx(i,a,Rt),i+"")}s(se,"baseRest");function TP(i){return my(Fi(i))}s(TP,"baseSample");function EP(i,a){var l=Fi(i);return Us(l,Fr(a,0,l.length))}s(EP,"baseSampleSize");function Zo(i,a,l,f){if(!De(i))return i;a=ar(a,i);for(var g=-1,b=a.length,T=b-1,S=i;S!=null&&++gg?0:g+a),l=l>g?g:l,l<0&&(l+=g),g=a>l?0:l-a>>>0,a>>>=0;for(var b=L(g);++f>>1,T=i[b];T!==null&&!Lt(T)&&(l?T<=a:T=n){var F=a?null:BP(i);if(F)return fs(F);T=!1,g=zo,O=new kr}else O=a?[]:S;e:for(;++f=f?i:Kt(i,a,l)}s(sr,"castSlice");var By=gS||function(i){return Qe.clearTimeout(i)};function jy(i,a){if(a)return i.slice();var l=i.length,f=sy?sy(l):new i.constructor(l);return i.copy(f),f}s(jy,"cloneBuffer");function Yl(i){var a=new i.constructor(i.byteLength);return new vs(a).set(new vs(i)),a}s(Yl,"cloneArrayBuffer");function OP(i,a){var l=a?Yl(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}s(OP,"cloneDataView");function IP(i){var a=new i.constructor(i.source,Rg.exec(i));return a.lastIndex=i.lastIndex,a}s(IP,"cloneRegExp");function DP(i){return Qo?we(Qo.call(i)):{}}s(DP,"cloneSymbol");function Uy(i,a){var l=a?Yl(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}s(Uy,"cloneTypedArray");function Hy(i,a){if(i!==a){var l=i!==t,f=i===null,g=i===i,b=Lt(i),T=a!==t,S=a===null,O=a===a,F=Lt(a);if(!S&&!F&&!b&&i>a||b&&T&&O&&!S&&!F||f&&T&&O||!l&&O||!g)return 1;if(!f&&!b&&!F&&i=S)return O;var F=l[f];return O*(F=="desc"?-1:1)}}return i.index-a.index}s(LP,"compareMultiple");function zy(i,a,l,f){for(var g=-1,b=i.length,T=l.length,S=-1,O=a.length,F=ze(b-T,0),q=L(O+F),B=!f;++S1?l[g-1]:t,T=g>2?l[2]:t;for(b=i.length>3&&typeof b=="function"?(g--,b):t,T&&ht(l[0],l[1],T)&&(b=g<3?t:b,g=1),a=we(a);++f-1?g[b?a[T]:T]:t}}s(Qy,"createFind");function Vy(i){return zn(function(a){var l=a.length,f=l,g=$t.prototype.thru;for(i&&a.reverse();f--;){var b=a[f];if(typeof b!="function")throw new zt(o);if(g&&!T&&Bs(b)=="wrapper")var T=new $t([],!0)}for(f=T?f:l;++f1&&de.reverse(),q&&OS))return!1;var F=b.get(i),q=b.get(a);if(F&&q)return F==a&&q==i;var B=-1,z=!0,W=l&P?new kr:t;for(b.set(i,a),b.set(a,i);++B1?"& ":"")+a[f],a=a.join(l>2?", ":" "),i.replace(JT,`{ +/* [wrapped with `+a+`] */ +`)}s(QP,"insertWrapDetails");function VP(i){return ie(i)||Ur(i)||!!(ly&&i&&i[ly])}s(VP,"isFlattenable");function $n(i,a){var l=typeof i;return a=a??Te,!!a&&(l=="number"||l!="symbol"&&sE.test(i))&&i>-1&&i%1==0&&i0){if(++a>=at)return arguments[0]}else a=0;return i.apply(t,arguments)}}s(dx,"shortOut");function Us(i,a){var l=-1,f=i.length,g=f-1;for(a=a===t?f:a;++l1?i[a-1]:t;return l=typeof l=="function"?(i.pop(),l):t,bx(i,l)});function wx(i){var a=x(i);return a.__chain__=!0,a}s(wx,"chain");function aC(i,a){return a(i),i}s(aC,"tap");function Hs(i,a){return a(i)}s(Hs,"thru");var sC=zn(function(i){var a=i.length,l=a?i[0]:0,f=this.__wrapped__,g=s(function(b){return Nl(b,i)},"interceptor");return a>1||this.__actions__.length||!(f instanceof le)||!$n(l)?this.thru(g):(f=f.slice(l,+l+(a?1:0)),f.__actions__.push({func:Hs,args:[g],thisArg:t}),new $t(f,this.__chain__).thru(function(b){return a&&!b.length&&b.push(t),b}))});function cC(){return wx(this)}s(cC,"wrapperChain");function uC(){return new $t(this.value(),this.__chain__)}s(uC,"wrapperCommit");function lC(){this.__values__===t&&(this.__values__=Nx(this.value()));var i=this.__index__>=this.__values__.length,a=i?t:this.__values__[this.__index__++];return{done:i,value:a}}s(lC,"wrapperNext");function pC(){return this}s(pC,"wrapperToIterator");function dC(i){for(var a,l=this;l instanceof Ps;){var f=hx(l);f.__index__=0,f.__values__=t,a?g.__wrapped__=f:a=f;var g=f;l=l.__wrapped__}return g.__wrapped__=i,a}s(dC,"wrapperPlant");function fC(){var i=this.__wrapped__;if(i instanceof le){var a=i;return this.__actions__.length&&(a=new le(this)),a=a.reverse(),a.__actions__.push({func:Hs,args:[up],thisArg:t}),new $t(a,this.__chain__)}return this.thru(up)}s(fC,"wrapperReverse");function hC(){return Fy(this.__wrapped__,this.__actions__)}s(hC,"wrapperValue");var mC=Ms(function(i,a,l){xe.call(i,l)?++i[l]:Un(i,l,1)});function gC(i,a,l){var f=ie(i)?Jg:aP;return l&&ht(i,a,l)&&(a=t),f(i,Y(a,3))}s(gC,"every");function yC(i,a){var l=ie(i)?Zn:by;return l(i,Y(a,3))}s(yC,"filter");var xC=Qy(mx),vC=Qy(gx);function bC(i,a){return nt(zs(i,a),1)}s(bC,"flatMap");function wC(i,a){return nt(zs(i,a),Re)}s(wC,"flatMapDeep");function _C(i,a,l){return l=l===t?1:oe(l),nt(zs(i,a),l)}s(_C,"flatMapDepth");function _x(i,a){var l=ie(i)?Ht:ir;return l(i,Y(a,3))}s(_x,"forEach");function Rx(i,a){var l=ie(i)?UE:vy;return l(i,Y(a,3))}s(Rx,"forEachRight");var RC=Ms(function(i,a,l){xe.call(i,l)?i[l].push(a):Un(i,l,[a])});function TC(i,a,l,f){i=wt(i)?i:Fi(i),l=l&&!f?oe(l):0;var g=i.length;return l<0&&(l=ze(g+l,0)),Qs(i)?l<=g&&i.indexOf(a,l)>-1:!!g&&Si(i,a,l)>-1}s(TC,"includes");var EC=se(function(i,a,l){var f=-1,g=typeof a=="function",b=wt(i)?L(i.length):[];return ir(i,function(T){b[++f]=g?Ot(a,T,l):Yo(T,a,l)}),b}),SC=Ms(function(i,a,l){Un(i,l,a)});function zs(i,a){var l=ie(i)?Ae:Sy;return l(i,Y(a,3))}s(zs,"map");function PC(i,a,l,f){return i==null?[]:(ie(a)||(a=a==null?[]:[a]),l=f?t:l,ie(l)||(l=l==null?[]:[l]),Oy(i,a,l))}s(PC,"orderBy");var AC=Ms(function(i,a,l){i[l?0:1].push(a)},function(){return[[],[]]});function CC(i,a,l){var f=ie(i)?_l:ey,g=arguments.length<3;return f(i,Y(a,4),l,g,ir)}s(CC,"reduce");function OC(i,a,l){var f=ie(i)?HE:ey,g=arguments.length<3;return f(i,Y(a,4),l,g,vy)}s(OC,"reduceRight");function IC(i,a){var l=ie(i)?Zn:by;return l(i,Ks(Y(a,3)))}s(IC,"reject");function DC(i){var a=ie(i)?my:TP;return a(i)}s(DC,"sample");function LC(i,a,l){(l?ht(i,a,l):a===t)?a=1:a=oe(a);var f=ie(i)?tP:EP;return f(i,a)}s(LC,"sampleSize");function MC(i){var a=ie(i)?nP:PP;return a(i)}s(MC,"shuffle");function NC(i){if(i==null)return 0;if(wt(i))return Qs(i)?Ai(i):i.length;var a=ct(i);return a==sn||a==cn?i.size:Ul(i).length}s(NC,"size");function kC(i,a,l){var f=ie(i)?Rl:AP;return l&&ht(i,a,l)&&(a=t),f(i,Y(a,3))}s(kC,"some");var FC=se(function(i,a){if(i==null)return[];var l=a.length;return l>1&&ht(i,a[0],a[1])?a=[]:l>2&&ht(a[0],a[1],a[2])&&(a=[a[0]]),Oy(i,nt(a,1),[])}),$s=yS||function(){return Qe.Date.now()};function qC(i,a){if(typeof a!="function")throw new zt(o);return i=oe(i),function(){if(--i<1)return a.apply(this,arguments)}}s(qC,"after");function Tx(i,a,l){return a=l?t:a,a=i&&a==null?i.length:a,Hn(i,te,t,t,t,t,a)}s(Tx,"ary");function Ex(i,a){var l;if(typeof a!="function")throw new zt(o);return i=oe(i),function(){return--i>0&&(l=a.apply(this,arguments)),i<=1&&(a=t),l}}s(Ex,"before");var pp=se(function(i,a,l){var f=_;if(l.length){var g=tr(l,Ni(pp));f|=j}return Hn(i,f,a,l,g)}),Sx=se(function(i,a,l){var f=_|E;if(l.length){var g=tr(l,Ni(Sx));f|=j}return Hn(a,f,i,l,g)});function Px(i,a,l){a=l?t:a;var f=Hn(i,N,t,t,t,t,t,a);return f.placeholder=Px.placeholder,f}s(Px,"curry");function Ax(i,a,l){a=l?t:a;var f=Hn(i,H,t,t,t,t,t,a);return f.placeholder=Ax.placeholder,f}s(Ax,"curryRight");function Cx(i,a,l){var f,g,b,T,S,O,F=0,q=!1,B=!1,z=!0;if(typeof i!="function")throw new zt(o);a=Qt(a)||0,De(l)&&(q=!!l.leading,B="maxWait"in l,b=B?ze(Qt(l.maxWait)||0,a):b,z="trailing"in l?!!l.trailing:z);function W(qe){var dn=f,Gn=g;return f=g=t,F=qe,T=i.apply(Gn,dn),T}s(W,"invokeFunc");function Z(qe){return F=qe,S=na(ce,a),q?W(qe):T}s(Z,"leadingEdge");function ae(qe){var dn=qe-O,Gn=qe-F,Qx=a-dn;return B?st(Qx,b-Gn):Qx}s(ae,"remainingWait");function ee(qe){var dn=qe-O,Gn=qe-F;return O===t||dn>=a||dn<0||B&&Gn>=b}s(ee,"shouldInvoke");function ce(){var qe=$s();if(ee(qe))return de(qe);S=na(ce,ae(qe))}s(ce,"timerExpired");function de(qe){return S=t,z&&f?W(qe):(f=g=t,T)}s(de,"trailingEdge");function Mt(){S!==t&&By(S),F=0,f=O=g=S=t}s(Mt,"cancel");function mt(){return S===t?T:de($s())}s(mt,"flush");function Nt(){var qe=$s(),dn=ee(qe);if(f=arguments,g=this,O=qe,dn){if(S===t)return Z(O);if(B)return By(S),S=na(ce,a),W(O)}return S===t&&(S=na(ce,a)),T}return s(Nt,"debounced"),Nt.cancel=Mt,Nt.flush=mt,Nt}s(Cx,"debounce");var BC=se(function(i,a){return xy(i,1,a)}),jC=se(function(i,a,l){return xy(i,Qt(a)||0,l)});function UC(i){return Hn(i,Ie)}s(UC,"flip");function Ws(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new zt(o);var l=s(function(){var f=arguments,g=a?a.apply(this,f):f[0],b=l.cache;if(b.has(g))return b.get(g);var T=i.apply(this,f);return l.cache=b.set(g,T)||b,T},"memoized");return l.cache=new(Ws.Cache||jn),l}s(Ws,"memoize"),Ws.Cache=jn;function Ks(i){if(typeof i!="function")throw new zt(o);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}s(Ks,"negate");function HC(i){return Ex(2,i)}s(HC,"once");var zC=CP(function(i,a){a=a.length==1&&ie(a[0])?Ae(a[0],It(Y())):Ae(nt(a,1),It(Y()));var l=a.length;return se(function(f){for(var g=-1,b=st(f.length,l);++g=a}),Ur=Ry(function(){return arguments}())?Ry:function(i){return Me(i)&&xe.call(i,"callee")&&!uy.call(i,"callee")},ie=L.isArray,iO=$g?It($g):dP;function wt(i){return i!=null&&Gs(i.length)&&!Wn(i)}s(wt,"isArrayLike");function Fe(i){return Me(i)&&wt(i)}s(Fe,"isArrayLikeObject");function oO(i){return i===!0||i===!1||Me(i)&&ft(i)==_n}s(oO,"isBoolean");var cr=vS||Rp,aO=Wg?It(Wg):fP;function sO(i){return Me(i)&&i.nodeType===1&&!ra(i)}s(sO,"isElement");function cO(i){if(i==null)return!0;if(wt(i)&&(ie(i)||typeof i=="string"||typeof i.splice=="function"||cr(i)||ki(i)||Ur(i)))return!i.length;var a=ct(i);if(a==sn||a==cn)return!i.size;if(ta(i))return!Ul(i).length;for(var l in i)if(xe.call(i,l))return!1;return!0}s(cO,"isEmpty");function uO(i,a){return Xo(i,a)}s(uO,"isEqual");function lO(i,a,l){l=typeof l=="function"?l:t;var f=l?l(i,a):t;return f===t?Xo(i,a,t,l):!!f}s(lO,"isEqualWith");function fp(i){if(!Me(i))return!1;var a=ft(i);return a==os||a==tt||typeof i.message=="string"&&typeof i.name=="string"&&!ra(i)}s(fp,"isError");function pO(i){return typeof i=="number"&&py(i)}s(pO,"isFinite");function Wn(i){if(!De(i))return!1;var a=ft(i);return a==as||a==xg||a==Ct||a==NT}s(Wn,"isFunction");function Ix(i){return typeof i=="number"&&i==oe(i)}s(Ix,"isInteger");function Gs(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Te}s(Gs,"isLength");function De(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}s(De,"isObject");function Me(i){return i!=null&&typeof i=="object"}s(Me,"isObjectLike");var Dx=Kg?It(Kg):mP;function dO(i,a){return i===a||jl(i,a,rp(a))}s(dO,"isMatch");function fO(i,a,l){return l=typeof l=="function"?l:t,jl(i,a,rp(a),l)}s(fO,"isMatchWith");function hO(i){return Lx(i)&&i!=+i}s(hO,"isNaN");function mO(i){if(XP(i))throw new re(r);return Ty(i)}s(mO,"isNative");function gO(i){return i===null}s(gO,"isNull");function yO(i){return i==null}s(yO,"isNil");function Lx(i){return typeof i=="number"||Me(i)&&ft(i)==qo}s(Lx,"isNumber");function ra(i){if(!Me(i)||ft(i)!=qn)return!1;var a=bs(i);if(a===null)return!0;var l=xe.call(a,"constructor")&&a.constructor;return typeof l=="function"&&l instanceof l&&gs.call(l)==fS}s(ra,"isPlainObject");var hp=Gg?It(Gg):gP;function xO(i){return Ix(i)&&i>=-Te&&i<=Te}s(xO,"isSafeInteger");var Mx=Qg?It(Qg):yP;function Qs(i){return typeof i=="string"||!ie(i)&&Me(i)&&ft(i)==jo}s(Qs,"isString");function Lt(i){return typeof i=="symbol"||Me(i)&&ft(i)==ss}s(Lt,"isSymbol");var ki=Vg?It(Vg):xP;function vO(i){return i===t}s(vO,"isUndefined");function bO(i){return Me(i)&&ct(i)==Uo}s(bO,"isWeakMap");function wO(i){return Me(i)&&ft(i)==FT}s(wO,"isWeakSet");var _O=qs(Hl),RO=qs(function(i,a){return i<=a});function Nx(i){if(!i)return[];if(wt(i))return Qs(i)?un(i):bt(i);if($o&&i[$o])return tS(i[$o]());var a=ct(i),l=a==sn?Cl:a==cn?fs:Fi;return l(i)}s(Nx,"toArray");function Kn(i){if(!i)return i===0?i:0;if(i=Qt(i),i===Re||i===-Re){var a=i<0?-1:1;return a*V}return i===i?i:0}s(Kn,"toFinite");function oe(i){var a=Kn(i),l=a%1;return a===a?l?a-l:a:0}s(oe,"toInteger");function kx(i){return i?Fr(oe(i),0,me):0}s(kx,"toLength");function Qt(i){if(typeof i=="number")return i;if(Lt(i))return G;if(De(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=De(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=ty(i);var l=iE.test(i);return l||aE.test(i)?qE(i.slice(2),l?2:8):rE.test(i)?G:+i}s(Qt,"toNumber");function Fx(i){return Tn(i,_t(i))}s(Fx,"toPlainObject");function TO(i){return i?Fr(oe(i),-Te,Te):i===0?i:0}s(TO,"toSafeInteger");function ye(i){return i==null?"":Dt(i)}s(ye,"toString");var EO=Li(function(i,a){if(ta(a)||wt(a)){Tn(a,Ve(a),i);return}for(var l in a)xe.call(a,l)&&Vo(i,l,a[l])}),qx=Li(function(i,a){Tn(a,_t(a),i)}),Vs=Li(function(i,a,l,f){Tn(a,_t(a),i,f)}),SO=Li(function(i,a,l,f){Tn(a,Ve(a),i,f)}),PO=zn(Nl);function AO(i,a){var l=Di(i);return a==null?l:gy(l,a)}s(AO,"create");var CO=se(function(i,a){i=we(i);var l=-1,f=a.length,g=f>2?a[2]:t;for(g&&ht(a[0],a[1],g)&&(f=1);++l1),b}),Tn(i,tp(i),l),f&&(l=Wt(l,m|h|y,jP));for(var g=a.length;g--;)Gl(l,a[g]);return l});function GO(i,a){return jx(i,Ks(Y(a)))}s(GO,"omitBy");var QO=zn(function(i,a){return i==null?{}:wP(i,a)});function jx(i,a){if(i==null)return{};var l=Ae(tp(i),function(f){return[f]});return a=Y(a),Iy(i,l,function(f,g){return a(f,g[0])})}s(jx,"pickBy");function VO(i,a,l){a=ar(a,i);var f=-1,g=a.length;for(g||(g=1,i=t);++fa){var f=i;i=a,a=f}if(l||i%1||a%1){var g=dy();return st(i+g*(a-i+FE("1e-"+((g+"").length-1))),a)}return $l(i,a)}s(oI,"random");var aI=Mi(function(i,a,l){return a=a.toLowerCase(),i+(l?zx(a):a)});function zx(i){return yp(ye(i).toLowerCase())}s(zx,"capitalize");function $x(i){return i=ye(i),i&&i.replace(cE,JE).replace(PE,"")}s($x,"deburr");function sI(i,a,l){i=ye(i),a=Dt(a);var f=i.length;l=l===t?f:Fr(oe(l),0,f);var g=l;return l-=a.length,l>=0&&i.slice(l,g)==a}s(sI,"endsWith");function cI(i){return i=ye(i),i&&HT.test(i)?i.replace(wg,YE):i}s(cI,"escape");function uI(i){return i=ye(i),i&&QT.test(i)?i.replace(dl,"\\$&"):i}s(uI,"escapeRegExp");var lI=Mi(function(i,a,l){return i+(l?"-":"")+a.toLowerCase()}),pI=Mi(function(i,a,l){return i+(l?" ":"")+a.toLowerCase()}),dI=Gy("toLowerCase");function fI(i,a,l){i=ye(i),a=oe(a);var f=a?Ai(i):0;if(!a||f>=a)return i;var g=(a-f)/2;return Fs(Ts(g),l)+i+Fs(Rs(g),l)}s(fI,"pad");function hI(i,a,l){i=ye(i),a=oe(a);var f=a?Ai(i):0;return a&&f>>0,l?(i=ye(i),i&&(typeof a=="string"||a!=null&&!hp(a))&&(a=Dt(a),!a&&Pi(i))?sr(un(i),0,l):i.split(a,l)):[]}s(bI,"split");var wI=Mi(function(i,a,l){return i+(l?" ":"")+yp(a)});function _I(i,a,l){return i=ye(i),l=l==null?0:Fr(oe(l),0,i.length),a=Dt(a),i.slice(l,l+a.length)==a}s(_I,"startsWith");function RI(i,a,l){var f=x.templateSettings;l&&ht(i,a,l)&&(a=t),i=ye(i),a=Vs({},a,f,ex);var g=Vs({},a.imports,f.imports,ex),b=Ve(g),T=Al(g,b),S,O,F=0,q=a.interpolate||cs,B="__p += '",z=Ol((a.escape||cs).source+"|"+q.source+"|"+(q===_g?nE:cs).source+"|"+(a.evaluate||cs).source+"|$","g"),W="//# sourceURL="+(xe.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++DE+"]")+` +`;i.replace(z,function(ee,ce,de,Mt,mt,Nt){return de||(de=Mt),B+=i.slice(F,Nt).replace(uE,XE),ce&&(S=!0,B+=`' + +__e(`+ce+`) + +'`),mt&&(O=!0,B+=`'; +`+mt+`; +__p += '`),de&&(B+=`' + +((__t = (`+de+`)) == null ? '' : __t) + +'`),F=Nt+ee.length,ee}),B+=`'; +`;var Z=xe.call(a,"variable")&&a.variable;if(!Z)B=`with (obj) { +`+B+` +} +`;else if(eE.test(Z))throw new re(c);B=(O?B.replace(qT,""):B).replace(BT,"$1").replace(jT,"$1;"),B="function("+(Z||"obj")+`) { +`+(Z?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(O?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+B+`return __p +}`;var ae=Kx(function(){return ge(b,W+"return "+B).apply(t,T)});if(ae.source=B,fp(ae))throw ae;return ae}s(RI,"template");function TI(i){return ye(i).toLowerCase()}s(TI,"toLower");function EI(i){return ye(i).toUpperCase()}s(EI,"toUpper");function SI(i,a,l){if(i=ye(i),i&&(l||a===t))return ty(i);if(!i||!(a=Dt(a)))return i;var f=un(i),g=un(a),b=ny(f,g),T=ry(f,g)+1;return sr(f,b,T).join("")}s(SI,"trim");function PI(i,a,l){if(i=ye(i),i&&(l||a===t))return i.slice(0,oy(i)+1);if(!i||!(a=Dt(a)))return i;var f=un(i),g=ry(f,un(a))+1;return sr(f,0,g).join("")}s(PI,"trimEnd");function AI(i,a,l){if(i=ye(i),i&&(l||a===t))return i.replace(fl,"");if(!i||!(a=Dt(a)))return i;var f=un(i),g=ny(f,un(a));return sr(f,g).join("")}s(AI,"trimStart");function CI(i,a){var l=Ke,f=Ge;if(De(a)){var g="separator"in a?a.separator:g;l="length"in a?oe(a.length):l,f="omission"in a?Dt(a.omission):f}i=ye(i);var b=i.length;if(Pi(i)){var T=un(i);b=T.length}if(l>=b)return i;var S=l-Ai(f);if(S<1)return f;var O=T?sr(T,0,S).join(""):i.slice(0,S);if(g===t)return O+f;if(T&&(S+=O.length-S),hp(g)){if(i.slice(S).search(g)){var F,q=O;for(g.global||(g=Ol(g.source,ye(Rg.exec(g))+"g")),g.lastIndex=0;F=g.exec(q);)var B=F.index;O=O.slice(0,B===t?S:B)}}else if(i.indexOf(Dt(g),S)!=S){var z=O.lastIndexOf(g);z>-1&&(O=O.slice(0,z))}return O+f}s(CI,"truncate");function OI(i){return i=ye(i),i&&UT.test(i)?i.replace(bg,oS):i}s(OI,"unescape");var II=Mi(function(i,a,l){return i+(l?" ":"")+a.toUpperCase()}),yp=Gy("toUpperCase");function Wx(i,a,l){return i=ye(i),a=l?t:a,a===t?eS(i)?cS(i):WE(i):i.match(a)||[]}s(Wx,"words");var Kx=se(function(i,a){try{return Ot(i,t,a)}catch(l){return fp(l)?l:new re(l)}}),DI=zn(function(i,a){return Ht(a,function(l){l=En(l),Un(i,l,pp(i[l],i))}),i});function LI(i){var a=i==null?0:i.length,l=Y();return i=a?Ae(i,function(f){if(typeof f[1]!="function")throw new zt(o);return[l(f[0]),f[1]]}):[],se(function(f){for(var g=-1;++gTe)return[];var l=me,f=st(i,me);a=Y(a),i-=me;for(var g=Pl(f,a);++l0||a<0)?new le(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),a!==t&&(a=oe(a),l=a<0?l.dropRight(-a):l.take(a-i)),l)},le.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},le.prototype.toArray=function(){return this.take(me)},Rn(le.prototype,function(i,a){var l=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=x[f?"take"+(a=="last"?"Right":""):a],b=f||/^find/.test(a);g&&(x.prototype[a]=function(){var T=this.__wrapped__,S=f?[1]:arguments,O=T instanceof le,F=S[0],q=O||ie(T),B=s(function(ce){var de=g.apply(x,er([ce],S));return f&&z?de[0]:de},"interceptor");q&&l&&typeof F=="function"&&F.length!=1&&(O=q=!1);var z=this.__chain__,W=!!this.__actions__.length,Z=b&&!z,ae=O&&!W;if(!b&&q){T=ae?T:new le(this);var ee=i.apply(T,S);return ee.__actions__.push({func:Hs,args:[B],thisArg:t}),new $t(ee,z)}return Z&&ae?i.apply(this,S):(ee=this.thru(B),Z?f?ee.value()[0]:ee.value():ee)})}),Ht(["pop","push","shift","sort","splice","unshift"],function(i){var a=hs[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",f=/^(?:pop|shift)$/.test(i);x.prototype[i]=function(){var g=arguments;if(f&&!this.__chain__){var b=this.value();return a.apply(ie(b)?b:[],g)}return this[l](function(T){return a.apply(ie(T)?T:[],g)})}}),Rn(le.prototype,function(i,a){var l=x[a];if(l){var f=l.name+"";xe.call(Ii,f)||(Ii[f]=[]),Ii[f].push({name:a,func:l})}}),Ii[Ns(t,E).name]=[{name:"wrapper",func:t}],le.prototype.clone=OS,le.prototype.reverse=IS,le.prototype.value=DS,x.prototype.at=sC,x.prototype.chain=cC,x.prototype.commit=uC,x.prototype.next=lC,x.prototype.plant=dC,x.prototype.reverse=fC,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=hC,x.prototype.first=x.prototype.head,$o&&(x.prototype[$o]=pC),x},"runInContext"),nr=uS();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Qe._=nr,define(function(){return nr})):Lr?((Lr.exports=nr)._=nr,vl._=nr):Qe._=nr}).call(Ro)});var p_=M((x8,l_)=>{var u_=require("stream").Stream,xF=require("util");l_.exports=yn;function yn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}s(yn,"DelayedStream");xF.inherits(yn,u_);yn.create=function(t,e){var n=new this;e=e||{};for(var r in e)n[r]=e[r];n.source=t;var o=t.emit;return t.emit=function(){return n._handleEmit(arguments),o.apply(t,arguments)},t.on("error",function(){}),n.pauseStream&&t.pause(),n};Object.defineProperty(yn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});yn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};yn.prototype.resume=function(){this._released||this.release(),this.source.resume()};yn.prototype.pause=function(){this.source.pause()};yn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};yn.prototype.pipe=function(){var t=u_.prototype.pipe.apply(this,arguments);return this.resume(),t};yn.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};yn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var m_=M((b8,h_)=>{var vF=require("util"),f_=require("stream").Stream,d_=p_();h_.exports=ke;function ke(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}s(ke,"CombinedStream");vF.inherits(ke,f_);ke.create=function(t){var e=new this;t=t||{};for(var n in t)e[n]=t[n];return e};ke.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ke.prototype.append=function(t){var e=ke.isStreamLike(t);if(e){if(!(t instanceof d_)){var n=d_.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=n}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};ke.prototype.pipe=function(t,e){return f_.prototype.pipe.call(this,t,e),this.resume(),t};ke.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ke.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(n){var r=ke.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};ke.prototype._pipeNext=function(t){this._currentStream=t;var e=ke.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var n=t;this.write(n),this._getNext()};ke.prototype._handleErrors=function(t){var e=this;t.on("error",function(n){e._emitError(n)})};ke.prototype.write=function(t){this.emit("data",t)};ke.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ke.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ke.prototype.end=function(){this._reset(),this.emit("end")};ke.prototype.destroy=function(){this._reset(),this.emit("close")};ke.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ke.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ke.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ke.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var g_=M((_8,bF)=>{bF.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var x_=M((R8,y_)=>{y_.exports=g_()});var w_=M(Pt=>{"use strict";var Cu=x_(),wF=require("path").extname,v_=/^\s*([^;\s]*)(?:;|\s|$)/,_F=/^text\//i;Pt.charset=b_;Pt.charsets={lookup:b_};Pt.contentType=RF;Pt.extension=TF;Pt.extensions=Object.create(null);Pt.lookup=EF;Pt.types=Object.create(null);SF(Pt.extensions,Pt.types);function b_(t){if(!t||typeof t!="string")return!1;var e=v_.exec(t),n=e&&Cu[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&_F.test(e[1])?"UTF-8":!1}s(b_,"charset");function RF(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Pt.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var n=Pt.charset(e);n&&(e+="; charset="+n.toLowerCase())}return e}s(RF,"contentType");function TF(t){if(!t||typeof t!="string")return!1;var e=v_.exec(t),n=e&&Pt.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}s(TF,"extension");function EF(t){if(!t||typeof t!="string")return!1;var e=wF("x."+t).toLowerCase().substr(1);return e&&Pt.types[e]||!1}s(EF,"lookup");function SF(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys(Cu).forEach(s(function(o){var c=Cu[o],u=c.extensions;if(!(!u||!u.length)){t[o]=u;for(var p=0;ph||m===h&&e[d].substr(0,12)==="application/"))continue}e[d]=o}}},"forEachMimeType"))}s(SF,"populateMaps")});var R_=M((S8,__)=>{__.exports=PF;function PF(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}s(PF,"defer")});var Wh=M((A8,E_)=>{var T_=R_();E_.exports=AF;function AF(t){var e=!1;return T_(function(){e=!0}),s(function(r,o){e?t(r,o):T_(s(function(){t(r,o)},"nextTick_callback"))},"async_callback")}s(AF,"async")});var Kh=M((O8,S_)=>{S_.exports=CF;function CF(t){Object.keys(t.jobs).forEach(OF.bind(t)),t.jobs={}}s(CF,"abort");function OF(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}s(OF,"clean")});var Gh=M((D8,A_)=>{var P_=Wh(),IF=Kh();A_.exports=DF;function DF(t,e,n,r){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=LF(e,o,t[o],function(c,u){o in n.jobs&&(delete n.jobs[o],c?IF(n):n.results[o]=u,r(c,n.results))})}s(DF,"iterate");function LF(t,e,n,r){var o;return t.length==2?o=t(n,P_(r)):o=t(n,e,P_(r)),o}s(LF,"runJob")});var Qh=M((M8,C_)=>{C_.exports=MF;function MF(t,e){var n=!Array.isArray(t),r={index:0,keyedList:n||e?Object.keys(t):null,jobs:{},results:n?{}:[],size:n?Object.keys(t).length:t.length};return e&&r.keyedList.sort(n?e:function(o,c){return e(t[o],t[c])}),r}s(MF,"state")});var Vh=M((k8,O_)=>{var NF=Kh(),kF=Wh();O_.exports=FF;function FF(t){Object.keys(this.jobs).length&&(this.index=this.size,NF(this),kF(t)(null,this.results))}s(FF,"terminator")});var D_=M((q8,I_)=>{var qF=Gh(),BF=Qh(),jF=Vh();I_.exports=UF;function UF(t,e,n){for(var r=BF(t);r.index<(r.keyedList||t).length;)qF(t,e,r,function(o,c){if(o){n(o,c);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return jF.bind(r,n)}s(UF,"parallel")});var Jh=M((j8,Ou)=>{var L_=Gh(),HF=Qh(),zF=Vh();Ou.exports=$F;Ou.exports.ascending=M_;Ou.exports.descending=WF;function $F(t,e,n,r){var o=HF(t,n);return L_(t,e,o,s(function c(u,p){if(u){r(u,p);return}if(o.index++,o.index<(o.keyedList||t).length){L_(t,e,o,c);return}r(null,o.results)},"iteratorHandler")),zF.bind(o,r)}s($F,"serialOrdered");function M_(t,e){return te?1:0}s(M_,"ascending");function WF(t,e){return-1*M_(t,e)}s(WF,"descending")});var k_=M((H8,N_)=>{var KF=Jh();N_.exports=GF;function GF(t,e,n){return KF(t,e,null,n)}s(GF,"serial")});var q_=M(($8,F_)=>{F_.exports={parallel:D_(),serial:k_(),serialOrdered:Jh()}});var j_=M((W8,B_)=>{B_.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var z_=M((K8,H_)=>{var em=m_(),U_=require("util"),Yh=require("path"),QF=require("http"),VF=require("https"),JF=require("url").parse,YF=require("fs"),XF=require("stream").Stream,Xh=w_(),ZF=q_(),Zh=j_();H_.exports=he;U_.inherits(he,em);function he(t){if(!(this instanceof he))return new he(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],em.call(this),t=t||{};for(var e in t)this[e]=t[e]}s(he,"FormData");he.LINE_BREAK=`\r +`;he.DEFAULT_CONTENT_TYPE="application/octet-stream";he.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=em.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),U_.isArray(e)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(t,e,n),c=this._multiPartFooter();r(o),r(e),r(c),this._trackLength(o,e,n)};he.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+he.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof XF))&&(n.knownLength||this._valuesToMeasure.push(e))};he.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):YF.stat(t.path,function(n,r){var o;if(n){e(n);return}o=r.size-(t.start?t.start:0),e(null,o)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};he.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),o=this._getContentType(e,n),c="",u={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};typeof n.header=="object"&&Zh(u,n.header);var p;for(var d in u)u.hasOwnProperty(d)&&(p=u[d],p!=null&&(Array.isArray(p)||(p=[p]),p.length&&(c+=d+": "+p.join("; ")+he.LINE_BREAK)));return"--"+this.getBoundary()+he.LINE_BREAK+c+he.LINE_BREAK};he.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=Yh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=Yh.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=Yh.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};he.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=Xh.lookup(t.name)),!n&&t.path&&(n=Xh.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=Xh.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=he.DEFAULT_CONTENT_TYPE),n};he.prototype._multiPartFooter=function(){return function(t){var e=he.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};he.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+he.LINE_BREAK};he.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};he.prototype.setBoundary=function(t){this._boundary=t};he.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};he.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n{"use strict";var eq=require("url").parse,tq={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},nq=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function rq(t){var e=typeof t=="string"?eq(t):t||{},n=e.protocol,r=e.host,o=e.port;if(typeof r!="string"||!r||typeof n!="string"||(n=n.split(":",1)[0],r=r.replace(/:\d*$/,""),o=parseInt(o)||tq[n]||0,!iq(r,o)))return"";var c=To("npm_config_"+n+"_proxy")||To(n+"_proxy")||To("npm_config_proxy")||To("all_proxy");return c&&c.indexOf("://")===-1&&(c=n+"://"+c),c}s(rq,"getProxyForUrl");function iq(t,e){var n=(To("npm_config_no_proxy")||To("no_proxy")).toLowerCase();return n?n==="*"?!1:n.split(/[,\s]/).every(function(r){if(!r)return!0;var o=r.match(/^(.+):(\d+)$/),c=o?o[1]:r,u=o?parseInt(o[2]):0;return u&&u!==e?!0:/^[.*]/.test(c)?(c.charAt(0)==="*"&&(c=c.slice(1)),!nq.call(t,c)):t!==c}):!0}s(iq,"shouldProxy");function To(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}s(To,"getEnv");$_.getProxyForUrl=rq});var G_=M((J8,K_)=>{var Ha;K_.exports=function(){if(!Ha){try{Ha=da()("follow-redirects")}catch{}typeof Ha!="function"&&(Ha=s(function(){},"debug"))}Ha.apply(null,arguments)}});var X_=M((X8,dm)=>{var Wa=require("url"),za=Wa.URL,oq=require("http"),aq=require("https"),om=require("stream").Writable,am=require("assert"),Q_=G_(),sm=!1;try{am(new za)}catch(t){sm=t.code==="ERR_INVALID_URL"}var sq=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],cm=["abort","aborted","connect","error","socket","timeout"],um=Object.create(null);cm.forEach(function(t){um[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var nm=Ka("ERR_INVALID_URL","Invalid URL",TypeError),rm=Ka("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),cq=Ka("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",rm),uq=Ka("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),lq=Ka("ERR_STREAM_WRITE_AFTER_END","write after end"),pq=om.prototype.destroy||J_;function At(t,e){om.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(r){try{n._processResponse(r)}catch(o){n.emit("error",o instanceof rm?o:new rm({cause:o}))}},this._performRequest()}s(At,"RedirectableRequest");At.prototype=Object.create(om.prototype);At.prototype.abort=function(){pm(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};At.prototype.destroy=function(t){return pm(this._currentRequest,t),pq.call(this,t),this};At.prototype.write=function(t,e,n){if(this._ending)throw new lq;if(!xi(t)&&!hq(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if($a(e)&&(n=e,e=null),t.length===0){n&&n();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new uq),this.abort())};At.prototype.end=function(t,e,n){if($a(t)?(n=t,t=e=null):$a(e)&&(n=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,o=this._currentRequest;this.write(t,e,function(){r._ended=!0,o.end(null,null,n)}),this._ending=!0}};At.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};At.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};At.prototype.setTimeout=function(t,e){var n=this;function r(u){u.setTimeout(t),u.removeListener("timeout",u.destroy),u.addListener("timeout",u.destroy)}s(r,"destroyOnTimeout");function o(u){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),c()},t),r(u)}s(o,"startTimer");function c(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",c),n.removeListener("error",c),n.removeListener("response",c),n.removeListener("close",c),e&&n.removeListener("timeout",e),n.socket||n._currentRequest.removeListener("socket",o)}return s(c,"clearTimer"),e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",c),this.on("error",c),this.on("response",c),this.on("close",c),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){At.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(At.prototype,t,{get:function(){return this._currentRequest[t]}})});At.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};At.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var n=t.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=e.request(this._options,this._onNativeResponse);r._redirectable=this;for(var o of cm)r.on(o,um[o]);if(this._currentUrl=/^\//.test(this._options.path)?Wa.format(this._options):this._options.path,this._isRedirect){var c=0,u=this,p=this._requestBodyBuffers;s(function d(m){if(r===u._currentRequest)if(m)u.emit("error",m);else if(c=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(pm(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new cq;var r,o=this._options.beforeRedirect;o&&(r=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var c=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],tm(/^content-/i,this._options.headers));var u=tm(/^host$/i,this._options.headers),p=lm(this._currentUrl),d=u||p.host,m=/^\w+:/.test(n)?this._currentUrl:Wa.format(Object.assign(p,{host:d})),h=dq(n,m);if(Q_("redirecting to",h.href),this._isRedirect=!0,im(h,this._options),(h.protocol!==p.protocol&&h.protocol!=="https:"||h.host!==d&&!fq(h.host,d))&&tm(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),$a(o)){var y={headers:t.headers,statusCode:e},v={url:m,method:c,headers:r};o(this._options,y,v),this._sanitizeOptions(this._options)}this._performRequest()};function V_(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach(function(r){var o=r+":",c=n[o]=t[r],u=e[r]=Object.create(c);function p(m,h,y){return mq(m)?m=im(m):xi(m)?m=im(lm(m)):(y=h,h=Y_(m),m={protocol:o}),$a(h)&&(y=h,h=null),h=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},m,h),h.nativeProtocols=n,!xi(h.host)&&!xi(h.hostname)&&(h.hostname="::1"),am.equal(h.protocol,o,"protocol mismatch"),Q_("options",h),new At(h,y)}s(p,"request");function d(m,h,y){var v=u.request(m,h,y);return v.end(),v}s(d,"get"),Object.defineProperties(u,{request:{value:p,configurable:!0,enumerable:!0,writable:!0},get:{value:d,configurable:!0,enumerable:!0,writable:!0}})}),e}s(V_,"wrap");function J_(){}s(J_,"noop");function lm(t){var e;if(sm)e=new za(t);else if(e=Y_(Wa.parse(t)),!xi(e.protocol))throw new nm({input:t});return e}s(lm,"parseUrl");function dq(t,e){return sm?new za(t,e):lm(Wa.resolve(e,t))}s(dq,"resolveUrl");function Y_(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new nm({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new nm({input:t.href||t});return t}s(Y_,"validateUrl");function im(t,e){var n=e||{};for(var r of sq)n[r]=t[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}s(im,"spreadUrlObject");function tm(t,e){var n;for(var r in e)t.test(r)&&(n=e[r],delete e[r]);return n===null||typeof n>"u"?void 0:String(n).trim()}s(tm,"removeMatchingHeaders");function Ka(t,e,n){function r(o){Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return s(r,"CustomError"),r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),r}s(Ka,"createErrorType");function pm(t,e){for(var n of cm)t.removeListener(n,um[n]);t.on("error",J_),t.destroy(e)}s(pm,"destroyRequest");function fq(t,e){am(xi(t)&&xi(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}s(fq,"isSubdomain");function xi(t){return typeof t=="string"||t instanceof String}s(xi,"isString");function $a(t){return typeof t=="function"}s($a,"isFunction");function hq(t){return typeof t=="object"&&"length"in t}s(hq,"isBuffer");function mq(t){return za&&t instanceof za}s(mq,"isURL");dm.exports=V_({http:oq,https:aq});dm.exports.wrap=V_});var U1=M((e$,j1)=>{"use strict";var gq=z_(),yq=require("url"),xq=W_(),vq=require("http"),bq=require("https"),g1=require("util"),wq=X_(),_q=require("zlib"),y1=require("stream"),Rq=require("events");function Xn(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}s(Xn,"_interopDefaultLegacy");var x1=Xn(gq),Tq=Xn(yq),Eq=Xn(vq),Sq=Xn(bq),Pq=Xn(g1),Aq=Xn(wq),Cr=Xn(_q),Pr=Xn(y1),Cq=Xn(Rq);function v1(t,e){return s(function(){return t.apply(e,arguments)},"wrap")}s(v1,"bind");var{toString:Oq}=Object.prototype,{getPrototypeOf:Pm}=Object,Fu=(t=>e=>{let n=Oq.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ln=s(t=>(t=t.toLowerCase(),e=>Fu(e)===t),"kindOfTest"),qu=s(t=>e=>typeof e===t,"typeOfTest"),{isArray:Ao}=Array,Va=qu("undefined");function Iq(t){return t!==null&&!Va(t)&&t.constructor!==null&&!Va(t.constructor)&&nn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}s(Iq,"isBuffer");var b1=Ln("ArrayBuffer");function Dq(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&b1(t.buffer),e}s(Dq,"isArrayBufferView");var Lq=qu("string"),nn=qu("function"),w1=qu("number"),Bu=s(t=>t!==null&&typeof t=="object","isObject"),Mq=s(t=>t===!0||t===!1,"isBoolean"),Du=s(t=>{if(Fu(t)!=="object")return!1;let e=Pm(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},"isPlainObject"),Nq=Ln("Date"),kq=Ln("File"),Fq=Ln("Blob"),qq=Ln("FileList"),Bq=s(t=>Bu(t)&&nn(t.pipe),"isStream"),jq=s(t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||nn(t.append)&&((e=Fu(t))==="formdata"||e==="object"&&nn(t.toString)&&t.toString()==="[object FormData]"))},"isFormData"),Uq=Ln("URLSearchParams"),Hq=s(t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function Ya(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Ao(t))for(r=0,o=t.length;r0;)if(o=n[r],e===o.toLowerCase())return o;return null}s(_1,"findKey");var R1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,T1=s(t=>!Va(t)&&t!==R1,"isContextDefined");function ym(){let{caseless:t}=T1(this)&&this||{},e={},n=s((r,o)=>{let c=t&&_1(e,o)||o;Du(e[c])&&Du(r)?e[c]=ym(e[c],r):Du(r)?e[c]=ym({},r):Ao(r)?e[c]=r.slice():e[c]=r},"assignValue");for(let r=0,o=arguments.length;r(Ya(e,(o,c)=>{n&&nn(o)?t[c]=v1(o,n):t[c]=o},{allOwnKeys:r}),t),"extend"),$q=s(t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),"stripBOM"),Wq=s((t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},"inherits"),Kq=s((t,e,n,r)=>{let o,c,u,p={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),c=o.length;c-- >0;)u=o[c],(!r||r(u,t,e))&&!p[u]&&(e[u]=t[u],p[u]=!0);t=n!==!1&&Pm(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},"toFlatObject"),Gq=s((t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;let r=t.indexOf(e,n);return r!==-1&&r===n},"endsWith"),Qq=s(t=>{if(!t)return null;if(Ao(t))return t;let e=t.length;if(!w1(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},"toArray"),Vq=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Pm(Uint8Array)),Jq=s((t,e)=>{let r=(t&&t[Symbol.iterator]).call(t),o;for(;(o=r.next())&&!o.done;){let c=o.value;e.call(t,c[0],c[1])}},"forEachEntry"),Yq=s((t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},"matchAll"),Xq=Ln("HTMLFormElement"),Zq=s(t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,s(function(n,r,o){return r.toUpperCase()+o},"replacer")),"toCamelCase"),Z_=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),eB=Ln("RegExp"),E1=s((t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};Ya(n,(o,c)=>{let u;(u=e(o,c,t))!==!1&&(r[c]=u||o)}),Object.defineProperties(t,r)},"reduceDescriptors"),tB=s(t=>{E1(t,(e,n)=>{if(nn(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=t[n];if(nn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},"freezeMethods"),nB=s((t,e)=>{let n={},r=s(o=>{o.forEach(c=>{n[c]=!0})},"define");return Ao(t)?r(t):r(String(t).split(e)),n},"toObjectSet"),rB=s(()=>{},"noop"),iB=s((t,e)=>(t=+t,Number.isFinite(t)?t:e),"toFiniteNumber"),fm="abcdefghijklmnopqrstuvwxyz",e1="0123456789",S1={DIGIT:e1,ALPHA:fm,ALPHA_DIGIT:fm+fm.toUpperCase()+e1},oB=s((t=16,e=S1.ALPHA_DIGIT)=>{let n="",{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},"generateString");function aB(t){return!!(t&&nn(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}s(aB,"isSpecCompliantForm");var sB=s(t=>{let e=new Array(10),n=s((r,o)=>{if(Bu(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;let c=Ao(r)?[]:{};return Ya(r,(u,p)=>{let d=n(u,o+1);!Va(d)&&(c[p]=d)}),e[o]=void 0,c}}return r},"visit");return n(t,0)},"toJSONObject"),cB=Ln("AsyncFunction"),uB=s(t=>t&&(Bu(t)||nn(t))&&nn(t.then)&&nn(t.catch),"isThenable"),D={isArray:Ao,isArrayBuffer:b1,isBuffer:Iq,isFormData:jq,isArrayBufferView:Dq,isString:Lq,isNumber:w1,isBoolean:Mq,isObject:Bu,isPlainObject:Du,isUndefined:Va,isDate:Nq,isFile:kq,isBlob:Fq,isRegExp:eB,isFunction:nn,isStream:Bq,isURLSearchParams:Uq,isTypedArray:Vq,isFileList:qq,forEach:Ya,merge:ym,extend:zq,trim:Hq,stripBOM:$q,inherits:Wq,toFlatObject:Kq,kindOf:Fu,kindOfTest:Ln,endsWith:Gq,toArray:Qq,forEachEntry:Jq,matchAll:Yq,isHTMLForm:Xq,hasOwnProperty:Z_,hasOwnProp:Z_,reduceDescriptors:E1,freezeMethods:tB,toObjectSet:nB,toCamelCase:Zq,noop:rB,toFiniteNumber:iB,findKey:_1,global:R1,isContextDefined:T1,ALPHABET:S1,generateString:oB,isSpecCompliantForm:aB,toJSONObject:sB,isAsyncFn:cB,isThenable:uB};function K(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}s(K,"AxiosError");D.inherits(K,Error,{toJSON:s(function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var P1=K.prototype,A1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{A1[t]={value:t}});Object.defineProperties(K,A1);Object.defineProperty(P1,"isAxiosError",{value:!0});K.from=(t,e,n,r,o,c)=>{let u=Object.create(P1);return D.toFlatObject(t,u,s(function(d){return d!==Error.prototype},"filter"),p=>p!=="isAxiosError"),K.call(u,t.message,e,n,r,o),u.cause=t,u.name=t.name,c&&Object.assign(u,c),u};function xm(t){return D.isPlainObject(t)||D.isArray(t)}s(xm,"isVisitable");function C1(t){return D.endsWith(t,"[]")?t.slice(0,-2):t}s(C1,"removeBrackets");function t1(t,e,n){return t?t.concat(e).map(s(function(o,c){return o=C1(o),!n&&c?"["+o+"]":o},"each")).join(n?".":""):e}s(t1,"renderKey");function lB(t){return D.isArray(t)&&!t.some(xm)}s(lB,"isFlatArray");var pB=D.toFlatObject(D,{},null,s(function(e){return/^is[A-Z]/.test(e)},"filter"));function ju(t,e,n){if(!D.isObject(t))throw new TypeError("target must be an object");e=e||new(x1.default||FormData),n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,s(function(E,I){return!D.isUndefined(I[E])},"defined"));let r=n.metaTokens,o=n.visitor||h,c=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(e);if(!D.isFunction(o))throw new TypeError("visitor must be a function");function m(_){if(_===null)return"";if(D.isDate(_))return _.toISOString();if(!d&&D.isBlob(_))throw new K("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(_)||D.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}s(m,"convertValue");function h(_,E,I){let N=_;if(_&&!I&&typeof _=="object"){if(D.endsWith(E,"{}"))E=r?E:E.slice(0,-2),_=JSON.stringify(_);else if(D.isArray(_)&&lB(_)||(D.isFileList(_)||D.endsWith(E,"[]"))&&(N=D.toArray(_)))return E=C1(E),N.forEach(s(function(j,J){!(D.isUndefined(j)||j===null)&&e.append(u===!0?t1([E],J,c):u===null?E:E+"[]",m(j))},"each")),!1}return xm(_)?!0:(e.append(t1(I,E,c),m(_)),!1)}s(h,"defaultVisitor");let y=[],v=Object.assign(pB,{defaultVisitor:h,convertValue:m,isVisitable:xm});function P(_,E){if(!D.isUndefined(_)){if(y.indexOf(_)!==-1)throw Error("Circular reference detected in "+E.join("."));y.push(_),D.forEach(_,s(function(N,H){(!(D.isUndefined(N)||N===null)&&o.call(e,N,D.isString(H)?H.trim():H,E,v))===!0&&P(N,E?E.concat(H):[H])},"each")),y.pop()}}if(s(P,"build"),!D.isObject(t))throw new TypeError("data must be an object");return P(t),e}s(ju,"toFormData");function n1(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,s(function(r){return e[r]},"replacer"))}s(n1,"encode$1");function O1(t,e){this._pairs=[],t&&ju(t,this,e)}s(O1,"AxiosURLSearchParams");var I1=O1.prototype;I1.append=s(function(e,n){this._pairs.push([e,n])},"append");I1.toString=s(function(e){let n=e?function(r){return e.call(this,r,n1)}:n1;return this._pairs.map(s(function(o){return n(o[0])+"="+n(o[1])},"each"),"").join("&")},"toString");function dB(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}s(dB,"encode");function Am(t,e,n){if(!e)return t;let r=n&&n.encode||dB,o=n&&n.serialize,c;if(o?c=o(e,n):c=D.isURLSearchParams(e)?e.toString():new O1(e,n).toString(r),c){let u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}s(Am,"buildURL");var Mm=class Mm{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){D.forEach(this.handlers,s(function(r){r!==null&&e(r)},"forEachHandler"))}};s(Mm,"InterceptorManager");var vm=Mm,r1=vm,Cm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fB=Tq.default.URLSearchParams,xn={isNode:!0,classes:{URLSearchParams:fB,FormData:x1.default,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};function hB(t,e){return ju(t,new xn.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,c){return D.isBuffer(n)?(this.append(r,n.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},e))}s(hB,"toURLEncodedForm");function mB(t){return D.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}s(mB,"parsePropPath");function gB(t){let e={},n=Object.keys(t),r,o=n.length,c;for(r=0;r=n.length;return u=!u&&D.isArray(o)?o.length:u,d?(D.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!p):((!o[u]||!D.isObject(o[u]))&&(o[u]=[]),e(n,r,o[u],c)&&D.isArray(o[u])&&(o[u]=gB(o[u])),!p)}if(s(e,"buildPath"),D.isFormData(t)&&D.isFunction(t.entries)){let n={};return D.forEachEntry(t,(r,o)=>{e(mB(r),o,n,0)}),n}return null}s(D1,"formDataToJSON");function yB(t,e,n){if(D.isString(t))try{return(e||JSON.parse)(t),D.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}s(yB,"stringifySafely");var Om={transitional:Cm,adapter:["xhr","http"],transformRequest:[s(function(e,n){let r=n.getContentType()||"",o=r.indexOf("application/json")>-1,c=D.isObject(e);if(c&&D.isHTMLForm(e)&&(e=new FormData(e)),D.isFormData(e))return o&&o?JSON.stringify(D1(e)):e;if(D.isArrayBuffer(e)||D.isBuffer(e)||D.isStream(e)||D.isFile(e)||D.isBlob(e))return e;if(D.isArrayBufferView(e))return e.buffer;if(D.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let p;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return hB(e,this.formSerializer).toString();if((p=D.isFileList(e))||r.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return ju(p?{"files[]":e}:e,d&&new d,this.formSerializer)}}return c||o?(n.setContentType("application/json",!1),yB(e)):e},"transformRequest")],transformResponse:[s(function(e){let n=this.transitional||Om.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(e&&D.isString(e)&&(r&&!this.responseType||o)){let u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(p){if(u)throw p.name==="SyntaxError"?K.from(p,K.ERR_BAD_RESPONSE,this,null,this.response):p}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xn.classes.FormData,Blob:xn.classes.Blob},validateStatus:s(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],t=>{Om.headers[t]={}});var Im=Om,xB=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vB=s(t=>{let e={},n,r,o;return t&&t.split(` +`).forEach(s(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||e[n]&&xB[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)},"parser")),e},"parseHeaders"),i1=Symbol("internals");function Ga(t){return t&&String(t).trim().toLowerCase()}s(Ga,"normalizeHeader");function Lu(t){return t===!1||t==null?t:D.isArray(t)?t.map(Lu):String(t)}s(Lu,"normalizeValue");function bB(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}s(bB,"parseTokens");var wB=s(t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()),"isValidHeaderName");function hm(t,e,n,r,o){if(D.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!D.isString(e)){if(D.isString(r))return e.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(e)}}s(hm,"matchHeaderValue");function _B(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}s(_B,"formatHeader");function RB(t,e){let n=D.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,c,u){return this[r].call(this,e,o,c,u)},configurable:!0})})}s(RB,"buildAccessors");var Nm=class Nm{constructor(e){e&&this.set(e)}set(e,n,r){let o=this;function c(p,d,m){let h=Ga(d);if(!h)throw new Error("header name must be a non-empty string");let y=D.findKey(o,h);(!y||o[y]===void 0||m===!0||m===void 0&&o[y]!==!1)&&(o[y||d]=Lu(p))}s(c,"setHeader");let u=s((p,d)=>D.forEach(p,(m,h)=>c(m,h,d)),"setHeaders");return D.isPlainObject(e)||e instanceof this.constructor?u(e,n):D.isString(e)&&(e=e.trim())&&!wB(e)?u(vB(e),n):e!=null&&c(n,e,r),this}get(e,n){if(e=Ga(e),e){let r=D.findKey(this,e);if(r){let o=this[r];if(!n)return o;if(n===!0)return bB(o);if(D.isFunction(n))return n.call(this,o,r);if(D.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ga(e),e){let r=D.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||hm(this,this[r],r,n)))}return!1}delete(e,n){let r=this,o=!1;function c(u){if(u=Ga(u),u){let p=D.findKey(r,u);p&&(!n||hm(r,r[p],p,n))&&(delete r[p],o=!0)}}return s(c,"deleteHeader"),D.isArray(e)?e.forEach(c):c(e),o}clear(e){let n=Object.keys(this),r=n.length,o=!1;for(;r--;){let c=n[r];(!e||hm(this,this[c],c,e,!0))&&(delete this[c],o=!0)}return o}normalize(e){let n=this,r={};return D.forEach(this,(o,c)=>{let u=D.findKey(r,c);if(u){n[u]=Lu(o),delete n[c];return}let p=e?_B(c):String(c).trim();p!==c&&delete n[c],n[p]=Lu(o),r[p]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return D.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){let r=(this[i1]=this[i1]={accessors:{}}).accessors,o=this.prototype;function c(u){let p=Ga(u);r[p]||(RB(o,u),r[p]=!0)}return s(c,"defineAccessor"),D.isArray(e)?e.forEach(c):c(e),this}};s(Nm,"AxiosHeaders");var Eo=Nm;Eo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Eo.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});D.freezeMethods(Eo);var rn=Eo;function mm(t,e){let n=this||Im,r=e||n,o=rn.from(r.headers),c=r.data;return D.forEach(t,s(function(p){c=p.call(n,c,o.normalize(),e?e.status:void 0)},"transform")),o.normalize(),c}s(mm,"transformData");function L1(t){return!!(t&&t.__CANCEL__)}s(L1,"isCancel");function vi(t,e,n){K.call(this,t??"canceled",K.ERR_CANCELED,e,n),this.name="CanceledError"}s(vi,"CanceledError");D.inherits(vi,K,{__CANCEL__:!0});function Qa(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}s(Qa,"settle");function TB(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}s(TB,"isAbsoluteURL");function EB(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}s(EB,"combineURLs");function Dm(t,e){return t&&!TB(e)?EB(t,e):e}s(Dm,"buildFullPath");var Nu="1.6.0";function M1(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}s(M1,"parseProtocol");var SB=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function PB(t,e,n){let r=n&&n.Blob||xn.classes.Blob,o=M1(t);if(e===void 0&&r&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let c=SB.exec(t);if(!c)throw new K("Invalid URL",K.ERR_INVALID_URL);let u=c[1],p=c[2],d=c[3],m=Buffer.from(decodeURIComponent(d),p?"base64":"utf8");if(e){if(!r)throw new K("Blob is not supported",K.ERR_NOT_SUPPORT);return new r([m],{type:u})}return m}throw new K("Unsupported protocol "+o,K.ERR_NOT_SUPPORT)}s(PB,"fromDataURI");function AB(t,e){let n=0,r=1e3/e,o=null;return s(function(u,p){let d=Date.now();if(u||d-n>r)return o&&(clearTimeout(o),o=null),n=d,t.apply(null,p);o||(o=setTimeout(()=>(o=null,n=Date.now(),t.apply(null,p)),r-(d-n)))},"throttled")}s(AB,"throttle");function N1(t,e){t=t||10;let n=new Array(t),r=new Array(t),o=0,c=0,u;return e=e!==void 0?e:1e3,s(function(d){let m=Date.now(),h=r[c];u||(u=m),n[o]=d,r[o]=m;let y=c,v=0;for(;y!==o;)v+=n[y++],y=y%t;if(o=(o+1)%t,o===c&&(c=(c+1)%t),m-u!D.isUndefined(d[p])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[Iu]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},o=N1(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",p=>{p==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let c=0;r.updateProgress=AB(s(function(){let d=r.length,m=r.bytesSeen,h=m-c;if(!h||n.destroyed)return;let y=o(h);c=m,process.nextTick(()=>{n.emit("progress",{loaded:m,total:d,progress:d?m/d:void 0,bytes:h,rate:y||void 0,estimated:y&&d&&m<=d?(d-m)/y:void 0})})},"throttledHandler"),r.ticksRate);let u=s(()=>{r.updateProgress(!0)},"onFinish");this.once("end",u),this.once("error",u)}_read(e){let n=this[Iu];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let o=this,c=this[Iu],u=c.maxRate,p=this.readableHighWaterMark,d=c.timeWindow,m=1e3/d,h=u/m,y=c.minChunkSize!==!1?Math.max(c.minChunkSize,h*.01):0;function v(_,E){let I=Buffer.byteLength(_);c.bytesSeen+=I,c.bytes+=I,c.isCaptured&&c.updateProgress(),o.push(_)?process.nextTick(E):c.onReadCallback=()=>{c.onReadCallback=null,process.nextTick(E)}}s(v,"pushChunk");let P=s((_,E)=>{let I=Buffer.byteLength(_),N=null,H=p,j,J=0;if(u){let te=Date.now();(!c.ts||(J=te-c.ts)>=d)&&(c.ts=te,j=h-c.bytes,c.bytes=j<0?-j:0,J=0),j=h-c.bytes}if(u){if(j<=0)return setTimeout(()=>{E(null,_)},d-J);jH&&I-H>y&&(N=_.subarray(H),_=_.subarray(0,H)),v(_,N?()=>{process.nextTick(E,null,N)}:E)},"transformChunk");P(e,s(function _(E,I){if(E)return r(E);I?P(I,_):r(null)},"transformNextChunk"))}setLength(e){return this[Iu].length=+e,this}};s(km,"AxiosTransformStream");var bm=km,o1=bm,{asyncIterator:a1}=Symbol,CB=s(async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[a1]?yield*t[a1]():yield t},"readBlob"),k1=CB,OB=D.ALPHABET.ALPHA_DIGIT+"-_",Ja=new g1.TextEncoder,Ar=`\r +`,IB=Ja.encode(Ar),DB=2,Fm=class Fm{constructor(e,n){let{escapeName:r}=this.constructor,o=D.isString(n),c=`Content-Disposition: form-data; name="${r(e)}"${!o&&n.name?`; filename="${r(n.name)}"`:""}${Ar}`;o?n=Ja.encode(String(n).replace(/\r?\n|\r\n?/g,Ar)):c+=`Content-Type: ${n.type||"application/octet-stream"}${Ar}`,this.headers=Ja.encode(c+Ar),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+DB,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;D.isTypedArray(e)?yield e:yield*k1(e),yield IB}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}};s(Fm,"FormDataPart");var wm=Fm,LB=s((t,e,n)=>{let{tag:r="form-data-boundary",size:o=25,boundary:c=r+"-"+D.generateString(o,OB)}=n||{};if(!D.isFormData(t))throw TypeError("FormData instance required");if(c.length<1||c.length>70)throw Error("boundary must be 10-70 characters long");let u=Ja.encode("--"+c+Ar),p=Ja.encode("--"+c+"--"+Ar+Ar),d=p.byteLength,m=Array.from(t.entries()).map(([y,v])=>{let P=new wm(y,v);return d+=P.size,P});d+=u.byteLength*m.length,d=D.toFiniteNumber(d);let h={"Content-Type":`multipart/form-data; boundary=${c}`};return Number.isFinite(d)&&(h["Content-Length"]=d),e&&e(h),y1.Readable.from(async function*(){for(let y of m)yield u,yield*y.encode();yield p}())},"formDataToStream"),MB=LB,qm=class qm extends Pr.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,n)}this.__transform(e,n,r)}};s(qm,"ZlibHeaderTransformStream");var _m=qm,NB=_m,kB=s((t,e)=>D.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(o=>{try{e?r(null,...e(o)):r(null,o)}catch(c){r(c)}},r)}:t,"callbackify"),FB=kB,s1={flush:Cr.default.constants.Z_SYNC_FLUSH,finishFlush:Cr.default.constants.Z_SYNC_FLUSH},qB={flush:Cr.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Cr.default.constants.BROTLI_OPERATION_FLUSH},c1=D.isFunction(Cr.default.createBrotliDecompress),{http:BB,https:jB}=Aq.default,UB=/https:?/,u1=xn.protocols.map(t=>t+":");function HB(t){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t)}s(HB,"dispatchBeforeRedirect");function F1(t,e,n){let r=e;if(!r&&r!==!1){let o=xq.getProxyForUrl(n);o&&(r=new URL(o))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let c=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+c}t.headers.host=t.hostname+(t.port?":"+t.port:"");let o=r.hostname||r.host;t.hostname=o,t.host=o,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=s(function(c){F1(c,e,c.href)},"beforeRedirect")}s(F1,"setProxy");var zB=typeof process<"u"&&D.kindOf(process)==="process",$B=s(t=>new Promise((e,n)=>{let r,o,c=s((d,m)=>{o||(o=!0,r&&r(d,m))},"done"),u=s(d=>{c(d),e(d)},"_resolve"),p=s(d=>{c(d,!0),n(d)},"_reject");t(u,p,d=>r=d).catch(p)}),"wrapAsync"),WB=s(({address:t,family:e})=>{if(!D.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},"resolveFamily"),l1=s((t,e)=>WB(D.isObject(t)?t:{address:t,family:e}),"buildAddressEntry"),KB=zB&&s(function(e){return $B(s(async function(r,o,c){let{data:u,lookup:p,family:d}=e,{responseType:m,responseEncoding:h}=e,y=e.method.toUpperCase(),v,P=!1,_;if(p){let V=FB(p,G=>D.isArray(G)?G:[G]);p=s((G,me,jt)=>{V(G,me,(et,bn,wn)=>{let dt=D.isArray(bn)?bn.map(Ct=>l1(Ct)):[l1(bn,wn)];me.all?jt(et,dt):jt(et,dt[0].address,dt[0].family)})},"lookup")}let E=new Cq.default,I=s(()=>{e.cancelToken&&e.cancelToken.unsubscribe(N),e.signal&&e.signal.removeEventListener("abort",N),E.removeAllListeners()},"onFinished");c((V,G)=>{v=!0,G&&(P=!0,I())});function N(V){E.emit("abort",!V||V.type?new vi(null,e,_):V)}s(N,"abort"),E.once("abort",o),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(N),e.signal&&(e.signal.aborted?N():e.signal.addEventListener("abort",N)));let H=Dm(e.baseURL,e.url),j=new URL(H,"http://localhost"),J=j.protocol||u1[0];if(J==="data:"){let V;if(y!=="GET")return Qa(r,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{V=PB(e.url,m==="blob",{Blob:e.env&&e.env.Blob})}catch(G){throw K.from(G,K.ERR_BAD_REQUEST,e)}return m==="text"?(V=V.toString(h),(!h||h==="utf8")&&(V=D.stripBOM(V))):m==="stream"&&(V=Pr.default.Readable.from(V)),Qa(r,o,{data:V,status:200,statusText:"OK",headers:new rn,config:e})}if(u1.indexOf(J)===-1)return o(new K("Unsupported protocol "+J,K.ERR_BAD_REQUEST,e));let te=rn.from(e.headers).normalize();te.set("User-Agent","axios/"+Nu,!1);let Se=e.onDownloadProgress,Ie=e.onUploadProgress,Ke=e.maxRate,Ge,at;if(D.isSpecCompliantForm(u)){let V=te.getContentType(/boundary=([-_\w\d]{10,70})/i);u=MB(u,G=>{te.set(G)},{tag:`axios-${Nu}-boundary`,boundary:V&&V[1]||void 0})}else if(D.isFormData(u)&&D.isFunction(u.getHeaders)){if(te.set(u.getHeaders()),!te.hasContentLength())try{let V=await Pq.default.promisify(u.getLength).call(u);Number.isFinite(V)&&V>=0&&te.setContentLength(V)}catch{}}else if(D.isBlob(u))u.size&&te.setContentType(u.type||"application/octet-stream"),te.setContentLength(u.size||0),u=Pr.default.Readable.from(k1(u));else if(u&&!D.isStream(u)){if(!Buffer.isBuffer(u))if(D.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(D.isString(u))u=Buffer.from(u,"utf-8");else return o(new K("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",K.ERR_BAD_REQUEST,e));if(te.setContentLength(u.length,!1),e.maxBodyLength>-1&&u.length>e.maxBodyLength)return o(new K("Request body larger than maxBodyLength limit",K.ERR_BAD_REQUEST,e))}let vn=D.toFiniteNumber(te.getContentLength());D.isArray(Ke)?(Ge=Ke[0],at=Ke[1]):Ge=at=Ke,u&&(Ie||Ge)&&(D.isStream(u)||(u=Pr.default.Readable.from(u,{objectMode:!1})),u=Pr.default.pipeline([u,new o1({length:vn,maxRate:D.toFiniteNumber(Ge)})],D.noop),Ie&&u.on("progress",V=>{Ie(Object.assign(V,{upload:!0}))}));let Le;if(e.auth){let V=e.auth.username||"",G=e.auth.password||"";Le=V+":"+G}if(!Le&&j.username){let V=j.username,G=j.password;Le=V+":"+G}Le&&te.delete("authorization");let je;try{je=Am(j.pathname+j.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(V){let G=new Error(V.message);return G.config=e,G.url=e.url,G.exists=!0,o(G)}te.set("Accept-Encoding","gzip, compress, deflate"+(c1?", br":""),!1);let be={path:je,method:y,headers:te.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:Le,protocol:J,family:d,beforeRedirect:HB,beforeRedirects:{}};!D.isUndefined(p)&&(be.lookup=p),e.socketPath?be.socketPath=e.socketPath:(be.hostname=j.hostname,be.port=j.port,F1(be,e.proxy,J+"//"+j.hostname+(j.port?":"+j.port:"")+be.path));let Re,Te=UB.test(be.protocol);if(be.agent=Te?e.httpsAgent:e.httpAgent,e.transport?Re=e.transport:e.maxRedirects===0?Re=Te?Sq.default:Eq.default:(e.maxRedirects&&(be.maxRedirects=e.maxRedirects),e.beforeRedirect&&(be.beforeRedirects.config=e.beforeRedirect),Re=Te?jB:BB),e.maxBodyLength>-1?be.maxBodyLength=e.maxBodyLength:be.maxBodyLength=1/0,e.insecureHTTPParser&&(be.insecureHTTPParser=e.insecureHTTPParser),_=Re.request(be,s(function(G){if(_.destroyed)return;let me=[G],jt=+G.headers["content-length"];if(Se){let Ct=new o1({length:D.toFiniteNumber(jt),maxRate:D.toFiniteNumber(at)});Se&&Ct.on("progress",_n=>{Se(Object.assign(_n,{download:!0}))}),me.push(Ct)}let et=G,bn=G.req||_;if(e.decompress!==!1&&G.headers["content-encoding"])switch((y==="HEAD"||G.statusCode===204)&&delete G.headers["content-encoding"],(G.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":me.push(Cr.default.createUnzip(s1)),delete G.headers["content-encoding"];break;case"deflate":me.push(new NB),me.push(Cr.default.createUnzip(s1)),delete G.headers["content-encoding"];break;case"br":c1&&(me.push(Cr.default.createBrotliDecompress(qB)),delete G.headers["content-encoding"])}et=me.length>1?Pr.default.pipeline(me,D.noop):me[0];let wn=Pr.default.finished(et,()=>{wn(),I()}),dt={status:G.statusCode,statusText:G.statusMessage,headers:new rn(G.headers),config:e,request:bn};if(m==="stream")dt.data=et,Qa(r,o,dt);else{let Ct=[],_n=0;et.on("data",s(function(tt){Ct.push(tt),_n+=tt.length,e.maxContentLength>-1&&_n>e.maxContentLength&&(P=!0,et.destroy(),o(new K("maxContentLength size of "+e.maxContentLength+" exceeded",K.ERR_BAD_RESPONSE,e,bn)))},"handleStreamData")),et.on("aborted",s(function(){if(P)return;let tt=new K("maxContentLength size of "+e.maxContentLength+" exceeded",K.ERR_BAD_RESPONSE,e,bn);et.destroy(tt),o(tt)},"handlerStreamAborted")),et.on("error",s(function(tt){_.destroyed||o(K.from(tt,null,e,bn))},"handleStreamError")),et.on("end",s(function(){try{let tt=Ct.length===1?Ct[0]:Buffer.concat(Ct);m!=="arraybuffer"&&(tt=tt.toString(h),(!h||h==="utf8")&&(tt=D.stripBOM(tt))),dt.data=tt}catch(tt){return o(K.from(tt,null,e,dt.request,dt))}Qa(r,o,dt)},"handleStreamEnd"))}E.once("abort",Ct=>{et.destroyed||(et.emit("error",Ct),et.destroy())})},"handleResponse")),E.once("abort",V=>{o(V),_.destroy(V)}),_.on("error",s(function(G){o(K.from(G,null,e,_))},"handleRequestError")),_.on("socket",s(function(G){G.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let V=parseInt(e.timeout,10);if(Number.isNaN(V)){o(new K("error trying to parse `config.timeout` to int",K.ERR_BAD_OPTION_VALUE,e,_));return}_.setTimeout(V,s(function(){if(v)return;let me=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",jt=e.transitional||Cm;e.timeoutErrorMessage&&(me=e.timeoutErrorMessage),o(new K(me,jt.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,_)),N()},"handleRequestTimeout"))}if(D.isStream(u)){let V=!1,G=!1;u.on("end",()=>{V=!0}),u.once("error",me=>{G=!0,_.destroy(me)}),u.on("close",()=>{!V&&!G&&N(new vi("Request stream has been aborted",e,_))}),u.pipe(_)}else _.end(u)},"dispatchHttpRequest"))},"httpAdapter"),GB=xn.isStandardBrowserEnv?s(function(){return{write:s(function(n,r,o,c,u,p){let d=[];d.push(n+"="+encodeURIComponent(r)),D.isNumber(o)&&d.push("expires="+new Date(o).toGMTString()),D.isString(c)&&d.push("path="+c),D.isString(u)&&d.push("domain="+u),p===!0&&d.push("secure"),document.cookie=d.join("; ")},"write"),read:s(function(n){let r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},"read"),remove:s(function(n){this.write(n,"",Date.now()-864e5)},"remove")}},"standardBrowserEnv")():s(function(){return{write:s(function(){},"write"),read:s(function(){return null},"read"),remove:s(function(){},"remove")}},"nonStandardBrowserEnv")(),QB=xn.isStandardBrowserEnv?s(function(){let e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function o(c){let u=c;return e&&(n.setAttribute("href",u),u=n.href),n.setAttribute("href",u),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s(o,"resolveURL"),r=o(window.location.href),s(function(u){let p=D.isString(u)?o(u):u;return p.protocol===r.protocol&&p.host===r.host},"isURLSameOrigin")},"standardBrowserEnv")():s(function(){return s(function(){return!0},"isURLSameOrigin")},"nonStandardBrowserEnv")();function p1(t,e){let n=0,r=N1(50,250);return o=>{let c=o.loaded,u=o.lengthComputable?o.total:void 0,p=c-n,d=r(p),m=c<=u;n=c;let h={loaded:c,total:u,progress:u?c/u:void 0,bytes:p,rate:d||void 0,estimated:d&&u&&m?(u-c)/d:void 0,event:o};h[e?"download":"upload"]=!0,t(h)}}s(p1,"progressEventReducer");var VB=typeof XMLHttpRequest<"u",JB=VB&&function(t){return new Promise(s(function(n,r){let o=t.data,c=rn.from(t.headers).normalize(),u=t.responseType,p;function d(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}s(d,"done");let m;D.isFormData(o)&&(xn.isStandardBrowserEnv||xn.isStandardBrowserWebWorkerEnv?c.setContentType(!1):c.getContentType(/^\s*multipart\/form-data/)?D.isString(m=c.getContentType())&&c.setContentType(m.replace(/^\s*(multipart\/form-data);+/,"$1")):c.setContentType("multipart/form-data"));let h=new XMLHttpRequest;if(t.auth){let _=t.auth.username||"",E=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";c.set("Authorization","Basic "+btoa(_+":"+E))}let y=Dm(t.baseURL,t.url);h.open(t.method.toUpperCase(),Am(y,t.params,t.paramsSerializer),!0),h.timeout=t.timeout;function v(){if(!h)return;let _=rn.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),I={data:!u||u==="text"||u==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:_,config:t,request:h};Qa(s(function(H){n(H),d()},"_resolve"),s(function(H){r(H),d()},"_reject"),I),h=null}if(s(v,"onloadend"),"onloadend"in h?h.onloadend=v:h.onreadystatechange=s(function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},"handleLoad"),h.onabort=s(function(){h&&(r(new K("Request aborted",K.ECONNABORTED,t,h)),h=null)},"handleAbort"),h.onerror=s(function(){r(new K("Network Error",K.ERR_NETWORK,t,h)),h=null},"handleError"),h.ontimeout=s(function(){let E=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",I=t.transitional||Cm;t.timeoutErrorMessage&&(E=t.timeoutErrorMessage),r(new K(E,I.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,t,h)),h=null},"handleTimeout"),xn.isStandardBrowserEnv){let _=QB(y)&&t.xsrfCookieName&&GB.read(t.xsrfCookieName);_&&c.set(t.xsrfHeaderName,_)}o===void 0&&c.setContentType(null),"setRequestHeader"in h&&D.forEach(c.toJSON(),s(function(E,I){h.setRequestHeader(I,E)},"setRequestHeader")),D.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),u&&u!=="json"&&(h.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&h.addEventListener("progress",p1(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",p1(t.onUploadProgress)),(t.cancelToken||t.signal)&&(p=s(_=>{h&&(r(!_||_.type?new vi(null,t,h):_),h.abort(),h=null)},"onCanceled"),t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p)));let P=M1(y);if(P&&xn.protocols.indexOf(P)===-1){r(new K("Unsupported protocol "+P+":",K.ERR_BAD_REQUEST,t));return}h.send(o||null)},"dispatchXhrRequest"))},Rm={http:KB,xhr:JB};D.forEach(Rm,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var d1=s(t=>`- ${t}`,"renderReason"),YB=s(t=>D.isFunction(t)||t===null||t===!1,"isResolvedHandle"),q1={getAdapter:t=>{t=D.isArray(t)?t:[t];let{length:e}=t,n,r,o={};for(let c=0;c`adapter ${p} `+(d===!1?"is not supported by the environment":"is not available in the build")),u=e?c.length>1?`since : +`+c.map(d1).join(` +`):" "+d1(c[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return r},adapters:Rm};function gm(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new vi(null,t)}s(gm,"throwIfCancellationRequested");function f1(t){return gm(t),t.headers=rn.from(t.headers),t.data=mm.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),q1.getAdapter(t.adapter||Im.adapter)(t).then(s(function(r){return gm(t),r.data=mm.call(t,t.transformResponse,r),r.headers=rn.from(r.headers),r},"onAdapterResolution"),s(function(r){return L1(r)||(gm(t),r&&r.response&&(r.response.data=mm.call(t,t.transformResponse,r.response),r.response.headers=rn.from(r.response.headers))),Promise.reject(r)},"onAdapterRejection"))}s(f1,"dispatchRequest");var h1=s(t=>t instanceof rn?t.toJSON():t,"headersToObject");function So(t,e){e=e||{};let n={};function r(m,h,y){return D.isPlainObject(m)&&D.isPlainObject(h)?D.merge.call({caseless:y},m,h):D.isPlainObject(h)?D.merge({},h):D.isArray(h)?h.slice():h}s(r,"getMergedValue");function o(m,h,y){if(D.isUndefined(h)){if(!D.isUndefined(m))return r(void 0,m,y)}else return r(m,h,y)}s(o,"mergeDeepProperties");function c(m,h){if(!D.isUndefined(h))return r(void 0,h)}s(c,"valueFromConfig2");function u(m,h){if(D.isUndefined(h)){if(!D.isUndefined(m))return r(void 0,m)}else return r(void 0,h)}s(u,"defaultToConfig2");function p(m,h,y){if(y in e)return r(m,h);if(y in t)return r(void 0,m)}s(p,"mergeDirectKeys");let d={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:p,headers:(m,h)=>o(h1(m),h1(h),!0)};return D.forEach(Object.keys(Object.assign({},t,e)),s(function(h){let y=d[h]||o,v=y(t[h],e[h],h);D.isUndefined(v)&&y!==p||(n[h]=v)},"computeConfigValue")),n}s(So,"mergeConfig");var Lm={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Lm[t]=s(function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t},"validator")});var m1={};Lm.transitional=s(function(e,n,r){function o(c,u){return"[Axios v"+Nu+"] Transitional option '"+c+"'"+u+(r?". "+r:"")}return s(o,"formatMessage"),(c,u,p)=>{if(e===!1)throw new K(o(u," has been removed"+(n?" in "+n:"")),K.ERR_DEPRECATED);return n&&!m1[u]&&(m1[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(c,u,p):!0}},"transitional");function XB(t,e,n){if(typeof t!="object")throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),o=r.length;for(;o-- >0;){let c=r[o],u=e[c];if(u){let p=t[c],d=p===void 0||u(p,c,t);if(d!==!0)throw new K("option "+c+" must be "+d,K.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new K("Unknown option "+c,K.ERR_BAD_OPTION)}}s(XB,"assertOptions");var Tm={assertOptions:XB,validators:Lm},Sr=Tm.validators,Bm=class Bm{constructor(e){this.defaults=e,this.interceptors={request:new r1,response:new r1}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=So(this.defaults,n);let{transitional:r,paramsSerializer:o,headers:c}=n;r!==void 0&&Tm.assertOptions(r,{silentJSONParsing:Sr.transitional(Sr.boolean),forcedJSONParsing:Sr.transitional(Sr.boolean),clarifyTimeoutError:Sr.transitional(Sr.boolean)},!1),o!=null&&(D.isFunction(o)?n.paramsSerializer={serialize:o}:Tm.assertOptions(o,{encode:Sr.function,serialize:Sr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=c&&D.merge(c.common,c[n.method]);c&&D.forEach(["delete","get","head","post","put","patch","common"],_=>{delete c[_]}),n.headers=rn.concat(u,c);let p=[],d=!0;this.interceptors.request.forEach(s(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(d=d&&E.synchronous,p.unshift(E.fulfilled,E.rejected))},"unshiftRequestInterceptors"));let m=[];this.interceptors.response.forEach(s(function(E){m.push(E.fulfilled,E.rejected)},"pushResponseInterceptors"));let h,y=0,v;if(!d){let _=[f1.bind(this),void 0];for(_.unshift.apply(_,p),_.push.apply(_,m),v=_.length,h=Promise.resolve(n);y{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](o);r._listeners=null}),this.promise.then=o=>{let c,u=new Promise(p=>{r.subscribe(p),c=p}).then(o);return u.cancel=s(function(){r.unsubscribe(c)},"reject"),u},e(s(function(c,u,p){r.reason||(r.reason=new vi(c,u,p),n(r.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ku(s(function(o){e=o},"executor")),cancel:e}}};s(ku,"CancelToken");var Em=ku,ZB=Em;function ej(t){return s(function(n){return t.apply(null,n)},"wrap")}s(ej,"spread");function tj(t){return D.isObject(t)&&t.isAxiosError===!0}s(tj,"isAxiosError");var Sm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sm).forEach(([t,e])=>{Sm[e]=t});var nj=Sm;function B1(t){let e=new Mu(t),n=v1(Mu.prototype.request,e);return D.extend(n,Mu.prototype,e,{allOwnKeys:!0}),D.extend(n,e,null,{allOwnKeys:!0}),n.create=s(function(o){return B1(So(t,o))},"create"),n}s(B1,"createInstance");var Ue=B1(Im);Ue.Axios=Mu;Ue.CanceledError=vi;Ue.CancelToken=ZB;Ue.isCancel=L1;Ue.VERSION=Nu;Ue.toFormData=ju;Ue.AxiosError=K;Ue.Cancel=Ue.CanceledError;Ue.all=s(function(e){return Promise.all(e)},"all");Ue.spread=ej;Ue.isAxiosError=tj;Ue.mergeConfig=So;Ue.AxiosHeaders=rn;Ue.formToJSON=t=>D1(D.isHTMLForm(t)?new FormData(t):t);Ue.getAdapter=q1.getAdapter;Ue.HttpStatusCode=nj;Ue.default=Ue;j1.exports=Ue});var z1=M((n$,H1)=>{"use strict";H1.exports=Error});var W1=M((r$,$1)=>{"use strict";$1.exports=EvalError});var G1=M((i$,K1)=>{"use strict";K1.exports=RangeError});var V1=M((o$,Q1)=>{"use strict";Q1.exports=ReferenceError});var jm=M((a$,J1)=>{"use strict";J1.exports=SyntaxError});var Co=M((s$,Y1)=>{"use strict";Y1.exports=TypeError});var Z1=M((c$,X1)=>{"use strict";X1.exports=URIError});var tR=M((u$,eR)=>{"use strict";eR.exports=s(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,n);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var iR=M((p$,rR)=>{"use strict";var nR=typeof Symbol<"u"&&Symbol,rj=tR();rR.exports=s(function(){return typeof nR!="function"||typeof Symbol!="function"||typeof nR("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:rj()},"hasNativeSymbols")});var aR=M((f$,oR)=>{"use strict";var Um={__proto__:null,foo:{}},ij=Object;oR.exports=s(function(){return{__proto__:Um}.foo===Um.foo&&!(Um instanceof ij)},"hasProto")});var uR=M((m$,cR)=>{"use strict";var oj="Function.prototype.bind called on incompatible ",aj=Object.prototype.toString,sj=Math.max,cj="[object Function]",sR=s(function(e,n){for(var r=[],o=0;o{"use strict";var pj=uR();lR.exports=Function.prototype.bind||pj});var dR=M((x$,pR)=>{"use strict";var dj=Function.prototype.call,fj=Object.prototype.hasOwnProperty,hj=Uu();pR.exports=hj.call(dj,fj)});var _i=M((v$,yR)=>{"use strict";var pe,mj=z1(),gj=W1(),yj=G1(),xj=V1(),Lo=jm(),Do=Co(),vj=Z1(),gR=Function,Hm=s(function(t){try{return gR('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),bi=Object.getOwnPropertyDescriptor;if(bi)try{bi({},"")}catch{bi=null}var zm=s(function(){throw new Do},"throwTypeError"),bj=bi?function(){try{return arguments.callee,zm}catch{try{return bi(arguments,"callee").get}catch{return zm}}}():zm,Oo=iR()(),wj=aR()(),Ze=Object.getPrototypeOf||(wj?function(t){return t.__proto__}:null),Io={},_j=typeof Uint8Array>"u"||!Ze?pe:Ze(Uint8Array),wi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":Oo&&Ze?Ze([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":Io,"%AsyncGenerator%":Io,"%AsyncGeneratorFunction%":Io,"%AsyncIteratorPrototype%":Io,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":mj,"%eval%":eval,"%EvalError%":gj,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":gR,"%GeneratorFunction%":Io,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oo&&Ze?Ze(Ze([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Oo||!Ze?pe:Ze(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":yj,"%ReferenceError%":xj,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Oo||!Ze?pe:Ze(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oo&&Ze?Ze(""[Symbol.iterator]()):pe,"%Symbol%":Oo?Symbol:pe,"%SyntaxError%":Lo,"%ThrowTypeError%":bj,"%TypedArray%":_j,"%TypeError%":Do,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":vj,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet};if(Ze)try{null.error}catch(t){fR=Ze(Ze(t)),wi["%Error.prototype%"]=fR}var fR,Rj=s(function t(e){var n;if(e==="%AsyncFunction%")n=Hm("async function () {}");else if(e==="%GeneratorFunction%")n=Hm("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Hm("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&Ze&&(n=Ze(o.prototype))}return wi[e]=n,n},"doEval"),hR={__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"]},Xa=Uu(),Hu=dR(),Tj=Xa.call(Function.call,Array.prototype.concat),Ej=Xa.call(Function.apply,Array.prototype.splice),mR=Xa.call(Function.call,String.prototype.replace),zu=Xa.call(Function.call,String.prototype.slice),Sj=Xa.call(Function.call,RegExp.prototype.exec),Pj=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Aj=/\\(\\)?/g,Cj=s(function(e){var n=zu(e,0,1),r=zu(e,-1);if(n==="%"&&r!=="%")throw new Lo("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Lo("invalid intrinsic syntax, expected opening `%`");var o=[];return mR(e,Pj,function(c,u,p,d){o[o.length]=p?mR(d,Aj,"$1"):u||c}),o},"stringToPath"),Oj=s(function(e,n){var r=e,o;if(Hu(hR,r)&&(o=hR[r],r="%"+o[0]+"%"),Hu(wi,r)){var c=wi[r];if(c===Io&&(c=Rj(r)),typeof c>"u"&&!n)throw new Do("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:c}}throw new Lo("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");yR.exports=s(function(e,n){if(typeof e!="string"||e.length===0)throw new Do("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Do('"allowMissing" argument must be a boolean');if(Sj(/^%?[^%]*%?$/,e)===null)throw new Lo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Cj(e),o=r.length>0?r[0]:"",c=Oj("%"+o+"%",n),u=c.name,p=c.value,d=!1,m=c.alias;m&&(o=m[0],Ej(r,Tj([0,1],m)));for(var h=1,y=!0;h=r.length){var E=bi(p,v);y=!!E,y&&"get"in E&&!("originalValue"in E.get)?p=E.get:p=p[v]}else y=Hu(p,v),p=p[v];y&&!d&&(wi[u]=p)}}return p},"GetIntrinsic")});var Wu=M((w$,xR)=>{"use strict";var Ij=_i(),$u=Ij("%Object.defineProperty%",!0)||!1;if($u)try{$u({},"a",{value:1})}catch{$u=!1}xR.exports=$u});var $m=M((_$,vR)=>{"use strict";var Dj=_i(),Ku=Dj("%Object.getOwnPropertyDescriptor%",!0);if(Ku)try{Ku([],"length")}catch{Ku=null}vR.exports=Ku});var RR=M((R$,_R)=>{"use strict";var bR=Wu(),Lj=jm(),Mo=Co(),wR=$m();_R.exports=s(function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Mo("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Mo("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Mo("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Mo("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Mo("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Mo("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,d=!!wR&&wR(e,n);if(bR)bR(e,n,{configurable:u===null&&d?d.configurable:!u,enumerable:o===null&&d?d.enumerable:!o,value:r,writable:c===null&&d?d.writable:!c});else if(p||!o&&!c&&!u)e[n]=r;else throw new Lj("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty")});var SR=M((E$,ER)=>{"use strict";var Wm=Wu(),TR=s(function(){return!!Wm},"hasPropertyDescriptors");TR.hasArrayLengthDefineBug=s(function(){if(!Wm)return null;try{return Wm([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug");ER.exports=TR});var IR=M((P$,OR)=>{"use strict";var Mj=_i(),PR=RR(),Nj=SR()(),AR=$m(),CR=Co(),kj=Mj("%Math.floor%");OR.exports=s(function(e,n){if(typeof e!="function")throw new CR("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||kj(n)!==n)throw new CR("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,c=!0;if("length"in e&&AR){var u=AR(e,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(c=!1)}return(o||c||!r)&&(Nj?PR(e,"length",n,!0,!0):PR(e,"length",n)),e},"setFunctionLength")});var FR=M((C$,Gu)=>{"use strict";var Km=Uu(),Qu=_i(),Fj=IR(),qj=Co(),MR=Qu("%Function.prototype.apply%"),NR=Qu("%Function.prototype.call%"),kR=Qu("%Reflect.apply%",!0)||Km.call(NR,MR),DR=Wu(),Bj=Qu("%Math.max%");Gu.exports=s(function(e){if(typeof e!="function")throw new qj("a function is required");var n=kR(Km,NR,arguments);return Fj(n,1+Bj(0,e.length-(arguments.length-1)),!0)},"callBind");var LR=s(function(){return kR(Km,MR,arguments)},"applyBind");DR?DR(Gu.exports,"apply",{value:LR}):Gu.exports.apply=LR});var UR=M((I$,jR)=>{"use strict";var qR=_i(),BR=FR(),jj=BR(qR("String.prototype.indexOf"));jR.exports=s(function(e,n){var r=qR(e,!!n);return typeof r=="function"&&jj(e,".prototype.")>-1?BR(r):r},"callBoundIntrinsic")});var zR=M((L$,HR)=>{HR.exports=require("util").inspect});var uT=M((M$,cT)=>{var ng=typeof Map=="function"&&Map.prototype,Gm=Object.getOwnPropertyDescriptor&&ng?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ju=ng&&Gm&&typeof Gm.get=="function"?Gm.get:null,$R=ng&&Map.prototype.forEach,rg=typeof Set=="function"&&Set.prototype,Qm=Object.getOwnPropertyDescriptor&&rg?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Yu=rg&&Qm&&typeof Qm.get=="function"?Qm.get:null,WR=rg&&Set.prototype.forEach,Uj=typeof WeakMap=="function"&&WeakMap.prototype,es=Uj?WeakMap.prototype.has:null,Hj=typeof WeakSet=="function"&&WeakSet.prototype,ts=Hj?WeakSet.prototype.has:null,zj=typeof WeakRef=="function"&&WeakRef.prototype,KR=zj?WeakRef.prototype.deref:null,$j=Boolean.prototype.valueOf,Wj=Object.prototype.toString,Kj=Function.prototype.toString,Gj=String.prototype.match,ig=String.prototype.slice,Ir=String.prototype.replace,Qj=String.prototype.toUpperCase,GR=String.prototype.toLowerCase,nT=RegExp.prototype.test,QR=Array.prototype.concat,Mn=Array.prototype.join,Vj=Array.prototype.slice,VR=Math.floor,Ym=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Vm=Object.getOwnPropertySymbols,Xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,No=typeof Symbol=="function"&&typeof Symbol.iterator=="object",pt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===No||!0)?Symbol.toStringTag:null,rT=Object.prototype.propertyIsEnumerable,JR=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function YR(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||nT.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-VR(-t):VR(t);if(r!==t){var o=String(r),c=ig.call(e,o.length+1);return Ir.call(o,n,"$&_")+"."+Ir.call(Ir.call(c,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ir.call(e,n,"$&_")}s(YR,"addNumericSeparator");var Zm=zR(),XR=Zm.custom,ZR=oT(XR)?XR:null;cT.exports=s(function t(e,n,r,o){var c=n||{};if(Or(c,"quoteStyle")&&c.quoteStyle!=="single"&&c.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Or(c,"maxStringLength")&&(typeof c.maxStringLength=="number"?c.maxStringLength<0&&c.maxStringLength!==1/0:c.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Or(c,"customInspect")?c.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Or(c,"indent")&&c.indent!==null&&c.indent!==" "&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Or(c,"numericSeparator")&&typeof c.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=c.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return sT(e,c);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return p?YR(e,d):d}if(typeof e=="bigint"){var m=String(e)+"n";return p?YR(e,m):m}var h=typeof c.depth>"u"?5:c.depth;if(typeof r>"u"&&(r=0),r>=h&&h>0&&typeof e=="object")return eg(e)?"[Array]":"[Object]";var y=fU(c,r);if(typeof o>"u")o=[];else if(aT(o,e)>=0)return"[Circular]";function v(je,be,Re){if(be&&(o=Vj.call(o),o.push(be)),Re){var Te={depth:c.depth};return Or(c,"quoteStyle")&&(Te.quoteStyle=c.quoteStyle),t(je,Te,r+1,o)}return t(je,c,r+1,o)}if(s(v,"inspect"),typeof e=="function"&&!eT(e)){var P=iU(e),_=Vu(e,v);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(_.length>0?" { "+Mn.call(_,", ")+" }":"")}if(oT(e)){var E=No?Ir.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Xm.call(e);return typeof e=="object"&&!No?Za(E):E}if(lU(e)){for(var I="<"+GR.call(String(e.nodeName)),N=e.attributes||[],H=0;H",I}if(eg(e)){if(e.length===0)return"[]";var j=Vu(e,v);return y&&!dU(j)?"["+tg(j,y)+"]":"[ "+Mn.call(j,", ")+" ]"}if(Xj(e)){var J=Vu(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!rT.call(e,"cause")?"{ ["+String(e)+"] "+Mn.call(QR.call("[cause]: "+v(e.cause),J),", ")+" }":J.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Mn.call(J,", ")+" }"}if(typeof e=="object"&&u){if(ZR&&typeof e[ZR]=="function"&&Zm)return Zm(e,{depth:h-r});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(oU(e)){var te=[];return $R&&$R.call(e,function(je,be){te.push(v(be,e,!0)+" => "+v(je,e))}),tT("Map",Ju.call(e),te,y)}if(cU(e)){var Se=[];return WR&&WR.call(e,function(je){Se.push(v(je,e))}),tT("Set",Yu.call(e),Se,y)}if(aU(e))return Jm("WeakMap");if(uU(e))return Jm("WeakSet");if(sU(e))return Jm("WeakRef");if(eU(e))return Za(v(Number(e)));if(nU(e))return Za(v(Ym.call(e)));if(tU(e))return Za($j.call(e));if(Zj(e))return Za(v(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===global)return"{ [object globalThis] }";if(!Yj(e)&&!eT(e)){var Ie=Vu(e,v),Ke=JR?JR(e)===Object.prototype:e instanceof Object||e.constructor===Object,Ge=e instanceof Object?"":"null prototype",at=!Ke&&pt&&Object(e)===e&&pt in e?ig.call(Dr(e),8,-1):Ge?"Object":"",vn=Ke||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Le=vn+(at||Ge?"["+Mn.call(QR.call([],at||[],Ge||[]),": ")+"] ":"");return Ie.length===0?Le+"{}":y?Le+"{"+tg(Ie,y)+"}":Le+"{ "+Mn.call(Ie,", ")+" }"}return String(e)},"inspect_");function iT(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}s(iT,"wrapQuotes");function Jj(t){return Ir.call(String(t),/"/g,""")}s(Jj,"quote");function eg(t){return Dr(t)==="[object Array]"&&(!pt||!(typeof t=="object"&&pt in t))}s(eg,"isArray");function Yj(t){return Dr(t)==="[object Date]"&&(!pt||!(typeof t=="object"&&pt in t))}s(Yj,"isDate");function eT(t){return Dr(t)==="[object RegExp]"&&(!pt||!(typeof t=="object"&&pt in t))}s(eT,"isRegExp");function Xj(t){return Dr(t)==="[object Error]"&&(!pt||!(typeof t=="object"&&pt in t))}s(Xj,"isError");function Zj(t){return Dr(t)==="[object String]"&&(!pt||!(typeof t=="object"&&pt in t))}s(Zj,"isString");function eU(t){return Dr(t)==="[object Number]"&&(!pt||!(typeof t=="object"&&pt in t))}s(eU,"isNumber");function tU(t){return Dr(t)==="[object Boolean]"&&(!pt||!(typeof t=="object"&&pt in t))}s(tU,"isBoolean");function oT(t){if(No)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Xm)return!1;try{return Xm.call(t),!0}catch{}return!1}s(oT,"isSymbol");function nU(t){if(!t||typeof t!="object"||!Ym)return!1;try{return Ym.call(t),!0}catch{}return!1}s(nU,"isBigInt");var rU=Object.prototype.hasOwnProperty||function(t){return t in this};function Or(t,e){return rU.call(t,e)}s(Or,"has");function Dr(t){return Wj.call(t)}s(Dr,"toStr");function iU(t){if(t.name)return t.name;var e=Gj.call(Kj.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}s(iU,"nameOf");function aT(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return sT(ig.call(t,0,e.maxStringLength),e)+r}var o=Ir.call(Ir.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,pU);return iT(o,"single",e)}s(sT,"inspectString");function pU(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+Qj.call(e.toString(16))}s(pU,"lowbyte");function Za(t){return"Object("+t+")"}s(Za,"markBoxed");function Jm(t){return t+" { ? }"}s(Jm,"weakCollectionOf");function tT(t,e,n,r){var o=r?tg(n,r):Mn.call(n,", ");return t+" ("+e+") {"+o+"}"}s(tT,"collectionOf");function dU(t){for(var e=0;e=0)return!1;return!0}s(dU,"singleLineValues");function fU(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=Mn.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Mn.call(Array(e+1),n)}}s(fU,"getIndent");function tg(t,e){if(t.length===0)return"";var n=` +`+e.prev+e.base;return n+Mn.call(t,","+n)+` +`+e.prev}s(tg,"indentedJoin");function Vu(t,e){var n=eg(t),r=[];if(n){r.length=t.length;for(var o=0;o{"use strict";var lT=_i(),ko=UR(),hU=uT(),mU=Co(),Xu=lT("%WeakMap%",!0),Zu=lT("%Map%",!0),gU=ko("WeakMap.prototype.get",!0),yU=ko("WeakMap.prototype.set",!0),xU=ko("WeakMap.prototype.has",!0),vU=ko("Map.prototype.get",!0),bU=ko("Map.prototype.set",!0),wU=ko("Map.prototype.has",!0),og=s(function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},"listGetNode"),_U=s(function(t,e){var n=og(t,e);return n&&n.value},"listGet"),RU=s(function(t,e,n){var r=og(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},"listSet"),TU=s(function(t,e){return!!og(t,e)},"listHas");pT.exports=s(function(){var e,n,r,o={assert:function(c){if(!o.has(c))throw new mU("Side channel does not contain "+hU(c))},get:function(c){if(Xu&&c&&(typeof c=="object"||typeof c=="function")){if(e)return gU(e,c)}else if(Zu){if(n)return vU(n,c)}else if(r)return _U(r,c)},has:function(c){if(Xu&&c&&(typeof c=="object"||typeof c=="function")){if(e)return xU(e,c)}else if(Zu){if(n)return wU(n,c)}else if(r)return TU(r,c);return!1},set:function(c,u){Xu&&c&&(typeof c=="object"||typeof c=="function")?(e||(e=new Xu),yU(e,c,u)):Zu?(n||(n=new Zu),bU(n,c,u)):(r||(r={key:{},next:null}),RU(r,c,u))}};return o},"getSideChannel")});var el=M((q$,fT)=>{"use strict";var EU=String.prototype.replace,SU=/%20/g,ag={RFC1738:"RFC1738",RFC3986:"RFC3986"};fT.exports={default:ag.RFC3986,formatters:{RFC1738:function(t){return EU.call(t,SU,"+")},RFC3986:function(t){return String(t)}},RFC1738:ag.RFC1738,RFC3986:ag.RFC3986}});var ug=M((B$,mT)=>{"use strict";var PU=el(),sg=Object.prototype.hasOwnProperty,Ri=Array.isArray,Nn=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),AU=s(function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Ri(r)){for(var o=[],c=0;c=cg?u.slice(d,d+cg):u,h=[],y=0;y=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||c===PU.RFC1738&&(v===40||v===41)){h[h.length]=m.charAt(y);continue}if(v<128){h[h.length]=Nn[v];continue}if(v<2048){h[h.length]=Nn[192|v>>6]+Nn[128|v&63];continue}if(v<55296||v>=57344){h[h.length]=Nn[224|v>>12]+Nn[128|v>>6&63]+Nn[128|v&63];continue}y+=1,v=65536+((v&1023)<<10|m.charCodeAt(y)&1023),h[h.length]=Nn[240|v>>18]+Nn[128|v>>12&63]+Nn[128|v>>6&63]+Nn[128|v&63]}p+=h.join("")}return p},"encode"),LU=s(function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o{"use strict";var yT=dT(),tl=ug(),ns=el(),qU=Object.prototype.hasOwnProperty,xT={brackets:s(function(e){return e+"[]"},"brackets"),comma:"comma",indices:s(function(e,n){return e+"["+n+"]"},"indices"),repeat:s(function(e){return e},"repeat")},kn=Array.isArray,BU=Array.prototype.push,vT=s(function(t,e){BU.apply(t,kn(e)?e:[e])},"pushToArray"),jU=Date.prototype.toISOString,gT=ns.default,We={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:tl.encode,encodeValuesOnly:!1,format:gT,formatter:ns.formatters[gT],indices:!1,serializeDate:s(function(e){return jU.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},UU=s(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),lg={},HU=s(function t(e,n,r,o,c,u,p,d,m,h,y,v,P,_,E,I,N,H){for(var j=e,J=H,te=0,Se=!1;(J=J.get(lg))!==void 0&&!Se;){var Ie=J.get(e);if(te+=1,typeof Ie<"u"){if(Ie===te)throw new RangeError("Cyclic object value");Se=!0}typeof J.get(lg)>"u"&&(te=0)}if(typeof h=="function"?j=h(n,j):j instanceof Date?j=P(j):r==="comma"&&kn(j)&&(j=tl.maybeMap(j,function(jt){return jt instanceof Date?P(jt):jt})),j===null){if(u)return m&&!I?m(n,We.encoder,N,"key",_):n;j=""}if(UU(j)||tl.isBuffer(j)){if(m){var Ke=I?n:m(n,We.encoder,N,"key",_);return[E(Ke)+"="+E(m(j,We.encoder,N,"value",_))]}return[E(n)+"="+E(String(j))]}var Ge=[];if(typeof j>"u")return Ge;var at;if(r==="comma"&&kn(j))I&&m&&(j=tl.maybeMap(j,m)),at=[{value:j.length>0?j.join(",")||null:void 0}];else if(kn(h))at=h;else{var vn=Object.keys(j);at=y?vn.sort(y):vn}var Le=d?n.replace(/\./g,"%2E"):n,je=o&&kn(j)&&j.length===1?Le+"[]":Le;if(c&&kn(j)&&j.length===0)return je+"[]";for(var be=0;be"u"?e.encodeDotInKeys===!0?!0:We.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:We.addQueryPrefix,allowDots:p,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:We.allowEmptyArrays,arrayFormat:u,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:We.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?We.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:We.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:We.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:We.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:We.encodeValuesOnly,filter:c,format:r,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:We.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:We.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:We.strictNullHandling}},"normalizeStringifyOptions");bT.exports=function(t,e){var n=t,r=zU(e),o,c;typeof r.filter=="function"?(c=r.filter,n=c("",n)):kn(r.filter)&&(c=r.filter,o=c);var u=[];if(typeof n!="object"||n===null)return"";var p=xT[r.arrayFormat],d=p==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var m=yT(),h=0;h0?P+v:""}});var TT=M((z$,RT)=>{"use strict";var Fo=ug(),pg=Object.prototype.hasOwnProperty,$U=Array.isArray,Be={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Fo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},WU=s(function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},"interpretNumericEntities"),_T=s(function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},"parseArrayValue"),KU="utf8=%26%2310003%3B",GU="utf8=%E2%9C%93",QU=s(function(e,n){var r={__proto__:null},o=n.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=n.parameterLimit===1/0?void 0:n.parameterLimit,u=o.split(n.delimiter,c),p=-1,d,m=n.charset;if(n.charsetSentinel)for(d=0;d-1&&(_=$U(_)?[_]:_);var E=pg.call(r,P);E&&n.duplicates==="combine"?r[P]=Fo.combine(r[P],_):(!E||n.duplicates==="last")&&(r[P]=_)}return r},"parseQueryStringValues"),VU=s(function(t,e,n,r){for(var o=r?e:_T(e,n),c=t.length-1;c>=0;--c){var u,p=t[c];if(p==="[]"&&n.parseArrays)u=n.allowEmptyArrays&&o===""?[]:[].concat(o);else{u=n.plainObjects?Object.create(null):{};var d=p.charAt(0)==="["&&p.charAt(p.length-1)==="]"?p.slice(1,-1):p,m=n.decodeDotInKeys?d.replace(/%2E/g,"."):d,h=parseInt(m,10);!n.parseArrays&&m===""?u={0:o}:!isNaN(h)&&p!==m&&String(h)===m&&h>=0&&n.parseArrays&&h<=n.arrayLimit?(u=[],u[h]=o):m!=="__proto__"&&(u[m]=o)}o=u}return o},"parseObject"),JU=s(function(e,n,r,o){if(e){var c=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,u=/(\[[^[\]]*])/,p=/(\[[^[\]]*])/g,d=r.depth>0&&u.exec(c),m=d?c.slice(0,d.index):c,h=[];if(m){if(!r.plainObjects&&pg.call(Object.prototype,m)&&!r.allowPrototypes)return;h.push(m)}for(var y=0;r.depth>0&&(d=p.exec(c))!==null&&y"u"?Be.charset:e.charset,r=typeof e.duplicates>"u"?Be.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:Be.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Be.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Be.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Be.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Be.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Be.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Be.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Be.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Be.decoder,delimiter:typeof e.delimiter=="string"||Fo.isRegExp(e.delimiter)?e.delimiter:Be.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Be.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Be.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Be.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Be.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Be.strictNullHandling}},"normalizeParseOptions");RT.exports=function(t,e){var n=YU(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?QU(t,n):t,o=n.plainObjects?Object.create(null):{},c=Object.keys(r),u=0;u{"use strict";var XU=wT(),ZU=TT(),eH=el();ET.exports={formats:eH,parse:ZU,stringify:XU}});var AT=M((K$,PT)=>{"use strict";var tH=s((t,e=3e4)=>new Promise(async(n,r)=>{let o=setTimeout(async()=>{r(new Error("Timeout exceeded. Please check your connections settings and try again"))},e);try{let c=await t();n(c)}catch(c){r(c)}finally{clearTimeout(o)}}),"executeWithTimeout");PT.exports=tH});var OT=M((Q$,CT)=>{"use strict";var nH={v2:2},rH={MultiHash:"MultiHash"},iH="On",oH="Off",aH="On (no default)";CT.exports={PARTITION_KEY_DEFINITION_VERSION:nH,PARTITION_KEY_KIND:rH,TTL_ON:iH,TTL_OFF:oH,TTL_ON_DEFAULT:aH}});var rs=s_(),an=c_(),IT=U1(),sH=ST(),cH=AT(),{TTL_ON_DEFAULT:uH,TTL_ON:lH,TTL_OFF:pH}=OT(),on;module.exports={connect:function(t,e,n){n()},disconnect:function(t,e,n){n()},testConnection:async function(t,e,n){e.clear(),on=rs(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);try{return await cH(DT),n()}catch(r){return n(is(r))}},getDatabases:async function(t,e,n){on=rs(t),e.clear(),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);try{let o=(await DT()).map(c=>c.id);return e.log("info",o,"All databases list",t.hiddenKeys),n(null,o)}catch(r){return e.log("error",r),n(is(r))}},getDocumentKinds:async function(t,e,n){on=rs(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);try{let r=await LT(t.database);e.log("collections list",r,"Mapped collection list");let o=r.map(async u=>{let p=on.database(t.database).container(u.id),d=await mg(p),m=yg(d,t.recordSamplingSettings);e.log("info",{collectionItem:u},"Getting documents for current collectionItem",t.hiddenKeys);let h=await hg(p,m),y=gg(h),v=hH(y,{sampleSize:20});return mH({bucketName:u.id,inference:v,isCustomInfer:!0,excludeDocKind:t.excludeDocKind},90)}),c=await Promise.all(o);n(null,c)}catch(r){return console.log(r),e.log("error",r),n(is(r))}},getDbCollectionsNames:async function(t,e,n){try{on=rs(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys),e.log("info",{Database:t.database},"Getting collections list for current database",t.hiddenKeys);let r=await LT(t.database);e.log("info",{CollectionList:r},"Collection list for current database",t.hiddenKeys);let o=r.map(u=>u.id),c=await gH(t,o);n(null,c)}catch(r){return console.log(r),e.log("error",r),n(is(r))}},getDbCollectionsData:async function(t,e,n){try{e.progress=e.progress||(()=>{}),on=rs(t),e.log("info",t,"Reverse-Engineering connection settings",t.hiddenKeys);let{recordSamplingSettings:r,fieldInference:o}=t;e.log("info",CH(r,o),"Reverse-Engineering sampling params",t.hiddenKeys);let c=t.collectionData.dataBaseNames;e.log("info",{CollectionList:c},"Selected collection list",t.hiddenKeys);let{resource:u}=await on.getDatabaseAccount(),p=await OH(t,e),d=Object.assign({accountID:t.accountKey,defaultConsistency:u.consistencyPolicy,preferredLocation:u.writableLocations[0]?u.writableLocations[0].name:"",...(t==null?void 0:t.includeAccountInformation)&&{resGrp:t.resourceGroupName,tenant:t.tenantId,subscription:t.subscriptionId}},p);e.log("info",d,"Model info",t.hiddenKeys);let m=c.map(async y=>{let v=on.database(t.database).container(y),P=await EH(v),_=await SH(v),E=await PH(v),I=await dH(v),N=await fH(I,e),{autopilot:H,throughput:j,capacityMode:J}=TH(N),te=_H(I),Se=vH(I.indexingPolicy),Ie=Array.isArray(te)&&te.length>1,Ke=Object.assign({dbId:t.database,capacityMode:J,throughput:j,autopilot:H,partitionKey:te,uniqueKey:RH(I),storedProcs:P,triggers:_,udfs:E,TTL:AH(I.defaultTtl),TTLseconds:I.defaultTtl,hierarchicalPartitionKey:Ie},Se),Ge=await mg(v),at=yg(Ge,r);e.progress({message:"Load documents...",containerName:t.database,entityName:y});let vn=await hg(v,at);e.progress({message:"Documents have loaded.",containerName:t.database,entityName:y});let Le=gg(vn),je=t.documentKinds[I.id].documentKindName||"*",be=t.collectionData.collections[y],Re=[];if(je!=="*")if(be)be.forEach(Te=>{let V=Le.filter(me=>me[je]===Te),G={dbName:y,collectionName:Te,documents:V||[],indexes:[],views:[],validation:fg(te,Le),docType:je,bucketInfo:Ke};o.active==="field"&&(G.documentTemplate=V[0]||null),Re.push(G)});else{let Te={dbName:y,emptyBucket:!0,indexes:[],views:[],validation:fg(te,Le),bucketInfo:Ke};Re.push(Te)}else{let Te={dbName:y,collectionName:y,documents:Le||[],indexes:[],views:[],validation:fg(te,Le),docType:"type",bucketInfo:Ke};o.active==="field"&&(Te.documentTemplate=Le[0]||null),Re.push(Te)}return Re}),h=await Promise.all(m);return n(null,h,d)}catch(r){return e.progress({message:"Error of connecting to the database "+t.database+`. + `+r.message,containerName:t.database,entityName:""}),e.log("error",r),n(is(r))}}};async function dH(t){let{resource:e}=await t.read();return e}s(dH,"getCollectionById");async function fH(t,e){try{let n={query:"SELECT * FROM root r WHERE r.resource = @link",parameters:[{name:"@link",value:t._self}]},{resources:r}=await on.offers.query(n).fetchAll();return r.length>0&&r[0]}catch(n){e.log("error",{message:n.message,stack:n.stack},"[Warning] Error querying offers");return}}s(fH,"getOfferType");async function DT(){return(await on.databases.readAll().fetchAll()).resources}s(DT,"getDatabasesData");async function LT(t){let{resources:e}=await on.database(t).containers.readAll().fetchAll();return e}s(LT,"listCollections");async function hg(t,e,n){let r=`SELECT TOP ${e} * FROM c`,o=[];try{let c=t.items.query(r,{enableCrossPartitionQuery:!0,maxItemCount:200});for(;c.hasMoreResults();){let{resources:u}=await c.fetchNext();o=o.concat(u)}}catch(c){console.log(c),n.log("error",c)}return o.filter(Boolean)}s(hg,"getDocuments");async function mg(t){let e="SELECT COUNT(1) FROM c",{resources:n}=await t.items.query(e,{enableCrossPartitionQuery:!0}).fetchAll();return n[0].$1}s(mg,"getDocumentsAmount");function gg(t){let e=["_rid","_self","_etag","_attachments","_ts"];return t.map(n=>{for(let r in n)e.includes(r)&&delete n[r];return n})}s(gg,"filterDocuments");function hH(t,e){function n(c){return{}.toString.call(c).split(" ")[1].slice(0,-1).toLowerCase()}s(n,"typeOf");let r=e.sampleSize||30,o={"#docs":0,$schema:"http://json-schema.org/schema#",properties:{}};t.forEach(c=>{o["#docs"]++;for(let u in c)o.properties.hasOwnProperty(u)?(o.properties[u]["#docs"]++,o.properties[u].samples.indexOf(c[u])===-1&&o.properties[u].samples.length=e&&p[d].samples.length){if(n.push(d),t.excludeDocKind.indexOf(d)===-1){if(p[d]["%docs"]===o.probability&&o.key==="type")continue;p[d]["%docs"]>=o.probability&&p[d].samples.length{let o=on.database(t.database).container(r),c=await mg(o),u=yg(c,t.recordSamplingSettings),p=await hg(o,u),d=gg(p),m=t.documentKinds[r].documentKindName||"*",h=[];return m!=="*"&&(h=d.map(y=>y[m]),h=h.filter(y=>!!y),h=an.uniq(h)),yH(h,r)});return await Promise.all(n)}s(gH,"handleBucket");function yH(t,e){let n=an.uniq(t);return{dbName:e,dbCollections:n}}s(yH,"prepareConnectionDataItem");var yg=s((t,e)=>{if(e.active==="absolute")return Number(e.absolute.value);let n=Math.ceil(t*e.relative.value/100);return Math.min(n,e.maxValue)},"getSampleDocSize");function xH(t){return t.charAt(0).toUpperCase()+t.slice(1)}s(xH,"capitalizeFirstLetter");function vH(t){return{indexingMode:xH(t.indexingMode||""),indexingAutomatic:t.automatic===!0?"true":"false",includedPaths:(t.includedPaths||[]).map((e,n)=>({name:`Included (${n+1})`,indexIncludedPath:[dg(e.path)]})),excludedPaths:t.excludedPaths.map((e,n)=>({name:`Excluded (${n+1})`,indexExcludedPath:[dg(e.path)]})),spatialIndexes:(t.spatialIndexes||[]).map((e,n)=>({name:`Spatial (${n+1})`,indexIncludedPath:[dg(e.path)],dataTypes:(e.types||[]).map(r=>({spatialType:r}))})),compositeIndexes:(t.compositeIndexes||[]).map((e,n)=>{let r=e.map((o,c)=>({name:nl(o.path),type:o.order||"ascending"}),{});return{name:`Composite (${n+1})`,compositeFieldPath:r}})}}s(vH,"getIndexes");var bH=s(t=>/\?$/.test(t)?"?":/\*$/.test(t)?"*":"","getIndexPathType"),dg=s(t=>{let e=bH(t),n=t.replace(/\/(\?|\*)$/,"");return{name:nl(n),type:e}},"getIndexPath"),wH=s(t=>{let e=/^\"([\s\S]+)\"$/i;return e.test(t)&&t.match(e)[1]||t},"trimKey"),nl=s(t=>(t||"").split("/").filter(Boolean).map(wH).map(e=>e==="[]"?0:e).join("."),"getKeyPath");function _H(t){return!t.partitionKey||!Array.isArray(t.partitionKey.paths)?"":t.partitionKey.paths.map(nl)}s(_H,"getPartitionKey");function RH(t){return t.uniqueKeyPolicy?Array.isArray(t.uniqueKeyPolicy.uniqueKeys)?t.uniqueKeyPolicy.uniqueKeys.map(e=>{if(Array.isArray(e.paths))return{attributePath:e.paths.map(nl)}}).filter(Boolean):[]:[]}s(RH,"getUniqueKeys");function TH(t){return t?an.get(t,"content.offerAutopilotSettings")?{autopilot:!0,throughput:an.get(t,"content.offerAutopilotSettings.maximumTierThroughput",""),capacityMode:"Provisioned throughput"}:{autopilot:!1,throughput:an.get(t,"content.offerThroughput",""),capacityMode:"Provisioned throughput"}:{capacityMode:"Serverless",autopilot:!1}}s(TH,"getOfferProps");async function EH(t){let{resources:e}=await t.scripts.storedProcedures.readAll().fetchAll();return e.map((n,r)=>({storedProcID:n.id,name:`New Stored procedure(${r+1})`,storedProcFunction:n.body}))}s(EH,"getStoredProcedures");async function SH(t){let{resources:e}=await t.scripts.triggers.readAll().fetchAll();return e.map((n,r)=>({triggerID:n.id,name:`New Trigger(${r+1})`,prePostTrigger:n.triggerType==="Pre"?"Pre-Trigger":"Post-Trigger",triggerOperation:n.triggerOperation,triggerFunction:n.body}))}s(SH,"getTriggers");async function PH(t){let{resources:e}=await t.scripts.userDefinedFunctions.readAll().fetchAll();return e.map((n,r)=>({udfID:n.id,name:`New UDFS(${r+1})`,udfFunction:n.body}))}s(PH,"getUdfs");function AH(t){return t?t===-1?uH:lH:pH}s(AH,"getTTL");function CH(t,e){let n={},r=t[t.active].value,o=t.active==="relative"?"%":" records max";return n.recordSampling=`${t.active} ${r}${o}`,n.fieldInference=e.active==="field"?"keep field order":"alphabetical order",n}s(CH,"getSamplingInfo");async function OH(t,e){if(t.disableSSL||!t.includeAccountInformation)return{};e.log("info",{},"Account additional info",t.hiddenKeys);try{let{clientId:n,appSecret:r,tenantId:o,subscriptionId:c,resourceGroupName:u,host:p}=t,d=/https:\/\/(.+)\.documents.+/i,m=d.test(p)?d.exec(p)[1]:"",h=`https://login.microsoftonline.com/${o}/oauth2/token`,{data:y}=await IT({method:"post",url:h,data:sH.stringify({grant_type:"client_credentials",client_id:n,client_secret:r,resource:"https://management.azure.com/"}),headers:{"Content-Type":"application/x-www-form-urlencoded"}}),v=`https://management.azure.com/subscriptions/${c}/resourceGroups/${u}/providers/Microsoft.DocumentDB/databaseAccounts/${m}?api-version=2015-04-08`,{data:P}=await IT({method:"get",url:v,headers:{Authorization:`${y.token_type} ${y.access_token}`}});return e.progress({message:"Getting account information",containerName:t.database,entityName:""}),{enableMultipleWriteLocations:P.properties.enableMultipleWriteLocations,enableAutomaticFailover:P.properties.enableAutomaticFailover,isVirtualNetworkFilterEnabled:P.properties.isVirtualNetworkFilterEnabled,virtualNetworkRules:P.properties.virtualNetworkRules.map(({id:_,ignoreMissingVNetServiceEndpoint:E})=>({virtualNetworkId:_,ignoreMissingVNetServiceEndpoint:E})),ipRangeFilter:P.properties.ipRangeFilter,tags:Object.entries(P.tags).map(([_,E])=>({tagName:_,tagValue:E})),locations:P.properties.locations.map(({id:_,locationName:E,failoverPriority:I,isZoneRedundant:N})=>({locationId:_,locationName:E,failoverPriority:I,isZoneRedundant:N}))}}catch(n){return e.log("error",{message:an.get(n,"response.data.error.message",n.message),stack:n.stack}),e.progress({message:"Error while getting account information",containerName:t.database}),{}}}s(OH,"getAdditionalAccountInfo");function is(t){return{message:t.message,stack:t.stack}}s(is,"mapError");function fg(t,e=[]){let n=s((u,p={})=>{if(an.isEmpty(u))return!0;let d=an.get(p,`${u[0]}`);return d!==void 0?n(an.tail(u),d):!1},"checkIfDocumentContainsPath"),r=s(u=>u.length===1?{[u[0]]:{primaryKey:!0,partitionKey:!0}}:{[u[0]]:{properties:r(an.tail(u))}},"getNestedObject"),o=s(u=>u.reduce((p,d)=>{if(!d||!an.isString(d))return p;let m=d.split(".");return m.length===0||!e.some(h=>n(m,h))?p:{...p,...r(m)}},{}),"getProperties");if(!Array.isArray(t))return!1;let c=o(t);return an.isEmpty(c)?!1:{jsonSchema:{properties:c}}}s(fg,"createSchemaByPartitionKeyPath"); +/*! Bundled license information: + +lodash/lodash.js: + (** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) +*/ diff --git a/reverse_engineering/config.json b/reverse_engineering/config.json index e05a75c..8a06a84 100644 --- a/reverse_engineering/config.json +++ b/reverse_engineering/config.json @@ -5,6 +5,6 @@ }, "excludeDocKind": ["id"], "scenario": "getDatabases", - "connectionList": [ "name", "host", "port" ], + "connectionList": ["name", "host", "port"], "helpUrl": "https://hackolade.com/help/Azureinstance.html" } diff --git a/reverse_engineering/connection_settings_modal/connectionSettingsModalConfig.json b/reverse_engineering/connection_settings_modal/connectionSettingsModalConfig.json index e43bbab..cd30ea0 100644 --- a/reverse_engineering/connection_settings_modal/connectionSettingsModalConfig.json +++ b/reverse_engineering/connection_settings_modal/connectionSettingsModalConfig.json @@ -1,12 +1,12 @@ /* -* Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. -* -* The copyright to the computer software herein is the property of IntegrIT S.A. -* The software may be used and/or copied only with the written permission of -* IntegrIT S.A. or in accordance with the terms and conditions stipulated in -* the agreement/contract under which the software has been supplied. -* -*/ + * Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. + * + * The copyright to the computer software herein is the property of IntegrIT S.A. + * The software may be used and/or copied only with the written permission of + * IntegrIT S.A. or in accordance with the terms and conditions stipulated in + * the agreement/contract under which the software has been supplied. + * + */ [ { "lowerTab": "Connection", diff --git a/reverse_engineering/helpers/executeWithTimeout.js b/reverse_engineering/helpers/executeWithTimeout.js deleted file mode 100644 index 8b581e1..0000000 --- a/reverse_engineering/helpers/executeWithTimeout.js +++ /dev/null @@ -1,18 +0,0 @@ - -const executeWithTimeout = (f, timeout = 30000) => new Promise(async (resolve, reject) => { - const t = setTimeout(async () => { - reject(new Error('Timeout exceeded. Please check your connections settings and try again')); - }, timeout); - - try { - const result = await f(); - - resolve(result); - } catch (error) { - reject(error); - } finally { - clearTimeout(t); - } -}); - -module.exports = executeWithTimeout; diff --git a/reverse_engineering/helpers/setUpDocumentClient.js b/reverse_engineering/helpers/setUpDocumentClient.js deleted file mode 100644 index 1fedbff..0000000 --- a/reverse_engineering/helpers/setUpDocumentClient.js +++ /dev/null @@ -1,25 +0,0 @@ -const { CosmosClient } = require('@azure/cosmos'); - -function getEndpoint(data) { - const hostWithPort = /:\d+/; - if (hostWithPort.test(data.host)) { - return data.host; - } - if (data.port) { - return data.host + ':' + (data.port || '443'); - } -} - -function setUpDocumentClient(connectionInfo) { - const endpoint = getEndpoint(connectionInfo); - const key = connectionInfo.accountKey; - const connectionPolicy = { - requestTimeout: 30000 - }; - if ((connectionInfo.disableSSL)) { - process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; - } - return new CosmosClient({ endpoint, key, connectionPolicy }); -} - -module.exports = setUpDocumentClient; diff --git a/reverse_engineering/node_modules/.bin/uuid b/reverse_engineering/node_modules/.bin/uuid deleted file mode 120000 index 588f70e..0000000 --- a/reverse_engineering/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../uuid/dist/bin/uuid \ No newline at end of file diff --git a/reverse_engineering/node_modules/.package-lock.json b/reverse_engineering/node_modules/.package-lock.json deleted file mode 100644 index ffafeb1..0000000 --- a/reverse_engineering/node_modules/.package-lock.json +++ /dev/null @@ -1,314 +0,0 @@ -{ - "name": "cosmosdb", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "node_modules/@azure/abort-controller": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", - "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz", - "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.0.tgz", - "integrity": "sha512-+MnSB0vGZjszSzr5AW8z93/9fkDu2RLtWmAN8gskURq7EW2sSwqy8jZa0V26rjuBVkwhdA3Hw8z3VWoeBUOw+A==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.3.0", - "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", - "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.4.0.tgz", - "integrity": "sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/cosmos": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.17.3.tgz", - "integrity": "sha512-wBglkQ6Irjv5Vo2iw8fd6eYj60WYRSSg4/0DBkeOP6BwQ4RA91znsOHd6s3qG6UAbNgYuzC9Nnq07vlFFZkHEw==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.2.0", - "@azure/core-tracing": "^1.0.0", - "debug": "^4.1.1", - "fast-json-stable-stringify": "^2.1.0", - "jsbi": "^3.1.3", - "node-abort-controller": "^3.0.0", - "priorityqueuejs": "^1.0.0", - "semaphore": "^1.0.5", - "tslib": "^2.2.0", - "universal-user-agent": "^6.0.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", - "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/axios": { - "version": "0.21.1", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.10.0" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/follow-redirects": { - "version": "1.13.1", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jsbi": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", - "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==" - }, - "node_modules/lodash": { - "version": "4.17.20", - "license": "MIT" - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/node-abort-controller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", - "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" - }, - "node_modules/priorityqueuejs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz", - "integrity": "sha512-lg++21mreCEOuGWTbO5DnJKAdxfjrdN0S9ysoW9SzdSJvbkWpkaDdpG/cdsPCsEnoLUwmd9m3WcZhngW7yKA2g==" - }, - "node_modules/qs": { - "version": "6.9.1", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/semaphore": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - } - } -} diff --git a/reverse_engineering/node_modules/@azure/abort-controller/CHANGELOG.md b/reverse_engineering/node_modules/@azure/abort-controller/CHANGELOG.md deleted file mode 100644 index b764523..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/CHANGELOG.md +++ /dev/null @@ -1,34 +0,0 @@ -# Release History - -## 1.1.0 (2022-05-05) - -- Changed TS compilation target to ES2017 in order to produce smaller bundles and use more native platform features -- With the dropping of support for Node.js versions that are no longer in LTS, the dependency on `@types/node` has been updated to version 12. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - -## 1.0.4 (2021-03-04) - -Fixes issue [13985](https://github.com/Azure/azure-sdk-for-js/issues/13985) where abort event listeners that removed themselves when invoked could prevent other event listeners from being invoked. - -## 1.0.3 (2021-02-23) - -Support Typescript version < 3.6 by down-leveling the type definition files. ([PR 12793](https://github.com/Azure/azure-sdk-for-js/pull/12793)) - -## 1.0.2 (2020-01-07) - -Updates the `tslib` dependency to version 2.x. - -## 1.0.1 (2019-12-04) - -Fixes the [bug 6271](https://github.com/Azure/azure-sdk-for-js/issues/6271) that can occur with angular prod builds due to triple-slash directives. -([PR 6344](https://github.com/Azure/azure-sdk-for-js/pull/6344)) - -## 1.0.0 (2019-10-29) - -This release marks the general availability of the `@azure/abort-controller` package. - -Removed the browser bundle. A browser-compatible library can still be created through the use of a bundler such as Rollup, Webpack, or Parcel. -([#5860](https://github.com/Azure/azure-sdk-for-js/pull/5860)) - -## 1.0.0-preview.2 (2019-09-09) - -Listeners attached to an `AbortSignal` now receive an event with the type `abort`. (PR #4756) diff --git a/reverse_engineering/node_modules/@azure/abort-controller/LICENSE b/reverse_engineering/node_modules/@azure/abort-controller/LICENSE deleted file mode 100644 index ea8fb15..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@azure/abort-controller/README.md b/reverse_engineering/node_modules/@azure/abort-controller/README.md deleted file mode 100644 index ce578d9..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# Azure Abort Controller client library for JavaScript - -The `@azure/abort-controller` package provides `AbortController` and `AbortSignal` classes. These classes are compatible -with the [AbortController](https://developer.mozilla.org/docs/Web/API/AbortController) built into modern browsers -and the `AbortSignal` used by [fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API). -Use the `AbortController` class to create an instance of the `AbortSignal` class that can be used to cancel an operation -in an Azure SDK that accept a parameter of type `AbortSignalLike`. - -Key links: - -- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller) -- [Package (npm)](https://www.npmjs.com/package/@azure/abort-controller) -- [API Reference Documentation](https://docs.microsoft.com/javascript/api/overview/azure/abort-controller-readme) - -## Getting started - -### Installation - -Install this library using npm as follows - -``` -npm install @azure/abort-controller -``` - -## Key Concepts - -Use the `AbortController` to create an `AbortSignal` which can then be passed to Azure SDK operations to cancel -pending work. The `AbortSignal` can be accessed via the `signal` property on an instantiated `AbortController`. -An `AbortSignal` can also be returned directly from a static method, e.g. `AbortController.timeout(100)`. -that is cancelled after 100 milliseconds. - -Calling `abort()` on the instantiated `AbortController` invokes the registered `abort` -event listeners on the associated `AbortSignal`. -Any subsequent calls to `abort()` on the same controller will have no effect. - -The `AbortSignal.none` static property returns an `AbortSignal` that can not be aborted. - -Multiple instances of an `AbortSignal` can be linked so that calling `abort()` on the parent signal, -aborts all linked signals. -This linkage is one-way, meaning that a parent signal can affect a linked signal, but not the other way around. -To link `AbortSignals` together, pass in the parent signals to the `AbortController` constructor. - -## Examples - -The below examples assume that `doAsyncWork` is a function that takes a bag of properties, one of which is -of the abort signal. - -### Example 1 - basic usage - -```js -import { AbortController } from "@azure/abort-controller"; - -const controller = new AbortController(); -doAsyncWork({ abortSignal: controller.signal }); - -// at some point later -controller.abort(); -``` - -### Example 2 - Aborting with timeout - -```js -import { AbortController } from "@azure/abort-controller"; - -const signal = AbortController.timeout(1000); -doAsyncWork({ abortSignal: signal }); -``` - -### Example 3 - Aborting sub-tasks - -```js -import { AbortController } from "@azure/abort-controller"; - -const allTasksController = new AbortController(); - -const subTask1 = new AbortController(allTasksController.signal); -const subtask2 = new AbortController(allTasksController.signal); - -allTasksController.abort(); // aborts allTasksSignal, subTask1, subTask2 -subTask1.abort(); // aborts only subTask1 -``` - -### Example 4 - Aborting with parent signal or timeout - -```js -import { AbortController } from "@azure/abort-controller"; - -const allTasksController = new AbortController(); - -// create a subtask controller that can be aborted manually, -// or when either the parent task aborts or the timeout is reached. -const subTask = new AbortController(allTasksController.signal, AbortController.timeout(100)); - -allTasksController.abort(); // aborts allTasksSignal, subTask -subTask.abort(); // aborts only subTask -``` - -## Next steps - -You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes. - -## Troubleshooting - -If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new). - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fabort-controller%2FREADME.png) diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js b/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js deleted file mode 100644 index 0d260f3..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { AbortSignal, abortSignal } from "./AbortSignal"; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -export class AbortError extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } -} -/** - * An AbortController provides an AbortSignal and the associated controls to signal - * that an asynchronous operation should be aborted. - * - * @example - * Abort an operation when another event fires - * ```ts - * const controller = new AbortController(); - * const signal = controller.signal; - * doAsyncWork(signal); - * button.addEventListener('click', () => controller.abort()); - * ``` - * - * @example - * Share aborter cross multiple operations in 30s - * ```ts - * // Upload the same data to 2 different data centers at the same time, - * // abort another when any of them is finished - * const controller = AbortController.withTimeout(30 * 1000); - * doAsyncWork(controller.signal).then(controller.abort); - * doAsyncWork(controller.signal).then(controller.abort); - *``` - * - * @example - * Cascaded aborting - * ```ts - * // All operations can't take more than 30 seconds - * const aborter = Aborter.timeout(30 * 1000); - * - * // Following 2 operations can't take more than 25 seconds - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * ``` - */ -export class AbortController { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal(); - if (!parentSignals) { - return; - } - // coerce parentSignals into an array - if (!Array.isArray(parentSignals)) { - // eslint-disable-next-line prefer-rest-params - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - // if the parent signal has already had abort() called, - // then call abort on this signal as well. - if (parentSignal.aborted) { - this.abort(); - } - else { - // when the parent signal aborts, this signal should as well. - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal(); - const timer = setTimeout(abortSignal, ms, signal); - // Prevent the active Timer from keeping the Node.js event loop active. - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } -} -//# sourceMappingURL=AbortController.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js.map b/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js.map deleted file mode 100644 index 8a6f7d0..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AbortController.js","sourceRoot":"","sources":["../../src/AbortController.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAmB,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,eAAe;IAW1B,6EAA6E;IAC7E,YAAY,aAAmB;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QAEjC,IAAI,CAAC,aAAa,EAAE;YAClB,OAAO;SACR;QACD,qCAAqC;QACrC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;YACjC,8CAA8C;YAC9C,aAAa,GAAG,SAAS,CAAC;SAC3B;QACD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;YACxC,uDAAuD;YACvD,0CAA0C;YAC1C,IAAI,YAAY,CAAC,OAAO,EAAE;gBACxB,IAAI,CAAC,KAAK,EAAE,CAAC;aACd;iBAAM;gBACL,6DAA6D;gBAC7D,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;oBAC1C,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,CAAC,CAAC,CAAC;aACJ;SACF;IACH,CAAC;IAED;;;;;OAKG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,OAAO,CAAC,EAAU;QAC9B,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;QAClD,uEAAuE;QACvE,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,EAAE;YACrC,KAAK,CAAC,KAAK,EAAE,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignal, AbortSignalLike, abortSignal } from \"./AbortSignal\";\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * Abort an operation when another event fires\n * ```ts\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n * ```\n *\n * @example\n * Share aborter cross multiple operations in 30s\n * ```ts\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *```\n *\n * @example\n * Cascaded aborting\n * ```ts\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * ```\n */\nexport class AbortController {\n private _signal: AbortSignal;\n\n /**\n * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n */\n constructor(parentSignals?: AbortSignalLike[]);\n /**\n * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n */\n constructor(...parentSignals: AbortSignalLike[]);\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(parentSignals?: any) {\n this._signal = new AbortSignal();\n\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n // eslint-disable-next-line prefer-rest-params\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n } else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n */\n public get signal(): AbortSignal {\n return this._signal;\n }\n\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n */\n abort(): void {\n abortSignal(this._signal);\n }\n\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n * @param ms - Elapsed time in milliseconds to trigger an abort.\n */\n public static timeout(ms: number): AbortSignal {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js b/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js deleted file mode 100644 index e97336a..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/// -const listenersMap = new WeakMap(); -const abortedMap = new WeakMap(); -/** - * An aborter instance implements AbortSignal interface, can abort HTTP requests. - * - * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. - * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation - * cannot or will not ever be cancelled. - * - * @example - * Abort without timeout - * ```ts - * await doAsyncWork(AbortSignal.none); - * ``` - */ -export class AbortSignal { - constructor() { - /** - * onabort event listener. - */ - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener( - // tslint:disable-next-line:variable-name - _type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener( - // tslint:disable-next-line:variable-name - _type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } -} -/** - * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. - * Will try to trigger abort event for all linked AbortSignal nodes. - * - * - If there is a timeout, the timer will be cancelled. - * - If aborted is true, nothing will happen. - * - * @internal - */ -// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters -export function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - // Create a copy of listeners so mutations to the array - // (e.g. via removeListener calls) don't affect the listeners - // we invoke. - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); -} -//# sourceMappingURL=AbortSignal.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js.map b/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js.map deleted file mode 100644 index 1ca33bd..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AbortSignal.js","sourceRoot":"","sources":["../../src/AbortSignal.ts"],"names":[],"mappings":"AAAA,uCAAuC;A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,CAAC;QAE1C,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1C,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;YACd,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC5B;IACH,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,MAAa;QACzB,MAAM,IAAI,KAAK,CACb,kHAAkH,CACnH,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,wEAAwE;AACxE,MAAM,UAAU,WAAW,CAAC,MAAmB;IAC7C,IAAI,MAAM,CAAC,OAAO,EAAE;QAClB,OAAO;KACR;IAED,IAAI,MAAM,CAAC,OAAO,EAAE;QAClB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC7B;IAED,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC;IAC5C,IAAI,SAAS,EAAE;QACb,uDAAuD;QACvD,6DAA6D;QAC7D,aAAa;QACb,SAAS,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YACrC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;KACJ;IAED,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// \n\ntype AbortEventListener = (this: AbortSignalLike, ev?: any) => any;\n\nconst listenersMap = new WeakMap();\nconst abortedMap = new WeakMap();\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n}\n\n/**\n * An aborter instance implements AbortSignal interface, can abort HTTP requests.\n *\n * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled.\n * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation\n * cannot or will not ever be cancelled.\n *\n * @example\n * Abort without timeout\n * ```ts\n * await doAsyncWork(AbortSignal.none);\n * ```\n */\nexport class AbortSignal implements AbortSignalLike {\n constructor() {\n listenersMap.set(this, []);\n abortedMap.set(this, false);\n }\n\n /**\n * Status of whether aborted or not.\n *\n * @readonly\n */\n public get aborted(): boolean {\n if (!abortedMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n return abortedMap.get(this)!;\n }\n\n /**\n * Creates a new AbortSignal instance that will never be aborted.\n *\n * @readonly\n */\n public static get none(): AbortSignal {\n return new AbortSignal();\n }\n\n /**\n * onabort event listener.\n */\n public onabort: ((ev?: Event) => any) | null = null;\n\n /**\n * Added new \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be added\n */\n public addEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n listeners.push(listener);\n }\n\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be removed\n */\n public removeEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n\n const index = listeners.indexOf(listener);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n\n /**\n * Dispatches a synthetic event to the AbortSignal.\n */\n dispatchEvent(_event: Event): boolean {\n throw new Error(\n \"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\"\n );\n }\n}\n\n/**\n * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.\n * Will try to trigger abort event for all linked AbortSignal nodes.\n *\n * - If there is a timeout, the timer will be cancelled.\n * - If aborted is true, nothing will happen.\n *\n * @internal\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nexport function abortSignal(signal: AbortSignal): void {\n if (signal.aborted) {\n return;\n }\n\n if (signal.onabort) {\n signal.onabort.call(signal);\n }\n\n const listeners = listenersMap.get(signal)!;\n if (listeners) {\n // Create a copy of listeners so mutations to the array\n // (e.g. via removeListener calls) don't affect the listeners\n // we invoke.\n listeners.slice().forEach((listener) => {\n listener.call(signal, { type: \"abort\" });\n });\n }\n\n abortedMap.set(signal, true);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/index.js b/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/index.js deleted file mode 100644 index ddbf505..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/index.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// Changes to Aborter -// * Rename Aborter to AbortSignal -// * Remove withValue and getValue - async context should be solved differently/wholistically, not tied to cancellation -// * Remove withTimeout, it's moved to the controller -// * AbortSignal constructor no longer takes a parent. Cancellation graphs are created from the controller. -// Potential changes to align with DOM Spec -// * dispatchEvent on Signal -export { AbortController, AbortError } from "./AbortController"; -export { AbortSignal } from "./AbortSignal"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/index.js.map b/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/index.js.map deleted file mode 100644 index def556e..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist-esm/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qBAAqB;AACrB,kCAAkC;AAClC,uHAAuH;AACvH,qDAAqD;AACrD,2GAA2G;AAE3G,2CAA2C;AAC3C,4BAA4B;AAE5B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// Changes to Aborter\n// * Rename Aborter to AbortSignal\n// * Remove withValue and getValue - async context should be solved differently/wholistically, not tied to cancellation\n// * Remove withTimeout, it's moved to the controller\n// * AbortSignal constructor no longer takes a parent. Cancellation graphs are created from the controller.\n\n// Potential changes to align with DOM Spec\n// * dispatchEvent on Signal\n\nexport { AbortController, AbortError } from \"./AbortController\";\nexport { AbortSignal, AbortSignalLike } from \"./AbortSignal\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist/index.js b/reverse_engineering/node_modules/@azure/abort-controller/dist/index.js deleted file mode 100644 index 650dd5f..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist/index.js +++ /dev/null @@ -1,239 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/// -const listenersMap = new WeakMap(); -const abortedMap = new WeakMap(); -/** - * An aborter instance implements AbortSignal interface, can abort HTTP requests. - * - * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. - * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation - * cannot or will not ever be cancelled. - * - * @example - * Abort without timeout - * ```ts - * await doAsyncWork(AbortSignal.none); - * ``` - */ -class AbortSignal { - constructor() { - /** - * onabort event listener. - */ - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener( - // tslint:disable-next-line:variable-name - _type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener( - // tslint:disable-next-line:variable-name - _type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } -} -/** - * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. - * Will try to trigger abort event for all linked AbortSignal nodes. - * - * - If there is a timeout, the timer will be cancelled. - * - If aborted is true, nothing will happen. - * - * @internal - */ -// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters -function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - // Create a copy of listeners so mutations to the array - // (e.g. via removeListener calls) don't affect the listeners - // we invoke. - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); -} - -// Copyright (c) Microsoft Corporation. -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -class AbortError extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } -} -/** - * An AbortController provides an AbortSignal and the associated controls to signal - * that an asynchronous operation should be aborted. - * - * @example - * Abort an operation when another event fires - * ```ts - * const controller = new AbortController(); - * const signal = controller.signal; - * doAsyncWork(signal); - * button.addEventListener('click', () => controller.abort()); - * ``` - * - * @example - * Share aborter cross multiple operations in 30s - * ```ts - * // Upload the same data to 2 different data centers at the same time, - * // abort another when any of them is finished - * const controller = AbortController.withTimeout(30 * 1000); - * doAsyncWork(controller.signal).then(controller.abort); - * doAsyncWork(controller.signal).then(controller.abort); - *``` - * - * @example - * Cascaded aborting - * ```ts - * // All operations can't take more than 30 seconds - * const aborter = Aborter.timeout(30 * 1000); - * - * // Following 2 operations can't take more than 25 seconds - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * ``` - */ -class AbortController { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal(); - if (!parentSignals) { - return; - } - // coerce parentSignals into an array - if (!Array.isArray(parentSignals)) { - // eslint-disable-next-line prefer-rest-params - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - // if the parent signal has already had abort() called, - // then call abort on this signal as well. - if (parentSignal.aborted) { - this.abort(); - } - else { - // when the parent signal aborts, this signal should as well. - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal(); - const timer = setTimeout(abortSignal, ms, signal); - // Prevent the active Timer from keeping the Node.js event loop active. - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } -} - -exports.AbortController = AbortController; -exports.AbortError = AbortError; -exports.AbortSignal = AbortSignal; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/@azure/abort-controller/dist/index.js.map b/reverse_engineering/node_modules/@azure/abort-controller/dist/index.js.map deleted file mode 100644 index 148b005..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/AbortSignal.ts","../src/AbortController.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// \n\ntype AbortEventListener = (this: AbortSignalLike, ev?: any) => any;\n\nconst listenersMap = new WeakMap();\nconst abortedMap = new WeakMap();\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n}\n\n/**\n * An aborter instance implements AbortSignal interface, can abort HTTP requests.\n *\n * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled.\n * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation\n * cannot or will not ever be cancelled.\n *\n * @example\n * Abort without timeout\n * ```ts\n * await doAsyncWork(AbortSignal.none);\n * ```\n */\nexport class AbortSignal implements AbortSignalLike {\n constructor() {\n listenersMap.set(this, []);\n abortedMap.set(this, false);\n }\n\n /**\n * Status of whether aborted or not.\n *\n * @readonly\n */\n public get aborted(): boolean {\n if (!abortedMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n return abortedMap.get(this)!;\n }\n\n /**\n * Creates a new AbortSignal instance that will never be aborted.\n *\n * @readonly\n */\n public static get none(): AbortSignal {\n return new AbortSignal();\n }\n\n /**\n * onabort event listener.\n */\n public onabort: ((ev?: Event) => any) | null = null;\n\n /**\n * Added new \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be added\n */\n public addEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n listeners.push(listener);\n }\n\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be removed\n */\n public removeEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n\n const index = listeners.indexOf(listener);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n\n /**\n * Dispatches a synthetic event to the AbortSignal.\n */\n dispatchEvent(_event: Event): boolean {\n throw new Error(\n \"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\"\n );\n }\n}\n\n/**\n * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.\n * Will try to trigger abort event for all linked AbortSignal nodes.\n *\n * - If there is a timeout, the timer will be cancelled.\n * - If aborted is true, nothing will happen.\n *\n * @internal\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nexport function abortSignal(signal: AbortSignal): void {\n if (signal.aborted) {\n return;\n }\n\n if (signal.onabort) {\n signal.onabort.call(signal);\n }\n\n const listeners = listenersMap.get(signal)!;\n if (listeners) {\n // Create a copy of listeners so mutations to the array\n // (e.g. via removeListener calls) don't affect the listeners\n // we invoke.\n listeners.slice().forEach((listener) => {\n listener.call(signal, { type: \"abort\" });\n });\n }\n\n abortedMap.set(signal, true);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignal, AbortSignalLike, abortSignal } from \"./AbortSignal\";\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * Abort an operation when another event fires\n * ```ts\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n * ```\n *\n * @example\n * Share aborter cross multiple operations in 30s\n * ```ts\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *```\n *\n * @example\n * Cascaded aborting\n * ```ts\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * ```\n */\nexport class AbortController {\n private _signal: AbortSignal;\n\n /**\n * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n */\n constructor(parentSignals?: AbortSignalLike[]);\n /**\n * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n */\n constructor(...parentSignals: AbortSignalLike[]);\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(parentSignals?: any) {\n this._signal = new AbortSignal();\n\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n // eslint-disable-next-line prefer-rest-params\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n } else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n */\n public get signal(): AbortSignal {\n return this._signal;\n }\n\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n */\n abort(): void {\n abortSignal(this._signal);\n }\n\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n * @param ms - Elapsed time in milliseconds to trigger an abort.\n */\n public static timeout(ms: number): AbortSignal {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n"],"names":[],"mappings":";;;;AAAA;AACA;AAGA;AAIA,MAAM,YAAY,GAAG,IAAI,OAAO,EAAqC,CAAC;AACtE,MAAM,UAAU,GAAG,IAAI,OAAO,EAAwB,CAAC;AA6BvD;;;;;;;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,IAAI,WAAW,EAAE,CAAC;QAEjC,IAAI,CAAC,aAAa,EAAE;YAClB,OAAO;AACR,SAAA;;AAED,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;;YAEjC,aAAa,GAAG,SAAS,CAAC;AAC3B,SAAA;AACD,QAAA,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;;;YAGxC,IAAI,YAAY,CAAC,OAAO,EAAE;gBACxB,IAAI,CAAC,KAAK,EAAE,CAAC;AACd,aAAA;AAAM,iBAAA;;AAEL,gBAAA,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;oBAC1C,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,iBAAC,CAAC,CAAC;AACJ,aAAA;AACF,SAAA;KACF;AAED;;;;;AAKG;AACH,IAAA,IAAW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;AAED;;;AAGG;IACH,KAAK,GAAA;AACH,QAAA,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC3B;AAED;;;AAGG;IACI,OAAO,OAAO,CAAC,EAAU,EAAA;AAC9B,QAAA,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;;AAElD,QAAA,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,EAAE;YACrC,KAAK,CAAC,KAAK,EAAE,CAAC;AACf,SAAA;AACD,QAAA,OAAO,MAAM,CAAC;KACf;AACF;;;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/package.json b/reverse_engineering/node_modules/@azure/abort-controller/package.json deleted file mode 100644 index 6126bc2..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "@azure/abort-controller", - "sdk-type": "client", - "version": "1.1.0", - "description": "Microsoft Azure SDK for JavaScript - Aborter", - "main": "./dist/index.js", - "module": "dist-esm/src/index.js", - "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:samples": "echo Obsolete", - "build:test": "tsc -p . && dev-tool run bundle", - "build:types": "downlevel-dts types/src types/3.1", - "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local && npm run build:types", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-* temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "echo skipped", - "integration-test:node": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", - "pack": "npm pack 2>&1", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", - "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" - }, - "types": "./types/src/index.d.ts", - "typesVersions": { - "<3.6": { - "types/src/*": [ - "types/3.1/*" - ] - } - }, - "files": [ - "dist/", - "dist-esm/src/", - "shims-public.d.ts", - "types/src", - "types/3.1", - "README.md", - "LICENSE" - ], - "engines": { - "node": ">=12.0.0" - }, - "repository": "github:Azure/azure-sdk-for-js", - "keywords": [ - "azure", - "aborter", - "abortsignal", - "cancellation", - "node.js", - "typescript", - "javascript", - "browser", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md", - "sideEffects": false, - "dependencies": { - "tslib": "^2.2.0" - }, - "devDependencies": { - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@microsoft/api-extractor": "7.18.11", - "@types/chai": "^4.1.6", - "@types/mocha": "^7.0.2", - "@types/node": "^12.0.0", - "chai": "^4.2.0", - "cross-env": "^7.0.2", - "downlevel-dts": "^0.8.0", - "eslint": "^7.15.0", - "karma": "^6.2.0", - "karma-chrome-launcher": "^3.0.0", - "karma-coverage": "^2.0.0", - "karma-edge-launcher": "^0.4.2", - "karma-env-preprocessor": "^0.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-ie-launcher": "^1.0.0", - "karma-junit-reporter": "^2.0.1", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-sourcemap-loader": "^0.3.8", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^2.0.0", - "nyc": "^15.0.0", - "prettier": "^2.5.1", - "rimraf": "^3.0.0", - "ts-node": "^10.0.0", - "typescript": "~4.6.0" - } -} diff --git a/reverse_engineering/node_modules/@azure/abort-controller/shims-public.d.ts b/reverse_engineering/node_modules/@azure/abort-controller/shims-public.d.ts deleted file mode 100644 index 002bec3..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/shims-public.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -// forward declaration of Event in case DOM libs are not present. -interface Event {} diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/AbortController.d.ts b/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/AbortController.d.ts deleted file mode 100644 index 6f935db..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/AbortController.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { AbortSignal, AbortSignalLike } from "./AbortSignal"; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -export declare class AbortError extends Error { - constructor(message?: string); -} -/** - * An AbortController provides an AbortSignal and the associated controls to signal - * that an asynchronous operation should be aborted. - * - * @example - * Abort an operation when another event fires - * ```ts - * const controller = new AbortController(); - * const signal = controller.signal; - * doAsyncWork(signal); - * button.addEventListener('click', () => controller.abort()); - * ``` - * - * @example - * Share aborter cross multiple operations in 30s - * ```ts - * // Upload the same data to 2 different data centers at the same time, - * // abort another when any of them is finished - * const controller = AbortController.withTimeout(30 * 1000); - * doAsyncWork(controller.signal).then(controller.abort); - * doAsyncWork(controller.signal).then(controller.abort); - *``` - * - * @example - * Cascaded aborting - * ```ts - * // All operations can't take more than 30 seconds - * const aborter = Aborter.timeout(30 * 1000); - * - * // Following 2 operations can't take more than 25 seconds - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * ``` - */ -export declare class AbortController { - private _signal; - /** - * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller. - */ - constructor(parentSignals?: AbortSignalLike[]); - /** - * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller. - */ - constructor(...parentSignals: AbortSignalLike[]); - /* - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - readonly signal: AbortSignal; - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort(): void; - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms: number): AbortSignal; -} -//# sourceMappingURL=AbortController.d.ts.map diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/AbortSignal.d.ts b/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/AbortSignal.d.ts deleted file mode 100644 index 53d6a77..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/AbortSignal.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -/// -/** - * Allows the request to be aborted upon firing of the "abort" event. - * Compatible with the browser built-in AbortSignal and common polyfills. - */ -export interface AbortSignalLike { - /** - * Indicates if the signal has already been aborted. - */ - readonly aborted: boolean; - /** - * Add new "abort" event listener, only support "abort" event. - */ - addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; - /** - * Remove "abort" event listener, only support "abort" event. - */ - removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; -} -/** - * An aborter instance implements AbortSignal interface, can abort HTTP requests. - * - * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. - * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation - * cannot or will not ever be cancelled. - * - * @example - * Abort without timeout - * ```ts - * await doAsyncWork(AbortSignal.none); - * ``` - */ -export declare class AbortSignal implements AbortSignalLike { - constructor(); - /* - * Status of whether aborted or not. - * - * @readonly - */ - readonly aborted: boolean; - /* - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static readonly none: AbortSignal; - /** - * onabort event listener. - */ - onabort: ((ev?: Event) => any) | null; - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void; - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void; - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event: Event): boolean; -} -/** - * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. - * Will try to trigger abort event for all linked AbortSignal nodes. - * - * - If there is a timeout, the timer will be cancelled. - * - If aborted is true, nothing will happen. - * - * @internal - */ -export declare function abortSignal(signal: AbortSignal): void; -//# sourceMappingURL=AbortSignal.d.ts.map diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/index.d.ts b/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/index.d.ts deleted file mode 100644 index 1345f47..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/3.1/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { AbortController, AbortError } from "./AbortController"; -export { AbortSignal, AbortSignalLike } from "./AbortSignal"; -//# sourceMappingURL=index.d.ts.map diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortController.d.ts b/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortController.d.ts deleted file mode 100644 index c07beb9..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortController.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { AbortSignal, AbortSignalLike } from "./AbortSignal"; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -export declare class AbortError extends Error { - constructor(message?: string); -} -/** - * An AbortController provides an AbortSignal and the associated controls to signal - * that an asynchronous operation should be aborted. - * - * @example - * Abort an operation when another event fires - * ```ts - * const controller = new AbortController(); - * const signal = controller.signal; - * doAsyncWork(signal); - * button.addEventListener('click', () => controller.abort()); - * ``` - * - * @example - * Share aborter cross multiple operations in 30s - * ```ts - * // Upload the same data to 2 different data centers at the same time, - * // abort another when any of them is finished - * const controller = AbortController.withTimeout(30 * 1000); - * doAsyncWork(controller.signal).then(controller.abort); - * doAsyncWork(controller.signal).then(controller.abort); - *``` - * - * @example - * Cascaded aborting - * ```ts - * // All operations can't take more than 30 seconds - * const aborter = Aborter.timeout(30 * 1000); - * - * // Following 2 operations can't take more than 25 seconds - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * await doAsyncWork(aborter.withTimeout(25 * 1000)); - * ``` - */ -export declare class AbortController { - private _signal; - /** - * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller. - */ - constructor(parentSignals?: AbortSignalLike[]); - /** - * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller. - */ - constructor(...parentSignals: AbortSignalLike[]); - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal(): AbortSignal; - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort(): void; - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms: number): AbortSignal; -} -//# sourceMappingURL=AbortController.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortController.d.ts.map b/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortController.d.ts.map deleted file mode 100644 index cb855af..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortController.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AbortController.d.ts","sourceRoot":"","sources":["../../src/AbortController.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAe,MAAM,eAAe,CAAC;AAE1E;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAc;IAE7B;;OAEG;gBACS,aAAa,CAAC,EAAE,eAAe,EAAE;IAC7C;;OAEG;gBACS,GAAG,aAAa,EAAE,eAAe,EAAE;IA2B/C;;;;;OAKG;IACH,IAAW,MAAM,IAAI,WAAW,CAE/B;IAED;;;OAGG;IACH,KAAK,IAAI,IAAI;IAIb;;;OAGG;WACW,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW;CAS/C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts b/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts deleted file mode 100644 index 7d31cb1..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -/// -/** - * Allows the request to be aborted upon firing of the "abort" event. - * Compatible with the browser built-in AbortSignal and common polyfills. - */ -export interface AbortSignalLike { - /** - * Indicates if the signal has already been aborted. - */ - readonly aborted: boolean; - /** - * Add new "abort" event listener, only support "abort" event. - */ - addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; - /** - * Remove "abort" event listener, only support "abort" event. - */ - removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; -} -/** - * An aborter instance implements AbortSignal interface, can abort HTTP requests. - * - * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. - * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation - * cannot or will not ever be cancelled. - * - * @example - * Abort without timeout - * ```ts - * await doAsyncWork(AbortSignal.none); - * ``` - */ -export declare class AbortSignal implements AbortSignalLike { - constructor(); - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted(): boolean; - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none(): AbortSignal; - /** - * onabort event listener. - */ - onabort: ((ev?: Event) => any) | null; - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void; - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void; - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event: Event): boolean; -} -/** - * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. - * Will try to trigger abort event for all linked AbortSignal nodes. - * - * - If there is a timeout, the timer will be cancelled. - * - If aborted is true, nothing will happen. - * - * @internal - */ -export declare function abortSignal(signal: AbortSignal): void; -//# sourceMappingURL=AbortSignal.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts.map b/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts.map deleted file mode 100644 index c82bea3..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AbortSignal.d.ts","sourceRoot":"","sources":["../../src/AbortSignal.ts"],"names":[],"mappings":";AAWA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CACd,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;IACR;;OAEG;IACH,mBAAmB,CACjB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;CACT;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,WAAY,YAAW,eAAe;;IAMjD;;;;OAIG;IACH,IAAW,OAAO,IAAI,OAAO,CAM5B;IAED;;;;OAIG;IACH,WAAkB,IAAI,IAAI,WAAW,CAEpC;IAED;;OAEG;IACI,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,IAAI,CAAQ;IAEpD;;;;;OAKG;IACI,gBAAgB,CAErB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,GAChD,IAAI;IASP;;;;;OAKG;IACI,mBAAmB,CAExB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,GAChD,IAAI;IAaP;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,KAAK,GAAG,OAAO;CAKtC;AAED;;;;;;;;GAQG;AAEH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAoBrD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/src/index.d.ts b/reverse_engineering/node_modules/@azure/abort-controller/types/src/index.d.ts deleted file mode 100644 index e5afaf4..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/src/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { AbortController, AbortError } from "./AbortController"; -export { AbortSignal, AbortSignalLike } from "./AbortSignal"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/src/index.d.ts.map b/reverse_engineering/node_modules/@azure/abort-controller/types/src/index.d.ts.map deleted file mode 100644 index a062939..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/src/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/abort-controller/types/src/tsdoc-metadata.json b/reverse_engineering/node_modules/@azure/abort-controller/types/src/tsdoc-metadata.json deleted file mode 100644 index 7b5aee3..0000000 --- a/reverse_engineering/node_modules/@azure/abort-controller/types/src/tsdoc-metadata.json +++ /dev/null @@ -1,11 +0,0 @@ -// This file is read by tools that parse documentation comments conforming to the TSDoc standard. -// It should be published with your NPM package. It should not be tracked by Git. -{ - "tsdocVersion": "0.12", - "toolPackages": [ - { - "packageName": "@microsoft/api-extractor", - "packageVersion": "7.18.11" - } - ] -} diff --git a/reverse_engineering/node_modules/@azure/core-auth/LICENSE b/reverse_engineering/node_modules/@azure/core-auth/LICENSE deleted file mode 100644 index ea8fb15..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@azure/core-auth/README.md b/reverse_engineering/node_modules/@azure/core-auth/README.md deleted file mode 100644 index 31ccc7f..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# Azure Core Authentication client library for JavaScript - -The `@azure/core-auth` package provides core interfaces and helper methods for authenticating with Azure services using Azure Active Directory and other authentication schemes common across the Azure SDK. As a "core" library, it shouldn't need to be added as a dependency to any user code, only other Azure SDK libraries. - -## Getting started - -### Installation - -Install this library using npm as follows - -``` -npm install @azure/core-auth -``` - -## Key Concepts - -The `TokenCredential` interface represents a credential capable of providing an authentication token. The `@azure/identity` package contains various credentials that implement the `TokenCredential` interface. - -The `AzureKeyCredential` is a static key-based credential that supports key rotation via the `update` method. Use this when a single secret value is needed for authentication, e.g. when using a shared access key. - -The `AzureNamedKeyCredential` is a static name/key-based credential that supports name and key rotation via the `update` method. Use this when both a secret value and a label are needed, e.g. when using a shared access key and shared access key name. - -The `AzureSASCredential` is a static signature-based credential that supports updating the signature value via the `update` method. Use this when using a shared access signature. - -## Examples - -### AzureKeyCredential - -```js -const { AzureKeyCredential } = require("@azure/core-auth"); - -const credential = new AzureKeyCredential("secret value"); -// prints: "secret value" -console.log(credential.key); -credential.update("other secret value"); -// prints: "other secret value" -console.log(credential.key); -``` - -### AzureNamedKeyCredential - -```js -const { AzureNamedKeyCredential } = require("@azure/core-auth"); - -const credential = new AzureNamedKeyCredential("ManagedPolicy", "secret value"); -// prints: "ManagedPolicy, secret value" -console.log(`${credential.name}, ${credential.key}`); -credential.update("OtherManagedPolicy", "other secret value"); -// prints: "OtherManagedPolicy, other secret value" -console.log(`${credential.name}, ${credential.key}`); -``` - -### AzureSASCredential - -```js -const { AzureSASCredential } = require("@azure/core-auth"); - -const credential = new AzureSASCredential("signature1"); -// prints: "signature1" -console.log(credential.signature); -credential.update("signature2"); -// prints: "signature2" -console.log(credential.signature); -``` - -## Next steps - -You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes. - -## Troubleshooting - -If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new). - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-auth%2FREADME.png) diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js deleted file mode 100644 index e1ec1af..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * A static-key-based credential that supports updating - * the underlying key value. - */ -export class AzureKeyCredential { - /** - * The value of the key to be used in authentication - */ - get key() { - return this._key; - } - /** - * Create an instance of an AzureKeyCredential for use - * with a service client. - * - * @param key - The initial value of the key to use in authentication - */ - constructor(key) { - if (!key) { - throw new Error("key must be a non-empty string"); - } - this._key = key; - } - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newKey - The new key value to be used - */ - update(newKey) { - this._key = newKey; - } -} -//# sourceMappingURL=azureKeyCredential.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js.map b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js.map deleted file mode 100644 index efc6831..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"azureKeyCredential.js","sourceRoot":"","sources":["../../src/azureKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAG7B;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,YAAY,GAAW;QACrB,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,MAAc;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents a credential defined by a static API key.\n */\nexport interface KeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n}\n\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nexport class AzureKeyCredential implements KeyCredential {\n private _key: string;\n\n /**\n * The value of the key to be used in authentication\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key - The initial value of the key to use in authentication\n */\n constructor(key: string) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey - The new key value to be used\n */\n public update(newKey: string): void {\n this._key = newKey;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureNamedKeyCredential.js b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureNamedKeyCredential.js deleted file mode 100644 index 3cd59bf..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureNamedKeyCredential.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { isObjectWithProperties } from "@azure/core-util"; -/** - * A static name/key-based credential that supports updating - * the underlying name and key values. - */ -export class AzureNamedKeyCredential { - /** - * The value of the key to be used in authentication. - */ - get key() { - return this._key; - } - /** - * The value of the name to be used in authentication. - */ - get name() { - return this._name; - } - /** - * Create an instance of an AzureNamedKeyCredential for use - * with a service client. - * - * @param name - The initial value of the name to use in authentication. - * @param key - The initial value of the key to use in authentication. - */ - constructor(name, key) { - if (!name || !key) { - throw new TypeError("name and key must be non-empty strings"); - } - this._name = name; - this._key = key; - } - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newName - The new name value to be used. - * @param newKey - The new key value to be used. - */ - update(newName, newKey) { - if (!newName || !newKey) { - throw new TypeError("newName and newKey must be non-empty strings"); - } - this._name = newName; - this._key = newKey; - } -} -/** - * Tests an object to determine whether it implements NamedKeyCredential. - * - * @param credential - The assumed NamedKeyCredential to be tested. - */ -export function isNamedKeyCredential(credential) { - return (isObjectWithProperties(credential, ["name", "key"]) && - typeof credential.key === "string" && - typeof credential.name === "string"); -} -//# sourceMappingURL=azureNamedKeyCredential.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureNamedKeyCredential.js.map b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureNamedKeyCredential.js.map deleted file mode 100644 index b85fcfa..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureNamedKeyCredential.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"azureNamedKeyCredential.js","sourceRoot":"","sources":["../../src/azureNamedKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAgB1D;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAIlC;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,GAAW;QACnC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE;YACjB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;SAC/D;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAe,EAAE,MAAc;QAC3C,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE;YACvB,MAAM,IAAI,SAAS,CAAC,8CAA8C,CAAC,CAAC;SACrE;QAED,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAmB;IACtD,OAAO,CACL,sBAAsB,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,UAAU,CAAC,GAAG,KAAK,QAAQ;QAClC,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,CACpC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isObjectWithProperties } from \"@azure/core-util\";\n\n/**\n * Represents a credential defined by a static API name and key.\n */\nexport interface NamedKeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n /**\n * The value of the API name represented as a string.\n */\n readonly name: string;\n}\n\n/**\n * A static name/key-based credential that supports updating\n * the underlying name and key values.\n */\nexport class AzureNamedKeyCredential implements NamedKeyCredential {\n private _key: string;\n private _name: string;\n\n /**\n * The value of the key to be used in authentication.\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * The value of the name to be used in authentication.\n */\n public get name(): string {\n return this._name;\n }\n\n /**\n * Create an instance of an AzureNamedKeyCredential for use\n * with a service client.\n *\n * @param name - The initial value of the name to use in authentication.\n * @param key - The initial value of the key to use in authentication.\n */\n constructor(name: string, key: string) {\n if (!name || !key) {\n throw new TypeError(\"name and key must be non-empty strings\");\n }\n\n this._name = name;\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newName - The new name value to be used.\n * @param newKey - The new key value to be used.\n */\n public update(newName: string, newKey: string): void {\n if (!newName || !newKey) {\n throw new TypeError(\"newName and newKey must be non-empty strings\");\n }\n\n this._name = newName;\n this._key = newKey;\n }\n}\n\n/**\n * Tests an object to determine whether it implements NamedKeyCredential.\n *\n * @param credential - The assumed NamedKeyCredential to be tested.\n */\nexport function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential {\n return (\n isObjectWithProperties(credential, [\"name\", \"key\"]) &&\n typeof credential.key === \"string\" &&\n typeof credential.name === \"string\"\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureSASCredential.js b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureSASCredential.js deleted file mode 100644 index d9d6e0b..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureSASCredential.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { isObjectWithProperties } from "@azure/core-util"; -/** - * A static-signature-based credential that supports updating - * the underlying signature value. - */ -export class AzureSASCredential { - /** - * The value of the shared access signature to be used in authentication - */ - get signature() { - return this._signature; - } - /** - * Create an instance of an AzureSASCredential for use - * with a service client. - * - * @param signature - The initial value of the shared access signature to use in authentication - */ - constructor(signature) { - if (!signature) { - throw new Error("shared access signature must be a non-empty string"); - } - this._signature = signature; - } - /** - * Change the value of the signature. - * - * Updates will take effect upon the next request after - * updating the signature value. - * - * @param newSignature - The new shared access signature value to be used - */ - update(newSignature) { - if (!newSignature) { - throw new Error("shared access signature must be a non-empty string"); - } - this._signature = newSignature; - } -} -/** - * Tests an object to determine whether it implements SASCredential. - * - * @param credential - The assumed SASCredential to be tested. - */ -export function isSASCredential(credential) { - return (isObjectWithProperties(credential, ["signature"]) && typeof credential.signature === "string"); -} -//# sourceMappingURL=azureSASCredential.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureSASCredential.js.map b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureSASCredential.js.map deleted file mode 100644 index 521e56b..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/azureSASCredential.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"azureSASCredential.js","sourceRoot":"","sources":["../../src/azureSASCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAY1D;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAG7B;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,YAAY,SAAiB;QAC3B,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACvE;QAED,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,YAAoB;QAChC,IAAI,CAAC,YAAY,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACvE;QAED,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;IACjC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,UAAmB;IACjD,OAAO,CACL,sBAAsB,CAAC,UAAU,EAAE,CAAC,WAAW,CAAC,CAAC,IAAI,OAAO,UAAU,CAAC,SAAS,KAAK,QAAQ,CAC9F,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isObjectWithProperties } from \"@azure/core-util\";\n\n/**\n * Represents a credential defined by a static shared access signature.\n */\nexport interface SASCredential {\n /**\n * The value of the shared access signature represented as a string\n */\n readonly signature: string;\n}\n\n/**\n * A static-signature-based credential that supports updating\n * the underlying signature value.\n */\nexport class AzureSASCredential implements SASCredential {\n private _signature: string;\n\n /**\n * The value of the shared access signature to be used in authentication\n */\n public get signature(): string {\n return this._signature;\n }\n\n /**\n * Create an instance of an AzureSASCredential for use\n * with a service client.\n *\n * @param signature - The initial value of the shared access signature to use in authentication\n */\n constructor(signature: string) {\n if (!signature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n\n this._signature = signature;\n }\n\n /**\n * Change the value of the signature.\n *\n * Updates will take effect upon the next request after\n * updating the signature value.\n *\n * @param newSignature - The new shared access signature value to be used\n */\n public update(newSignature: string): void {\n if (!newSignature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n\n this._signature = newSignature;\n }\n}\n\n/**\n * Tests an object to determine whether it implements SASCredential.\n *\n * @param credential - The assumed SASCredential to be tested.\n */\nexport function isSASCredential(credential: unknown): credential is SASCredential {\n return (\n isObjectWithProperties(credential, [\"signature\"]) && typeof credential.signature === \"string\"\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/index.js b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/index.js deleted file mode 100644 index c950a96..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { AzureKeyCredential } from "./azureKeyCredential"; -export { AzureNamedKeyCredential, isNamedKeyCredential, } from "./azureNamedKeyCredential"; -export { AzureSASCredential, isSASCredential } from "./azureSASCredential"; -export { isTokenCredential, } from "./tokenCredential"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/index.js.map b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/index.js.map deleted file mode 100644 index 8270542..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,uBAAuB,EAEvB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAiB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EAIL,iBAAiB,GAClB,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { AzureKeyCredential, KeyCredential } from \"./azureKeyCredential\";\nexport {\n AzureNamedKeyCredential,\n NamedKeyCredential,\n isNamedKeyCredential,\n} from \"./azureNamedKeyCredential\";\nexport { AzureSASCredential, SASCredential, isSASCredential } from \"./azureSASCredential\";\n\nexport {\n TokenCredential,\n GetTokenOptions,\n AccessToken,\n isTokenCredential,\n} from \"./tokenCredential\";\n\nexport { TracingContext } from \"./tracing\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js deleted file mode 100644 index 5ca7f68..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Tests an object to determine whether it implements TokenCredential. - * - * @param credential - The assumed TokenCredential to be tested. - */ -export function isTokenCredential(credential) { - // Check for an object with a 'getToken' function and possibly with - // a 'signRequest' function. We do this check to make sure that - // a ServiceClientCredentials implementor (like TokenClientCredentials - // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if - // it doesn't actually implement TokenCredential also. - const castCredential = credential; - return (castCredential && - typeof castCredential.getToken === "function" && - (castCredential.signRequest === undefined || castCredential.getToken.length > 0)); -} -//# sourceMappingURL=tokenCredential.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js.map b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js.map deleted file mode 100644 index 7e81232..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tokenCredential.js","sourceRoot":"","sources":["../../src/tokenCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA6ElC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAmB;IACnD,mEAAmE;IACnE,gEAAgE;IAChE,sEAAsE;IACtE,qEAAqE;IACrE,sDAAsD;IACtD,MAAM,cAAc,GAAG,UAGtB,CAAC;IACF,OAAO,CACL,cAAc;QACd,OAAO,cAAc,CAAC,QAAQ,KAAK,UAAU;QAC7C,CAAC,cAAc,CAAC,WAAW,KAAK,SAAS,IAAI,cAAc,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CACjF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { TracingContext } from \"./tracing\";\n\n/**\n * Represents a credential capable of providing an authentication token.\n */\nexport interface TokenCredential {\n /**\n * Gets the token provided by this credential.\n *\n * This method is called automatically by Azure SDK client libraries. You may call this method\n * directly, but you must also handle token caching and token refreshing.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n getToken(scopes: string | string[], options?: GetTokenOptions): Promise;\n}\n\n/**\n * Defines options for TokenCredential.getToken.\n */\nexport interface GetTokenOptions {\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Options used when creating and sending HTTP requests for this operation.\n */\n requestOptions?: {\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n };\n /**\n * Options used when tracing is enabled.\n */\n tracingOptions?: {\n /**\n * Tracing Context for the current request.\n */\n tracingContext?: TracingContext;\n };\n /**\n * Claim details to perform the Continuous Access Evaluation authentication flow\n */\n claims?: string;\n /**\n * Indicates whether to enable the Continuous Access Evaluation authentication flow\n */\n enableCae?: boolean;\n /**\n * Allows specifying a tenantId. Useful to handle challenges that provide tenant Id hints.\n */\n tenantId?: string;\n}\n\n/**\n * Represents an access token with an expiration time.\n */\nexport interface AccessToken {\n /**\n * The access token returned by the authentication service.\n */\n token: string;\n\n /**\n * The access token's expiration timestamp in milliseconds, UNIX epoch time.\n */\n expiresOnTimestamp: number;\n}\n\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential - The assumed TokenCredential to be tested.\n */\nexport function isTokenCredential(credential: unknown): credential is TokenCredential {\n // Check for an object with a 'getToken' function and possibly with\n // a 'signRequest' function. We do this check to make sure that\n // a ServiceClientCredentials implementor (like TokenClientCredentials\n // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n // it doesn't actually implement TokenCredential also.\n const castCredential = credential as {\n getToken: unknown;\n signRequest: unknown;\n };\n return (\n castCredential &&\n typeof castCredential.getToken === \"function\" &&\n (castCredential.signRequest === undefined || castCredential.getToken.length > 0)\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tracing.js b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tracing.js deleted file mode 100644 index 377718d..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tracing.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export {}; -//# sourceMappingURL=tracing.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tracing.js.map b/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tracing.js.map deleted file mode 100644 index fe00d40..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist-esm/src/tracing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// The interfaces in this file should be kept in sync with those\n// found in the `@azure/core-tracing` package.\n\n/**\n * An interface structurally compatible with OpenTelemetry.\n */\nexport interface TracingContext {\n /**\n * Get a value from the context.\n *\n * @param key - key which identifies a context value\n */\n getValue(key: symbol): unknown;\n /**\n * Create a new context which inherits from this context and has\n * the given key set to the given value.\n *\n * @param key - context key for which to set the value\n * @param value - value to set for the given key\n */\n setValue(key: symbol, value: unknown): TracingContext;\n /**\n * Return a new context which inherits from this context but does\n * not contain a value for the given key.\n *\n * @param key - context key for which to clear a value\n */\n deleteValue(key: symbol): TracingContext;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist/index.js b/reverse_engineering/node_modules/@azure/core-auth/dist/index.js deleted file mode 100644 index 0dd82a3..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist/index.js +++ /dev/null @@ -1,178 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var coreUtil = require('@azure/core-util'); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * A static-key-based credential that supports updating - * the underlying key value. - */ -class AzureKeyCredential { - /** - * The value of the key to be used in authentication - */ - get key() { - return this._key; - } - /** - * Create an instance of an AzureKeyCredential for use - * with a service client. - * - * @param key - The initial value of the key to use in authentication - */ - constructor(key) { - if (!key) { - throw new Error("key must be a non-empty string"); - } - this._key = key; - } - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newKey - The new key value to be used - */ - update(newKey) { - this._key = newKey; - } -} - -// Copyright (c) Microsoft Corporation. -/** - * A static name/key-based credential that supports updating - * the underlying name and key values. - */ -class AzureNamedKeyCredential { - /** - * The value of the key to be used in authentication. - */ - get key() { - return this._key; - } - /** - * The value of the name to be used in authentication. - */ - get name() { - return this._name; - } - /** - * Create an instance of an AzureNamedKeyCredential for use - * with a service client. - * - * @param name - The initial value of the name to use in authentication. - * @param key - The initial value of the key to use in authentication. - */ - constructor(name, key) { - if (!name || !key) { - throw new TypeError("name and key must be non-empty strings"); - } - this._name = name; - this._key = key; - } - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newName - The new name value to be used. - * @param newKey - The new key value to be used. - */ - update(newName, newKey) { - if (!newName || !newKey) { - throw new TypeError("newName and newKey must be non-empty strings"); - } - this._name = newName; - this._key = newKey; - } -} -/** - * Tests an object to determine whether it implements NamedKeyCredential. - * - * @param credential - The assumed NamedKeyCredential to be tested. - */ -function isNamedKeyCredential(credential) { - return (coreUtil.isObjectWithProperties(credential, ["name", "key"]) && - typeof credential.key === "string" && - typeof credential.name === "string"); -} - -// Copyright (c) Microsoft Corporation. -/** - * A static-signature-based credential that supports updating - * the underlying signature value. - */ -class AzureSASCredential { - /** - * The value of the shared access signature to be used in authentication - */ - get signature() { - return this._signature; - } - /** - * Create an instance of an AzureSASCredential for use - * with a service client. - * - * @param signature - The initial value of the shared access signature to use in authentication - */ - constructor(signature) { - if (!signature) { - throw new Error("shared access signature must be a non-empty string"); - } - this._signature = signature; - } - /** - * Change the value of the signature. - * - * Updates will take effect upon the next request after - * updating the signature value. - * - * @param newSignature - The new shared access signature value to be used - */ - update(newSignature) { - if (!newSignature) { - throw new Error("shared access signature must be a non-empty string"); - } - this._signature = newSignature; - } -} -/** - * Tests an object to determine whether it implements SASCredential. - * - * @param credential - The assumed SASCredential to be tested. - */ -function isSASCredential(credential) { - return (coreUtil.isObjectWithProperties(credential, ["signature"]) && typeof credential.signature === "string"); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Tests an object to determine whether it implements TokenCredential. - * - * @param credential - The assumed TokenCredential to be tested. - */ -function isTokenCredential(credential) { - // Check for an object with a 'getToken' function and possibly with - // a 'signRequest' function. We do this check to make sure that - // a ServiceClientCredentials implementor (like TokenClientCredentials - // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if - // it doesn't actually implement TokenCredential also. - const castCredential = credential; - return (castCredential && - typeof castCredential.getToken === "function" && - (castCredential.signRequest === undefined || castCredential.getToken.length > 0)); -} - -exports.AzureKeyCredential = AzureKeyCredential; -exports.AzureNamedKeyCredential = AzureNamedKeyCredential; -exports.AzureSASCredential = AzureSASCredential; -exports.isNamedKeyCredential = isNamedKeyCredential; -exports.isSASCredential = isSASCredential; -exports.isTokenCredential = isTokenCredential; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/@azure/core-auth/dist/index.js.map b/reverse_engineering/node_modules/@azure/core-auth/dist/index.js.map deleted file mode 100644 index 6e8a3e1..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/azureKeyCredential.ts","../src/azureNamedKeyCredential.ts","../src/azureSASCredential.ts","../src/tokenCredential.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents a credential defined by a static API key.\n */\nexport interface KeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n}\n\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nexport class AzureKeyCredential implements KeyCredential {\n private _key: string;\n\n /**\n * The value of the key to be used in authentication\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key - The initial value of the key to use in authentication\n */\n constructor(key: string) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey - The new key value to be used\n */\n public update(newKey: string): void {\n this._key = newKey;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isObjectWithProperties } from \"@azure/core-util\";\n\n/**\n * Represents a credential defined by a static API name and key.\n */\nexport interface NamedKeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n /**\n * The value of the API name represented as a string.\n */\n readonly name: string;\n}\n\n/**\n * A static name/key-based credential that supports updating\n * the underlying name and key values.\n */\nexport class AzureNamedKeyCredential implements NamedKeyCredential {\n private _key: string;\n private _name: string;\n\n /**\n * The value of the key to be used in authentication.\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * The value of the name to be used in authentication.\n */\n public get name(): string {\n return this._name;\n }\n\n /**\n * Create an instance of an AzureNamedKeyCredential for use\n * with a service client.\n *\n * @param name - The initial value of the name to use in authentication.\n * @param key - The initial value of the key to use in authentication.\n */\n constructor(name: string, key: string) {\n if (!name || !key) {\n throw new TypeError(\"name and key must be non-empty strings\");\n }\n\n this._name = name;\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newName - The new name value to be used.\n * @param newKey - The new key value to be used.\n */\n public update(newName: string, newKey: string): void {\n if (!newName || !newKey) {\n throw new TypeError(\"newName and newKey must be non-empty strings\");\n }\n\n this._name = newName;\n this._key = newKey;\n }\n}\n\n/**\n * Tests an object to determine whether it implements NamedKeyCredential.\n *\n * @param credential - The assumed NamedKeyCredential to be tested.\n */\nexport function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential {\n return (\n isObjectWithProperties(credential, [\"name\", \"key\"]) &&\n typeof credential.key === \"string\" &&\n typeof credential.name === \"string\"\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isObjectWithProperties } from \"@azure/core-util\";\n\n/**\n * Represents a credential defined by a static shared access signature.\n */\nexport interface SASCredential {\n /**\n * The value of the shared access signature represented as a string\n */\n readonly signature: string;\n}\n\n/**\n * A static-signature-based credential that supports updating\n * the underlying signature value.\n */\nexport class AzureSASCredential implements SASCredential {\n private _signature: string;\n\n /**\n * The value of the shared access signature to be used in authentication\n */\n public get signature(): string {\n return this._signature;\n }\n\n /**\n * Create an instance of an AzureSASCredential for use\n * with a service client.\n *\n * @param signature - The initial value of the shared access signature to use in authentication\n */\n constructor(signature: string) {\n if (!signature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n\n this._signature = signature;\n }\n\n /**\n * Change the value of the signature.\n *\n * Updates will take effect upon the next request after\n * updating the signature value.\n *\n * @param newSignature - The new shared access signature value to be used\n */\n public update(newSignature: string): void {\n if (!newSignature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n\n this._signature = newSignature;\n }\n}\n\n/**\n * Tests an object to determine whether it implements SASCredential.\n *\n * @param credential - The assumed SASCredential to be tested.\n */\nexport function isSASCredential(credential: unknown): credential is SASCredential {\n return (\n isObjectWithProperties(credential, [\"signature\"]) && typeof credential.signature === \"string\"\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { TracingContext } from \"./tracing\";\n\n/**\n * Represents a credential capable of providing an authentication token.\n */\nexport interface TokenCredential {\n /**\n * Gets the token provided by this credential.\n *\n * This method is called automatically by Azure SDK client libraries. You may call this method\n * directly, but you must also handle token caching and token refreshing.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n getToken(scopes: string | string[], options?: GetTokenOptions): Promise;\n}\n\n/**\n * Defines options for TokenCredential.getToken.\n */\nexport interface GetTokenOptions {\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Options used when creating and sending HTTP requests for this operation.\n */\n requestOptions?: {\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n };\n /**\n * Options used when tracing is enabled.\n */\n tracingOptions?: {\n /**\n * Tracing Context for the current request.\n */\n tracingContext?: TracingContext;\n };\n /**\n * Claim details to perform the Continuous Access Evaluation authentication flow\n */\n claims?: string;\n /**\n * Indicates whether to enable the Continuous Access Evaluation authentication flow\n */\n enableCae?: boolean;\n /**\n * Allows specifying a tenantId. Useful to handle challenges that provide tenant Id hints.\n */\n tenantId?: string;\n}\n\n/**\n * Represents an access token with an expiration time.\n */\nexport interface AccessToken {\n /**\n * The access token returned by the authentication service.\n */\n token: string;\n\n /**\n * The access token's expiration timestamp in milliseconds, UNIX epoch time.\n */\n expiresOnTimestamp: number;\n}\n\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential - The assumed TokenCredential to be tested.\n */\nexport function isTokenCredential(credential: unknown): credential is TokenCredential {\n // Check for an object with a 'getToken' function and possibly with\n // a 'signRequest' function. We do this check to make sure that\n // a ServiceClientCredentials implementor (like TokenClientCredentials\n // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n // it doesn't actually implement TokenCredential also.\n const castCredential = credential as {\n getToken: unknown;\n signRequest: unknown;\n };\n return (\n castCredential &&\n typeof castCredential.getToken === \"function\" &&\n (castCredential.signRequest === undefined || castCredential.getToken.length > 0)\n );\n}\n"],"names":["isObjectWithProperties"],"mappings":";;;;;;AAAA;AACA;AAYA;;;AAGG;MACU,kBAAkB,CAAA;AAG7B;;AAEG;AACH,IAAA,IAAW,GAAG,GAAA;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;AAED;;;;;AAKG;AACH,IAAA,WAAA,CAAY,GAAW,EAAA;QACrB,IAAI,CAAC,GAAG,EAAE;AACR,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AAK,QAAQ,EACnC;AACJ;;ACvFA;AAeA;;;AAGG;MACU,kBAAkB,CAAA;AAG7B;;AAEG;AACH,IAAA,IAAW,SAAS,GAAA;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;KACxB;AAED;;;;;AAKG;AACH,IAAA,WAAA,CAAY,SAAiB,EAAA;QAC3B,IAAI,CAAC,SAAS,EAAE;AACd,YAAA,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACvE,SAAA;AAED,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;KAC7B;AAED;;;;;;;AAOG;AACI,IAAA,MAAM,CAAC,YAAoB,EAAA;QAChC,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACvE,SAAA;AAED,QAAA,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;KAChC;AACF,CAAA;AAED;;;;AAIG;AACG,SAAU,eAAe,CAAC,UAAmB,EAAA;AACjD,IAAA,QACEA,+BAAsB,CAAC,UAAU,EAAE,CAAC,WAAW,CAAC,CAAC,IAAI,OAAO,UAAU,CAAC,SAAS,KAAK,QAAQ,EAC7F;AACJ;;ACrEA;AACA;AA6EA;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,UAAmB,EAAA;;;;;;IAMnD,MAAM,cAAc,GAAG,UAGtB,CAAC;AACF,IAAA,QACE,cAAc;AACd,QAAA,OAAO,cAAc,CAAC,QAAQ,KAAK,UAAU;AAC7C,SAAC,cAAc,CAAC,WAAW,KAAK,SAAS,IAAI,cAAc,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EAChF;AACJ;;;;;;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-auth/package.json b/reverse_engineering/node_modules/@azure/core-auth/package.json deleted file mode 100644 index f238877..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "@azure/core-auth", - "version": "1.5.0", - "description": "Provides low-level interfaces and helper methods for authentication in Azure SDK", - "sdk-type": "client", - "main": "dist/index.js", - "module": "dist-esm/src/index.js", - "types": "./types/latest/core-auth.d.ts", - "typesVersions": { - "<3.6": { - "types/latest/*": [ - "types/3.1/*" - ] - } - }, - "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:samples": "echo Obsolete", - "build:test": "tsc -p . && dev-tool run bundle", - "build:types": "downlevel-dts types/latest/ types/3.1/", - "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local && npm run build:types", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-* temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "echo skipped", - "integration-test:node": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", - "pack": "npm pack 2>&1", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", - "unit-test:browser": "echo skipped", - "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" - }, - "files": [ - "dist/", - "dist-esm/src/", - "types/latest/core-auth.d.ts", - "types/3.1", - "README.md", - "LICENSE" - ], - "repository": "github:Azure/azure-sdk-for-js", - "keywords": [ - "azure", - "authentication", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "engines": { - "node": ">=14.0.0" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/README.md", - "sideEffects": false, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.2.0" - }, - "devDependencies": { - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@microsoft/api-extractor": "^7.31.1", - "@types/chai": "^4.1.6", - "@types/mocha": "^7.0.2", - "@types/node": "^14.0.0", - "chai": "^4.2.0", - "cross-env": "^7.0.2", - "downlevel-dts": "^0.10.0", - "eslint": "^8.0.0", - "inherits": "^2.0.3", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^2.0.0", - "prettier": "^2.5.1", - "rimraf": "^3.0.0", - "typescript": "~5.0.0", - "util": "^0.12.1" - }, - "//metadata": { - "migrationDate": "2023-03-08T18:36:03.000Z" - } -} diff --git a/reverse_engineering/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts b/reverse_engineering/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts deleted file mode 100644 index 2e75f26..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { AbortSignalLike } from '@azure/abort-controller'; -/** - * Represents an access token with an expiration time. - */ -export declare interface AccessToken { - /** - * The access token returned by the authentication service. - */ - token: string; - /** - * The access token's expiration timestamp in milliseconds, UNIX epoch time. - */ - expiresOnTimestamp: number; -} -/** - * A static-key-based credential that supports updating - * the underlying key value. - */ -export declare class AzureKeyCredential implements KeyCredential { - private _key; - /* - * The value of the key to be used in authentication - */ - readonly key: string; - /** - * Create an instance of an AzureKeyCredential for use - * with a service client. - * - * @param key - The initial value of the key to use in authentication - */ - constructor(key: string); - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newKey - The new key value to be used - */ - update(newKey: string): void; -} -/** - * A static name/key-based credential that supports updating - * the underlying name and key values. - */ -export declare class AzureNamedKeyCredential implements NamedKeyCredential { - private _key; - private _name; - /* - * The value of the key to be used in authentication. - */ - readonly key: string; - /* - * The value of the name to be used in authentication. - */ - readonly name: string; - /** - * Create an instance of an AzureNamedKeyCredential for use - * with a service client. - * - * @param name - The initial value of the name to use in authentication. - * @param key - The initial value of the key to use in authentication. - */ - constructor(name: string, key: string); - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newName - The new name value to be used. - * @param newKey - The new key value to be used. - */ - update(newName: string, newKey: string): void; -} -/** - * A static-signature-based credential that supports updating - * the underlying signature value. - */ -export declare class AzureSASCredential implements SASCredential { - private _signature; - /* - * The value of the shared access signature to be used in authentication - */ - readonly signature: string; - /** - * Create an instance of an AzureSASCredential for use - * with a service client. - * - * @param signature - The initial value of the shared access signature to use in authentication - */ - constructor(signature: string); - /** - * Change the value of the signature. - * - * Updates will take effect upon the next request after - * updating the signature value. - * - * @param newSignature - The new shared access signature value to be used - */ - update(newSignature: string): void; -} -/** - * Defines options for TokenCredential.getToken. - */ -export declare interface GetTokenOptions { - /** - * The signal which can be used to abort requests. - */ - abortSignal?: AbortSignalLike; - /** - * Options used when creating and sending HTTP requests for this operation. - */ - requestOptions?: { - /** - * The number of milliseconds a request can take before automatically being terminated. - */ - timeout?: number; - }; - /** - * Options used when tracing is enabled. - */ - tracingOptions?: { - /** - * Tracing Context for the current request. - */ - tracingContext?: TracingContext; - }; - /** - * Claim details to perform the Continuous Access Evaluation authentication flow - */ - claims?: string; - /** - * Indicates whether to enable the Continuous Access Evaluation authentication flow - */ - enableCae?: boolean; - /** - * Allows specifying a tenantId. Useful to handle challenges that provide tenant Id hints. - */ - tenantId?: string; -} -/** - * Tests an object to determine whether it implements NamedKeyCredential. - * - * @param credential - The assumed NamedKeyCredential to be tested. - */ -export declare function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential; -/** - * Tests an object to determine whether it implements SASCredential. - * - * @param credential - The assumed SASCredential to be tested. - */ -export declare function isSASCredential(credential: unknown): credential is SASCredential; -/** - * Tests an object to determine whether it implements TokenCredential. - * - * @param credential - The assumed TokenCredential to be tested. - */ -export declare function isTokenCredential(credential: unknown): credential is TokenCredential; -/** - * Represents a credential defined by a static API key. - */ -export declare interface KeyCredential { - /** - * The value of the API key represented as a string - */ - readonly key: string; -} -/** - * Represents a credential defined by a static API name and key. - */ -export declare interface NamedKeyCredential { - /** - * The value of the API key represented as a string - */ - readonly key: string; - /** - * The value of the API name represented as a string. - */ - readonly name: string; -} -/** - * Represents a credential defined by a static shared access signature. - */ -export declare interface SASCredential { - /** - * The value of the shared access signature represented as a string - */ - readonly signature: string; -} -/** - * Represents a credential capable of providing an authentication token. - */ -export declare interface TokenCredential { - /** - * Gets the token provided by this credential. - * - * This method is called automatically by Azure SDK client libraries. You may call this method - * directly, but you must also handle token caching and token refreshing. - * - * @param scopes - The list of scopes for which the token will have access. - * @param options - The options used to configure any requests this - * TokenCredential implementation might make. - */ - getToken(scopes: string | string[], options?: GetTokenOptions): Promise; -} -/** - * An interface structurally compatible with OpenTelemetry. - */ -export declare interface TracingContext { - /** - * Get a value from the context. - * - * @param key - key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key - context key for which to set the value - * @param value - value to set for the given key - */ - setValue(key: symbol, value: unknown): TracingContext; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key - context key for which to clear a value - */ - deleteValue(key: symbol): TracingContext; -} -export {}; diff --git a/reverse_engineering/node_modules/@azure/core-auth/types/latest/core-auth.d.ts b/reverse_engineering/node_modules/@azure/core-auth/types/latest/core-auth.d.ts deleted file mode 100644 index 028da4e..0000000 --- a/reverse_engineering/node_modules/@azure/core-auth/types/latest/core-auth.d.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { AbortSignalLike } from '@azure/abort-controller'; - -/** - * Represents an access token with an expiration time. - */ -export declare interface AccessToken { - /** - * The access token returned by the authentication service. - */ - token: string; - /** - * The access token's expiration timestamp in milliseconds, UNIX epoch time. - */ - expiresOnTimestamp: number; -} - -/** - * A static-key-based credential that supports updating - * the underlying key value. - */ -export declare class AzureKeyCredential implements KeyCredential { - private _key; - /** - * The value of the key to be used in authentication - */ - get key(): string; - /** - * Create an instance of an AzureKeyCredential for use - * with a service client. - * - * @param key - The initial value of the key to use in authentication - */ - constructor(key: string); - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newKey - The new key value to be used - */ - update(newKey: string): void; -} - -/** - * A static name/key-based credential that supports updating - * the underlying name and key values. - */ -export declare class AzureNamedKeyCredential implements NamedKeyCredential { - private _key; - private _name; - /** - * The value of the key to be used in authentication. - */ - get key(): string; - /** - * The value of the name to be used in authentication. - */ - get name(): string; - /** - * Create an instance of an AzureNamedKeyCredential for use - * with a service client. - * - * @param name - The initial value of the name to use in authentication. - * @param key - The initial value of the key to use in authentication. - */ - constructor(name: string, key: string); - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newName - The new name value to be used. - * @param newKey - The new key value to be used. - */ - update(newName: string, newKey: string): void; -} - -/** - * A static-signature-based credential that supports updating - * the underlying signature value. - */ -export declare class AzureSASCredential implements SASCredential { - private _signature; - /** - * The value of the shared access signature to be used in authentication - */ - get signature(): string; - /** - * Create an instance of an AzureSASCredential for use - * with a service client. - * - * @param signature - The initial value of the shared access signature to use in authentication - */ - constructor(signature: string); - /** - * Change the value of the signature. - * - * Updates will take effect upon the next request after - * updating the signature value. - * - * @param newSignature - The new shared access signature value to be used - */ - update(newSignature: string): void; -} - -/** - * Defines options for TokenCredential.getToken. - */ -export declare interface GetTokenOptions { - /** - * The signal which can be used to abort requests. - */ - abortSignal?: AbortSignalLike; - /** - * Options used when creating and sending HTTP requests for this operation. - */ - requestOptions?: { - /** - * The number of milliseconds a request can take before automatically being terminated. - */ - timeout?: number; - }; - /** - * Options used when tracing is enabled. - */ - tracingOptions?: { - /** - * Tracing Context for the current request. - */ - tracingContext?: TracingContext; - }; - /** - * Claim details to perform the Continuous Access Evaluation authentication flow - */ - claims?: string; - /** - * Indicates whether to enable the Continuous Access Evaluation authentication flow - */ - enableCae?: boolean; - /** - * Allows specifying a tenantId. Useful to handle challenges that provide tenant Id hints. - */ - tenantId?: string; -} - -/** - * Tests an object to determine whether it implements NamedKeyCredential. - * - * @param credential - The assumed NamedKeyCredential to be tested. - */ -export declare function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential; - -/** - * Tests an object to determine whether it implements SASCredential. - * - * @param credential - The assumed SASCredential to be tested. - */ -export declare function isSASCredential(credential: unknown): credential is SASCredential; - -/** - * Tests an object to determine whether it implements TokenCredential. - * - * @param credential - The assumed TokenCredential to be tested. - */ -export declare function isTokenCredential(credential: unknown): credential is TokenCredential; - -/** - * Represents a credential defined by a static API key. - */ -export declare interface KeyCredential { - /** - * The value of the API key represented as a string - */ - readonly key: string; -} - -/** - * Represents a credential defined by a static API name and key. - */ -export declare interface NamedKeyCredential { - /** - * The value of the API key represented as a string - */ - readonly key: string; - /** - * The value of the API name represented as a string. - */ - readonly name: string; -} - -/** - * Represents a credential defined by a static shared access signature. - */ -export declare interface SASCredential { - /** - * The value of the shared access signature represented as a string - */ - readonly signature: string; -} - -/** - * Represents a credential capable of providing an authentication token. - */ -export declare interface TokenCredential { - /** - * Gets the token provided by this credential. - * - * This method is called automatically by Azure SDK client libraries. You may call this method - * directly, but you must also handle token caching and token refreshing. - * - * @param scopes - The list of scopes for which the token will have access. - * @param options - The options used to configure any requests this - * TokenCredential implementation might make. - */ - getToken(scopes: string | string[], options?: GetTokenOptions): Promise; -} - -/** - * An interface structurally compatible with OpenTelemetry. - */ -export declare interface TracingContext { - /** - * Get a value from the context. - * - * @param key - key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key - context key for which to set the value - * @param value - value to set for the given key - */ - setValue(key: symbol, value: unknown): TracingContext; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key - context key for which to clear a value - */ - deleteValue(key: symbol): TracingContext; -} - -export { } diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/LICENSE b/reverse_engineering/node_modules/@azure/core-rest-pipeline/LICENSE deleted file mode 100644 index ea8fb15..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/README.md b/reverse_engineering/node_modules/@azure/core-rest-pipeline/README.md deleted file mode 100644 index 008f089..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# Azure Core HTTP client library for JavaScript - -This is the core HTTP pipeline for Azure SDK JavaScript libraries which work in the browser and Node.js. This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). - -## Getting started - -### Requirements - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. - -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - -### Installation - -This package is primarily used in generated code and not meant to be consumed directly by end users. - -## Key concepts - -### PipelineRequest - -A `PipelineRequest` describes all the information necessary to make a request to an HTTP REST endpoint. - -### PipelineResponse - -A `PipelineResponse` describes the HTTP response (body, headers, and status code) from a REST endpoint that was returned after making an HTTP request. - -### SendRequest - -A `SendRequest` method is a method that given a `PipelineRequest` can asynchronously return a `PipelineResponse`. - -```ts -export type SendRequest = (request: PipelineRequest) => Promise; -``` - -### HttpClient - -An `HttpClient` is any object that satisfies the following interface to implement a `SendRequest` method: - -```ts -export interface HttpClient { - /** - * The method that makes the request and returns a response. - */ - sendRequest: SendRequest; -} -``` - -`HttpClient`s are expected to actually make the HTTP request to a server endpoint, using some platform-specific mechanism for doing so. - -### Pipeline Policies - -A `PipelinePolicy` is a simple object that implements the following interface: - -```ts -export interface PipelinePolicy { - /** - * The policy name. Must be a unique string in the pipeline. - */ - name: string; - /** - * The main method to implement that manipulates a request/response. - * @param request The request being performed. - * @param next The next policy in the pipeline. Must be called to continue the pipeline. - */ - sendRequest(request: PipelineRequest, next: SendRequest): Promise; -} -``` - -It is similar in shape to `HttpClient`, but includes a policy name as well as a slightly modified `SendRequest` signature that allows it to conditionally call the next policy in the pipeline. - -One can view the role of policies as that of `middleware`, a concept that is familiar to NodeJS developers who have worked with frameworks such as [Express](https://expressjs.com/). - -The `sendRequest` implementation can both transform the outgoing request as well as the incoming response: - -```ts -const customPolicy = { - name: "My wonderful policy", - async sendRequest(request: PipelineRequest, next: SendRequest): Promise { - // Change the outgoing request by adding a new header - request.headers.set("X-Cool-Header", 42); - const result = await next(request); - if (response.status === 403) { - // Do something special if this policy sees Forbidden - } - return result; - } -}; -``` - -Most policies only concern themselves with either the request or the response, but there are some exceptions such as the [LogPolicy](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/src/policies/logPolicy.ts) which logs information from each. - -### Pipelines - -A `Pipeline` is an object that manages a set of `PipelinePolicy` objects. Its main function is to ensure that policies are executed in a consistent and predictable order. - -You can think of policies being applied like a stack (first-in/last-out.) The first `PipelinePolicy` is able to modify the `PipelineRequest` before any other policies, and it is also the last to modify the `PipelineResponse`, making it the closest to the caller. The final policy is the last able to modify the outgoing request, and the first to handle the response, making it the closest to the network. - -A `Pipeline` satisfies the following interface: - -```ts -export interface Pipeline { - addPolicy(policy: PipelinePolicy, options?: AddPolicyOptions): void; - removePolicy(options: { name?: string; phase?: PipelinePhase }): PipelinePolicy[]; - sendRequest(httpClient: HttpClient, request: PipelineRequest): Promise; - getOrderedPolicies(): PipelinePolicy[]; - clone(): Pipeline; -} -``` - -As you can see it allows for policies to be added or removed and it is loosely coupled with `HttpClient` to perform the real request to the server endpoint. - -One important concept for `Pipeline`s is that they group policies into ordered phases: - -1. Serialize Phase -2. Policies not in a phase -3. Deserialize Phase -4. Retry Phase - -Phases occur in the above order, with serialization policies being applied first and retry policies being applied last. Most custom policies fall into the second bucket and are not given a phase name. - -When adding a policy to the pipeline you can specify not only what phase a policy is in, but also if it has any dependencies: - -```ts -export interface AddPolicyOptions { - beforePolicies?: string[]; - afterPolicies?: string[]; - afterPhase?: PipelinePhase; - phase?: PipelinePhase; -} -``` - -`beforePolicies` are policies that the new policy must execute before and `afterPolicies` are policies that the new policy must happen after. Similarly, `afterPhase` means the policy must only execute after the specified phase has occurred. - -This syntax allows custom policy authors to express any necessary relationships between their own policies and the built-in policies provided by `@azure/core-rest-pipeline` when creating a pipeline using `createPipelineFromOptions`. - -Implementers are also able to remove policies by name or phase, in the case that they wish to modify an existing `Pipeline` without having to create a new one using `createEmptyPipeline`. The `clone` method is particularly useful when recreating a `Pipeline` without modifying the original. - -After all other constraints have been satisfied, policies are applied in the order which they were added. - -## Examples - -Examples can be found in the `samples` folder. - -## Next steps - -You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes. - -## Troubleshooting - -If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new). - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-rest-pipeline%2FREADME.png) diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/core-rest-pipeline.shims-3_1.d.ts b/reverse_engineering/node_modules/@azure/core-rest-pipeline/core-rest-pipeline.shims-3_1.d.ts deleted file mode 100644 index abb8bf3..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/core-rest-pipeline.shims-3_1.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -declare global { - interface FormData {} - interface Blob {} - interface File {} - interface ReadableStream {} - interface TransformStream {} -} - -export * from "./types/3.1/core-rest-pipeline"; diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/core-rest-pipeline.shims.d.ts b/reverse_engineering/node_modules/@azure/core-rest-pipeline/core-rest-pipeline.shims.d.ts deleted file mode 100644 index 718d5fd..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/core-rest-pipeline.shims.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -declare global { - interface FormData {} - interface Blob {} - interface File {} - interface ReadableStream {} - interface TransformStream {} -} - -export * from "./types/latest/core-rest-pipeline"; diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/accessTokenCache.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/accessTokenCache.js deleted file mode 100644 index ff7dee1..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/accessTokenCache.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Defines the default token refresh buffer duration. - */ -export const DefaultTokenRefreshBufferMs = 2 * 60 * 1000; // 2 Minutes -/** - * Provides an AccessTokenCache implementation which clears - * the cached AccessToken's after the expiresOnTimestamp has - * passed. - * @internal - */ -export class ExpiringAccessTokenCache { - /** - * Constructs an instance of ExpiringAccessTokenCache with - * an optional expiration buffer time. - */ - constructor(tokenRefreshBufferMs = DefaultTokenRefreshBufferMs) { - this.tokenRefreshBufferMs = tokenRefreshBufferMs; - } - setCachedToken(accessToken) { - this.cachedToken = accessToken; - } - getCachedToken() { - if (this.cachedToken && - Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp) { - this.cachedToken = undefined; - } - return this.cachedToken; - } -} -//# sourceMappingURL=accessTokenCache.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/accessTokenCache.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/accessTokenCache.js.map deleted file mode 100644 index f69e299..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/accessTokenCache.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"accessTokenCache.js","sourceRoot":"","sources":["../../src/accessTokenCache.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAqBtE;;;;;GAKG;AACH,MAAM,OAAO,wBAAwB;IAInC;;;OAGG;IACH,YAAY,uBAA+B,2BAA2B;QACpE,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED,cAAc,CAAC,WAAoC;QACjD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,cAAc;QACZ,IACE,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAC7E;YACA,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;SAC9B;QAED,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccessToken } from \"@azure/core-auth\";\n\n/**\n * Defines the default token refresh buffer duration.\n */\nexport const DefaultTokenRefreshBufferMs = 2 * 60 * 1000; // 2 Minutes\n\n/**\n * Provides a cache for an AccessToken that was that\n * was returned from a TokenCredential.\n */\nexport interface AccessTokenCache {\n /**\n * Sets the cached token.\n *\n * @param accessToken - The AccessToken to be cached or null to\n * clear the cached token.\n */\n setCachedToken(accessToken: AccessToken | undefined): void;\n\n /**\n * Returns the cached AccessToken or undefined if nothing is cached.\n */\n getCachedToken(): AccessToken | undefined;\n}\n\n/**\n * Provides an AccessTokenCache implementation which clears\n * the cached AccessToken's after the expiresOnTimestamp has\n * passed.\n * @internal\n */\nexport class ExpiringAccessTokenCache implements AccessTokenCache {\n private tokenRefreshBufferMs: number;\n private cachedToken?: AccessToken;\n\n /**\n * Constructs an instance of ExpiringAccessTokenCache with\n * an optional expiration buffer time.\n */\n constructor(tokenRefreshBufferMs: number = DefaultTokenRefreshBufferMs) {\n this.tokenRefreshBufferMs = tokenRefreshBufferMs;\n }\n\n setCachedToken(accessToken: AccessToken | undefined): void {\n this.cachedToken = accessToken;\n }\n\n getCachedToken(): AccessToken | undefined {\n if (\n this.cachedToken &&\n Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp\n ) {\n this.cachedToken = undefined;\n }\n\n return this.cachedToken;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/constants.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/constants.js deleted file mode 100644 index 45ba182..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/constants.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export const SDK_VERSION = "1.12.0"; -export const DEFAULT_RETRY_POLICY_COUNT = 3; -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/constants.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/constants.js.map deleted file mode 100644 index c77f4a1..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,QAAQ,CAAC;AAE5C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"1.12.0\";\n\nexport const DEFAULT_RETRY_POLICY_COUNT = 3;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/createPipelineFromOptions.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/createPipelineFromOptions.js deleted file mode 100644 index 82ed0a3..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/createPipelineFromOptions.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { logPolicy } from "./policies/logPolicy"; -import { createEmptyPipeline } from "./pipeline"; -import { redirectPolicy } from "./policies/redirectPolicy"; -import { userAgentPolicy } from "./policies/userAgentPolicy"; -import { decompressResponsePolicy } from "./policies/decompressResponsePolicy"; -import { defaultRetryPolicy } from "./policies/defaultRetryPolicy"; -import { formDataPolicy } from "./policies/formDataPolicy"; -import { isNode } from "@azure/core-util"; -import { proxyPolicy } from "./policies/proxyPolicy"; -import { setClientRequestIdPolicy } from "./policies/setClientRequestIdPolicy"; -import { tlsPolicy } from "./policies/tlsPolicy"; -import { tracingPolicy } from "./policies/tracingPolicy"; -/** - * Create a new pipeline with a default set of customizable policies. - * @param options - Options to configure a custom pipeline. - */ -export function createPipelineFromOptions(options) { - var _a; - const pipeline = createEmptyPipeline(); - if (isNode) { - if (options.tlsOptions) { - pipeline.addPolicy(tlsPolicy(options.tlsOptions)); - } - pipeline.addPolicy(proxyPolicy(options.proxyOptions)); - pipeline.addPolicy(decompressResponsePolicy()); - } - pipeline.addPolicy(formDataPolicy()); - pipeline.addPolicy(userAgentPolicy(options.userAgentOptions)); - pipeline.addPolicy(setClientRequestIdPolicy((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); - pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy(tracingPolicy(options.userAgentOptions), { afterPhase: "Retry" }); - if (isNode) { - // Both XHR and Fetch expect to handle redirects automatically, - // so only include this policy when we're in Node. - pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: "Retry" }); - } - pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: "Sign" }); - return pipeline; -} -//# sourceMappingURL=createPipelineFromOptions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/createPipelineFromOptions.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/createPipelineFromOptions.js.map deleted file mode 100644 index 1e27c46..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/createPipelineFromOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createPipelineFromOptions.js","sourceRoot":"","sources":["../../src/createPipelineFromOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAoB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAY,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE3D,OAAO,EAAyB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAA0B,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAyDzD;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAgC;;IACxE,MAAM,QAAQ,GAAG,mBAAmB,EAAE,CAAC;IAEvC,IAAI,MAAM,EAAE;QACV,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;SACnD;QACD,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;QACtD,QAAQ,CAAC,SAAS,CAAC,wBAAwB,EAAE,CAAC,CAAC;KAChD;IAED,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,SAAS,CAAC,wBAAwB,CAAC,MAAA,OAAO,CAAC,gBAAgB,0CAAE,yBAAyB,CAAC,CAAC,CAAC;IAClG,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACjF,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACrF,IAAI,MAAM,EAAE;QACV,+DAA+D;QAC/D,kDAAkD;QAClD,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;KACtF;IACD,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;IAE9E,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { LogPolicyOptions, logPolicy } from \"./policies/logPolicy\";\nimport { Pipeline, createEmptyPipeline } from \"./pipeline\";\nimport { PipelineRetryOptions, TlsSettings } from \"./interfaces\";\nimport { RedirectPolicyOptions, redirectPolicy } from \"./policies/redirectPolicy\";\nimport { UserAgentPolicyOptions, userAgentPolicy } from \"./policies/userAgentPolicy\";\n\nimport { ProxySettings } from \".\";\nimport { decompressResponsePolicy } from \"./policies/decompressResponsePolicy\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy\";\nimport { formDataPolicy } from \"./policies/formDataPolicy\";\nimport { isNode } from \"@azure/core-util\";\nimport { proxyPolicy } from \"./policies/proxyPolicy\";\nimport { setClientRequestIdPolicy } from \"./policies/setClientRequestIdPolicy\";\nimport { tlsPolicy } from \"./policies/tlsPolicy\";\nimport { tracingPolicy } from \"./policies/tracingPolicy\";\n\n/**\n * Defines options that are used to configure the HTTP pipeline for\n * an SDK client.\n */\nexport interface PipelineOptions {\n /**\n * Options that control how to retry failed requests.\n */\n retryOptions?: PipelineRetryOptions;\n\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxySettings;\n\n /** Options for configuring TLS authentication */\n tlsOptions?: TlsSettings;\n\n /**\n * Options for how redirect responses are handled.\n */\n redirectOptions?: RedirectPolicyOptions;\n\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentPolicyOptions;\n\n /**\n * Options for setting common telemetry and tracing info to outgoing requests.\n */\n telemetryOptions?: TelemetryOptions;\n}\n\n/**\n * Defines options that are used to configure common telemetry and tracing info\n */\nexport interface TelemetryOptions {\n /**\n * The name of the header to pass the request ID to.\n */\n clientRequestIdHeaderName?: string;\n}\n\n/**\n * Defines options that are used to configure internal options of\n * the HTTP pipeline for an SDK client.\n */\nexport interface InternalPipelineOptions extends PipelineOptions {\n /**\n * Options to configure request/response logging.\n */\n loggingOptions?: LogPolicyOptions;\n}\n\n/**\n * Create a new pipeline with a default set of customizable policies.\n * @param options - Options to configure a custom pipeline.\n */\nexport function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline {\n const pipeline = createEmptyPipeline();\n\n if (isNode) {\n if (options.tlsOptions) {\n pipeline.addPolicy(tlsPolicy(options.tlsOptions));\n }\n pipeline.addPolicy(proxyPolicy(options.proxyOptions));\n pipeline.addPolicy(decompressResponsePolicy());\n }\n\n pipeline.addPolicy(formDataPolicy());\n pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));\n pipeline.addPolicy(setClientRequestIdPolicy(options.telemetryOptions?.clientRequestIdHeaderName));\n pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: \"Retry\" });\n pipeline.addPolicy(tracingPolicy(options.userAgentOptions), { afterPhase: \"Retry\" });\n if (isNode) {\n // Both XHR and Fetch expect to handle redirects automatically,\n // so only include this policy when we're in Node.\n pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: \"Retry\" });\n }\n pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: \"Sign\" });\n\n return pipeline;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.browser.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.browser.js deleted file mode 100644 index a0658ab..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.browser.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createFetchHttpClient } from "./fetchHttpClient"; -/** - * Create the correct HttpClient for the current environment. - */ -export function createDefaultHttpClient() { - return createFetchHttpClient(); -} -//# sourceMappingURL=defaultHttpClient.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.browser.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.browser.js.map deleted file mode 100644 index 0bec9d4..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultHttpClient.browser.js","sourceRoot":"","sources":["../../src/defaultHttpClient.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,qBAAqB,EAAE,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient } from \"./interfaces\";\nimport { createFetchHttpClient } from \"./fetchHttpClient\";\n\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient(): HttpClient {\n return createFetchHttpClient();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.js deleted file mode 100644 index 7caa5e8..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createNodeHttpClient } from "./nodeHttpClient"; -/** - * Create the correct HttpClient for the current environment. - */ -export function createDefaultHttpClient() { - return createNodeHttpClient(); -} -//# sourceMappingURL=defaultHttpClient.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.js.map deleted file mode 100644 index 252903b..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultHttpClient.js","sourceRoot":"","sources":["../../src/defaultHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient } from \"./interfaces\";\nimport { createNodeHttpClient } from \"./nodeHttpClient\";\n\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient(): HttpClient {\n return createNodeHttpClient();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.native.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.native.js deleted file mode 100644 index 56c22ea..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.native.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createXhrHttpClient } from "./xhrHttpClient"; -/** - * Create the correct HttpClient for the current environment. - */ -export function createDefaultHttpClient() { - return createXhrHttpClient(); -} -//# sourceMappingURL=defaultHttpClient.native.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.native.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.native.js.map deleted file mode 100644 index 97f6a73..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.native.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultHttpClient.native.js","sourceRoot":"","sources":["../../src/defaultHttpClient.native.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,mBAAmB,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient } from \"./interfaces\";\nimport { createXhrHttpClient } from \"./xhrHttpClient\";\n\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient(): HttpClient {\n return createXhrHttpClient();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/fetchHttpClient.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/fetchHttpClient.js deleted file mode 100644 index 2384c69..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/fetchHttpClient.js +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { AbortError } from "@azure/abort-controller"; -import { RestError } from "./restError"; -import { createHttpHeaders } from "./httpHeaders"; -/** - * Checks if the body is a NodeReadable stream which is not supported in Browsers - */ -function isNodeReadableStream(body) { - return body && typeof body.pipe === "function"; -} -/** - * Checks if the body is a ReadableStream supported by browsers - */ -function isReadableStream(body) { - return Boolean(body && - typeof body.getReader === "function" && - typeof body.tee === "function"); -} -/** - * Checks if the body is a Blob or Blob-like - */ -function isBlob(body) { - // File objects count as a type of Blob, so we want to use instanceof explicitly - return (typeof Blob === "function" || typeof Blob === "object") && body instanceof Blob; -} -/** - * A HttpClient implementation that uses window.fetch to send HTTP requests. - * @internal - */ -class FetchHttpClient { - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (isInsecure && !request.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); - } - if (request.proxySettings) { - throw new Error("HTTP proxy is not supported in browser environment"); - } - try { - return await makeRequest(request); - } - catch (e) { - throw getError(e, request); - } - } -} -/** - * Sends a request - */ -async function makeRequest(request) { - const { abortController, abortControllerCleanup } = setupAbortSignal(request); - try { - const headers = buildFetchHeaders(request.headers); - const requestBody = buildRequestBody(request); - /** - * Developers of the future: - * Do not set redirect: "manual" as part - * of request options. - * It will not work as you expect. - */ - const response = await fetch(request.url, { - body: requestBody, - method: request.method, - headers: headers, - signal: abortController.signal, - credentials: request.withCredentials ? "include" : "same-origin", - cache: "no-store", - }); - // If we're uploading a blob, we need to fire the progress event manually - if (isBlob(request.body) && request.onUploadProgress) { - request.onUploadProgress({ loadedBytes: request.body.size }); - } - return buildPipelineResponse(response, request); - } - finally { - if (abortControllerCleanup) { - abortControllerCleanup(); - } - } -} -/** - * Creates a pipeline response from a Fetch response; - */ -async function buildPipelineResponse(httpResponse, request) { - var _a, _b; - const headers = buildPipelineHeaders(httpResponse); - const response = { - request, - headers, - status: httpResponse.status, - }; - const bodyStream = isReadableStream(httpResponse.body) - ? buildBodyStream(httpResponse.body, request.onDownloadProgress) - : httpResponse.body; - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(Number.POSITIVE_INFINITY)) || - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(response.status))) { - if (request.enableBrowserStreams) { - response.browserStreamBody = bodyStream !== null && bodyStream !== void 0 ? bodyStream : undefined; - } - else { - const responseStream = new Response(bodyStream); - response.blobBody = responseStream.blob(); - } - } - else { - const responseStream = new Response(bodyStream); - response.bodyAsText = await responseStream.text(); - } - return response; -} -function setupAbortSignal(request) { - const abortController = new AbortController(); - // Cleanup function - let abortControllerCleanup; - /** - * Attach an abort listener to the request - */ - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - abortControllerCleanup = () => { - var _a; - if (abortListener) { - (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); - } - }; - } - // If a timeout was passed, call the abort signal once the time elapses - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - return { abortController, abortControllerCleanup }; -} -/** - * Gets the specific error - */ -function getError(e, request) { - var _a; - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - return e; - } - else { - return new RestError(`Error sending request: ${e.message}`, { - code: (_a = e === null || e === void 0 ? void 0 : e.code) !== null && _a !== void 0 ? _a : RestError.REQUEST_SEND_ERROR, - request, - }); - } -} -/** - * Converts PipelineRequest headers to Fetch headers - */ -function buildFetchHeaders(pipelineHeaders) { - const headers = new Headers(); - for (const [name, value] of pipelineHeaders) { - headers.append(name, value); - } - return headers; -} -function buildPipelineHeaders(httpResponse) { - const responseHeaders = createHttpHeaders(); - for (const [name, value] of httpResponse.headers) { - responseHeaders.set(name, value); - } - return responseHeaders; -} -function buildRequestBody(request) { - const body = typeof request.body === "function" ? request.body() : request.body; - if (isNodeReadableStream(body)) { - throw new Error("Node streams are not supported in browser environment."); - } - return isReadableStream(body) ? buildBodyStream(body, request.onUploadProgress) : body; -} -/** - * Reads the request/response original stream and stream it through a new - * ReadableStream, this is done to be able to report progress in a way that - * all modern browsers support. TransformStreams would be an alternative, - * however they are not yet supported by all browsers i.e Firefox - */ -function buildBodyStream(readableStream, onProgress) { - let loadedBytes = 0; - // If the current browser supports pipeThrough we use a TransformStream - // to report progress - if (isTransformStreamSupported(readableStream)) { - return readableStream.pipeThrough(new TransformStream({ - transform(chunk, controller) { - if (chunk === null) { - controller.terminate(); - return; - } - controller.enqueue(chunk); - loadedBytes += chunk.length; - if (onProgress) { - onProgress({ loadedBytes }); - } - }, - })); - } - else { - // If we can't use transform streams, wrap the original stream in a new readable stream - // and use pull to enqueue each chunk and report progress. - const reader = readableStream.getReader(); - return new ReadableStream({ - async pull(controller) { - var _a; - const { done, value } = await reader.read(); - // When no more data needs to be consumed, break the reading - if (done || !value) { - // Close the stream - controller.close(); - reader.releaseLock(); - return; - } - loadedBytes += (_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0; - // Enqueue the next data chunk into our target stream - controller.enqueue(value); - if (onProgress) { - onProgress({ loadedBytes }); - } - }, - }); - } -} -/** - * Create a new HttpClient instance for the browser environment. - * @internal - */ -export function createFetchHttpClient() { - return new FetchHttpClient(); -} -function isTransformStreamSupported(readableStream) { - return readableStream.pipeThrough !== undefined && self.TransformStream !== undefined; -} -//# sourceMappingURL=fetchHttpClient.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/fetchHttpClient.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/fetchHttpClient.js.map deleted file mode 100644 index 9531e8c..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/fetchHttpClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetchHttpClient.js","sourceRoot":"","sources":["../../src/fetchHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAQrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;GAEG;AACH,SAAS,oBAAoB,CAAC,IAAS;IACrC,OAAO,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,IAAa;IACrC,OAAO,OAAO,CACZ,IAAI;QACF,OAAQ,IAAuB,CAAC,SAAS,KAAK,UAAU;QACxD,OAAQ,IAAuB,CAAC,GAAG,KAAK,UAAU,CACrD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,MAAM,CAAC,IAAa;IAC3B,gFAAgF;IAChF,OAAO,CAAC,OAAO,IAAI,KAAK,UAAU,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,IAAI,IAAI,YAAY,IAAI,CAAC;AAC1F,CAAC;AAED;;;GAGG;AACH,MAAM,eAAe;IACnB;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,OAAwB;QAC/C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,UAAU,GA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e,KAAK,SAAS,CAAC;AACxF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError } from \"@azure/abort-controller\";\nimport {\n HttpClient,\n HttpHeaders as PipelineHeaders,\n PipelineRequest,\n PipelineResponse,\n TransferProgressEvent,\n} from \"./interfaces\";\nimport { RestError } from \"./restError\";\nimport { createHttpHeaders } from \"./httpHeaders\";\n\n/**\n * Checks if the body is a NodeReadable stream which is not supported in Browsers\n */\nfunction isNodeReadableStream(body: any): body is NodeJS.ReadableStream {\n return body && typeof body.pipe === \"function\";\n}\n\n/**\n * Checks if the body is a ReadableStream supported by browsers\n */\nfunction isReadableStream(body: unknown): body is ReadableStream {\n return Boolean(\n body &&\n typeof (body as ReadableStream).getReader === \"function\" &&\n typeof (body as ReadableStream).tee === \"function\"\n );\n}\n\n/**\n * Checks if the body is a Blob or Blob-like\n */\nfunction isBlob(body: unknown): body is Blob {\n // File objects count as a type of Blob, so we want to use instanceof explicitly\n return (typeof Blob === \"function\" || typeof Blob === \"object\") && body instanceof Blob;\n}\n\n/**\n * A HttpClient implementation that uses window.fetch to send HTTP requests.\n * @internal\n */\nclass FetchHttpClient implements HttpClient {\n /**\n * Makes a request over an underlying transport layer and returns the response.\n * @param request - The request to be made.\n */\n public async sendRequest(request: PipelineRequest): Promise {\n const url = new URL(request.url);\n const isInsecure = url.protocol !== \"https:\";\n\n if (isInsecure && !request.allowInsecureConnection) {\n throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n }\n\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n\n try {\n return await makeRequest(request);\n } catch (e: any) {\n throw getError(e, request);\n }\n }\n}\n\n/**\n * Sends a request\n */\nasync function makeRequest(request: PipelineRequest): Promise {\n const { abortController, abortControllerCleanup } = setupAbortSignal(request);\n\n try {\n const headers = buildFetchHeaders(request.headers);\n const requestBody = buildRequestBody(request);\n\n /**\n * Developers of the future:\n * Do not set redirect: \"manual\" as part\n * of request options.\n * It will not work as you expect.\n */\n const response = await fetch(request.url, {\n body: requestBody,\n method: request.method,\n headers: headers,\n signal: abortController.signal,\n credentials: request.withCredentials ? \"include\" : \"same-origin\",\n cache: \"no-store\",\n });\n // If we're uploading a blob, we need to fire the progress event manually\n if (isBlob(request.body) && request.onUploadProgress) {\n request.onUploadProgress({ loadedBytes: request.body.size });\n }\n return buildPipelineResponse(response, request);\n } finally {\n if (abortControllerCleanup) {\n abortControllerCleanup();\n }\n }\n}\n\n/**\n * Creates a pipeline response from a Fetch response;\n */\nasync function buildPipelineResponse(httpResponse: Response, request: PipelineRequest) {\n const headers = buildPipelineHeaders(httpResponse);\n const response: PipelineResponse = {\n request,\n headers,\n status: httpResponse.status,\n };\n\n const bodyStream = isReadableStream(httpResponse.body)\n ? buildBodyStream(httpResponse.body, request.onDownloadProgress)\n : httpResponse.body;\n\n if (\n // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) ||\n request.streamResponseStatusCodes?.has(response.status)\n ) {\n if (request.enableBrowserStreams) {\n response.browserStreamBody = bodyStream ?? undefined;\n } else {\n const responseStream = new Response(bodyStream);\n response.blobBody = responseStream.blob();\n }\n } else {\n const responseStream = new Response(bodyStream);\n\n response.bodyAsText = await responseStream.text();\n }\n\n return response;\n}\n\nfunction setupAbortSignal(request: PipelineRequest): {\n abortController: AbortController;\n abortControllerCleanup: (() => void) | undefined;\n} {\n const abortController = new AbortController();\n\n // Cleanup function\n let abortControllerCleanup: (() => void) | undefined;\n\n /**\n * Attach an abort listener to the request\n */\n let abortListener: ((event: any) => void) | undefined;\n if (request.abortSignal) {\n if (request.abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n\n abortListener = (event: Event) => {\n if (event.type === \"abort\") {\n abortController.abort();\n }\n };\n request.abortSignal.addEventListener(\"abort\", abortListener);\n abortControllerCleanup = () => {\n if (abortListener) {\n request.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n };\n }\n\n // If a timeout was passed, call the abort signal once the time elapses\n if (request.timeout > 0) {\n setTimeout(() => {\n abortController.abort();\n }, request.timeout);\n }\n\n return { abortController, abortControllerCleanup };\n}\n\n/**\n * Gets the specific error\n */\nfunction getError(e: RestError, request: PipelineRequest): RestError {\n if (e && e?.name === \"AbortError\") {\n return e;\n } else {\n return new RestError(`Error sending request: ${e.message}`, {\n code: e?.code ?? RestError.REQUEST_SEND_ERROR,\n request,\n });\n }\n}\n\n/**\n * Converts PipelineRequest headers to Fetch headers\n */\nfunction buildFetchHeaders(pipelineHeaders: PipelineHeaders) {\n const headers = new Headers();\n for (const [name, value] of pipelineHeaders) {\n headers.append(name, value);\n }\n\n return headers;\n}\n\nfunction buildPipelineHeaders(httpResponse: Response): PipelineHeaders {\n const responseHeaders = createHttpHeaders();\n for (const [name, value] of httpResponse.headers) {\n responseHeaders.set(name, value);\n }\n\n return responseHeaders;\n}\n\nfunction buildRequestBody(request: PipelineRequest) {\n const body = typeof request.body === \"function\" ? request.body() : request.body;\n if (isNodeReadableStream(body)) {\n throw new Error(\"Node streams are not supported in browser environment.\");\n }\n\n return isReadableStream(body) ? buildBodyStream(body, request.onUploadProgress) : body;\n}\n\n/**\n * Reads the request/response original stream and stream it through a new\n * ReadableStream, this is done to be able to report progress in a way that\n * all modern browsers support. TransformStreams would be an alternative,\n * however they are not yet supported by all browsers i.e Firefox\n */\nfunction buildBodyStream(\n readableStream: ReadableStream,\n onProgress?: (progress: TransferProgressEvent) => void\n): ReadableStream {\n let loadedBytes = 0;\n\n // If the current browser supports pipeThrough we use a TransformStream\n // to report progress\n if (isTransformStreamSupported(readableStream)) {\n return readableStream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === null) {\n controller.terminate();\n return;\n }\n\n controller.enqueue(chunk);\n loadedBytes += chunk.length;\n if (onProgress) {\n onProgress({ loadedBytes });\n }\n },\n })\n );\n } else {\n // If we can't use transform streams, wrap the original stream in a new readable stream\n // and use pull to enqueue each chunk and report progress.\n const reader = readableStream.getReader();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await reader.read();\n // When no more data needs to be consumed, break the reading\n if (done || !value) {\n // Close the stream\n controller.close();\n reader.releaseLock();\n return;\n }\n\n loadedBytes += value?.length ?? 0;\n\n // Enqueue the next data chunk into our target stream\n controller.enqueue(value);\n\n if (onProgress) {\n onProgress({ loadedBytes });\n }\n },\n });\n }\n}\n\n/**\n * Create a new HttpClient instance for the browser environment.\n * @internal\n */\nexport function createFetchHttpClient(): HttpClient {\n return new FetchHttpClient();\n}\n\nfunction isTransformStreamSupported(readableStream: ReadableStream): boolean {\n return readableStream.pipeThrough !== undefined && self.TransformStream !== undefined;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/httpHeaders.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/httpHeaders.js deleted file mode 100644 index 1a46c9d..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/httpHeaders.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -function normalizeName(name) { - return name.toLowerCase(); -} -function* headerIterator(map) { - for (const entry of map.values()) { - yield [entry.name, entry.value]; - } -} -class HttpHeadersImpl { - constructor(rawHeaders) { - this._headersMap = new Map(); - if (rawHeaders) { - for (const headerName of Object.keys(rawHeaders)) { - this.set(headerName, rawHeaders[headerName]); - } - } - } - /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param name - The name of the header to set. This value is case-insensitive. - * @param value - The value of the header to set. - */ - set(name, value) { - this._headersMap.set(normalizeName(name), { name, value: String(value) }); - } - /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param name - The name of the header. This value is case-insensitive. - */ - get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; - } - /** - * Get whether or not this header collection contains a header entry for the provided header name. - * @param name - The name of the header to set. This value is case-insensitive. - */ - has(name) { - return this._headersMap.has(normalizeName(name)); - } - /** - * Remove the header with the provided headerName. - * @param name - The name of the header to remove. - */ - delete(name) { - this._headersMap.delete(normalizeName(name)); - } - /** - * Get the JSON object representation of this HTTP header collection. - */ - toJSON(options = {}) { - const result = {}; - if (options.preserveCase) { - for (const entry of this._headersMap.values()) { - result[entry.name] = entry.value; - } - } - else { - for (const [normalizedName, entry] of this._headersMap) { - result[normalizedName] = entry.value; - } - } - return result; - } - /** - * Get the string representation of this HTTP header collection. - */ - toString() { - return JSON.stringify(this.toJSON({ preserveCase: true })); - } - /** - * Iterate over tuples of header [name, value] pairs. - */ - [Symbol.iterator]() { - return headerIterator(this._headersMap); - } -} -/** - * Creates an object that satisfies the `HttpHeaders` interface. - * @param rawHeaders - A simple object representing initial headers - */ -export function createHttpHeaders(rawHeaders) { - return new HttpHeadersImpl(rawHeaders); -} -//# sourceMappingURL=httpHeaders.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/httpHeaders.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/httpHeaders.js.map deleted file mode 100644 index 60298a0..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/httpHeaders.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"httpHeaders.js","sourceRoot":"","sources":["../../src/httpHeaders.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,CAAC;AAED,QAAQ,CAAC,CAAC,cAAc,CAAC,GAA6B;IACpD,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE;QAChC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,C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,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE;gBACtD,MAAM,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;aACtC;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAgC;IAChE,OAAO,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpHeaders, RawHttpHeaders, RawHttpHeadersInput } from \"./interfaces\";\n\ninterface HeaderEntry {\n name: string;\n value: string;\n}\n\nfunction normalizeName(name: string): string {\n return name.toLowerCase();\n}\n\nfunction* headerIterator(map: Map): IterableIterator<[string, string]> {\n for (const entry of map.values()) {\n yield [entry.name, entry.value];\n }\n}\n\nclass HttpHeadersImpl implements HttpHeaders {\n private readonly _headersMap: Map;\n\n constructor(rawHeaders?: RawHttpHeaders | RawHttpHeadersInput) {\n this._headersMap = new Map();\n if (rawHeaders) {\n for (const headerName of Object.keys(rawHeaders)) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param name - The name of the header to set. This value is case-insensitive.\n * @param value - The value of the header to set.\n */\n public set(name: string, value: string | number | boolean): void {\n this._headersMap.set(normalizeName(name), { name, value: String(value) });\n }\n\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param name - The name of the header. This value is case-insensitive.\n */\n public get(name: string): string | undefined {\n return this._headersMap.get(normalizeName(name))?.value;\n }\n\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n * @param name - The name of the header to set. This value is case-insensitive.\n */\n public has(name: string): boolean {\n return this._headersMap.has(normalizeName(name));\n }\n\n /**\n * Remove the header with the provided headerName.\n * @param name - The name of the header to remove.\n */\n public delete(name: string): void {\n this._headersMap.delete(normalizeName(name));\n }\n\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n public toJSON(options: { preserveCase?: boolean } = {}): RawHttpHeaders {\n const result: RawHttpHeaders = {};\n if (options.preserveCase) {\n for (const entry of this._headersMap.values()) {\n result[entry.name] = entry.value;\n }\n } else {\n for (const [normalizedName, entry] of this._headersMap) {\n result[normalizedName] = entry.value;\n }\n }\n\n return result;\n }\n\n /**\n * Get the string representation of this HTTP header collection.\n */\n public toString(): string {\n return JSON.stringify(this.toJSON({ preserveCase: true }));\n }\n\n /**\n * Iterate over tuples of header [name, value] pairs.\n */\n [Symbol.iterator](): Iterator<[string, string]> {\n return headerIterator(this._headersMap);\n }\n}\n\n/**\n * Creates an object that satisfies the `HttpHeaders` interface.\n * @param rawHeaders - A simple object representing initial headers\n */\nexport function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders {\n return new HttpHeadersImpl(rawHeaders);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/index.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/index.js deleted file mode 100644 index 9b9a313..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/index.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { createEmptyPipeline, } from "./pipeline"; -export { createPipelineFromOptions, } from "./createPipelineFromOptions"; -export { createDefaultHttpClient } from "./defaultHttpClient"; -export { createHttpHeaders } from "./httpHeaders"; -export { createPipelineRequest } from "./pipelineRequest"; -export { RestError, isRestError } from "./restError"; -export { decompressResponsePolicy, decompressResponsePolicyName, } from "./policies/decompressResponsePolicy"; -export { exponentialRetryPolicy, exponentialRetryPolicyName, } from "./policies/exponentialRetryPolicy"; -export { setClientRequestIdPolicy, setClientRequestIdPolicyName, } from "./policies/setClientRequestIdPolicy"; -export { logPolicy, logPolicyName } from "./policies/logPolicy"; -export { proxyPolicy, proxyPolicyName, getDefaultProxySettings } from "./policies/proxyPolicy"; -export { redirectPolicy, redirectPolicyName, } from "./policies/redirectPolicy"; -export { systemErrorRetryPolicy, systemErrorRetryPolicyName, } from "./policies/systemErrorRetryPolicy"; -export { throttlingRetryPolicy, throttlingRetryPolicyName, } from "./policies/throttlingRetryPolicy"; -export { retryPolicy } from "./policies/retryPolicy"; -export { tracingPolicy, tracingPolicyName } from "./policies/tracingPolicy"; -export { defaultRetryPolicy } from "./policies/defaultRetryPolicy"; -export { userAgentPolicy, userAgentPolicyName, } from "./policies/userAgentPolicy"; -export { tlsPolicy, tlsPolicyName } from "./policies/tlsPolicy"; -export { formDataPolicy, formDataPolicyName } from "./policies/formDataPolicy"; -export { bearerTokenAuthenticationPolicy, bearerTokenAuthenticationPolicyName, } from "./policies/bearerTokenAuthenticationPolicy"; -export { ndJsonPolicy, ndJsonPolicyName } from "./policies/ndJsonPolicy"; -export { auxiliaryAuthenticationHeaderPolicy, auxiliaryAuthenticationHeaderPolicyName, } from "./policies/auxiliaryAuthenticationHeaderPolicy"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/index.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/index.js.map deleted file mode 100644 index 62e3693..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;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AAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,+BAA+B,EAE/B,mCAAmC,GAIpC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EACL,mCAAmC,EAEnC,uCAAuC,GACxC,MAAM,gDAAgD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n Agent,\n FormDataMap,\n FormDataValue,\n HttpClient,\n HttpHeaders,\n HttpMethods,\n KeyObject,\n PipelineRequest,\n PipelineResponse,\n PipelineRetryOptions,\n ProxySettings,\n PxfObject,\n RawHttpHeaders,\n RawHttpHeadersInput,\n RequestBodyType,\n SendRequest,\n TlsSettings,\n TransferProgressEvent,\n} from \"./interfaces\";\nexport {\n AddPolicyOptions as AddPipelineOptions,\n PipelinePhase,\n PipelinePolicy,\n Pipeline,\n createEmptyPipeline,\n} from \"./pipeline\";\nexport {\n createPipelineFromOptions,\n TelemetryOptions,\n InternalPipelineOptions,\n PipelineOptions,\n} from \"./createPipelineFromOptions\";\nexport { createDefaultHttpClient } from \"./defaultHttpClient\";\nexport { createHttpHeaders } from \"./httpHeaders\";\nexport { createPipelineRequest, PipelineRequestOptions } from \"./pipelineRequest\";\nexport { RestError, RestErrorOptions, isRestError } from \"./restError\";\nexport {\n decompressResponsePolicy,\n decompressResponsePolicyName,\n} from \"./policies/decompressResponsePolicy\";\nexport {\n exponentialRetryPolicy,\n ExponentialRetryPolicyOptions,\n exponentialRetryPolicyName,\n} from \"./policies/exponentialRetryPolicy\";\nexport {\n setClientRequestIdPolicy,\n setClientRequestIdPolicyName,\n} from \"./policies/setClientRequestIdPolicy\";\nexport { logPolicy, logPolicyName, LogPolicyOptions } from \"./policies/logPolicy\";\nexport { proxyPolicy, proxyPolicyName, getDefaultProxySettings } from \"./policies/proxyPolicy\";\nexport {\n redirectPolicy,\n redirectPolicyName,\n RedirectPolicyOptions,\n} from \"./policies/redirectPolicy\";\nexport {\n systemErrorRetryPolicy,\n SystemErrorRetryPolicyOptions,\n systemErrorRetryPolicyName,\n} from \"./policies/systemErrorRetryPolicy\";\nexport {\n throttlingRetryPolicy,\n throttlingRetryPolicyName,\n ThrottlingRetryPolicyOptions,\n} from \"./policies/throttlingRetryPolicy\";\nexport { retryPolicy, RetryPolicyOptions } from \"./policies/retryPolicy\";\nexport { RetryStrategy, RetryInformation, RetryModifiers } from \"./retryStrategies/retryStrategy\";\nexport { tracingPolicy, tracingPolicyName, TracingPolicyOptions } from \"./policies/tracingPolicy\";\nexport { defaultRetryPolicy, DefaultRetryPolicyOptions } from \"./policies/defaultRetryPolicy\";\nexport {\n userAgentPolicy,\n userAgentPolicyName,\n UserAgentPolicyOptions,\n} from \"./policies/userAgentPolicy\";\nexport { tlsPolicy, tlsPolicyName } from \"./policies/tlsPolicy\";\nexport { formDataPolicy, formDataPolicyName } from \"./policies/formDataPolicy\";\nexport {\n bearerTokenAuthenticationPolicy,\n BearerTokenAuthenticationPolicyOptions,\n bearerTokenAuthenticationPolicyName,\n ChallengeCallbacks,\n AuthorizeRequestOptions,\n AuthorizeRequestOnChallengeOptions,\n} from \"./policies/bearerTokenAuthenticationPolicy\";\nexport { ndJsonPolicy, ndJsonPolicyName } from \"./policies/ndJsonPolicy\";\nexport {\n auxiliaryAuthenticationHeaderPolicy,\n AuxiliaryAuthenticationHeaderPolicyOptions,\n auxiliaryAuthenticationHeaderPolicyName,\n} from \"./policies/auxiliaryAuthenticationHeaderPolicy\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/interfaces.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/interfaces.js deleted file mode 100644 index c0a2e2e..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/interfaces.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export {}; -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/interfaces.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/interfaces.js.map deleted file mode 100644 index 22e4a57..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * A HttpHeaders collection represented as a simple JSON object.\n */\nexport type RawHttpHeaders = { [headerName: string]: string };\n\n/**\n * A HttpHeaders collection for input, represented as a simple JSON object.\n */\nexport type RawHttpHeadersInput = Record;\n\n/**\n * Represents a set of HTTP headers on a request/response.\n * Header names are treated as case insensitive.\n */\nexport interface HttpHeaders extends Iterable<[string, string]> {\n /**\n * Returns the value of a specific header or undefined if not set.\n * @param name - The name of the header to retrieve.\n */\n get(name: string): string | undefined;\n /**\n * Returns true if the specified header exists.\n * @param name - The name of the header to check.\n */\n has(name: string): boolean;\n /**\n * Sets a specific header with a given value.\n * @param name - The name of the header to set.\n * @param value - The value to use for the header.\n */\n set(name: string, value: string | number | boolean): void;\n /**\n * Removes a specific header from the collection.\n * @param name - The name of the header to delete.\n */\n delete(name: string): void;\n /**\n * Accesses a raw JS object that acts as a simple map\n * of header names to values.\n */\n toJSON(options?: { preserveCase?: boolean }): RawHttpHeaders;\n}\n\n/**\n * Types of bodies supported on the request.\n * NodeJS.ReadableStream and () =\\> NodeJS.ReadableStream is Node only.\n * Blob, ReadableStream, and () =\\> ReadableStream are browser only.\n */\nexport type RequestBodyType =\n | NodeJS.ReadableStream\n | (() => NodeJS.ReadableStream)\n | ReadableStream\n | (() => ReadableStream)\n | Blob\n | ArrayBuffer\n | ArrayBufferView\n | FormData\n | string\n | null;\n\n/**\n * An interface compatible with NodeJS's `http.Agent`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface Agent {\n /**\n * Destroy any sockets that are currently in use by the agent.\n */\n destroy(): void;\n /**\n * For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state.\n */\n maxFreeSockets: number;\n /**\n * Determines how many concurrent sockets the agent can have open per origin.\n */\n maxSockets: number;\n /**\n * An object which contains queues of requests that have not yet been assigned to sockets.\n */\n requests: unknown;\n /**\n * An object which contains arrays of sockets currently in use by the agent.\n */\n sockets: unknown;\n}\n\n/**\n * Metadata about a request being made by the pipeline.\n */\nexport interface PipelineRequest {\n /**\n * The URL to make the request to.\n */\n url: string;\n\n /**\n * The HTTP method to use when making the request.\n */\n method: HttpMethods;\n\n /**\n * The HTTP headers to use when making the request.\n */\n headers: HttpHeaders;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n * Defaults to 0, which disables the timeout.\n */\n timeout: number;\n\n /**\n * Indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests.\n * Defaults to false.\n */\n withCredentials: boolean;\n\n /**\n * A unique identifier for the request. Used for logging and tracing.\n */\n requestId: string;\n\n /**\n * The HTTP body content (if any)\n */\n body?: RequestBodyType;\n\n /**\n * To simulate a browser form post\n */\n formData?: FormDataMap;\n\n /**\n * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream.\n * When streamResponseStatusCodes contains the value Number.POSITIVE_INFINITY any status would be treated as a stream.\n */\n streamResponseStatusCodes?: Set;\n\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n\n /**\n * If the connection should not be reused.\n */\n disableKeepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Tracing options to use for any created Spans.\n */\n tracingOptions?: OperationTracingOptions;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Set to true if the request is sent over HTTP instead of HTTPS */\n allowInsecureConnection?: boolean;\n\n /**\n * NODEJS ONLY\n *\n * A Node-only option to provide a custom `http.Agent`/`https.Agent`.\n * Does nothing when running in the browser.\n */\n agent?: Agent;\n\n /**\n * BROWSER ONLY\n *\n * A browser only option to enable browser Streams. If this option is set and a response is a stream\n * the response will have a property `browserStream` instead of `blobBody` which will be undefined.\n *\n * Default value is false\n */\n enableBrowserStreams?: boolean;\n\n /** Settings for configuring TLS authentication */\n tlsSettings?: TlsSettings;\n}\n\n/**\n * Metadata about a response received by the pipeline.\n */\nexport interface PipelineResponse {\n /**\n * The request that generated this response.\n */\n request: PipelineRequest;\n /**\n * The HTTP status code of the response.\n */\n status: number;\n /**\n * The HTTP response headers.\n */\n headers: HttpHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText?: string | null;\n\n /**\n * BROWSER ONLY\n *\n * The response body as a browser Blob.\n * Always undefined in node.js.\n */\n blobBody?: Promise;\n\n /**\n * BROWSER ONLY\n *\n * The response body as a browser ReadableStream.\n * Always undefined in node.js.\n */\n browserStreamBody?: ReadableStream;\n\n /**\n * NODEJS ONLY\n *\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n */\n readableStreamBody?: NodeJS.ReadableStream;\n}\n\n/**\n * A simple interface for making a pipeline request and receiving a response.\n */\nexport type SendRequest = (request: PipelineRequest) => Promise;\n\n/**\n * The required interface for a client that makes HTTP requests\n * on behalf of a pipeline.\n */\nexport interface HttpClient {\n /**\n * The method that makes the request and returns a response.\n */\n sendRequest: SendRequest;\n}\n\n/**\n * Fired in response to upload or download progress.\n */\nexport type TransferProgressEvent = {\n /**\n * The number of bytes loaded so far.\n */\n loadedBytes: number;\n};\n\n/**\n * Supported HTTP methods to use when making requests.\n */\nexport type HttpMethods =\n | \"GET\"\n | \"PUT\"\n | \"POST\"\n | \"DELETE\"\n | \"PATCH\"\n | \"HEAD\"\n | \"OPTIONS\"\n | \"TRACE\";\n\n/**\n * Options to configure a proxy for outgoing requests (Node.js only).\n */\nexport interface ProxySettings {\n /**\n * The proxy's host address.\n */\n host: string;\n\n /**\n * The proxy host's port.\n */\n port: number;\n\n /**\n * The user name to authenticate with the proxy, if required.\n */\n username?: string;\n\n /**\n * The password to authenticate with the proxy, if required.\n */\n password?: string;\n}\n\n/**\n * Each form data entry can be a string or (in the browser) a Blob.\n */\nexport type FormDataValue = string | Blob;\n\n/**\n * A simple object that provides form data, as if from a browser form.\n */\nexport type FormDataMap = { [key: string]: FormDataValue | FormDataValue[] };\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface PipelineRetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second). The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Represents a certificate credential for authentication.\n */\nexport interface CertificateCredential {\n /**\n * Optionally override the trusted CA certificates. Default is to trust\n * the well-known CAs curated by Mozilla. Mozilla's CAs are completely\n * replaced when CAs are explicitly specified using this option.\n */\n ca?: string | Buffer | Array | undefined;\n /**\n * Cert chains in PEM format. One cert chain should be provided per\n * private key. Each cert chain should consist of the PEM formatted\n * certificate for a provided private key, followed by the PEM\n * formatted intermediate certificates (if any), in order, and not\n * including the root CA (the root CA must be pre-known to the peer,\n * see ca). When providing multiple cert chains, they do not have to\n * be in the same order as their private keys in key. If the\n * intermediate certificates are not provided, the peer will not be\n * able to validate the certificate, and the handshake will fail.\n */\n cert?: string | Buffer | Array | undefined;\n /**\n * Private keys in PEM format. PEM allows the option of private keys\n * being encrypted. Encrypted keys will be decrypted with\n * options.passphrase. Multiple keys using different algorithms can be\n * provided either as an array of unencrypted key strings or buffers,\n * or an array of objects in the form `{pem: [,passphrase: ]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n key?: string | Buffer | Array | undefined;\n /**\n * Shared passphrase used for a single private key and/or a PFX.\n */\n passphrase?: string | undefined;\n /**\n * PFX or PKCS12 encoded private key and certificate chain. pfx is an\n * alternative to providing key and cert individually. PFX is usually\n * encrypted, if it is, passphrase will be used to decrypt it. Multiple\n * PFX can be provided either as an array of unencrypted PFX buffers,\n * or an array of objects in the form `{buf: [,passphrase: ]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n pfx?: string | Buffer | Array | undefined;\n}\n\n/**\n * Represents a certificate for TLS authentication.\n */\nexport interface TlsSettings {\n /**\n * Optionally override the trusted CA certificates. Default is to trust\n * the well-known CAs curated by Mozilla. Mozilla's CAs are completely\n * replaced when CAs are explicitly specified using this option.\n */\n ca?: string | Buffer | Array | undefined;\n /**\n * Cert chains in PEM format. One cert chain should be provided per\n * private key. Each cert chain should consist of the PEM formatted\n * certificate for a provided private key, followed by the PEM\n * formatted intermediate certificates (if any), in order, and not\n * including the root CA (the root CA must be pre-known to the peer,\n * see ca). When providing multiple cert chains, they do not have to\n * be in the same order as their private keys in key. If the\n * intermediate certificates are not provided, the peer will not be\n * able to validate the certificate, and the handshake will fail.\n */\n cert?: string | Buffer | Array | undefined;\n /**\n * Private keys in PEM format. PEM allows the option of private keys\n * being encrypted. Encrypted keys will be decrypted with\n * options.passphrase. Multiple keys using different algorithms can be\n * provided either as an array of unencrypted key strings or buffers,\n * or an array of objects in the form `{pem: [,passphrase: ]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n key?: string | Buffer | Array | undefined;\n /**\n * Shared passphrase used for a single private key and/or a PFX.\n */\n passphrase?: string | undefined;\n /**\n * PFX or PKCS12 encoded private key and certificate chain. pfx is an\n * alternative to providing key and cert individually. PFX is usually\n * encrypted, if it is, passphrase will be used to decrypt it. Multiple\n * PFX can be provided either as an array of unencrypted PFX buffers,\n * or an array of objects in the form `{buf: [,passphrase: ]}`.\n * The object form can only occur in an array.object.passphrase is optional.\n * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.\n */\n pfx?: string | Buffer | Array | undefined;\n}\n\n/**\n * An interface compatible with NodeJS's `tls.KeyObject`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface KeyObject {\n /**\n * Private keys in PEM format.\n */\n pem: string | Buffer;\n /**\n * Optional passphrase.\n */\n passphrase?: string | undefined;\n}\n\n/**\n * An interface compatible with NodeJS's `tls.PxfObject`.\n * We want to avoid publicly re-exporting the actual interface,\n * since it might vary across runtime versions.\n */\nexport interface PxfObject {\n /**\n * PFX or PKCS12 encoded private key and certificate chain.\n */\n buf: string | Buffer;\n /**\n * Optional passphrase.\n */\n passphrase?: string | undefined;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/log.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/log.js deleted file mode 100644 index 10a0a4e..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/log.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createClientLogger } from "@azure/logger"; -export const logger = createClientLogger("core-rest-pipeline"); -//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/log.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/log.js.map deleted file mode 100644 index 9490f3c..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/log.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-rest-pipeline\");\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/nodeHttpClient.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/nodeHttpClient.js deleted file mode 100644 index 2422751..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/nodeHttpClient.js +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import * as http from "http"; -import * as https from "https"; -import * as zlib from "zlib"; -import { Transform } from "stream"; -import { AbortController, AbortError } from "@azure/abort-controller"; -import { createHttpHeaders } from "./httpHeaders"; -import { RestError } from "./restError"; -import { logger } from "./log"; -const DEFAULT_TLS_SETTINGS = {}; -function isReadableStream(body) { - return body && typeof body.pipe === "function"; -} -function isStreamComplete(stream) { - return new Promise((resolve) => { - stream.on("close", resolve); - stream.on("end", resolve); - stream.on("error", resolve); - }); -} -function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; -} -class ReportTransform extends Transform { - // eslint-disable-next-line @typescript-eslint/ban-types - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } - catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } -} -/** - * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. - * @internal - */ -class NodeHttpClient { - constructor() { - this.cachedHttpsAgents = new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } - else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request, - }; - // Responses to HEAD must not have a body. - // If they do return a body, that body must be ignored. - if (request.method === "HEAD") { - // call resume() and not destroy() to avoid closing the socket - // and losing keep alive - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || - ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status))) { - response.readableStreamBody = responseStream; - } - else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } - finally { - // clean up event listener - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]) - .then(() => { - var _a; - // eslint-disable-next-line promise/always-return - if (abortListener) { - (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); - } - }) - .catch((e) => { - logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (isInsecure && !request.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); - } - const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); - const options = { - agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }), - }; - return new Promise((resolve, reject) => { - const req = isInsecure ? http.request(options, resolve) : https.request(options, resolve); - req.once("error", (err) => { - var _a; - reject(new RestError(err.message, { code: (_a = err.code) !== null && _a !== void 0 ? _a : RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } - else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } - else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } - else { - logger.error("Unrecognized body type", body); - reject(new RestError("Unrecognized body type")); - } - } - else { - // streams don't like "undefined" being passed as data - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - // Handle Insecure requests first - if (isInsecure) { - if (disableKeepAlive) { - // keepAlive:false is the default so we don't need a custom Agent - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - // If there is no cached agent create a new one and cache it. - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } - else { - if (disableKeepAlive && !request.tlsSettings) { - // When there are no tlsSettings and keepAlive is false - // we don't need a custom agent - return https.globalAgent; - } - // We use the tlsSettings to index cached clients - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - // Get the cached agent or create a new one with the - // provided values for keepAlive and tlsSettings - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } -} -function getResponseHeaders(res) { - const headers = createHttpHeaders(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } - else if (value) { - headers.set(header, value); - } - } - return headers; -} -function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } - else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; -} -function streamToText(stream) { - return new Promise((resolve, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } - else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } - else { - reject(new RestError(`Error reading response as text: ${e.message}`, { - code: RestError.PARSE_ERROR, - })); - } - }); - }); -} -/** @internal */ -export function getBodyLength(body) { - if (!body) { - return 0; - } - else if (Buffer.isBuffer(body)) { - return body.length; - } - else if (isReadableStream(body)) { - return null; - } - else if (isArrayBuffer(body)) { - return body.byteLength; - } - else if (typeof body === "string") { - return Buffer.from(body).length; - } - else { - return null; - } -} -/** - * Create a new HttpClient instance for the NodeJS environment. - * @internal - */ -export function createNodeHttpClient() { - return new NodeHttpClient(); -} -//# sourceMappingURL=nodeHttpClient.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/nodeHttpClient.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/nodeHttpClient.js.map deleted file mode 100644 index 6a042be..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/nodeHttpClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nodeHttpClient.js","sourceRoot":"","sources":["../../src/nodeHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAUtE,OAAO,E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CAAC,MAAM,CAAC;KACpB;SAAM,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACjC,OAAO,IAAI,CAAC;KACb;SAAM,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE;QAC9B,OAAO,IAAI,CAAC,UAAU,CAAC;KACxB;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACnC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;KACjC;SAAM;QACL,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,cAAc,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport * as zlib from \"zlib\";\nimport { Transform } from \"stream\";\nimport { AbortController, AbortError } from \"@azure/abort-controller\";\nimport {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n RequestBodyType,\n TlsSettings,\n TransferProgressEvent,\n} from \"./interfaces\";\nimport { createHttpHeaders } from \"./httpHeaders\";\nimport { RestError } from \"./restError\";\nimport { IncomingMessage } from \"http\";\nimport { logger } from \"./log\";\n\nconst DEFAULT_TLS_SETTINGS = {};\n\nfunction isReadableStream(body: any): body is NodeJS.ReadableStream {\n return body && typeof body.pipe === \"function\";\n}\n\nfunction isStreamComplete(stream: NodeJS.ReadableStream): Promise {\n return new Promise((resolve) => {\n stream.on(\"close\", resolve);\n stream.on(\"end\", resolve);\n stream.on(\"error\", resolve);\n });\n}\n\nfunction isArrayBuffer(body: any): body is ArrayBuffer | ArrayBufferView {\n return body && typeof body.byteLength === \"number\";\n}\n\nclass ReportTransform extends Transform {\n private loadedBytes = 0;\n private progressCallback: (progress: TransferProgressEvent) => void;\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n _transform(chunk: string | Buffer, _encoding: string, callback: Function): void {\n this.push(chunk);\n this.loadedBytes += chunk.length;\n try {\n this.progressCallback({ loadedBytes: this.loadedBytes });\n callback();\n } catch (e: any) {\n callback(e);\n }\n }\n\n constructor(progressCallback: (progress: TransferProgressEvent) => void) {\n super();\n this.progressCallback = progressCallback;\n }\n}\n\n/**\n * A HttpClient implementation that uses Node's \"https\" module to send HTTPS requests.\n * @internal\n */\nclass NodeHttpClient implements HttpClient {\n private cachedHttpAgent?: http.Agent;\n private cachedHttpsAgents: WeakMap = new WeakMap();\n\n /**\n * Makes a request over an underlying transport layer and returns the response.\n * @param request - The request to be made.\n */\n public async sendRequest(request: PipelineRequest): Promise {\n const abortController = new AbortController();\n let abortListener: ((event: any) => void) | undefined;\n if (request.abortSignal) {\n if (request.abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n\n abortListener = (event: Event) => {\n if (event.type === \"abort\") {\n abortController.abort();\n }\n };\n request.abortSignal.addEventListener(\"abort\", abortListener);\n }\n\n if (request.timeout > 0) {\n setTimeout(() => {\n abortController.abort();\n }, request.timeout);\n }\n\n const acceptEncoding = request.headers.get(\"Accept-Encoding\");\n const shouldDecompress =\n acceptEncoding?.includes(\"gzip\") || acceptEncoding?.includes(\"deflate\");\n\n let body = typeof request.body === \"function\" ? request.body() : request.body;\n if (body && !request.headers.has(\"Content-Length\")) {\n const bodyLength = getBodyLength(body);\n if (bodyLength !== null) {\n request.headers.set(\"Content-Length\", bodyLength);\n }\n }\n\n let responseStream: NodeJS.ReadableStream | undefined;\n try {\n if (body && request.onUploadProgress) {\n const onUploadProgress = request.onUploadProgress;\n const uploadReportStream = new ReportTransform(onUploadProgress);\n uploadReportStream.on(\"error\", (e) => {\n logger.error(\"Error in upload progress\", e);\n });\n if (isReadableStream(body)) {\n body.pipe(uploadReportStream);\n } else {\n uploadReportStream.end(body);\n }\n\n body = uploadReportStream;\n }\n\n const res = await this.makeRequest(request, abortController, body);\n\n const headers = getResponseHeaders(res);\n\n const status = res.statusCode ?? 0;\n const response: PipelineResponse = {\n status,\n headers,\n request,\n };\n\n // Responses to HEAD must not have a body.\n // If they do return a body, that body must be ignored.\n if (request.method === \"HEAD\") {\n // call resume() and not destroy() to avoid closing the socket\n // and losing keep alive\n res.resume();\n return response;\n }\n\n responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res;\n\n const onDownloadProgress = request.onDownloadProgress;\n if (onDownloadProgress) {\n const downloadReportStream = new ReportTransform(onDownloadProgress);\n downloadReportStream.on(\"error\", (e) => {\n logger.error(\"Error in download progress\", e);\n });\n responseStream.pipe(downloadReportStream);\n responseStream = downloadReportStream;\n }\n\n if (\n // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) ||\n request.streamResponseStatusCodes?.has(response.status)\n ) {\n response.readableStreamBody = responseStream;\n } else {\n response.bodyAsText = await streamToText(responseStream);\n }\n\n return response;\n } finally {\n // clean up event listener\n if (request.abortSignal && abortListener) {\n let uploadStreamDone = Promise.resolve();\n if (isReadableStream(body)) {\n uploadStreamDone = isStreamComplete(body as NodeJS.ReadableStream);\n }\n let downloadStreamDone = Promise.resolve();\n if (isReadableStream(responseStream)) {\n downloadStreamDone = isStreamComplete(responseStream);\n }\n\n Promise.all([uploadStreamDone, downloadStreamDone])\n .then(() => {\n // eslint-disable-next-line promise/always-return\n if (abortListener) {\n request.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n })\n .catch((e) => {\n logger.warning(\"Error when cleaning up abortListener on httpRequest\", e);\n });\n }\n }\n }\n\n private makeRequest(\n request: PipelineRequest,\n abortController: AbortController,\n body?: RequestBodyType\n ): Promise {\n const url = new URL(request.url);\n\n const isInsecure = url.protocol !== \"https:\";\n\n if (isInsecure && !request.allowInsecureConnection) {\n throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n }\n\n const agent = (request.agent as http.Agent) ?? this.getOrCreateAgent(request, isInsecure);\n const options: http.RequestOptions = {\n agent,\n hostname: url.hostname,\n path: `${url.pathname}${url.search}`,\n port: url.port,\n method: request.method,\n headers: request.headers.toJSON({ preserveCase: true }),\n };\n\n return new Promise((resolve, reject) => {\n const req = isInsecure ? http.request(options, resolve) : https.request(options, resolve);\n\n req.once(\"error\", (err: Error & { code?: string }) => {\n reject(\n new RestError(err.message, { code: err.code ?? RestError.REQUEST_SEND_ERROR, request })\n );\n });\n\n abortController.signal.addEventListener(\"abort\", () => {\n const abortError = new AbortError(\"The operation was aborted.\");\n req.destroy(abortError);\n reject(abortError);\n });\n if (body && isReadableStream(body)) {\n body.pipe(req);\n } else if (body) {\n if (typeof body === \"string\" || Buffer.isBuffer(body)) {\n req.end(body);\n } else if (isArrayBuffer(body)) {\n req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body));\n } else {\n logger.error(\"Unrecognized body type\", body);\n reject(new RestError(\"Unrecognized body type\"));\n }\n } else {\n // streams don't like \"undefined\" being passed as data\n req.end();\n }\n });\n }\n\n private getOrCreateAgent(request: PipelineRequest, isInsecure: boolean): http.Agent {\n const disableKeepAlive = request.disableKeepAlive;\n\n // Handle Insecure requests first\n if (isInsecure) {\n if (disableKeepAlive) {\n // keepAlive:false is the default so we don't need a custom Agent\n return http.globalAgent;\n }\n\n if (!this.cachedHttpAgent) {\n // If there is no cached agent create a new one and cache it.\n this.cachedHttpAgent = new http.Agent({ keepAlive: true });\n }\n return this.cachedHttpAgent;\n } else {\n if (disableKeepAlive && !request.tlsSettings) {\n // When there are no tlsSettings and keepAlive is false\n // we don't need a custom agent\n return https.globalAgent;\n }\n\n // We use the tlsSettings to index cached clients\n const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS;\n\n // Get the cached agent or create a new one with the\n // provided values for keepAlive and tlsSettings\n let agent = this.cachedHttpsAgents.get(tlsSettings);\n\n if (agent && agent.options.keepAlive === !disableKeepAlive) {\n return agent;\n }\n\n logger.info(\"No cached TLS Agent exist, creating a new Agent\");\n agent = new https.Agent({\n // keepAlive is true if disableKeepAlive is false.\n keepAlive: !disableKeepAlive,\n // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options.\n ...tlsSettings,\n });\n\n this.cachedHttpsAgents.set(tlsSettings, agent);\n return agent;\n }\n }\n}\n\nfunction getResponseHeaders(res: IncomingMessage): HttpHeaders {\n const headers = createHttpHeaders();\n for (const header of Object.keys(res.headers)) {\n const value = res.headers[header];\n if (Array.isArray(value)) {\n if (value.length > 0) {\n headers.set(header, value[0]);\n }\n } else if (value) {\n headers.set(header, value);\n }\n }\n return headers;\n}\n\nfunction getDecodedResponseStream(\n stream: IncomingMessage,\n headers: HttpHeaders\n): NodeJS.ReadableStream {\n const contentEncoding = headers.get(\"Content-Encoding\");\n if (contentEncoding === \"gzip\") {\n const unzip = zlib.createGunzip();\n stream.pipe(unzip);\n return unzip;\n } else if (contentEncoding === \"deflate\") {\n const inflate = zlib.createInflate();\n stream.pipe(inflate);\n return inflate;\n }\n\n return stream;\n}\n\nfunction streamToText(stream: NodeJS.ReadableStream): Promise {\n return new Promise((resolve, reject) => {\n const buffer: Buffer[] = [];\n\n stream.on(\"data\", (chunk) => {\n if (Buffer.isBuffer(chunk)) {\n buffer.push(chunk);\n } else {\n buffer.push(Buffer.from(chunk));\n }\n });\n stream.on(\"end\", () => {\n resolve(Buffer.concat(buffer).toString(\"utf8\"));\n });\n stream.on(\"error\", (e) => {\n if (e && e?.name === \"AbortError\") {\n reject(e);\n } else {\n reject(\n new RestError(`Error reading response as text: ${e.message}`, {\n code: RestError.PARSE_ERROR,\n })\n );\n }\n });\n });\n}\n\n/** @internal */\nexport function getBodyLength(body: RequestBodyType): number | null {\n if (!body) {\n return 0;\n } else if (Buffer.isBuffer(body)) {\n return body.length;\n } else if (isReadableStream(body)) {\n return null;\n } else if (isArrayBuffer(body)) {\n return body.byteLength;\n } else if (typeof body === \"string\") {\n return Buffer.from(body).length;\n } else {\n return null;\n }\n}\n\n/**\n * Create a new HttpClient instance for the NodeJS environment.\n * @internal\n */\nexport function createNodeHttpClient(): HttpClient {\n return new NodeHttpClient();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipeline.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipeline.js deleted file mode 100644 index 07e8ced..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipeline.js +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); -/** - * A private implementation of Pipeline. - * Do not export this class from the package. - * @internal - */ -class HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = undefined; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options, - }); - this._orderedPolicies = undefined; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if ((options.name && policyDescriptor.policy.name === options.name) || - (options.phase && policyDescriptor.options.phase === options.phase)) { - removedPolicies.push(policyDescriptor.policy); - return false; - } - else { - return true; - } - }); - this._orderedPolicies = undefined; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new HttpPipeline(this._policies); - } - static create() { - return new HttpPipeline(); - } - orderPolicies() { - /** - * The goal of this method is to reliably order pipeline policies - * based on their declared requirements when they were added. - * - * Order is first determined by phase: - * - * 1. Serialize Phase - * 2. Policies not in a phase - * 3. Deserialize Phase - * 4. Retry Phase - * 5. Sign Phase - * - * Within each phase, policies are executed in the order - * they were added unless they were specified to execute - * before/after other policies or after a particular phase. - * - * To determine the final order, we will walk the policy list - * in phase order multiple times until all dependencies are - * satisfied. - * - * `afterPolicies` are the set of policies that must be - * executed before a given policy. This requirement is - * considered satisfied when each of the listed policies - * have been scheduled. - * - * `beforePolicies` are the set of policies that must be - * executed after a given policy. Since this dependency - * can be expressed by converting it into a equivalent - * `afterPolicies` declarations, they are normalized - * into that form for simplicity. - * - * An `afterPhase` dependency is considered satisfied when all - * policies in that phase have scheduled. - * - */ - const result = []; - // Track all policies we know about. - const policyMap = new Map(); - function createPhase(name) { - return { - name, - policies: new Set(), - hasRun: false, - hasAfterPolicies: false, - }; - } - // Track policies for each phase. - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - // a list of phases in order - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - // Small helper function to map phase name to each Phase - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } - else if (phase === "Serialize") { - return serializePhase; - } - else if (phase === "Deserialize") { - return deserializePhase; - } - else if (phase === "Sign") { - return signPhase; - } - else { - return noPhase; - } - } - // First walk each policy and create a node to track metadata. - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: new Set(), - dependants: new Set(), - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - // Now that each policy has a node, connect dependency references. - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - // Linking in both directions helps later - // when we want to notify dependants. - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - // To execute before another node, make it - // depend on the current node. - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - // Sets iterate in insertion order - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - // If this node is waiting on a phase to complete, - // we need to skip it for now. - // Even if the phase is empty, we should wait for it - // to be walked to avoid re-ordering policies. - continue; - } - if (node.dependsOn.size === 0) { - // If there's nothing else we're waiting for, we can - // add this policy to the result list. - result.push(node.policy); - // Notify anything that depends on this policy that - // the policy has been scheduled. - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - // if the phase isn't complete - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - // Try running noPhase to see if that unblocks this phase next tick. - // This can happen if a phase that happens before noPhase - // is waiting on a noPhase policy to complete. - walkPhase(noPhase); - } - // Don't proceed to the next phase until this phase finishes. - return; - } - if (phase.hasAfterPolicies) { - // Run any policies unblocked by this phase - walkPhase(noPhase); - } - } - } - // Iterate until we've put every node in the result list. - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - // Keep walking each phase in order until we can order every node. - walkPhases(); - // The result list *should* get at least one larger each time - // after the first full pass. - // Otherwise, we're going to loop forever. - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } -} -/** - * Creates a totally empty pipeline. - * Useful for testing or creating a custom one. - */ -export function createEmptyPipeline() { - return HttpPipeline.create(); -} -//# sourceMappingURL=pipeline.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipeline.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipeline.js.map deleted file mode 100644 index ea80891..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipeline.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAgB,CAAC,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAiG9F;;;;GAIG;AACH,MAAM,YAAY;IAIhB,YAAoB,QAA+B;;QAH3C,cAAS,GAAyB,EAAE,CAAC;QAI3C,IAAI,CAAC,SAAS,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC,CAAC,CAAC,mCAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IACpC,CAAC;IAEM,SAAS,CAAC,MAAsB,EAAE,UAA4B,EAAE;QACrE,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE;YACvC,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACvE;QACD,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxD,MAAM,IAAI,KAAK,CAAC,uBAAuB,OAAO,CAAC,KAAK,EAAE,CA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S,EAAE,CAAC;YACZ,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;YAC1C,kEAAkE;YAClE,UAAU,EAAE,CAAC;YACb,6DAA6D;YAC7D,6BAA6B;YAC7B,0CAA0C;YAC1C,IAAI,MAAM,CAAC,MAAM,IAAI,mBAAmB,IAAI,SAAS,GAAG,CAAC,EAAE;gBACzD,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;aAClF;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,YAAY,CAAC,MAAM,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient, PipelineRequest, PipelineResponse, SendRequest } from \"./interfaces\";\n\n/**\n * Policies are executed in phases.\n * The execution order is:\n * 1. Serialize Phase\n * 2. Policies not in a phase\n * 3. Deserialize Phase\n * 4. Retry Phase\n * 5. Sign Phase\n */\nexport type PipelinePhase = \"Deserialize\" | \"Serialize\" | \"Retry\" | \"Sign\";\n\nconst ValidPhaseNames = new Set([\"Deserialize\", \"Serialize\", \"Retry\", \"Sign\"]);\n\n/**\n * Options when adding a policy to the pipeline.\n * Used to express dependencies on other policies.\n */\nexport interface AddPolicyOptions {\n /**\n * Policies that this policy must come before.\n */\n beforePolicies?: string[];\n /**\n * Policies that this policy must come after.\n */\n afterPolicies?: string[];\n /**\n * The phase that this policy must come after.\n */\n afterPhase?: PipelinePhase;\n /**\n * The phase this policy belongs to.\n */\n phase?: PipelinePhase;\n}\n\n/**\n * A pipeline policy manipulates a request as it travels through the pipeline.\n * It is conceptually a middleware that is allowed to modify the request before\n * it is made as well as the response when it is received.\n */\nexport interface PipelinePolicy {\n /**\n * The policy name. Must be a unique string in the pipeline.\n */\n name: string;\n /**\n * The main method to implement that manipulates a request/response.\n * @param request - The request being performed.\n * @param next - The next policy in the pipeline. Must be called to continue the pipeline.\n */\n sendRequest(request: PipelineRequest, next: SendRequest): Promise;\n}\n\n/**\n * Represents a pipeline for making a HTTP request to a URL.\n * Pipelines can have multiple policies to manage manipulating each request\n * before and after it is made to the server.\n */\nexport interface Pipeline {\n /**\n * Add a new policy to the pipeline.\n * @param policy - A policy that manipulates a request.\n * @param options - A set of options for when the policy should run.\n */\n addPolicy(policy: PipelinePolicy, options?: AddPolicyOptions): void;\n /**\n * Remove a policy from the pipeline.\n * @param options - Options that let you specify which policies to remove.\n */\n removePolicy(options: { name?: string; phase?: PipelinePhase }): PipelinePolicy[];\n /**\n * Uses the pipeline to make a HTTP request.\n * @param httpClient - The HttpClient that actually performs the request.\n * @param request - The request to be made.\n */\n sendRequest(httpClient: HttpClient, request: PipelineRequest): Promise;\n /**\n * Returns the current set of policies in the pipeline in the order in which\n * they will be applied to the request. Later in the list is closer to when\n * the request is performed.\n */\n getOrderedPolicies(): PipelinePolicy[];\n /**\n * Duplicates this pipeline to allow for modifying an existing one without mutating it.\n */\n clone(): Pipeline;\n}\n\ninterface PipelineDescriptor {\n policy: PipelinePolicy;\n options: AddPolicyOptions;\n}\n\ninterface PolicyGraphNode {\n policy: PipelinePolicy;\n dependsOn: Set;\n dependants: Set;\n afterPhase?: Phase;\n}\n\ninterface Phase {\n name: PipelinePhase | \"None\";\n policies: Set;\n hasRun: boolean;\n hasAfterPolicies: boolean;\n}\n\n/**\n * A private implementation of Pipeline.\n * Do not export this class from the package.\n * @internal\n */\nclass HttpPipeline implements Pipeline {\n private _policies: PipelineDescriptor[] = [];\n private _orderedPolicies?: PipelinePolicy[];\n\n private constructor(policies?: PipelineDescriptor[]) {\n this._policies = policies?.slice(0) ?? [];\n this._orderedPolicies = undefined;\n }\n\n public addPolicy(policy: PipelinePolicy, options: AddPolicyOptions = {}): void {\n if (options.phase && options.afterPhase) {\n throw new Error(\"Policies inside a phase cannot specify afterPhase.\");\n }\n if (options.phase && !ValidPhaseNames.has(options.phase)) {\n throw new Error(`Invalid phase name: ${options.phase}`);\n }\n if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) {\n throw new Error(`Invalid afterPhase name: ${options.afterPhase}`);\n }\n this._policies.push({\n policy,\n options,\n });\n this._orderedPolicies = undefined;\n }\n\n public removePolicy(options: { name?: string; phase?: string }): PipelinePolicy[] {\n const removedPolicies: PipelinePolicy[] = [];\n\n this._policies = this._policies.filter((policyDescriptor) => {\n if (\n (options.name && policyDescriptor.policy.name === options.name) ||\n (options.phase && policyDescriptor.options.phase === options.phase)\n ) {\n removedPolicies.push(policyDescriptor.policy);\n return false;\n } else {\n return true;\n }\n });\n this._orderedPolicies = undefined;\n\n return removedPolicies;\n }\n\n public sendRequest(httpClient: HttpClient, request: PipelineRequest): Promise {\n const policies = this.getOrderedPolicies();\n\n const pipeline = policies.reduceRight(\n (next, policy) => {\n return (req: PipelineRequest) => {\n return policy.sendRequest(req, next);\n };\n },\n (req: PipelineRequest) => httpClient.sendRequest(req)\n );\n\n return pipeline(request);\n }\n\n public getOrderedPolicies(): PipelinePolicy[] {\n if (!this._orderedPolicies) {\n this._orderedPolicies = this.orderPolicies();\n }\n return this._orderedPolicies;\n }\n\n public clone(): Pipeline {\n return new HttpPipeline(this._policies);\n }\n\n public static create(): Pipeline {\n return new HttpPipeline();\n }\n\n private orderPolicies(): PipelinePolicy[] {\n /**\n * The goal of this method is to reliably order pipeline policies\n * based on their declared requirements when they were added.\n *\n * Order is first determined by phase:\n *\n * 1. Serialize Phase\n * 2. Policies not in a phase\n * 3. Deserialize Phase\n * 4. Retry Phase\n * 5. Sign Phase\n *\n * Within each phase, policies are executed in the order\n * they were added unless they were specified to execute\n * before/after other policies or after a particular phase.\n *\n * To determine the final order, we will walk the policy list\n * in phase order multiple times until all dependencies are\n * satisfied.\n *\n * `afterPolicies` are the set of policies that must be\n * executed before a given policy. This requirement is\n * considered satisfied when each of the listed policies\n * have been scheduled.\n *\n * `beforePolicies` are the set of policies that must be\n * executed after a given policy. Since this dependency\n * can be expressed by converting it into a equivalent\n * `afterPolicies` declarations, they are normalized\n * into that form for simplicity.\n *\n * An `afterPhase` dependency is considered satisfied when all\n * policies in that phase have scheduled.\n *\n */\n const result: PipelinePolicy[] = [];\n\n // Track all policies we know about.\n const policyMap: Map = new Map();\n\n function createPhase(name: PipelinePhase | \"None\"): Phase {\n return {\n name,\n policies: new Set(),\n hasRun: false,\n hasAfterPolicies: false,\n };\n }\n\n // Track policies for each phase.\n const serializePhase = createPhase(\"Serialize\");\n const noPhase = createPhase(\"None\");\n const deserializePhase = createPhase(\"Deserialize\");\n const retryPhase = createPhase(\"Retry\");\n const signPhase = createPhase(\"Sign\");\n\n // a list of phases in order\n const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase];\n\n // Small helper function to map phase name to each Phase\n function getPhase(phase: PipelinePhase | undefined): Phase {\n if (phase === \"Retry\") {\n return retryPhase;\n } else if (phase === \"Serialize\") {\n return serializePhase;\n } else if (phase === \"Deserialize\") {\n return deserializePhase;\n } else if (phase === \"Sign\") {\n return signPhase;\n } else {\n return noPhase;\n }\n }\n\n // First walk each policy and create a node to track metadata.\n for (const descriptor of this._policies) {\n const policy = descriptor.policy;\n const options = descriptor.options;\n const policyName = policy.name;\n if (policyMap.has(policyName)) {\n throw new Error(\"Duplicate policy names not allowed in pipeline\");\n }\n const node: PolicyGraphNode = {\n policy,\n dependsOn: new Set(),\n dependants: new Set(),\n };\n if (options.afterPhase) {\n node.afterPhase = getPhase(options.afterPhase);\n node.afterPhase.hasAfterPolicies = true;\n }\n policyMap.set(policyName, node);\n const phase = getPhase(options.phase);\n phase.policies.add(node);\n }\n\n // Now that each policy has a node, connect dependency references.\n for (const descriptor of this._policies) {\n const { policy, options } = descriptor;\n const policyName = policy.name;\n const node = policyMap.get(policyName);\n if (!node) {\n throw new Error(`Missing node for policy ${policyName}`);\n }\n\n if (options.afterPolicies) {\n for (const afterPolicyName of options.afterPolicies) {\n const afterNode = policyMap.get(afterPolicyName);\n if (afterNode) {\n // Linking in both directions helps later\n // when we want to notify dependants.\n node.dependsOn.add(afterNode);\n afterNode.dependants.add(node);\n }\n }\n }\n if (options.beforePolicies) {\n for (const beforePolicyName of options.beforePolicies) {\n const beforeNode = policyMap.get(beforePolicyName);\n if (beforeNode) {\n // To execute before another node, make it\n // depend on the current node.\n beforeNode.dependsOn.add(node);\n node.dependants.add(beforeNode);\n }\n }\n }\n }\n\n function walkPhase(phase: Phase): void {\n phase.hasRun = true;\n // Sets iterate in insertion order\n for (const node of phase.policies) {\n if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) {\n // If this node is waiting on a phase to complete,\n // we need to skip it for now.\n // Even if the phase is empty, we should wait for it\n // to be walked to avoid re-ordering policies.\n continue;\n }\n if (node.dependsOn.size === 0) {\n // If there's nothing else we're waiting for, we can\n // add this policy to the result list.\n result.push(node.policy);\n // Notify anything that depends on this policy that\n // the policy has been scheduled.\n for (const dependant of node.dependants) {\n dependant.dependsOn.delete(node);\n }\n policyMap.delete(node.policy.name);\n phase.policies.delete(node);\n }\n }\n }\n\n function walkPhases(): void {\n for (const phase of orderedPhases) {\n walkPhase(phase);\n // if the phase isn't complete\n if (phase.policies.size > 0 && phase !== noPhase) {\n if (!noPhase.hasRun) {\n // Try running noPhase to see if that unblocks this phase next tick.\n // This can happen if a phase that happens before noPhase\n // is waiting on a noPhase policy to complete.\n walkPhase(noPhase);\n }\n // Don't proceed to the next phase until this phase finishes.\n return;\n }\n\n if (phase.hasAfterPolicies) {\n // Run any policies unblocked by this phase\n walkPhase(noPhase);\n }\n }\n }\n\n // Iterate until we've put every node in the result list.\n let iteration = 0;\n while (policyMap.size > 0) {\n iteration++;\n const initialResultLength = result.length;\n // Keep walking each phase in order until we can order every node.\n walkPhases();\n // The result list *should* get at least one larger each time\n // after the first full pass.\n // Otherwise, we're going to loop forever.\n if (result.length <= initialResultLength && iteration > 1) {\n throw new Error(\"Cannot satisfy policy dependencies due to requirements cycle.\");\n }\n }\n\n return result;\n }\n}\n\n/**\n * Creates a totally empty pipeline.\n * Useful for testing or creating a custom one.\n */\nexport function createEmptyPipeline(): Pipeline {\n return HttpPipeline.create();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipelineRequest.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipelineRequest.js deleted file mode 100644 index d93797c..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipelineRequest.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createHttpHeaders } from "./httpHeaders"; -import { randomUUID } from "@azure/core-util"; -class PipelineRequestImpl { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : createHttpHeaders(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || randomUUID(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } -} -/** - * Creates a new pipeline request with the given options. - * This method is to allow for the easy setting of default values and not required. - * @param options - The options to create the request with. - */ -export function createPipelineRequest(options) { - return new PipelineRequestImpl(options); -} -//# sourceMappingURL=pipelineRequest.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipelineRequest.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipelineRequest.js.map deleted file mode 100644 index f7cbdfb..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipelineRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipelineRequest.js","sourceRoot":"","sources":["../../src/pipelineRequest.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAmG9C,MAAM,mBAAmB;IAoBvB,YAAY,OAA+B;;QACzC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,iBAAiB,EAAE,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,KAAK,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,CAAC,CAAC;QACpC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,gBAAgB,GAAG,MAAA,OAAO,CAAC,gBAAgB,mCAAI,KAAK,CAAC;QAC1D,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,CAAC,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC;QACnE,IAAI,CAAC,eAAe,GAAG,MAAA,OAAO,CAAC,eAAe,mCAAI,KAAK,CAAC;QACxD,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAC7C,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,UAAU,EAAE,CAAC;QACnD,IAAI,CAAC,uBAAuB,GAAG,MAAA,OAAO,CAAC,uBAAuB,mCAAI,KAAK,CAAC;QACxE,IAAI,CAAC,oBAAoB,GAAG,MAAA,OAAO,CAAC,oBAAoB,mCAAI,KAAK,CAAC;IACpE,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAA+B;IACnE,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n FormDataMap,\n HttpHeaders,\n HttpMethods,\n PipelineRequest,\n ProxySettings,\n RequestBodyType,\n TransferProgressEvent,\n} from \"./interfaces\";\nimport { createHttpHeaders } from \"./httpHeaders\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { randomUUID } from \"@azure/core-util\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * Settings to initialize a request.\n * Almost equivalent to Partial, but url is mandatory.\n */\nexport interface PipelineRequestOptions {\n /**\n * The URL to make the request to.\n */\n url: string;\n\n /**\n * The HTTP method to use when making the request.\n */\n method?: HttpMethods;\n\n /**\n * The HTTP headers to use when making the request.\n */\n headers?: HttpHeaders;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n * Defaults to 0, which disables the timeout.\n */\n timeout?: number;\n\n /**\n * If credentials (cookies) should be sent along during an XHR.\n * Defaults to false.\n */\n withCredentials?: boolean;\n\n /**\n * A unique identifier for the request. Used for logging and tracing.\n */\n requestId?: string;\n\n /**\n * The HTTP body content (if any)\n */\n body?: RequestBodyType;\n\n /**\n * To simulate a browser form post\n */\n formData?: FormDataMap;\n\n /**\n * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream.\n */\n streamResponseStatusCodes?: Set;\n\n /**\n * BROWSER ONLY\n *\n * A browser only option to enable use of the Streams API. If this option is set and streaming is used\n * (see `streamResponseStatusCodes`), the response will have a property `browserStream` instead of\n * `blobBody` which will be undefined.\n *\n * Default value is false\n */\n enableBrowserStreams?: boolean;\n\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n\n /**\n * If the connection should not be reused.\n */\n disableKeepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Options used to create a span when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Set to true if the request is sent over HTTP instead of HTTPS */\n allowInsecureConnection?: boolean;\n}\n\nclass PipelineRequestImpl implements PipelineRequest {\n public url: string;\n public method: HttpMethods;\n public headers: HttpHeaders;\n public timeout: number;\n public withCredentials: boolean;\n public body?: RequestBodyType;\n public formData?: FormDataMap;\n public streamResponseStatusCodes?: Set;\n public enableBrowserStreams: boolean;\n\n public proxySettings?: ProxySettings;\n public disableKeepAlive: boolean;\n public abortSignal?: AbortSignalLike;\n public requestId: string;\n public tracingOptions?: OperationTracingOptions;\n public allowInsecureConnection?: boolean;\n public onUploadProgress?: (progress: TransferProgressEvent) => void;\n public onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n constructor(options: PipelineRequestOptions) {\n this.url = options.url;\n this.body = options.body;\n this.headers = options.headers ?? createHttpHeaders();\n this.method = options.method ?? \"GET\";\n this.timeout = options.timeout ?? 0;\n this.formData = options.formData;\n this.disableKeepAlive = options.disableKeepAlive ?? false;\n this.proxySettings = options.proxySettings;\n this.streamResponseStatusCodes = options.streamResponseStatusCodes;\n this.withCredentials = options.withCredentials ?? false;\n this.abortSignal = options.abortSignal;\n this.tracingOptions = options.tracingOptions;\n this.onUploadProgress = options.onUploadProgress;\n this.onDownloadProgress = options.onDownloadProgress;\n this.requestId = options.requestId || randomUUID();\n this.allowInsecureConnection = options.allowInsecureConnection ?? false;\n this.enableBrowserStreams = options.enableBrowserStreams ?? false;\n }\n}\n\n/**\n * Creates a new pipeline request with the given options.\n * This method is to allow for the easy setting of default values and not required.\n * @param options - The options to create the request with.\n */\nexport function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest {\n return new PipelineRequestImpl(options);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/auxiliaryAuthenticationHeaderPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/auxiliaryAuthenticationHeaderPolicy.js deleted file mode 100644 index 72865de..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/auxiliaryAuthenticationHeaderPolicy.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createTokenCycler } from "../util/tokenCycler"; -import { logger as coreLogger } from "../log"; -/** - * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. - */ -export const auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; -const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; -async function sendAuthorizeRequest(options) { - var _a, _b; - const { scopes, getAccessToken, request } = options; - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - }; - return (_b = (_a = (await getAccessToken(scopes, getTokenOptions))) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; -} -/** - * A policy for external tokens to `x-ms-authorization-auxiliary` header. - * This header will be used when creating a cross-tenant application we may need to handle authentication requests - * for resources that are in different tenants. - * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works - */ -export function auxiliaryAuthenticationHeaderPolicy(options) { - const { credentials, scopes } = options; - const logger = options.logger || coreLogger; - const tokenCyclerMap = new WeakMap(); - return { - name: auxiliaryAuthenticationHeaderPolicyName, - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); - } - if (!credentials || credentials.length === 0) { - logger.info(`${auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); - return next(request); - } - const tokenPromises = []; - for (const credential of credentials) { - let getAccessToken = tokenCyclerMap.get(credential); - if (!getAccessToken) { - getAccessToken = createTokenCycler(credential); - tokenCyclerMap.set(credential, getAccessToken); - } - tokenPromises.push(sendAuthorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger, - })); - } - const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); - if (auxiliaryTokens.length === 0) { - logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); - return next(request); - } - request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); - return next(request); - }, - }; -} -//# sourceMappingURL=auxiliaryAuthenticationHeaderPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/auxiliaryAuthenticationHeaderPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/auxiliaryAuthenticationHeaderPolicy.js.map deleted file mode 100644 index 2d8eb23..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/auxiliaryAuthenticationHeaderPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auxiliaryAuthenticationHeaderPolicy.js","sourceRoot":"","sources":["../../../src/policies/auxilia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redential } from \"@azure/core-auth\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { AccessTokenGetter, createTokenCycler } from \"../util/tokenCycler\";\nimport { logger as coreLogger } from \"../log\";\nimport { AuthorizeRequestOptions } from \"./bearerTokenAuthenticationPolicy\";\n\n/**\n * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy.\n */\nexport const auxiliaryAuthenticationHeaderPolicyName = \"auxiliaryAuthenticationHeaderPolicy\";\nconst AUTHORIZATION_AUXILIARY_HEADER = \"x-ms-authorization-auxiliary\";\n\n/**\n * Options to configure the auxiliaryAuthenticationHeaderPolicy\n */\nexport interface AuxiliaryAuthenticationHeaderPolicyOptions {\n /**\n * TokenCredential list used to get token from auxiliary tenants and\n * one credential for each tenant the client may need to access\n */\n credentials?: TokenCredential[];\n /**\n * Scopes depend on the cloud your application runs in\n */\n scopes: string | string[];\n /**\n * A logger can be sent for debugging purposes.\n */\n logger?: AzureLogger;\n}\n\nasync function sendAuthorizeRequest(options: AuthorizeRequestOptions): Promise {\n const { scopes, getAccessToken, request } = options;\n const getTokenOptions: GetTokenOptions = {\n abortSignal: request.abortSignal,\n tracingOptions: request.tracingOptions,\n };\n\n return (await getAccessToken(scopes, getTokenOptions))?.token ?? \"\";\n}\n\n/**\n * A policy for external tokens to `x-ms-authorization-auxiliary` header.\n * This header will be used when creating a cross-tenant application we may need to handle authentication requests\n * for resources that are in different tenants.\n * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works\n */\nexport function auxiliaryAuthenticationHeaderPolicy(\n options: AuxiliaryAuthenticationHeaderPolicyOptions\n): PipelinePolicy {\n const { credentials, scopes } = options;\n const logger = options.logger || coreLogger;\n const tokenCyclerMap = new WeakMap();\n\n return {\n name: auxiliaryAuthenticationHeaderPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\n \"Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.\"\n );\n }\n if (!credentials || credentials.length === 0) {\n logger.info(\n `${auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`\n );\n return next(request);\n }\n\n const tokenPromises: Promise[] = [];\n for (const credential of credentials) {\n let getAccessToken = tokenCyclerMap.get(credential);\n if (!getAccessToken) {\n getAccessToken = createTokenCycler(credential);\n tokenCyclerMap.set(credential, getAccessToken);\n }\n tokenPromises.push(\n sendAuthorizeRequest({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n getAccessToken,\n logger,\n })\n );\n }\n const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token));\n if (auxiliaryTokens.length === 0) {\n logger.warning(\n `None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`\n );\n return next(request);\n }\n request.headers.set(\n AUTHORIZATION_AUXILIARY_HEADER,\n auxiliaryTokens.map((token) => `Bearer ${token}`).join(\", \")\n );\n\n return next(request);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/bearerTokenAuthenticationPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/bearerTokenAuthenticationPolicy.js deleted file mode 100644 index 57681d7..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/bearerTokenAuthenticationPolicy.js +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createTokenCycler } from "../util/tokenCycler"; -import { logger as coreLogger } from "../log"; -/** - * The programmatic identifier of the bearerTokenAuthenticationPolicy. - */ -export const bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; -/** - * Default authorize request handler - */ -async function defaultAuthorizeRequest(options) { - const { scopes, getAccessToken, request } = options; - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - }; - const accessToken = await getAccessToken(scopes, getTokenOptions); - if (accessToken) { - options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); - } -} -/** - * We will retrieve the challenge only if the response status code was 401, - * and if the response contained the header "WWW-Authenticate" with a non-empty value. - */ -function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; - } - return; -} -/** - * A policy that can request a token from a TokenCredential implementation and - * then apply it to the Authorization header of a request as a Bearer token. - */ -export function bearerTokenAuthenticationPolicy(options) { - var _a; - const { credential, scopes, challengeCallbacks } = options; - const logger = options.logger || coreLogger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); - // This function encapsulates the entire process of reliably retrieving the token - // The options are left out of the public API until there's demand to configure this. - // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions` - // in order to pass through the `options` object. - const getAccessToken = credential - ? createTokenCycler(credential /* , options */) - : () => Promise.resolve(null); - return { - name: bearerTokenAuthenticationPolicyName, - /** - * If there's no challenge parameter: - * - It will try to retrieve the token using the cache, or the credential's getToken. - * - Then it will try the next policy with or without the retrieved token. - * - * It uses the challenge parameters to: - * - Skip a first attempt to get the token from the credential if there's no cached token, - * since it expects the token to be retrievable only after the challenge. - * - Prepare the outgoing request if the `prepareRequest` method has been provided. - * - Send an initial request to receive the challenge if it fails. - * - Process a challenge if the response contains it. - * - Retrieve a token with the challenge information, then re-send the request. - */ - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); - } - await callbacks.authorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger, - }); - let response; - let error; - try { - response = await next(request); - } - catch (err) { - error = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && - (response === null || response === void 0 ? void 0 : response.status) === 401 && - getChallenge(response)) { - // processes challenge - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger, - }); - if (shouldSendRequest) { - return next(request); - } - } - if (error) { - throw error; - } - else { - return response; - } - }, - }; -} -//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/bearerTokenAuthenticationPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/bearerTokenAuthenticationPolicy.js.map deleted file mode 100644 index 28571ba..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/bearerTokenAuthenticationPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bearerTokenAuthenticationPolicy.js","sourceRoot":"","sources":["../../../src/policies/bearerTokenAuthenticationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,iCAAiC,CAAC;AA2FrF;;GAEG;AACH,KAAK,UAAU,uBAAuB,CAAC,OAAgC;IACrE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACpD,MAAM,eAAe,GAAoB;QACvC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC;IACF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ken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { createTokenCycler } from \"../util/tokenCycler\";\nimport { logger as coreLogger } from \"../log\";\n\n/**\n * The programmatic identifier of the bearerTokenAuthenticationPolicy.\n */\nexport const bearerTokenAuthenticationPolicyName = \"bearerTokenAuthenticationPolicy\";\n\n/**\n * Options sent to the authorizeRequest callback\n */\nexport interface AuthorizeRequestOptions {\n /**\n * The scopes for which the bearer token applies.\n */\n scopes: string[];\n /**\n * Function that retrieves either a cached access token or a new access token.\n */\n getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise;\n /**\n * Request that the policy is trying to fulfill.\n */\n request: PipelineRequest;\n /**\n * A logger, if one was sent through the HTTP pipeline.\n */\n logger?: AzureLogger;\n}\n\n/**\n * Options sent to the authorizeRequestOnChallenge callback\n */\nexport interface AuthorizeRequestOnChallengeOptions {\n /**\n * The scopes for which the bearer token applies.\n */\n scopes: string[];\n /**\n * Function that retrieves either a cached access token or a new access token.\n */\n getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise;\n /**\n * Request that the policy is trying to fulfill.\n */\n request: PipelineRequest;\n /**\n * Response containing the challenge.\n */\n response: PipelineResponse;\n /**\n * A logger, if one was sent through the HTTP pipeline.\n */\n logger?: AzureLogger;\n}\n\n/**\n * Options to override the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges.\n */\nexport interface ChallengeCallbacks {\n /**\n * Allows for the authorization of the main request of this policy before it's sent.\n */\n authorizeRequest?(options: AuthorizeRequestOptions): Promise;\n /**\n * Allows to handle authentication challenges and to re-authorize the request.\n * The response containing the challenge is `options.response`.\n * If this method returns true, the underlying request will be sent once again.\n * The request may be modified before being sent.\n */\n authorizeRequestOnChallenge?(options: AuthorizeRequestOnChallengeOptions): Promise;\n}\n\n/**\n * Options to configure the bearerTokenAuthenticationPolicy\n */\nexport interface BearerTokenAuthenticationPolicyOptions {\n /**\n * The TokenCredential implementation that can supply the bearer token.\n */\n credential?: TokenCredential;\n /**\n * The scopes for which the bearer token applies.\n */\n scopes: string | string[];\n /**\n * Allows for the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges.\n * If provided, it must contain at least the `authorizeRequestOnChallenge` method.\n * If provided, after a request is sent, if it has a challenge, it can be processed to re-send the original request with the relevant challenge information.\n */\n challengeCallbacks?: ChallengeCallbacks;\n /**\n * A logger can be sent for debugging purposes.\n */\n logger?: AzureLogger;\n}\n\n/**\n * Default authorize request handler\n */\nasync function defaultAuthorizeRequest(options: AuthorizeRequestOptions): Promise {\n const { scopes, getAccessToken, request } = options;\n const getTokenOptions: GetTokenOptions = {\n abortSignal: request.abortSignal,\n tracingOptions: request.tracingOptions,\n };\n const accessToken = await getAccessToken(scopes, getTokenOptions);\n\n if (accessToken) {\n options.request.headers.set(\"Authorization\", `Bearer ${accessToken.token}`);\n }\n}\n\n/**\n * We will retrieve the challenge only if the response status code was 401,\n * and if the response contained the header \"WWW-Authenticate\" with a non-empty value.\n */\nfunction getChallenge(response: PipelineResponse): string | undefined {\n const challenge = response.headers.get(\"WWW-Authenticate\");\n if (response.status === 401 && challenge) {\n return challenge;\n }\n return;\n}\n\n/**\n * A policy that can request a token from a TokenCredential implementation and\n * then apply it to the Authorization header of a request as a Bearer token.\n */\nexport function bearerTokenAuthenticationPolicy(\n options: BearerTokenAuthenticationPolicyOptions\n): PipelinePolicy {\n const { credential, scopes, challengeCallbacks } = options;\n const logger = options.logger || coreLogger;\n const callbacks = {\n authorizeRequest: challengeCallbacks?.authorizeRequest ?? defaultAuthorizeRequest,\n authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge,\n // keep all other properties\n ...challengeCallbacks,\n };\n\n // This function encapsulates the entire process of reliably retrieving the token\n // The options are left out of the public API until there's demand to configure this.\n // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions`\n // in order to pass through the `options` object.\n const getAccessToken = credential\n ? createTokenCycler(credential /* , options */)\n : () => Promise.resolve(null);\n\n return {\n name: bearerTokenAuthenticationPolicyName,\n /**\n * If there's no challenge parameter:\n * - It will try to retrieve the token using the cache, or the credential's getToken.\n * - Then it will try the next policy with or without the retrieved token.\n *\n * It uses the challenge parameters to:\n * - Skip a first attempt to get the token from the credential if there's no cached token,\n * since it expects the token to be retrievable only after the challenge.\n * - Prepare the outgoing request if the `prepareRequest` method has been provided.\n * - Send an initial request to receive the challenge if it fails.\n * - Process a challenge if the response contains it.\n * - Retrieve a token with the challenge information, then re-send the request.\n */\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\n \"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\"\n );\n }\n\n await callbacks.authorizeRequest({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n getAccessToken,\n logger,\n });\n\n let response: PipelineResponse;\n let error: Error | undefined;\n try {\n response = await next(request);\n } catch (err: any) {\n error = err;\n response = err.response;\n }\n\n if (\n callbacks.authorizeRequestOnChallenge &&\n response?.status === 401 &&\n getChallenge(response)\n ) {\n // processes challenge\n const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n response,\n getAccessToken,\n logger,\n });\n\n if (shouldSendRequest) {\n return next(request);\n }\n }\n\n if (error) {\n throw error;\n } else {\n return response;\n }\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.browser.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.browser.js deleted file mode 100644 index 2b14e03..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.browser.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/* - * NOTE: When moving this file, please update "browser" section in package.json - */ -const NotSupported = new Error("decompressResponsePolicy is not supported in browser environment"); -export const decompressResponsePolicyName = "decompressResponsePolicy"; -/** - * decompressResponsePolicy is not supported in the browser and attempting - * to use it will raise an error. - */ -export function decompressResponsePolicy() { - throw NotSupported; -} -//# sourceMappingURL=decompressResponsePolicy.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.browser.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.browser.js.map deleted file mode 100644 index 81a241c..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decompressResponsePolicy.browser.js","sourceRoot":"","sources":["../../../src/policies/decompressResponsePolicy.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AAEH,MAAM,YAAY,GAAG,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;AAEnG,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAEvE;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,YAAY,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n */\n\nconst NotSupported = new Error(\"decompressResponsePolicy is not supported in browser environment\");\n\nexport const decompressResponsePolicyName = \"decompressResponsePolicy\";\n\n/**\n * decompressResponsePolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function decompressResponsePolicy(): never {\n throw NotSupported;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.js deleted file mode 100644 index 40e4ac7..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the decompressResponsePolicy. - */ -export const decompressResponsePolicyName = "decompressResponsePolicy"; -/** - * A policy to enable response decompression according to Accept-Encoding header - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding - */ -export function decompressResponsePolicy() { - return { - name: decompressResponsePolicyName, - async sendRequest(request, next) { - // HEAD requests have no body - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - }, - }; -} -//# sourceMappingURL=decompressResponsePolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.js.map deleted file mode 100644 index 13aac89..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decompressResponsePolicy.js","sourceRoot":"","sources":["../../../src/policies/decompressResponsePolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAEvE;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,OAAO;QACL,IAAI,EAAE,4BAA4B;QAClC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,6BAA6B;YAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE;gBAC7B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;aACxD;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the decompressResponsePolicy.\n */\nexport const decompressResponsePolicyName = \"decompressResponsePolicy\";\n\n/**\n * A policy to enable response decompression according to Accept-Encoding header\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding\n */\nexport function decompressResponsePolicy(): PipelinePolicy {\n return {\n name: decompressResponsePolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n // HEAD requests have no body\n if (request.method !== \"HEAD\") {\n request.headers.set(\"Accept-Encoding\", \"gzip,deflate\");\n }\n return next(request);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/defaultRetryPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/defaultRetryPolicy.js deleted file mode 100644 index 77317a5..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/defaultRetryPolicy.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { exponentialRetryStrategy } from "../retryStrategies/exponentialRetryStrategy"; -import { throttlingRetryStrategy } from "../retryStrategies/throttlingRetryStrategy"; -import { retryPolicy } from "./retryPolicy"; -import { DEFAULT_RETRY_POLICY_COUNT } from "../constants"; -/** - * Name of the {@link defaultRetryPolicy} - */ -export const defaultRetryPolicyName = "defaultRetryPolicy"; -/** - * A policy that retries according to three strategies: - * - When the server sends a 429 response with a Retry-After header. - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. - */ -export function defaultRetryPolicy(options = {}) { - var _a; - return { - name: defaultRetryPolicyName, - sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; -} -//# sourceMappingURL=defaultRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/defaultRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/defaultRetryPolicy.js.map deleted file mode 100644 index 8fcd1ea..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/defaultRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultRetryPolicy.js","sourceRoot":"","sources":["../../../src/policies/defaultRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAO3D;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAqC,EAAE;;IACxE,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,WAAW,CAAC,CAAC,uBAAuB,EAAE,EAAE,wBAAwB,CAAC,OAAO,CAAC,CAAC,EAAE;YACvF,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,0BAA0B;SAC7D,CAAC,CAAC,WAAW;KACf,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRetryOptions } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * Name of the {@link defaultRetryPolicy}\n */\nexport const defaultRetryPolicyName = \"defaultRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface DefaultRetryPolicyOptions extends PipelineRetryOptions {}\n\n/**\n * A policy that retries according to three strategies:\n * - When the server sends a 429 response with a Retry-After header.\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay.\n */\nexport function defaultRetryPolicy(options: DefaultRetryPolicyOptions = {}): PipelinePolicy {\n return {\n name: defaultRetryPolicyName,\n sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }).sendRequest,\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/exponentialRetryPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/exponentialRetryPolicy.js deleted file mode 100644 index a3161c0..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/exponentialRetryPolicy.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { exponentialRetryStrategy } from "../retryStrategies/exponentialRetryStrategy"; -import { retryPolicy } from "./retryPolicy"; -import { DEFAULT_RETRY_POLICY_COUNT } from "../constants"; -/** - * The programmatic identifier of the exponentialRetryPolicy. - */ -export const exponentialRetryPolicyName = "exponentialRetryPolicy"; -/** - * A policy that attempts to retry requests while introducing an exponentially increasing delay. - * @param options - Options that configure retry logic. - */ -export function exponentialRetryPolicy(options = {}) { - var _a; - return retryPolicy([ - exponentialRetryStrategy(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }); -} -//# sourceMappingURL=exponentialRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/exponentialRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/exponentialRetryPolicy.js.map deleted file mode 100644 index 48c1be7..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/exponentialRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exponentialRetryPolicy.js","sourceRoot":"","sources":["../../../src/policies/exponentialRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAyBnE;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAyC,EAAE;;IAE3C,OAAO,WAAW,CAChB;QACE,wBAAwB,iCACnB,OAAO,KACV,kBAAkB,EAAE,IAAI,IACxB;KACH,EACD;QACE,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,0BAA0B;KAC7D,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * The programmatic identifier of the exponentialRetryPolicy.\n */\nexport const exponentialRetryPolicyName = \"exponentialRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface ExponentialRetryPolicyOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second.) The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * A policy that attempts to retry requests while introducing an exponentially increasing delay.\n * @param options - Options that configure retry logic.\n */\nexport function exponentialRetryPolicy(\n options: ExponentialRetryPolicyOptions = {}\n): PipelinePolicy {\n return retryPolicy(\n [\n exponentialRetryStrategy({\n ...options,\n ignoreSystemErrors: true,\n }),\n ],\n {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.browser.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.browser.js deleted file mode 100644 index 393bfe0..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.browser.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the formDataPolicy. - */ -export const formDataPolicyName = "formDataPolicy"; -/** - * A policy that encodes FormData on the request into the body. - */ -export function formDataPolicy() { - return { - name: formDataPolicyName, - async sendRequest(request, next) { - if (request.formData) { - const formData = request.formData; - const requestForm = new FormData(); - for (const formKey of Object.keys(formData)) { - const formValue = formData[formKey]; - if (Array.isArray(formValue)) { - for (const subValue of formValue) { - requestForm.append(formKey, subValue); - } - } - else { - requestForm.append(formKey, formValue); - } - } - request.body = requestForm; - request.formData = undefined; - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { - request.body = new URLSearchParams(requestForm).toString(); - } - else if (contentType && contentType.indexOf("multipart/form-data") !== -1) { - // browser will automatically apply a suitable content-type header - request.headers.delete("Content-Type"); - } - } - return next(request); - }, - }; -} -//# sourceMappingURL=formDataPolicy.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.browser.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.browser.js.map deleted file mode 100644 index ae73969..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"formDataPolicy.browser.js","sourceRoot":"","sources":["../../../src/policies/formDataPolicy.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,OAAO,CAAC,QAAQ,EAAE;gBACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;gBAClC,MAAM,WAAW,GAAG,IAAI,QAAQ,EAAE,CAAC;gBACnC,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBAC3C,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;oBACpC,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;wBAC5B,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;4BAChC,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;yBACvC;qBACF;yBAAM;wBACL,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;qBACxC;iBACF;gBAED,OAAO,CAAC,IAAI,GAAG,WAAW,CAAC;gBAC3B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;gBAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;gBACxD,IAAI,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,mCAAmC,CAAC,KAAK,CAAC,CAAC,EAAE;oBAClF,OAAO,CAAC,IAAI,GAAG,IAAI,eAAe,CAAC,WAAkB,CAAC,CAAC,QAAQ,EAAE,CAAC;iBACnE;qBAAM,IAAI,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE;oBAC3E,kEAAkE;oBAClE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;iBACxC;aACF;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the formDataPolicy.\n */\nexport const formDataPolicyName = \"formDataPolicy\";\n\n/**\n * A policy that encodes FormData on the request into the body.\n */\nexport function formDataPolicy(): PipelinePolicy {\n return {\n name: formDataPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (request.formData) {\n const formData = request.formData;\n const requestForm = new FormData();\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (const subValue of formValue) {\n requestForm.append(formKey, subValue);\n }\n } else {\n requestForm.append(formKey, formValue);\n }\n }\n\n request.body = requestForm;\n request.formData = undefined;\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"application/x-www-form-urlencoded\") !== -1) {\n request.body = new URLSearchParams(requestForm as any).toString();\n } else if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n // browser will automatically apply a suitable content-type header\n request.headers.delete(\"Content-Type\");\n }\n }\n return next(request);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js deleted file mode 100644 index 4b492b5..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import FormData from "form-data"; -/** - * The programmatic identifier of the formDataPolicy. - */ -export const formDataPolicyName = "formDataPolicy"; -/** - * A policy that encodes FormData on the request into the body. - */ -export function formDataPolicy() { - return { - name: formDataPolicyName, - async sendRequest(request, next) { - if (request.formData) { - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { - request.body = wwwFormUrlEncode(request.formData); - request.formData = undefined; - } - else { - await prepareFormData(request.formData, request); - } - } - return next(request); - }, - }; -} -function wwwFormUrlEncode(formData) { - const urlSearchParams = new URLSearchParams(); - for (const [key, value] of Object.entries(formData)) { - if (Array.isArray(value)) { - for (const subValue of value) { - urlSearchParams.append(key, subValue.toString()); - } - } - else { - urlSearchParams.append(key, value.toString()); - } - } - return urlSearchParams.toString(); -} -async function prepareFormData(formData, request) { - const requestForm = new FormData(); - for (const formKey of Object.keys(formData)) { - const formValue = formData[formKey]; - if (Array.isArray(formValue)) { - for (const subValue of formValue) { - requestForm.append(formKey, subValue); - } - } - else { - requestForm.append(formKey, formValue); - } - } - request.body = requestForm; - request.formData = undefined; - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("multipart/form-data") !== -1) { - request.headers.set("Content-Type", `multipart/form-data; boundary=${requestForm.getBoundary()}`); - } - try { - const contentLength = await new Promise((resolve, reject) => { - requestForm.getLength((err, length) => { - if (err) { - reject(err); - } - else { - resolve(length); - } - }); - }); - request.headers.set("Content-Length", contentLength); - } - catch (e) { - // ignore setting the length if this fails - } -} -//# sourceMappingURL=formDataPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js.map deleted file mode 100644 index 38e12fa..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"formDataPolicy.js","sourceRoot":"","sources":["../../../src/policies/formDataPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,QAAQ,MAAM,WAAW,CAAC;AAIjC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,OAAO,CAAC,QAAQ,EAAE;gBACpB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;gBACxD,IAAI,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,mCAAmC,CAAC,KAAK,CAAC,CAAC,EAAE;oBAClF,OAAO,CAAC,IAAI,GAA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E,SAAS,CAAC,CAAC;SACxC;KACF;IAED,OAAO,CAAC,IAAI,GAAG,WAAW,CAAC;IAC3B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACxD,IAAI,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE;QACpE,OAAO,CAAC,OAAO,CAAC,GAAG,CACjB,cAAc,EACd,iCAAiC,WAAW,CAAC,WAAW,EAAE,EAAE,CAC7D,CAAC;KACH;IACD,IAAI;QACF,MAAM,aAAa,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClE,WAAW,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;gBACpC,IAAI,GAAG,EAAE;oBACP,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;qBAAM;oBACL,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;KACtD;IAAC,OAAO,CAAM,EAAE;QACf,0CAA0C;KAC3C;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport FormData from \"form-data\";\nimport { FormDataMap, PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the formDataPolicy.\n */\nexport const formDataPolicyName = \"formDataPolicy\";\n\n/**\n * A policy that encodes FormData on the request into the body.\n */\nexport function formDataPolicy(): PipelinePolicy {\n return {\n name: formDataPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (request.formData) {\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"application/x-www-form-urlencoded\") !== -1) {\n request.body = wwwFormUrlEncode(request.formData);\n request.formData = undefined;\n } else {\n await prepareFormData(request.formData, request);\n }\n }\n return next(request);\n },\n };\n}\n\nfunction wwwFormUrlEncode(formData: FormDataMap): string {\n const urlSearchParams = new URLSearchParams();\n for (const [key, value] of Object.entries(formData)) {\n if (Array.isArray(value)) {\n for (const subValue of value) {\n urlSearchParams.append(key, subValue.toString());\n }\n } else {\n urlSearchParams.append(key, value.toString());\n }\n }\n return urlSearchParams.toString();\n}\n\nasync function prepareFormData(formData: FormDataMap, request: PipelineRequest): Promise {\n const requestForm = new FormData();\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (const subValue of formValue) {\n requestForm.append(formKey, subValue);\n }\n } else {\n requestForm.append(formKey, formValue);\n }\n }\n\n request.body = requestForm;\n request.formData = undefined;\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n request.headers.set(\n \"Content-Type\",\n `multipart/form-data; boundary=${requestForm.getBoundary()}`\n );\n }\n try {\n const contentLength = await new Promise((resolve, reject) => {\n requestForm.getLength((err, length) => {\n if (err) {\n reject(err);\n } else {\n resolve(length);\n }\n });\n });\n request.headers.set(\"Content-Length\", contentLength);\n } catch (e: any) {\n // ignore setting the length if this fails\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/logPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/logPolicy.js deleted file mode 100644 index 26576bc..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/logPolicy.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { logger as coreLogger } from "../log"; -import { Sanitizer } from "../util/sanitizer"; -/** - * The programmatic identifier of the logPolicy. - */ -export const logPolicyName = "logPolicy"; -/** - * A policy that logs all requests and responses. - * @param options - Options to configure logPolicy. - */ -export function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : coreLogger.info; - const sanitizer = new Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, - }); - return { - name: logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - }, - }; -} -//# sourceMappingURL=logPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/logPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/logPolicy.js.map deleted file mode 100644 index 1c1e2d5..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/logPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logPolicy.js","sourceRoot":"","sources":["../../../src/policies/logPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AA4BzC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,UAA4B,EAAE;;IACtD,MAAM,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,UAAU,CAAC,IAAI,CAAC;IACjD,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;QAC9B,4BAA4B,EAAE,OAAO,CAAC,4BAA4B;QAClE,gCAAgC,EAAE,OAAO,CAAC,gCAAgC;KAC3E,CAAC,CAAC;IACH,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;gBACnB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;aACtB;YAED,MAAM,CAAC,YAAY,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAElD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC;YAErC,MAAM,CAAC,yBAAyB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YACnD,MAAM,CAAC,YAAY,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAE3D,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Debugger } from \"@azure/logger\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { logger as coreLogger } from \"../log\";\nimport { Sanitizer } from \"../util/sanitizer\";\n\n/**\n * The programmatic identifier of the logPolicy.\n */\nexport const logPolicyName = \"logPolicy\";\n\n/**\n * Options to configure the logPolicy.\n */\nexport interface LogPolicyOptions {\n /**\n * Header names whose values will be logged when logging is enabled.\n * Defaults include a list of well-known safe headers. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n */\n additionalAllowedHeaderNames?: string[];\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n */\n additionalAllowedQueryParameters?: string[];\n\n /**\n * The log function to use for writing pipeline logs.\n * Defaults to core-http's built-in logger.\n * Compatible with the `debug` library.\n */\n logger?: Debugger;\n}\n\n/**\n * A policy that logs all requests and responses.\n * @param options - Options to configure logPolicy.\n */\nexport function logPolicy(options: LogPolicyOptions = {}): PipelinePolicy {\n const logger = options.logger ?? coreLogger.info;\n const sanitizer = new Sanitizer({\n additionalAllowedHeaderNames: options.additionalAllowedHeaderNames,\n additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n });\n return {\n name: logPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!logger.enabled) {\n return next(request);\n }\n\n logger(`Request: ${sanitizer.sanitize(request)}`);\n\n const response = await next(request);\n\n logger(`Response status code: ${response.status}`);\n logger(`Headers: ${sanitizer.sanitize(response.headers)}`);\n\n return response;\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/ndJsonPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/ndJsonPolicy.js deleted file mode 100644 index 3b1fa6f..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/ndJsonPolicy.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the ndJsonPolicy. - */ -export const ndJsonPolicyName = "ndJsonPolicy"; -/** - * ndJsonPolicy is a policy used to control keep alive settings for every request. - */ -export function ndJsonPolicy() { - return { - name: ndJsonPolicyName, - async sendRequest(request, next) { - // There currently isn't a good way to bypass the serializer - if (typeof request.body === "string" && request.body.startsWith("[")) { - const body = JSON.parse(request.body); - if (Array.isArray(body)) { - request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); - } - } - return next(request); - }, - }; -} -//# sourceMappingURL=ndJsonPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/ndJsonPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/ndJsonPolicy.js.map deleted file mode 100644 index 246e2e6..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/ndJsonPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ndJsonPolicy.js","sourceRoot":"","sources":["../../../src/policies/ndJsonPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,4DAA4D;YAC5D,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;gBACpE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBACvB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;iBACzE;aACF;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the ndJsonPolicy.\n */\nexport const ndJsonPolicyName = \"ndJsonPolicy\";\n\n/**\n * ndJsonPolicy is a policy used to control keep alive settings for every request.\n */\nexport function ndJsonPolicy(): PipelinePolicy {\n return {\n name: ndJsonPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n // There currently isn't a good way to bypass the serializer\n if (typeof request.body === \"string\" && request.body.startsWith(\"[\")) {\n const body = JSON.parse(request.body);\n if (Array.isArray(body)) {\n request.body = body.map((item) => JSON.stringify(item) + \"\\n\").join(\"\");\n }\n }\n return next(request);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.browser.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.browser.js deleted file mode 100644 index e10ab5e..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.browser.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/* - * NOTE: When moving this file, please update "browser" section in package.json - */ -const NotSupported = new Error("proxyPolicy is not supported in browser environment"); -export const proxyPolicyName = "proxyPolicy"; -export function getDefaultProxySettings() { - throw NotSupported; -} -/** - * proxyPolicy is not supported in the browser and attempting - * to use it will raise an error. - */ -export function proxyPolicy() { - throw NotSupported; -} -/** - * A function to reset the cached agents. - * proxyPolicy is not supported in the browser and attempting - * to use it will raise an error. - * @internal - */ -export function resetCachedProxyAgents() { - throw NotSupported; -} -//# sourceMappingURL=proxyPolicy.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.browser.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.browser.js.map deleted file mode 100644 index f30f00d..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxyPolicy.browser.js","sourceRoot":"","sources":["../../../src/policies/proxyPolicy.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AAEH,MAAM,YAAY,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAE7C,MAAM,UAAU,uBAAuB;IACrC,MAAM,YAAY,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,YAAY,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,YAAY,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n */\n\nconst NotSupported = new Error(\"proxyPolicy is not supported in browser environment\");\n\nexport const proxyPolicyName = \"proxyPolicy\";\n\nexport function getDefaultProxySettings(): never {\n throw NotSupported;\n}\n\n/**\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function proxyPolicy(): never {\n throw NotSupported;\n}\n\n/**\n * A function to reset the cached agents.\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n * @internal\n */\nexport function resetCachedProxyAgents(): never {\n throw NotSupported;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.js deleted file mode 100644 index 512da41..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.js +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { HttpsProxyAgent } from "https-proxy-agent"; -import { HttpProxyAgent } from "http-proxy-agent"; -import { logger } from "../log"; -const HTTPS_PROXY = "HTTPS_PROXY"; -const HTTP_PROXY = "HTTP_PROXY"; -const ALL_PROXY = "ALL_PROXY"; -const NO_PROXY = "NO_PROXY"; -/** - * The programmatic identifier of the proxyPolicy. - */ -export const proxyPolicyName = "proxyPolicy"; -/** - * Stores the patterns specified in NO_PROXY environment variable. - * @internal - */ -export const globalNoProxyList = []; -let noProxyListLoaded = false; -/** A cache of whether a host should bypass the proxy. */ -const globalBypassedMap = new Map(); -function getEnvironmentValue(name) { - if (process.env[name]) { - return process.env[name]; - } - else if (process.env[name.toLowerCase()]) { - return process.env[name.toLowerCase()]; - } - return undefined; -} -function loadEnvironmentProxyValue() { - if (!process) { - return undefined; - } - const httpsProxy = getEnvironmentValue(HTTPS_PROXY); - const allProxy = getEnvironmentValue(ALL_PROXY); - const httpProxy = getEnvironmentValue(HTTP_PROXY); - return httpsProxy || allProxy || httpProxy; -} -/** - * Check whether the host of a given `uri` matches any pattern in the no proxy list. - * If there's a match, any request sent to the same host shouldn't have the proxy settings set. - * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 - */ -function isBypassed(uri, noProxyList, bypassedMap) { - if (noProxyList.length === 0) { - return false; - } - const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { - return bypassedMap.get(host); - } - let isBypassedFlag = false; - for (const pattern of noProxyList) { - if (pattern[0] === ".") { - // This should match either domain it self or any subdomain or host - // .foo.com will match foo.com it self or *.foo.com - if (host.endsWith(pattern)) { - isBypassedFlag = true; - } - else { - if (host.length === pattern.length - 1 && host === pattern.slice(1)) { - isBypassedFlag = true; - } - } - } - else { - if (host === pattern) { - isBypassedFlag = true; - } - } - } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); - return isBypassedFlag; -} -export function loadNoProxy() { - const noProxy = getEnvironmentValue(NO_PROXY); - noProxyListLoaded = true; - if (noProxy) { - return noProxy - .split(",") - .map((item) => item.trim()) - .filter((item) => item.length); - } - return []; -} -/** - * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. - * If no argument is given, it attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - * @param proxyUrl - The url of the proxy to use. May contain authentication information. - */ -export function getDefaultProxySettings(proxyUrl) { - if (!proxyUrl) { - proxyUrl = loadEnvironmentProxyValue(); - if (!proxyUrl) { - return undefined; - } - } - const parsedUrl = new URL(proxyUrl); - const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; - return { - host: schema + parsedUrl.hostname, - port: Number.parseInt(parsedUrl.port || "80"), - username: parsedUrl.username, - password: parsedUrl.password, - }; -} -/** - * @internal - */ -export function getProxyAgentOptions(proxySettings, { headers, tlsSettings }) { - let parsedProxyUrl; - try { - parsedProxyUrl = new URL(proxySettings.host); - } - catch (_error) { - throw new Error(`Expecting a valid host string in proxy settings, but found "${proxySettings.host}".`); - } - if (tlsSettings) { - logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); - } - const proxyAgentOptions = { - hostname: parsedProxyUrl.hostname, - port: proxySettings.port, - protocol: parsedProxyUrl.protocol, - headers: headers.toJSON(), - }; - if (proxySettings.username && proxySettings.password) { - proxyAgentOptions.auth = `${proxySettings.username}:${proxySettings.password}`; - } - else if (proxySettings.username) { - proxyAgentOptions.auth = `${proxySettings.username}`; - } - return proxyAgentOptions; -} -function setProxyAgentOnRequest(request, cachedAgents) { - // Custom Agent should take precedence so if one is present - // we should skip to avoid overwriting it. - if (request.agent) { - return; - } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - const proxySettings = request.proxySettings; - if (proxySettings) { - if (isInsecure) { - if (!cachedAgents.httpProxyAgent) { - const proxyAgentOptions = getProxyAgentOptions(proxySettings, request); - cachedAgents.httpProxyAgent = new HttpProxyAgent(proxyAgentOptions); - } - request.agent = cachedAgents.httpProxyAgent; - } - else { - if (!cachedAgents.httpsProxyAgent) { - const proxyAgentOptions = getProxyAgentOptions(proxySettings, request); - cachedAgents.httpsProxyAgent = new HttpsProxyAgent(proxyAgentOptions); - } - request.agent = cachedAgents.httpsProxyAgent; - } - } -} -/** - * A policy that allows one to apply proxy settings to all requests. - * If not passed static settings, they will be retrieved from the HTTPS_PROXY - * or HTTP_PROXY environment variables. - * @param proxySettings - ProxySettings to use on each request. - * @param options - additional settings, for example, custom NO_PROXY patterns - */ -export function proxyPolicy(proxySettings = getDefaultProxySettings(), options) { - if (!noProxyListLoaded) { - globalNoProxyList.push(...loadNoProxy()); - } - const cachedAgents = {}; - return { - name: proxyPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.proxySettings && - !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) { - request.proxySettings = proxySettings; - } - if (request.proxySettings) { - setProxyAgentOnRequest(request, cachedAgents); - } - return next(request); - }, - }; -} -//# sourceMappingURL=proxyPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.js.map deleted file mode 100644 index 6044a09..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxyPolicy.js","sourceRoot":"","sources":["../../../src/policies/proxyPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,eAAe,EAA0B,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AAGzE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe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,IACE,CAAC,OAAO,CAAC,aAAa;gBACtB,CAAC,UAAU,CACT,OAAO,CAAC,GAAG,EACX,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,mCAAI,iBAAiB,EAC/C,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,EAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAC3D,EACD;gBACA,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;aACvC;YAED,IAAI,OAAO,CAAC,aAAa,EAAE;gBACzB,sBAAsB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;aAC/C;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport { HttpsProxyAgent, HttpsProxyAgentOptions } from \"https-proxy-agent\";\nimport { HttpProxyAgent, HttpProxyAgentOptions } from \"http-proxy-agent\";\nimport { PipelineRequest, PipelineResponse, ProxySettings, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { logger } from \"../log\";\n\nconst HTTPS_PROXY = \"HTTPS_PROXY\";\nconst HTTP_PROXY = \"HTTP_PROXY\";\nconst ALL_PROXY = \"ALL_PROXY\";\nconst NO_PROXY = \"NO_PROXY\";\n\n/**\n * The programmatic identifier of the proxyPolicy.\n */\nexport const proxyPolicyName = \"proxyPolicy\";\n\n/**\n * Stores the patterns specified in NO_PROXY environment variable.\n * @internal\n */\nexport const globalNoProxyList: string[] = [];\nlet noProxyListLoaded: boolean = false;\n\n/** A cache of whether a host should bypass the proxy. */\nconst globalBypassedMap: Map = new Map();\n\nfunction getEnvironmentValue(name: string): string | undefined {\n if (process.env[name]) {\n return process.env[name];\n } else if (process.env[name.toLowerCase()]) {\n return process.env[name.toLowerCase()];\n }\n return undefined;\n}\n\nfunction loadEnvironmentProxyValue(): string | undefined {\n if (!process) {\n return undefined;\n }\n\n const httpsProxy = getEnvironmentValue(HTTPS_PROXY);\n const allProxy = getEnvironmentValue(ALL_PROXY);\n const httpProxy = getEnvironmentValue(HTTP_PROXY);\n\n return httpsProxy || allProxy || httpProxy;\n}\n\n/**\n * Check whether the host of a given `uri` matches any pattern in the no proxy list.\n * If there's a match, any request sent to the same host shouldn't have the proxy settings set.\n * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210\n */\nfunction isBypassed(\n uri: string,\n noProxyList: string[],\n bypassedMap?: Map\n): boolean | undefined {\n if (noProxyList.length === 0) {\n return false;\n }\n const host = new URL(uri).hostname;\n if (bypassedMap?.has(host)) {\n return bypassedMap.get(host);\n }\n let isBypassedFlag = false;\n for (const pattern of noProxyList) {\n if (pattern[0] === \".\") {\n // This should match either domain it self or any subdomain or host\n // .foo.com will match foo.com it self or *.foo.com\n if (host.endsWith(pattern)) {\n isBypassedFlag = true;\n } else {\n if (host.length === pattern.length - 1 && host === pattern.slice(1)) {\n isBypassedFlag = true;\n }\n }\n } else {\n if (host === pattern) {\n isBypassedFlag = true;\n }\n }\n }\n bypassedMap?.set(host, isBypassedFlag);\n return isBypassedFlag;\n}\n\nexport function loadNoProxy(): string[] {\n const noProxy = getEnvironmentValue(NO_PROXY);\n noProxyListLoaded = true;\n if (noProxy) {\n return noProxy\n .split(\",\")\n .map((item) => item.trim())\n .filter((item) => item.length);\n }\n\n return [];\n}\n\n/**\n * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy.\n * If no argument is given, it attempts to parse a proxy URL from the environment\n * variables `HTTPS_PROXY` or `HTTP_PROXY`.\n * @param proxyUrl - The url of the proxy to use. May contain authentication information.\n */\nexport function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined {\n if (!proxyUrl) {\n proxyUrl = loadEnvironmentProxyValue();\n if (!proxyUrl) {\n return undefined;\n }\n }\n\n const parsedUrl = new URL(proxyUrl);\n const schema = parsedUrl.protocol ? parsedUrl.protocol + \"//\" : \"\";\n return {\n host: schema + parsedUrl.hostname,\n port: Number.parseInt(parsedUrl.port || \"80\"),\n username: parsedUrl.username,\n password: parsedUrl.password,\n };\n}\n\n/**\n * @internal\n */\nexport function getProxyAgentOptions(\n proxySettings: ProxySettings,\n { headers, tlsSettings }: PipelineRequest\n): HttpProxyAgentOptions {\n let parsedProxyUrl: URL;\n try {\n parsedProxyUrl = new URL(proxySettings.host);\n } catch (_error) {\n throw new Error(\n `Expecting a valid host string in proxy settings, but found \"${proxySettings.host}\".`\n );\n }\n\n if (tlsSettings) {\n logger.warning(\n \"TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.\"\n );\n }\n\n const proxyAgentOptions: HttpsProxyAgentOptions = {\n hostname: parsedProxyUrl.hostname,\n port: proxySettings.port,\n protocol: parsedProxyUrl.protocol,\n headers: headers.toJSON(),\n };\n if (proxySettings.username && proxySettings.password) {\n proxyAgentOptions.auth = `${proxySettings.username}:${proxySettings.password}`;\n } else if (proxySettings.username) {\n proxyAgentOptions.auth = `${proxySettings.username}`;\n }\n return proxyAgentOptions;\n}\n\nfunction setProxyAgentOnRequest(request: PipelineRequest, cachedAgents: CachedAgents): void {\n // Custom Agent should take precedence so if one is present\n // we should skip to avoid overwriting it.\n if (request.agent) {\n return;\n }\n\n const url = new URL(request.url);\n\n const isInsecure = url.protocol !== \"https:\";\n\n const proxySettings = request.proxySettings;\n if (proxySettings) {\n if (isInsecure) {\n if (!cachedAgents.httpProxyAgent) {\n const proxyAgentOptions = getProxyAgentOptions(proxySettings, request);\n cachedAgents.httpProxyAgent = new HttpProxyAgent(proxyAgentOptions);\n }\n request.agent = cachedAgents.httpProxyAgent;\n } else {\n if (!cachedAgents.httpsProxyAgent) {\n const proxyAgentOptions = getProxyAgentOptions(proxySettings, request);\n cachedAgents.httpsProxyAgent = new HttpsProxyAgent(proxyAgentOptions);\n }\n request.agent = cachedAgents.httpsProxyAgent;\n }\n }\n}\n\ninterface CachedAgents {\n httpsProxyAgent?: https.Agent;\n httpProxyAgent?: http.Agent;\n}\n\n/**\n * A policy that allows one to apply proxy settings to all requests.\n * If not passed static settings, they will be retrieved from the HTTPS_PROXY\n * or HTTP_PROXY environment variables.\n * @param proxySettings - ProxySettings to use on each request.\n * @param options - additional settings, for example, custom NO_PROXY patterns\n */\nexport function proxyPolicy(\n proxySettings = getDefaultProxySettings(),\n options?: {\n /** a list of patterns to override those loaded from NO_PROXY environment variable. */\n customNoProxyList?: string[];\n }\n): PipelinePolicy {\n if (!noProxyListLoaded) {\n globalNoProxyList.push(...loadNoProxy());\n }\n\n const cachedAgents: CachedAgents = {};\n\n return {\n name: proxyPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (\n !request.proxySettings &&\n !isBypassed(\n request.url,\n options?.customNoProxyList ?? globalNoProxyList,\n options?.customNoProxyList ? undefined : globalBypassedMap\n )\n ) {\n request.proxySettings = proxySettings;\n }\n\n if (request.proxySettings) {\n setProxyAgentOnRequest(request, cachedAgents);\n }\n return next(request);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/redirectPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/redirectPolicy.js deleted file mode 100644 index 302a1b8..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/redirectPolicy.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the redirectPolicy. - */ -export const redirectPolicyName = "redirectPolicy"; -/** - * Methods that are allowed to follow redirects 301 and 302 - */ -const allowedRedirect = ["GET", "HEAD"]; -/** - * A policy to follow Location headers from the server in order - * to support server-side redirection. - * In the browser, this policy is not used. - * @param options - Options to control policy behavior. - */ -export function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - }, - }; -} -async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - const { request, status, headers } = response; - const locationHeader = headers.get("location"); - if (locationHeader && - (status === 300 || - (status === 301 && allowedRedirect.includes(request.method)) || - (status === 302 && allowedRedirect.includes(request.method)) || - (status === 303 && request.method === "POST") || - status === 307) && - currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); - // POST request with Status code 303 should be converted into a - // redirected GET request if the redirect url is present in the location header - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; -} -//# sourceMappingURL=redirectPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/redirectPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/redirectPolicy.js.map deleted file mode 100644 index 6f4596d..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/redirectPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"redirectPolicy.js","sourceRoot":"","sources":["../../../src/policies/redirectPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAaxC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,UAAiC,EAAE;IAChE,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IACpC,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,KAAK,CAAC,WA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AAM,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,OAAO,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;KAClE;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the redirectPolicy.\n */\nexport const redirectPolicyName = \"redirectPolicy\";\n\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\n\n/**\n * Options for how redirect responses are handled.\n */\nexport interface RedirectPolicyOptions {\n /**\n * The maximum number of times the redirect URL will be tried before\n * failing. Defaults to 20.\n */\n maxRetries?: number;\n}\n\n/**\n * A policy to follow Location headers from the server in order\n * to support server-side redirection.\n * In the browser, this policy is not used.\n * @param options - Options to control policy behavior.\n */\nexport function redirectPolicy(options: RedirectPolicyOptions = {}): PipelinePolicy {\n const { maxRetries = 20 } = options;\n return {\n name: redirectPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n const response = await next(request);\n return handleRedirect(next, response, maxRetries);\n },\n };\n}\n\nasync function handleRedirect(\n next: SendRequest,\n response: PipelineResponse,\n maxRetries: number,\n currentRetries: number = 0\n): Promise {\n const { request, status, headers } = response;\n const locationHeader = headers.get(\"location\");\n if (\n locationHeader &&\n (status === 300 ||\n (status === 301 && allowedRedirect.includes(request.method)) ||\n (status === 302 && allowedRedirect.includes(request.method)) ||\n (status === 303 && request.method === \"POST\") ||\n status === 307) &&\n currentRetries < maxRetries\n ) {\n const url = new URL(locationHeader, request.url);\n request.url = url.toString();\n\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n request.headers.delete(\"Content-Length\");\n delete request.body;\n }\n\n request.headers.delete(\"Authorization\");\n\n const res = await next(request);\n return handleRedirect(next, res, maxRetries, currentRetries + 1);\n }\n\n return response;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/retryPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/retryPolicy.js deleted file mode 100644 index ce8feb9..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/retryPolicy.js +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { delay } from "../util/helpers"; -import { createClientLogger } from "@azure/logger"; -import { AbortError } from "@azure/abort-controller"; -import { DEFAULT_RETRY_POLICY_COUNT } from "../constants"; -const retryPolicyLogger = createClientLogger("core-rest-pipeline retryPolicy"); -/** - * The programmatic identifier of the retryPolicy. - */ -const retryPolicyName = "retryPolicy"; -/** - * retryPolicy is a generic policy to enable retrying requests when certain conditions are met - */ -export function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - // eslint-disable-next-line no-constant-condition - retryRequest: while (true) { - retryCount += 1; - response = undefined; - responseError = undefined; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } - catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - // RestErrors are valid targets for the retry strategies. - // If none of the retry strategies can work with them, they will be thrown later in this policy. - // If the received error is not a RestError, it is immediately thrown. - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } - else if (response) { - return response; - } - else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError, - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await delay(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } - // If all the retries skip and there's no response, - // we're still in the retry loop, so a new request will be sent - // until `maxRetries` is reached. - } - }, - }; -} -//# sourceMappingURL=retryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/retryPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/retryPolicy.js.map deleted file mode 100644 index 721b2e8..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src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ensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { delay } from \"../util/helpers\";\nimport { createClientLogger } from \"@azure/logger\";\nimport { RetryStrategy } from \"../retryStrategies/retryStrategy\";\nimport { RestError } from \"../restError\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\nconst retryPolicyLogger = createClientLogger(\"core-rest-pipeline retryPolicy\");\n\n/**\n * The programmatic identifier of the retryPolicy.\n */\nconst retryPolicyName = \"retryPolicy\";\n\n/**\n * Options to the {@link retryPolicy}\n */\nexport interface RetryPolicyOptions {\n /**\n * Maximum number of retries. If not specified, it will limit to 3 retries.\n */\n maxRetries?: number;\n /**\n * Logger. If it's not provided, a default logger is used.\n */\n logger?: AzureLogger;\n}\n\n/**\n * retryPolicy is a generic policy to enable retrying requests when certain conditions are met\n */\nexport function retryPolicy(\n strategies: RetryStrategy[],\n options: RetryPolicyOptions = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }\n): PipelinePolicy {\n const logger = options.logger || retryPolicyLogger;\n return {\n name: retryPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n let response: PipelineResponse | undefined;\n let responseError: RestError | undefined;\n let retryCount = -1;\n\n // eslint-disable-next-line no-constant-condition\n retryRequest: while (true) {\n retryCount += 1;\n response = undefined;\n responseError = undefined;\n\n try {\n logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId);\n response = await next(request);\n logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId);\n } catch (e: any) {\n logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId);\n\n // RestErrors are valid targets for the retry strategies.\n // If none of the retry strategies can work with them, they will be thrown later in this policy.\n // If the received error is not a RestError, it is immediately thrown.\n responseError = e as RestError;\n if (!e || responseError.name !== \"RestError\") {\n throw e;\n }\n\n response = responseError.response;\n }\n\n if (request.abortSignal?.aborted) {\n logger.error(`Retry ${retryCount}: Request aborted.`);\n const abortError = new AbortError();\n throw abortError;\n }\n\n if (retryCount >= (options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT)) {\n logger.info(\n `Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`\n );\n if (responseError) {\n throw responseError;\n } else if (response) {\n return response;\n } else {\n throw new Error(\"Maximum retries reached with no response or error to throw\");\n }\n }\n\n logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`);\n\n strategiesLoop: for (const strategy of strategies) {\n const strategyLogger = strategy.logger || retryPolicyLogger;\n strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`);\n\n const modifiers = strategy.retry({\n retryCount,\n response,\n responseError,\n });\n\n if (modifiers.skipStrategy) {\n strategyLogger.info(`Retry ${retryCount}: Skipped.`);\n continue strategiesLoop;\n }\n\n const { errorToThrow, retryAfterInMs, redirectTo } = modifiers;\n\n if (errorToThrow) {\n strategyLogger.error(\n `Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`,\n errorToThrow\n );\n throw errorToThrow;\n }\n\n if (retryAfterInMs || retryAfterInMs === 0) {\n strategyLogger.info(\n `Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`\n );\n await delay(retryAfterInMs, undefined, { abortSignal: request.abortSignal });\n continue retryRequest;\n }\n\n if (redirectTo) {\n strategyLogger.info(\n `Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`\n );\n request.url = redirectTo;\n continue retryRequest;\n }\n }\n\n if (responseError) {\n logger.info(\n `None of the retry strategies could work with the received error. Throwing it.`\n );\n throw responseError;\n }\n if (response) {\n logger.info(\n `None of the retry strategies could work with the received response. Returning it.`\n );\n return response;\n }\n\n // If all the retries skip and there's no response,\n // we're still in the retry loop, so a new request will be sent\n // until `maxRetries` is reached.\n }\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/setClientRequestIdPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/setClientRequestIdPolicy.js deleted file mode 100644 index 46baba4..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/setClientRequestIdPolicy.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the setClientRequestIdPolicy. - */ -export const setClientRequestIdPolicyName = "setClientRequestIdPolicy"; -/** - * Each PipelineRequest gets a unique id upon creation. - * This policy passes that unique id along via an HTTP header to enable better - * telemetry and tracing. - * @param requestIdHeaderName - The name of the header to pass the request ID to. - */ -export function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { - return { - name: setClientRequestIdPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(requestIdHeaderName)) { - request.headers.set(requestIdHeaderName, request.requestId); - } - return next(request); - }, - }; -} -//# sourceMappingURL=setClientRequestIdPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/setClientRequestIdPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/setClientRequestIdPolicy.js.map deleted file mode 100644 index 8c7eb19..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/setClientRequestIdPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"setClientRequestIdPolicy.js","sourceRoot":"","sources":["../../../src/policies/setClientRequestIdPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,mBAAmB,GAAG,wBAAwB;IAE9C,OAAO;QACL,IAAI,EAAE,4BAA4B;QAClC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE;gBAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;aAC7D;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the setClientRequestIdPolicy.\n */\nexport const setClientRequestIdPolicyName = \"setClientRequestIdPolicy\";\n\n/**\n * Each PipelineRequest gets a unique id upon creation.\n * This policy passes that unique id along via an HTTP header to enable better\n * telemetry and tracing.\n * @param requestIdHeaderName - The name of the header to pass the request ID to.\n */\nexport function setClientRequestIdPolicy(\n requestIdHeaderName = \"x-ms-client-request-id\"\n): PipelinePolicy {\n return {\n name: setClientRequestIdPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.headers.has(requestIdHeaderName)) {\n request.headers.set(requestIdHeaderName, request.requestId);\n }\n return next(request);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/systemErrorRetryPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/systemErrorRetryPolicy.js deleted file mode 100644 index 4c4bca0..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/systemErrorRetryPolicy.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { exponentialRetryStrategy } from "../retryStrategies/exponentialRetryStrategy"; -import { retryPolicy } from "./retryPolicy"; -import { DEFAULT_RETRY_POLICY_COUNT } from "../constants"; -/** - * Name of the {@link systemErrorRetryPolicy} - */ -export const systemErrorRetryPolicyName = "systemErrorRetryPolicy"; -/** - * A retry policy that specifically seeks to handle errors in the - * underlying transport layer (e.g. DNS lookup failures) rather than - * retryable error codes from the server itself. - * @param options - Options that customize the policy. - */ -export function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: systemErrorRetryPolicyName, - sendRequest: retryPolicy([ - exponentialRetryStrategy(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; -} -//# sourceMappingURL=systemErrorRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/systemErrorRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/systemErrorRetryPolicy.js.map deleted file mode 100644 index e8063ba..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/systemErrorRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"systemErrorRetryPolicy.js","sourceRoot":"","sources":["../../../src/policies/systemErrorRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAyBnE;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAyC,EAAE;;IAE3C,OAAO;QACL,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,WAAW,CACtB;YACE,wBAAwB,iCACnB,OAAO,KACV,qBAAqB,EAAE,IAAI,IAC3B;SACH,EACD;YACE,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,0BAA0B;SAC7D,CACF,CAAC,WAAW;KACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * Name of the {@link systemErrorRetryPolicy}\n */\nexport const systemErrorRetryPolicyName = \"systemErrorRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface SystemErrorRetryPolicyOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second.) The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * A retry policy that specifically seeks to handle errors in the\n * underlying transport layer (e.g. DNS lookup failures) rather than\n * retryable error codes from the server itself.\n * @param options - Options that customize the policy.\n */\nexport function systemErrorRetryPolicy(\n options: SystemErrorRetryPolicyOptions = {}\n): PipelinePolicy {\n return {\n name: systemErrorRetryPolicyName,\n sendRequest: retryPolicy(\n [\n exponentialRetryStrategy({\n ...options,\n ignoreHttpStatusCodes: true,\n }),\n ],\n {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }\n ).sendRequest,\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/throttlingRetryPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/throttlingRetryPolicy.js deleted file mode 100644 index e4b8e28..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/throttlingRetryPolicy.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { throttlingRetryStrategy } from "../retryStrategies/throttlingRetryStrategy"; -import { retryPolicy } from "./retryPolicy"; -import { DEFAULT_RETRY_POLICY_COUNT } from "../constants"; -/** - * Name of the {@link throttlingRetryPolicy} - */ -export const throttlingRetryPolicyName = "throttlingRetryPolicy"; -/** - * A policy that retries when the server sends a 429 response with a Retry-After header. - * - * To learn more, please refer to - * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors - * - * @param options - Options that configure retry logic. - */ -export function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: throttlingRetryPolicyName, - sendRequest: retryPolicy([throttlingRetryStrategy()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; -} -//# sourceMappingURL=throttlingRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/throttlingRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/throttlingRetryPolicy.js.map deleted file mode 100644 index b67feb7..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/throttlingRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttlingRetryPolicy.js","sourceRoot":"","sources":["../../../src/policies/throttlingRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,uBAAuB,CAAC;AAYjE;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAwC,EAAE;;IAC9E,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,WAAW,CAAC,CAAC,uBAAuB,EAAE,CAAC,EAAE;YACpD,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,0BAA0B;SAC7D,CAAC,CAAC,WAAW;KACf,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * Name of the {@link throttlingRetryPolicy}\n */\nexport const throttlingRetryPolicyName = \"throttlingRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface ThrottlingRetryPolicyOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n}\n\n/**\n * A policy that retries when the server sends a 429 response with a Retry-After header.\n *\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n *\n * @param options - Options that configure retry logic.\n */\nexport function throttlingRetryPolicy(options: ThrottlingRetryPolicyOptions = {}): PipelinePolicy {\n return {\n name: throttlingRetryPolicyName,\n sendRequest: retryPolicy([throttlingRetryStrategy()], {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }).sendRequest,\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tlsPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tlsPolicy.js deleted file mode 100644 index 67ce535..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tlsPolicy.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Name of the TLS Policy - */ -export const tlsPolicyName = "tlsPolicy"; -/** - * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. - */ -export function tlsPolicy(tlsSettings) { - return { - name: tlsPolicyName, - sendRequest: async (req, next) => { - // Users may define a request tlsSettings, honor those over the client level one - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - }, - }; -} -//# sourceMappingURL=tlsPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tlsPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tlsPolicy.js.map deleted file mode 100644 index 9d3f1be..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tlsPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tlsPolicy.js","sourceRoot":"","sources":["../../../src/policies/tlsPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,WAAyB;IACjD,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC/B,gFAAgF;YAChF,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;gBACpB,GAAG,CAAC,WAAW,GAAG,WAAW,CAAC;aAC/B;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { TlsSettings } from \"../interfaces\";\n\n/**\n * Name of the TLS Policy\n */\nexport const tlsPolicyName = \"tlsPolicy\";\n\n/**\n * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication.\n */\nexport function tlsPolicy(tlsSettings?: TlsSettings): PipelinePolicy {\n return {\n name: tlsPolicyName,\n sendRequest: async (req, next) => {\n // Users may define a request tlsSettings, honor those over the client level one\n if (!req.tlsSettings) {\n req.tlsSettings = tlsSettings;\n }\n return next(req);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tracingPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tracingPolicy.js deleted file mode 100644 index 6c77e99..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tracingPolicy.js +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createTracingClient, } from "@azure/core-tracing"; -import { SDK_VERSION } from "../constants"; -import { getUserAgentValue } from "../util/userAgent"; -import { logger } from "../log"; -import { getErrorMessage, isError } from "@azure/core-util"; -import { isRestError } from "../restError"; -/** - * The programmatic identifier of the tracingPolicy. - */ -export const tracingPolicyName = "tracingPolicy"; -/** - * A simple policy to create OpenTelemetry Spans for each request made by the pipeline - * that has SpanOptions with a parent. - * Requests made without a parent Span will not be recorded. - * @param options - Options to configure the telemetry logged by the tracing policy. - */ -export function tracingPolicy(options = {}) { - const userAgent = getUserAgentValue(options.userAgentPrefix); - const tracingClient = tryCreateTracingClient(); - return { - name: tracingPolicyName, - async sendRequest(request, next) { - var _a, _b; - if (!tracingClient || !((_a = request.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext)) { - return next(request); - } - const { span, tracingContext } = (_b = tryCreateSpan(tracingClient, request, userAgent)) !== null && _b !== void 0 ? _b : {}; - if (!span || !tracingContext) { - return next(request); - } - try { - const response = await tracingClient.withContext(tracingContext, next, request); - tryProcessResponse(span, response); - return response; - } - catch (err) { - tryProcessError(span, err); - throw err; - } - }, - }; -} -function tryCreateTracingClient() { - try { - return createTracingClient({ - namespace: "", - packageName: "@azure/core-rest-pipeline", - packageVersion: SDK_VERSION, - }); - } - catch (e) { - logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`); - return undefined; - } -} -function tryCreateSpan(tracingClient, request, userAgent) { - try { - // As per spec, we do not need to differentiate between HTTP and HTTPS in span name. - const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { - spanKind: "client", - spanAttributes: { - "http.method": request.method, - "http.url": request.url, - requestId: request.requestId, - }, - }); - // If the span is not recording, don't do any more work. - if (!span.isRecording()) { - span.end(); - return undefined; - } - if (userAgent) { - span.setAttribute("http.user_agent", userAgent); - } - // set headers - const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); - for (const [key, value] of Object.entries(headers)) { - request.headers.set(key, value); - } - return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; - } - catch (e) { - logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e)}`); - return undefined; - } -} -function tryProcessError(span, error) { - try { - span.setStatus({ - status: "error", - error: isError(error) ? error : undefined, - }); - if (isRestError(error) && error.statusCode) { - span.setAttribute("http.status_code", error.statusCode); - } - span.end(); - } - catch (e) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`); - } -} -function tryProcessResponse(span, response) { - try { - span.setAttribute("http.status_code", response.status); - const serviceRequestId = response.headers.get("x-ms-request-id"); - if (serviceRequestId) { - span.setAttribute("serviceRequestId", serviceRequestId); - } - span.setStatus({ - status: "success", - }); - span.end(); - } - catch (e) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`); - } -} -//# sourceMappingURL=tracingPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tracingPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tracingPolicy.js.map deleted file mode 100644 index fb18741..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tracingPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracingPolicy.js","sourceRoot":"","sources":["../../../src/policies/tracingPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAIL,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAcjD;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,UAAgC,EAAE;IAC9D,MAAM,SAAS,GAAG,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7D,MAAM,aAAa,GAAG,sBAAsB,EAAE,CAAC;IAE/C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;;YAC3D,IAAI,CAAC,aAAa,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,cAAc,CAAA,EAAE;gBAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;aACtB;YAED,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eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAC3F;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAiB,EAAE,QAA0B;IACvE,IAAI;QACF,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QACvD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjE,IAAI,gBAAgB,EAAE;YACpB,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;SACzD;QACD,IAAI,CAAC,SAAS,CAAC;YACb,MAAM,EAAE,SAAS;SAClB,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,EAAE,CAAC;KACZ;IAAC,OAAO,CAAM,EAAE;QACf,MAAM,CAAC,OAAO,CAAC,qDAAqD,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAC3F;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n TracingClient,\n TracingContext,\n TracingSpan,\n createTracingClient,\n} from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"../constants\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { getUserAgentValue } from \"../util/userAgent\";\nimport { logger } from \"../log\";\nimport { getErrorMessage, isError } from \"@azure/core-util\";\nimport { isRestError } from \"../restError\";\n\n/**\n * The programmatic identifier of the tracingPolicy.\n */\nexport const tracingPolicyName = \"tracingPolicy\";\n\n/**\n * Options to configure the tracing policy.\n */\nexport interface TracingPolicyOptions {\n /**\n * String prefix to add to the user agent logged as metadata\n * on the generated Span.\n * Defaults to an empty string.\n */\n userAgentPrefix?: string;\n}\n\n/**\n * A simple policy to create OpenTelemetry Spans for each request made by the pipeline\n * that has SpanOptions with a parent.\n * Requests made without a parent Span will not be recorded.\n * @param options - Options to configure the telemetry logged by the tracing policy.\n */\nexport function tracingPolicy(options: TracingPolicyOptions = {}): PipelinePolicy {\n const userAgent = getUserAgentValue(options.userAgentPrefix);\n const tracingClient = tryCreateTracingClient();\n\n return {\n name: tracingPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!tracingClient || !request.tracingOptions?.tracingContext) {\n return next(request);\n }\n\n const { span, tracingContext } = tryCreateSpan(tracingClient, request, userAgent) ?? {};\n\n if (!span || !tracingContext) {\n return next(request);\n }\n\n try {\n const response = await tracingClient.withContext(tracingContext, next, request);\n tryProcessResponse(span, response);\n return response;\n } catch (err: any) {\n tryProcessError(span, err);\n throw err;\n }\n },\n };\n}\n\nfunction tryCreateTracingClient(): TracingClient | undefined {\n try {\n return createTracingClient({\n namespace: \"\",\n packageName: \"@azure/core-rest-pipeline\",\n packageVersion: SDK_VERSION,\n });\n } catch (e: unknown) {\n logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\n\nfunction tryCreateSpan(\n tracingClient: TracingClient,\n request: PipelineRequest,\n userAgent?: string\n): { span: TracingSpan; tracingContext: TracingContext } | undefined {\n try {\n // As per spec, we do not need to differentiate between HTTP and HTTPS in span name.\n const { span, updatedOptions } = tracingClient.startSpan(\n `HTTP ${request.method}`,\n { tracingOptions: request.tracingOptions },\n {\n spanKind: \"client\",\n spanAttributes: {\n \"http.method\": request.method,\n \"http.url\": request.url,\n requestId: request.requestId,\n },\n }\n );\n\n // If the span is not recording, don't do any more work.\n if (!span.isRecording()) {\n span.end();\n return undefined;\n }\n\n if (userAgent) {\n span.setAttribute(\"http.user_agent\", userAgent);\n }\n\n // set headers\n const headers = tracingClient.createRequestHeaders(\n updatedOptions.tracingOptions.tracingContext\n );\n for (const [key, value] of Object.entries(headers)) {\n request.headers.set(key, value);\n }\n return { span, tracingContext: updatedOptions.tracingOptions.tracingContext };\n } catch (e: any) {\n logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\n\nfunction tryProcessError(span: TracingSpan, error: unknown): void {\n try {\n span.setStatus({\n status: \"error\",\n error: isError(error) ? error : undefined,\n });\n if (isRestError(error) && error.statusCode) {\n span.setAttribute(\"http.status_code\", error.statusCode);\n }\n span.end();\n } catch (e: any) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\n\nfunction tryProcessResponse(span: TracingSpan, response: PipelineResponse): void {\n try {\n span.setAttribute(\"http.status_code\", response.status);\n const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n if (serviceRequestId) {\n span.setAttribute(\"serviceRequestId\", serviceRequestId);\n }\n span.setStatus({\n status: \"success\",\n });\n span.end();\n } catch (e: any) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/userAgentPolicy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/userAgentPolicy.js deleted file mode 100644 index 1191b50..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/userAgentPolicy.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { getUserAgentHeaderName, getUserAgentValue } from "../util/userAgent"; -const UserAgentHeaderName = getUserAgentHeaderName(); -/** - * The programmatic identifier of the userAgentPolicy. - */ -export const userAgentPolicyName = "userAgentPolicy"; -/** - * A policy that sets the User-Agent header (or equivalent) to reflect - * the library version. - * @param options - Options to customize the user agent value. - */ -export function userAgentPolicy(options = {}) { - const userAgentValue = getUserAgentValue(options.userAgentPrefix); - return { - name: userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, userAgentValue); - } - return next(request); - }, - }; -} -//# sourceMappingURL=userAgentPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/userAgentPolicy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/userAgentPolicy.js.map deleted file mode 100644 index 88807a5..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/userAgentPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userAgentPolicy.js","sourceRoot":"","sources":["../../../src/policies/userAgentPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;AAErD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAarD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkC,EAAE;IAClE,MAAM,cAAc,GAAG,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAClE,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE;gBAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;aAC1D;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { getUserAgentHeaderName, getUserAgentValue } from \"../util/userAgent\";\n\nconst UserAgentHeaderName = getUserAgentHeaderName();\n\n/**\n * The programmatic identifier of the userAgentPolicy.\n */\nexport const userAgentPolicyName = \"userAgentPolicy\";\n\n/**\n * Options for adding user agent details to outgoing requests.\n */\nexport interface UserAgentPolicyOptions {\n /**\n * String prefix to add to the user agent for outgoing requests.\n * Defaults to an empty string.\n */\n userAgentPrefix?: string;\n}\n\n/**\n * A policy that sets the User-Agent header (or equivalent) to reflect\n * the library version.\n * @param options - Options to customize the user agent value.\n */\nexport function userAgentPolicy(options: UserAgentPolicyOptions = {}): PipelinePolicy {\n const userAgentValue = getUserAgentValue(options.userAgentPrefix);\n return {\n name: userAgentPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.headers.has(UserAgentHeaderName)) {\n request.headers.set(UserAgentHeaderName, userAgentValue);\n }\n return next(request);\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/restError.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/restError.js deleted file mode 100644 index 76e8395..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/restError.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { isError } from "@azure/core-util"; -import { custom } from "./util/inspect"; -import { Sanitizer } from "./util/sanitizer"; -const errorSanitizer = new Sanitizer(); -/** - * A custom error type for failed pipeline requests. - */ -class RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - this.request = options.request; - this.response = options.response; - Object.setPrototypeOf(this, RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [custom]() { - return `RestError: ${this.message} \n ${errorSanitizer.sanitize(this)}`; - } -} -/** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ -RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; -/** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ -RestError.PARSE_ERROR = "PARSE_ERROR"; -export { RestError }; -/** - * Typeguard for RestError - * @param e - Something caught by a catch clause. - */ -export function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return isError(e) && e.name === "RestError"; -} -//# sourceMappingURL=restError.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/restError.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/restError.js.map deleted file mode 100644 index cecab76..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/restError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"restError.js","sourceRoot":"","sources":["../../src/restError.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,cAAc,GAAG,IAAI,SAAS,EAAE,CAAC;AAwBvC;;GAEG;AACH,MAAa,SAAU,SAAQ,KAAK;IAkClC,YAAY,OAAe,EAAE,UAA4B,EAAE;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAEjC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,CAAC,MAAM,CAAC;QACN,OAAO,cAAc,IAAI,CAAC,OAAO,OAAO,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;IAC1E,CAAC;;AAjDD;;;;GAIG;AACa,4BAAkB,GAAW,oBAAoB,CAAC;AAClE;;;GAGG;AACa,qBAAW,GAAW,aAAa,CAAC;SAXzC,SAAS;AAqDtB;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,CAAU;IACpC,IAAI,CAAC,YAAY,SAAS,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC;AAC9C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isError } from \"@azure/core-util\";\nimport { PipelineRequest, PipelineResponse } from \"./interfaces\";\nimport { custom } from \"./util/inspect\";\nimport { Sanitizer } from \"./util/sanitizer\";\n\nconst errorSanitizer = new Sanitizer();\n\n/**\n * The options supported by RestError.\n */\nexport interface RestErrorOptions {\n /**\n * The code of the error itself (use statics on RestError if possible.)\n */\n code?: string;\n /**\n * The HTTP status code of the request (if applicable.)\n */\n statusCode?: number;\n /**\n * The request that was made.\n */\n request?: PipelineRequest;\n /**\n * The response received (if any.)\n */\n response?: PipelineResponse;\n}\n\n/**\n * A custom error type for failed pipeline requests.\n */\nexport class RestError extends Error {\n /**\n * Something went wrong when making the request.\n * This means the actual request failed for some reason,\n * such as a DNS issue or the connection being lost.\n */\n static readonly REQUEST_SEND_ERROR: string = \"REQUEST_SEND_ERROR\";\n /**\n * This means that parsing the response from the server failed.\n * It may have been malformed.\n */\n static readonly PARSE_ERROR: string = \"PARSE_ERROR\";\n\n /**\n * The code of the error itself (use statics on RestError if possible.)\n */\n public code?: string;\n /**\n * The HTTP status code of the request (if applicable.)\n */\n public statusCode?: number;\n /**\n * The request that was made.\n */\n public request?: PipelineRequest;\n /**\n * The response received (if any.)\n */\n public response?: PipelineResponse;\n /**\n * Bonus property set by the throw site.\n */\n public details?: unknown;\n\n constructor(message: string, options: RestErrorOptions = {}) {\n super(message);\n this.name = \"RestError\";\n this.code = options.code;\n this.statusCode = options.statusCode;\n this.request = options.request;\n this.response = options.response;\n\n Object.setPrototypeOf(this, RestError.prototype);\n }\n\n /**\n * Logging method for util.inspect in Node\n */\n [custom](): string {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }\n}\n\n/**\n * Typeguard for RestError\n * @param e - Something caught by a catch clause.\n */\nexport function isRestError(e: unknown): e is RestError {\n if (e instanceof RestError) {\n return true;\n }\n return isError(e) && e.name === \"RestError\";\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/exponentialRetryStrategy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/exponentialRetryStrategy.js deleted file mode 100644 index b8314ce..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/exponentialRetryStrategy.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { getRandomIntegerInclusive } from "@azure/core-util"; -import { isThrottlingRetryResponse } from "./throttlingRetryStrategy"; -// intervals are in milliseconds -const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; -const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; -/** - * A retry strategy that retries with an exponentially increasing delay in these two cases: - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). - */ -export function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - // Exponentially increase the delay each time - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - // Don't let the delay exceed the maximum - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - // Allow the final value to have some "jitter" (within 50% of the delay size) so - // that retries across multiple clients don't occur simultaneously. - retryAfterInMs = - clampedExponentialDelay / 2 + getRandomIntegerInclusive(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - }, - }; -} -/** - * A response is a retry response if it has status codes: - * - 408, or - * - Greater or equal than 500, except for 501 and 505. - */ -export function isExponentialRetryResponse(response) { - return Boolean(response && - response.status !== undefined && - (response.status >= 500 || response.status === 408) && - response.status !== 501 && - response.status !== 505); -} -/** - * Determines whether an error from a pipeline response was triggered in the network layer. - */ -export function isSystemError(err) { - if (!err) { - return false; - } - return (err.code === "ETIMEDOUT" || - err.code === "ESOCKETTIMEDOUT" || - err.code === "ECONNREFUSED" || - err.code === "ECONNRESET" || - err.code === "ENOENT"); -} -//# sourceMappingURL=exponentialRetryStrategy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/exponentialRetryStrategy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/exponentialRetryStrategy.js.map deleted file mode 100644 index 4a46013..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/exponentialRetryStrategy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exponentialRetryStrategy.js","sourceRoot":"","sources":["../../../src/retryStrategies/exponentialRetryStrategy.ts"],"names":[],"m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AAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;YAClE,yCAAyC;YACzC,MAAM,uBAAuB,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;YAC7E,gFAAgF;YAChF,mEAAmE;YACnE,cAAc;gBACZ,uBAAuB,GAAG,CAAC,GAAG,yBAAyB,CAAC,CAAC,EAAE,uBAAuB,GAAG,CAAC,CAAC,CAAC;YAC1F,OAAO,EAAE,cAAc,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,QAA2B;IACpE,OAAO,OAAO,CACZ,QAAQ;QACN,QAAQ,CAAC,MAAM,KAAK,SAAS;QAC7B,CAAC,QAAQ,CAAC,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,CAAC;QACnD,QAAQ,CAAC,MAAM,KAAK,GAAG;QACvB,QAAQ,CAAC,MAAM,KAAK,GAAG,CAC1B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAe;IAC3C,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CACL,GAAG,CAAC,IAAI,KAAK,WAAW;QACxB,GAAG,CAAC,IAAI,KAAK,iBAAiB;QAC9B,GAAG,CAAC,IAAI,KAAK,cAAc;QAC3B,GAAG,CAAC,IAAI,KAAK,YAAY;QACzB,GAAG,CAAC,IAAI,KAAK,QAAQ,CACtB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineResponse } from \"../interfaces\";\nimport { RestError } from \"../restError\";\nimport { getRandomIntegerInclusive } from \"@azure/core-util\";\nimport { RetryStrategy } from \"./retryStrategy\";\nimport { isThrottlingRetryResponse } from \"./throttlingRetryStrategy\";\n\n// intervals are in milliseconds\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;\n\n/**\n * A retry strategy that retries with an exponentially increasing delay in these two cases:\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505).\n */\nexport function exponentialRetryStrategy(\n options: {\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second.) The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n\n /**\n * If true it won't retry if it received a system error.\n */\n ignoreSystemErrors?: boolean;\n\n /**\n * If true it won't retry if it received a non-fatal HTTP status code.\n */\n ignoreHttpStatusCodes?: boolean;\n } = {}\n): RetryStrategy {\n const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL;\n const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n\n let retryAfterInMs = retryInterval;\n\n return {\n name: \"exponentialRetryStrategy\",\n retry({ retryCount, response, responseError }) {\n const matchedSystemError = isSystemError(responseError);\n const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors;\n\n const isExponential = isExponentialRetryResponse(response);\n const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes;\n const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential);\n\n if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) {\n return { skipStrategy: true };\n }\n\n if (responseError && !matchedSystemError && !isExponential) {\n return { errorToThrow: responseError };\n }\n\n // Exponentially increase the delay each time\n const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount);\n // Don't let the delay exceed the maximum\n const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay);\n // Allow the final value to have some \"jitter\" (within 50% of the delay size) so\n // that retries across multiple clients don't occur simultaneously.\n retryAfterInMs =\n clampedExponentialDelay / 2 + getRandomIntegerInclusive(0, clampedExponentialDelay / 2);\n return { retryAfterInMs };\n },\n };\n}\n\n/**\n * A response is a retry response if it has status codes:\n * - 408, or\n * - Greater or equal than 500, except for 501 and 505.\n */\nexport function isExponentialRetryResponse(response?: PipelineResponse): boolean {\n return Boolean(\n response &&\n response.status !== undefined &&\n (response.status >= 500 || response.status === 408) &&\n response.status !== 501 &&\n response.status !== 505\n );\n}\n\n/**\n * Determines whether an error from a pipeline response was triggered in the network layer.\n */\nexport function isSystemError(err?: RestError): boolean {\n if (!err) {\n return false;\n }\n return (\n err.code === \"ETIMEDOUT\" ||\n err.code === \"ESOCKETTIMEDOUT\" ||\n err.code === \"ECONNREFUSED\" ||\n err.code === \"ECONNRESET\" ||\n err.code === \"ENOENT\"\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/retryStrategy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/retryStrategy.js deleted file mode 100644 index 4b2354b..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/retryStrategy.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export {}; -//# sourceMappingURL=retryStrategy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/retryStrategy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/retryStrategy.js.map deleted file mode 100644 index ad16f46..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/retryStrategy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryStrategy.js","sourceRoot":"","sources":["../../../src/retryStrategies/retryStrategy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AzureLogger } from \"@azure/logger\";\nimport { PipelineResponse } from \"../interfaces\";\nimport { RestError } from \"../restError\";\n\n/**\n * Information provided to the retry strategy about the current progress of the retry policy.\n */\nexport interface RetryInformation {\n /**\n * A {@link PipelineResponse}, if the last retry attempt succeeded.\n */\n response?: PipelineResponse;\n /**\n * A {@link RestError}, if the last retry attempt failed.\n */\n responseError?: RestError;\n /**\n * Total number of retries so far.\n */\n retryCount: number;\n}\n\n/**\n * Properties that can modify the behavior of the retry policy.\n */\nexport interface RetryModifiers {\n /**\n * If true, allows skipping the current strategy from running on the retry policy.\n */\n skipStrategy?: boolean;\n /**\n * Indicates to retry against this URL.\n */\n redirectTo?: string;\n /**\n * Controls whether to retry in a given number of milliseconds.\n * If provided, a new retry will be attempted.\n */\n retryAfterInMs?: number;\n /**\n * Indicates to throw this error instead of retrying.\n */\n errorToThrow?: RestError;\n}\n\n/**\n * A retry strategy is intended to define whether to retry or not, and how to retry.\n */\nexport interface RetryStrategy {\n /**\n * Name of the retry strategy. Used for logging.\n */\n name: string;\n /**\n * Logger. If it's not provided, a default logger for all retry strategies is used.\n */\n logger?: AzureLogger;\n /**\n * Function that determines how to proceed with the subsequent requests.\n * @param state - Retry state\n */\n retry(state: RetryInformation): RetryModifiers;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/throttlingRetryStrategy.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/throttlingRetryStrategy.js deleted file mode 100644 index 2b2547d..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/throttlingRetryStrategy.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { parseHeaderValueAsNumber } from "../util/helpers"; -/** - * The header that comes back from Azure services representing - * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). - */ -const RetryAfterHeader = "Retry-After"; -/** - * The headers that come back from Azure services representing - * the amount of time (minimum) to wait to retry. - * - * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds - * "Retry-After" : seconds or timestamp - */ -const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; -/** - * A response is a throttling retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. - * - * Returns the `retryAfterInMs` value if the response is a throttling retry response. - * If not throttling retry response, returns `undefined`. - * - * @internal - */ -function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return undefined; - try { - // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = parseHeaderValueAsNumber(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - // "Retry-After" header ==> seconds - // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds - const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; - return retryAfterValue * multiplyingFactor; // in milli-seconds - } - } - // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) - return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - // negative diff would mean a date in the past, so retry asap with 0 milliseconds - return Number.isFinite(diff) ? Math.max(0, diff) : undefined; - } - catch (e) { - return undefined; - } -} -/** - * A response is a retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. - */ -export function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); -} -export function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs, - }; - }, - }; -} -//# sourceMappingURL=throttlingRetryStrategy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/throttlingRetryStrategy.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/throttlingRetryStrategy.js.map deleted file mode 100644 index e5af49d..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/throttlingRetryStrategy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttlingRetryStrategy.js","sourceRoot":"","sources":["../../../src/retryStrategies/throttlingRetryStrategy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAG3D;;;GAGG;AACH,MAAM,gBAAgB,GAAG,aAAa,CAAC;AACvC;;;;;;GAMG;AACH,MAAM,oBAAoB,GAAa,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,gBAAgB,CAAC,CAAC;AAEnG;;;;;;;;GAQG;AACH,SAAS,iBAAiB,CAAC,QAA2B;IACpD,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1E,IAAI;QACF,kEAAkE;QAClE,KAAK,MAAM,MAAM,IAAI,oBAAoB,EAAE;YACzC,MAAM,eAAe,GAAG,wBAAwB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACnE,IAAI,eAAe,KAAK,CAAC,IAAI,eAAe,EAAE;gBAC5C,mCAAmC;gBACnC,oEAAoE;gBACpE,MAAM,iBAAiB,GAAG,MAAM,KAAK,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjE,OAAO,eAAe,GAAG,iBAAiB,CAAC,CAAC,mBAAmB;aAChE;SACF;QAED,2HAA2H;QAC3H,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAChE,IAAI,CAAC,gBAAgB;YAAE,OAAO;QAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC/B,iFAAiF;QACjF,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KAC9D;IAAC,OAAO,CAAM,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAA2B;IACnE,OAAO,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,KAAK,CAAC,EAAE,QAAQ,EAAE;YAChB,MAAM,cAAc,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;YACnD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;gBACpC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;aAC/B;YACD,OAAO;gBACL,cAAc;aACf,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineResponse } from \"..\";\nimport { parseHeaderValueAsNumber } from \"../util/helpers\";\nimport { RetryStrategy } from \"./retryStrategy\";\n\n/**\n * The header that comes back from Azure services representing\n * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry).\n */\nconst RetryAfterHeader = \"Retry-After\";\n/**\n * The headers that come back from Azure services representing\n * the amount of time (minimum) to wait to retry.\n *\n * \"retry-after-ms\", \"x-ms-retry-after-ms\" : milliseconds\n * \"Retry-After\" : seconds or timestamp\n */\nconst AllRetryAfterHeaders: string[] = [\"retry-after-ms\", \"x-ms-retry-after-ms\", RetryAfterHeader];\n\n/**\n * A response is a throttling retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n *\n * Returns the `retryAfterInMs` value if the response is a throttling retry response.\n * If not throttling retry response, returns `undefined`.\n *\n * @internal\n */\nfunction getRetryAfterInMs(response?: PipelineResponse): number | undefined {\n if (!(response && [429, 503].includes(response.status))) return undefined;\n try {\n // Headers: \"retry-after-ms\", \"x-ms-retry-after-ms\", \"Retry-After\"\n for (const header of AllRetryAfterHeaders) {\n const retryAfterValue = parseHeaderValueAsNumber(response, header);\n if (retryAfterValue === 0 || retryAfterValue) {\n // \"Retry-After\" header ==> seconds\n // \"retry-after-ms\", \"x-ms-retry-after-ms\" headers ==> milli-seconds\n const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1;\n return retryAfterValue * multiplyingFactor; // in milli-seconds\n }\n }\n\n // RetryAfterHeader (\"Retry-After\") has a special case where it might be formatted as a date instead of a number of seconds\n const retryAfterHeader = response.headers.get(RetryAfterHeader);\n if (!retryAfterHeader) return;\n\n const date = Date.parse(retryAfterHeader);\n const diff = date - Date.now();\n // negative diff would mean a date in the past, so retry asap with 0 milliseconds\n return Number.isFinite(diff) ? Math.max(0, diff) : undefined;\n } catch (e: any) {\n return undefined;\n }\n}\n\n/**\n * A response is a retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n */\nexport function isThrottlingRetryResponse(response?: PipelineResponse): boolean {\n return Number.isFinite(getRetryAfterInMs(response));\n}\n\nexport function throttlingRetryStrategy(): RetryStrategy {\n return {\n name: \"throttlingRetryStrategy\",\n retry({ response }) {\n const retryAfterInMs = getRetryAfterInMs(response);\n if (!Number.isFinite(retryAfterInMs)) {\n return { skipStrategy: true };\n }\n return {\n retryAfterInMs,\n };\n },\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/helpers.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/helpers.js deleted file mode 100644 index a1c1183..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/helpers.js +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { AbortError } from "@azure/abort-controller"; -const StandardAbortMessage = "The operation was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. - * @param delayInMs - The number of milliseconds to be delayed. - * @param value - The value to be resolved with after a timeout of t milliseconds. - * @param options - The options for delay - currently abort options - * - abortSignal - The abortSignal associated with containing operation. - * - abortErrorMsg - The abort error message associated with containing operation. - * @returns Resolved promise - */ -export function delay(delayInMs, value, options) { - return new Promise((resolve, reject) => { - let timer = undefined; - let onAborted = undefined; - const rejectOnAbort = () => { - return reject(new AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); - } - timer = setTimeout(() => { - removeListeners(); - resolve(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); - } - }); -} -/** - * @internal - * @returns the parsed value or undefined if the parsed value is invalid. - */ -export function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/helpers.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/helpers.js.map deleted file mode 100644 index d6a91dc..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/util/helpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAGtE,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,UAAU,KAAK,CACnB,SAAiB,EACjB,KAAS,EACT,OAGC;IAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,KAAK,GAA8C,SAAS,CAAC;QACjE,IAAI,SAAS,GAA6B,SAAS,CAAC;QAEpD,MAAM,aAAa,GAAG,GAAS,EAAE;YAC/B,OAAO,MAAM,CACX,IAAI,UAAU,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,EAAC,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,CACvF,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,eAAe,GAAG,GAAS,EAAE;YACjC,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,SAAS,EAAE;gBACrC,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;aAC7D;QACH,CAAC,CAAC;QAEF,SAAS,GAAG,GAAS,EAAE;YACrB,IAAI,KAAK,EAAE;gBACT,YAAY,CAAC,KAAK,CAAC,CAAC;aACrB;YACD,eAAe,EAAE,CAAC;YAClB,OAAO,aAAa,EAAE,CAAC;QACzB,CAAC,CAAC;QAEF,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE;YACvD,OAAO,aAAa,EAAE,CAAC;SACxB;QAED,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YACtB,eAAe,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,EAAE,SAAS,CAAC,CAAC;QAEd,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,EAAE;YACxB,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;SAC1D;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAA0B,EAC1B,UAAkB;IAElB,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC/C,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;QAAE,OAAO;IACrC,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError, AbortSignalLike } from \"@azure/abort-controller\";\nimport { PipelineResponse } from \"../interfaces\";\n\nconst StandardAbortMessage = \"The operation was aborted.\";\n\n/**\n * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds.\n * @param delayInMs - The number of milliseconds to be delayed.\n * @param value - The value to be resolved with after a timeout of t milliseconds.\n * @param options - The options for delay - currently abort options\n * - abortSignal - The abortSignal associated with containing operation.\n * - abortErrorMsg - The abort error message associated with containing operation.\n * @returns Resolved promise\n */\nexport function delay(\n delayInMs: number,\n value?: T,\n options?: {\n abortSignal?: AbortSignalLike;\n abortErrorMsg?: string;\n }\n): Promise {\n return new Promise((resolve, reject) => {\n let timer: ReturnType | undefined = undefined;\n let onAborted: (() => void) | undefined = undefined;\n\n const rejectOnAbort = (): void => {\n return reject(\n new AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)\n );\n };\n\n const removeListeners = (): void => {\n if (options?.abortSignal && onAborted) {\n options.abortSignal.removeEventListener(\"abort\", onAborted);\n }\n };\n\n onAborted = (): void => {\n if (timer) {\n clearTimeout(timer);\n }\n removeListeners();\n return rejectOnAbort();\n };\n\n if (options?.abortSignal && options.abortSignal.aborted) {\n return rejectOnAbort();\n }\n\n timer = setTimeout(() => {\n removeListeners();\n resolve(value);\n }, delayInMs);\n\n if (options?.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", onAborted);\n }\n });\n}\n\n/**\n * @internal\n * @returns the parsed value or undefined if the parsed value is invalid.\n */\nexport function parseHeaderValueAsNumber(\n response: PipelineResponse,\n headerName: string\n): number | undefined {\n const value = response.headers.get(headerName);\n if (!value) return;\n const valueAsNum = Number(value);\n if (Number.isNaN(valueAsNum)) return;\n return valueAsNum;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.browser.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.browser.js deleted file mode 100644 index 65d8b5e..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.browser.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export const custom = {}; -//# sourceMappingURL=inspect.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.browser.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.browser.js.map deleted file mode 100644 index edb1168..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inspect.browser.js","sourceRoot":"","sources":["../../../src/util/inspect.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const custom = {};\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.js deleted file mode 100644 index 53fba75..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { inspect } from "util"; -export const custom = inspect.custom; -//# sourceMappingURL=inspect.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.js.map deleted file mode 100644 index 5ba871c..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../../src/util/inspect.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { inspect } from \"util\";\n\nexport const custom = inspect.custom;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/sanitizer.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/sanitizer.js deleted file mode 100644 index 4ea4b25..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/sanitizer.js +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { isObject } from "@azure/core-util"; -const RedactedString = "REDACTED"; -// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts -const defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate", -]; -const defaultAllowedQueryParameters = ["api-version"]; -/** - * @internal - */ -export class Sanitizer { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = new Set(); - return JSON.stringify(obj, (key, value) => { - // Ensure Errors include their interesting non-enumerable members - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } - else if (key === "url") { - return this.sanitizeUrl(value); - } - else if (key === "query") { - return this.sanitizeQuery(value); - } - else if (key === "body") { - // Don't log the request body - return undefined; - } - else if (key === "response") { - // Don't log response again - return undefined; - } - else if (key === "operationSpec") { - // When using sendOperationRequest, the request carries a massive - // field with the autorest spec. No need to log it. - return undefined; - } - else if (Array.isArray(value) || isObject(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } - else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } - else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null) { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } -} -//# sourceMappingURL=sanitizer.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/sanitizer.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/sanitizer.js.map deleted file mode 100644 index 728401b..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/sanitizer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sanitizer.js","sourceRoot":"","sources":["../../../src/util/sanitizer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAiB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAqB3D,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC,sFAAsF;AACtF,MAAM,yBAAyB,GAAG;IAChC,wBAAwB;IACxB,+BAA+B;IAC/B,gBAAgB;IAChB,6BAA6B;IAC7B,iBAAiB;IACjB,mBAAmB;IACnB,OAAO;IACP,0BAA0B;IAC1B,aAAa;IAEb,kCAAkC;IAClC,8BAA8B;IAC9B,8BAA8B;IAC9B,6BAA6B;IAC7B,+BAA+B;IAC/B,wBAAwB;IACxB,gCAAgC;IAChC,+BAA+B;IAC/B,QAAQ;IAER,QAAQ;IACR,iBAAiB;IACjB,eAAe;IACf,YAAY;IACZ,gBAAgB;IAChB,cAAc;IACd,MAAM;IACN,MAAM;IACN,SAAS;IACT,UAAU;IACV,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,eAAe;IACf,QAAQ;IACR,YAAY;IACZ,aAAa;IACb,QAAQ;IACR,mBAAmB;IACnB,YAAY;IACZ,kBAAkB;CACnB,CAAC;AAEF,MAAM,6BAA6B,GAAa,CAAC,aAAa,CAAC,CAAC;AAEhE;;GAEG;AACH,MAAM,OAAO,SAAS;IAIpB,YAAY,EACV,4BAA4B,EAAE,kBAAkB,GAAG,EAAE,EACrD,gCAAgC,EAAE,sBAAsB,GAAG,EAAE,MACzC,EAAE;QACtB,kBAAkB,GAAG,yBAAyB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC1E,sBAAsB,GAAG,6BAA6B,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;QAEtF,IAAI,CAAC,kBAAkB,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CA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B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YACf,OAAO,KAAK,CAAC;SACd;QAED,KAAK,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,YAAY,EAAE;YACpC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,EAAE;gBACvD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;aAC3C;SACF;QAED,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { UnknownObject, isObject } from \"@azure/core-util\";\n\n/**\n * @internal\n */\nexport interface SanitizerOptions {\n /**\n * Header names whose values will be logged when logging is enabled.\n * Defaults include a list of well-known safe headers. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n */\n additionalAllowedHeaderNames?: string[];\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n */\n additionalAllowedQueryParameters?: string[];\n}\n\nconst RedactedString = \"REDACTED\";\n\n// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts\nconst defaultAllowedHeaderNames = [\n \"x-ms-client-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-useragent\",\n \"x-ms-correlation-request-id\",\n \"x-ms-request-id\",\n \"client-request-id\",\n \"ms-cv\",\n \"return-client-request-id\",\n \"traceparent\",\n\n \"Access-Control-Allow-Credentials\",\n \"Access-Control-Allow-Headers\",\n \"Access-Control-Allow-Methods\",\n \"Access-Control-Allow-Origin\",\n \"Access-Control-Expose-Headers\",\n \"Access-Control-Max-Age\",\n \"Access-Control-Request-Headers\",\n \"Access-Control-Request-Method\",\n \"Origin\",\n\n \"Accept\",\n \"Accept-Encoding\",\n \"Cache-Control\",\n \"Connection\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"ETag\",\n \"Expires\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"Last-Modified\",\n \"Pragma\",\n \"Request-Id\",\n \"Retry-After\",\n \"Server\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"WWW-Authenticate\",\n];\n\nconst defaultAllowedQueryParameters: string[] = [\"api-version\"];\n\n/**\n * @internal\n */\nexport class Sanitizer {\n private allowedHeaderNames: Set;\n private allowedQueryParameters: Set;\n\n constructor({\n additionalAllowedHeaderNames: allowedHeaderNames = [],\n additionalAllowedQueryParameters: allowedQueryParameters = [],\n }: SanitizerOptions = {}) {\n allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames);\n allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters);\n\n this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n }\n\n public sanitize(obj: unknown): string {\n const seen = new Set();\n return JSON.stringify(\n obj,\n (key: string, value: unknown) => {\n // Ensure Errors include their interesting non-enumerable members\n if (value instanceof Error) {\n return {\n ...value,\n name: value.name,\n message: value.message,\n };\n }\n\n if (key === \"headers\") {\n return this.sanitizeHeaders(value as UnknownObject);\n } else if (key === \"url\") {\n return this.sanitizeUrl(value as string);\n } else if (key === \"query\") {\n return this.sanitizeQuery(value as UnknownObject);\n } else if (key === \"body\") {\n // Don't log the request body\n return undefined;\n } else if (key === \"response\") {\n // Don't log response again\n return undefined;\n } else if (key === \"operationSpec\") {\n // When using sendOperationRequest, the request carries a massive\n // field with the autorest spec. No need to log it.\n return undefined;\n } else if (Array.isArray(value) || isObject(value)) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n\n return value;\n },\n 2\n );\n }\n\n private sanitizeHeaders(obj: UnknownObject): UnknownObject {\n const sanitized: UnknownObject = {};\n for (const key of Object.keys(obj)) {\n if (this.allowedHeaderNames.has(key.toLowerCase())) {\n sanitized[key] = obj[key];\n } else {\n sanitized[key] = RedactedString;\n }\n }\n return sanitized;\n }\n\n private sanitizeQuery(value: UnknownObject): UnknownObject {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n const sanitized: UnknownObject = {};\n\n for (const k of Object.keys(value)) {\n if (this.allowedQueryParameters.has(k.toLowerCase())) {\n sanitized[k] = value[k];\n } else {\n sanitized[k] = RedactedString;\n }\n }\n\n return sanitized;\n }\n\n private sanitizeUrl(value: string): string {\n if (typeof value !== \"string\" || value === null) {\n return value;\n }\n\n const url = new URL(value);\n\n if (!url.search) {\n return value;\n }\n\n for (const [key] of url.searchParams) {\n if (!this.allowedQueryParameters.has(key.toLowerCase())) {\n url.searchParams.set(key, RedactedString);\n }\n }\n\n return url.toString();\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/tokenCycler.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/tokenCycler.js deleted file mode 100644 index 2b6617a..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/tokenCycler.js +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { delay } from "./helpers"; -// Default options for the cycler if none are provided -export const DEFAULT_CYCLER_OPTIONS = { - forcedRefreshWindowInMs: 1000, - retryIntervalInMs: 3000, - refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry -}; -/** - * Converts an an unreliable access token getter (which may resolve with null) - * into an AccessTokenGetter by retrying the unreliable getter in a regular - * interval. - * - * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null. - * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts. - * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception. - * @returns - A promise that, if it resolves, will resolve with an access token. - */ -async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { - // This wrapper handles exceptions gracefully as long as we haven't exceeded - // the timeout. - async function tryGetAccessToken() { - if (Date.now() < refreshTimeout) { - try { - return await getAccessToken(); - } - catch (_a) { - return null; - } - } - else { - const finalToken = await getAccessToken(); - // Timeout is up, so throw if it's still null - if (finalToken === null) { - throw new Error("Failed to refresh access token."); - } - return finalToken; - } - } - let token = await tryGetAccessToken(); - while (token === null) { - await delay(retryIntervalInMs); - token = await tryGetAccessToken(); - } - return token; -} -/** - * Creates a token cycler from a credential, scopes, and optional settings. - * - * A token cycler represents a way to reliably retrieve a valid access token - * from a TokenCredential. It will handle initializing the token, refreshing it - * when it nears expiration, and synchronizes refresh attempts to avoid - * concurrency hazards. - * - * @param credential - the underlying TokenCredential that provides the access - * token - * @param tokenCyclerOptions - optionally override default settings for the cycler - * - * @returns - a function that reliably produces a valid access token - */ -export function createTokenCycler(credential, tokenCyclerOptions) { - let refreshWorker = null; - let token = null; - let tenantId; - const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); - /** - * This little holder defines several predicates that we use to construct - * the rules of refreshing the token. - */ - const cycler = { - /** - * Produces true if a refresh job is currently in progress. - */ - get isRefreshing() { - return refreshWorker !== null; - }, - /** - * Produces true if the cycler SHOULD refresh (we are within the refresh - * window and not already refreshing) - */ - get shouldRefresh() { - var _a; - return (!cycler.isRefreshing && - ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now()); - }, - /** - * Produces true if the cycler MUST refresh (null or nearly-expired - * token). - */ - get mustRefresh() { - return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()); - }, - }; - /** - * Starts a refresh job or returns the existing job if one is already - * running. - */ - function refresh(scopes, getTokenOptions) { - var _a; - if (!cycler.isRefreshing) { - // We bind `scopes` here to avoid passing it around a lot - const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); - // Take advantage of promise chaining to insert an assignment to `token` - // before the refresh can be considered done. - refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, - // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now()) - .then((_token) => { - refreshWorker = null; - token = _token; - tenantId = getTokenOptions.tenantId; - return token; - }) - .catch((reason) => { - // We also should reset the refresher if we enter a failed state. All - // existing awaiters will throw, but subsequent requests will start a - // new retry chain. - refreshWorker = null; - token = null; - tenantId = undefined; - throw reason; - }); - } - return refreshWorker; - } - return async (scopes, tokenOptions) => { - // - // Simple rules: - // - If we MUST refresh, then return the refresh task, blocking - // the pipeline until a token is available. - // - If we SHOULD refresh, then run refresh but don't return it - // (we can still use the cached token). - // - Return the token, since it's fine if we didn't return in - // step 1. - // - // If the tenantId passed in token options is different to the one we have - // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to - // refresh the token with the new tenantId or token. - const mustRefresh = tenantId !== tokenOptions.tenantId || Boolean(tokenOptions.claims) || cycler.mustRefresh; - if (mustRefresh) - return refresh(scopes, tokenOptions); - if (cycler.shouldRefresh) { - refresh(scopes, tokenOptions); - } - return token; - }; -} -//# sourceMappingURL=tokenCycler.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/tokenCycler.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/tokenCycler.js.map deleted file mode 100644 index a70f597..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/tokenCycler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tokenCycler.js","sourceRoot":"","sources":["../../../src/util/tokenCycler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAkClC,sDAAsD;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAuB;IACxD,uBAAuB,EAAE,IAAI;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C,CAAC;IAC/C,CAAC;IAED,OAAO,KAAK,EAAE,MAAyB,EAAE,YAA6B,EAAwB,EAAE;QAC9F,EAAE;QACF,gBAAgB;QAChB,+DAA+D;QAC/D,6CAA6C;QAC7C,+DAA+D;QAC/D,yCAAyC;QACzC,6DAA6D;QAC7D,YAAY;QACZ,EAAE;QAEF,0EAA0E;QAC1E,kHAAkH;QAClH,oDAAoD;QACpD,MAAM,WAAW,GACf,QAAQ,KAAK,YAAY,CAAC,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC;QAE3F,IAAI,WAAW;YAAE,OAAO,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAEtD,IAAI,MAAM,CAAC,aAAa,EAAE;YACxB,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;SAC/B;QAED,OAAO,KAAoB,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { delay } from \"./helpers\";\n\n/**\n * A function that gets a promise of an access token and allows providing\n * options.\n *\n * @param options - the options to pass to the underlying token provider\n */\nexport type AccessTokenGetter = (\n scopes: string | string[],\n options: GetTokenOptions\n) => Promise;\n\nexport interface TokenCyclerOptions {\n /**\n * The window of time before token expiration during which the token will be\n * considered unusable due to risk of the token expiring before sending the\n * request.\n *\n * This will only become meaningful if the refresh fails for over\n * (refreshWindow - forcedRefreshWindow) milliseconds.\n */\n forcedRefreshWindowInMs: number;\n /**\n * Interval in milliseconds to retry failed token refreshes.\n */\n retryIntervalInMs: number;\n /**\n * The window of time before token expiration during which\n * we will attempt to refresh the token.\n */\n refreshWindowInMs: number;\n}\n\n// Default options for the cycler if none are provided\nexport const DEFAULT_CYCLER_OPTIONS: TokenCyclerOptions = {\n forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires\n retryIntervalInMs: 3000, // Allow refresh attempts every 3s\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null.\n * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts.\n * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception.\n * @returns - A promise that, if it resolves, will resolve with an access token.\n */\nasync function beginRefresh(\n getAccessToken: () => Promise,\n retryIntervalInMs: number,\n refreshTimeout: number\n): Promise {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken(): Promise {\n if (Date.now() < refreshTimeout) {\n try {\n return await getAccessToken();\n } catch {\n return null;\n }\n } else {\n const finalToken = await getAccessToken();\n\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n\n return finalToken;\n }\n }\n\n let token: AccessToken | null = await tryGetAccessToken();\n\n while (token === null) {\n await delay(retryIntervalInMs);\n\n token = await tryGetAccessToken();\n }\n\n return token;\n}\n\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nexport function createTokenCycler(\n credential: TokenCredential,\n tokenCyclerOptions?: Partial\n): AccessTokenGetter {\n let refreshWorker: Promise | null = null;\n let token: AccessToken | null = null;\n let tenantId: string | undefined;\n\n const options = {\n ...DEFAULT_CYCLER_OPTIONS,\n ...tokenCyclerOptions,\n };\n\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing(): boolean {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh(): boolean {\n return (\n !cycler.isRefreshing &&\n (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now()\n );\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh(): boolean {\n return (\n token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()\n );\n },\n };\n\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(\n scopes: string | string[],\n getTokenOptions: GetTokenOptions\n ): Promise {\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = (): Promise =>\n credential.getToken(scopes, getTokenOptions);\n\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(\n tryGetAccessToken,\n options.retryIntervalInMs,\n // If we don't have a token, then we should timeout immediately\n token?.expiresOnTimestamp ?? Date.now()\n )\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n tenantId = getTokenOptions.tenantId;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n tenantId = undefined;\n throw reason;\n });\n }\n\n return refreshWorker as Promise;\n }\n\n return async (scopes: string | string[], tokenOptions: GetTokenOptions): Promise => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n\n // If the tenantId passed in token options is different to the one we have\n // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to\n // refresh the token with the new tenantId or token.\n const mustRefresh =\n tenantId !== tokenOptions.tenantId || Boolean(tokenOptions.claims) || cycler.mustRefresh;\n\n if (mustRefresh) return refresh(scopes, tokenOptions);\n\n if (cycler.shouldRefresh) {\n refresh(scopes, tokenOptions);\n }\n\n return token as AccessToken;\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgent.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgent.js deleted file mode 100644 index 865b799..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgent.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { getHeaderName, setPlatformSpecificData } from "./userAgentPlatform"; -import { SDK_VERSION } from "../constants"; -function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); -} -/** - * @internal - */ -export function getUserAgentHeaderName() { - return getHeaderName(); -} -/** - * @internal - */ -export function getUserAgentValue(prefix) { - const runtimeInfo = new Map(); - runtimeInfo.set("core-rest-pipeline", SDK_VERSION); - setPlatformSpecificData(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; -} -//# sourceMappingURL=userAgent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgent.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgent.js.map deleted file mode 100644 index 9b985f0..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../../../src/util/userAgent.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,SAAS,kBAAkB,CAAC,aAAkC;IAC5D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,aAAa,EAAE;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;QAC9C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnB;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,aAAa,EAAE,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAe;IAC/C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC9C,WAAW,CAAC,GAAG,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;IACnD,uBAAuB,CAAC,WAAW,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IAC3E,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getHeaderName, setPlatformSpecificData } from \"./userAgentPlatform\";\nimport { SDK_VERSION } from \"../constants\";\n\nfunction getUserAgentString(telemetryInfo: Map): string {\n const parts: string[] = [];\n for (const [key, value] of telemetryInfo) {\n const token = value ? `${key}/${value}` : key;\n parts.push(token);\n }\n return parts.join(\" \");\n}\n\n/**\n * @internal\n */\nexport function getUserAgentHeaderName(): string {\n return getHeaderName();\n}\n\n/**\n * @internal\n */\nexport function getUserAgentValue(prefix?: string): string {\n const runtimeInfo = new Map();\n runtimeInfo.set(\"core-rest-pipeline\", SDK_VERSION);\n setPlatformSpecificData(runtimeInfo);\n const defaultAgent = getUserAgentString(runtimeInfo);\n const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;\n return userAgentValue;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.browser.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.browser.js deleted file mode 100644 index cfc6ec0..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.browser.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/* - * NOTE: When moving this file, please update "browser" section in package.json. - */ -/** - * @internal - */ -export function getHeaderName() { - return "x-ms-useragent"; -} -/** - * @internal - */ -export function setPlatformSpecificData(map) { - var _a, _b, _c; - const localNavigator = globalThis.navigator; - map.set("OS", ((_c = (_b = (_a = localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.userAgentData) === null || _a === void 0 ? void 0 : _a.platform) !== null && _b !== void 0 ? _b : localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.platform) !== null && _c !== void 0 ? _c : "unknown").replace(" ", "")); -} -//# sourceMappingURL=userAgentPlatform.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.browser.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.browser.js.map deleted file mode 100644 index 9baafd4..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userAgentPlatform.browser.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AAEH;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAQD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAwB;;IAC9D,MAAM,cAAc,GAAG,UAAU,CAAC,SAAwB,CAAC;IAC3D,GAAG,CAAC,GAAG,CACL,IAAI,EACJ,CAAC,MAAA,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,aAAa,0CAAE,QAAQ,mCAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,QAAQ,mCAAI,SAAS,CAAC,CAAC,OAAO,CACxF,GAAG,EACH,EAAE,CACH,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json.\n */\n\n/**\n * @internal\n */\nexport function getHeaderName(): string {\n return \"x-ms-useragent\";\n}\n\ninterface NavigatorEx extends Navigator {\n userAgentData?: {\n platform?: string;\n };\n}\n\n/**\n * @internal\n */\nexport function setPlatformSpecificData(map: Map): void {\n const localNavigator = globalThis.navigator as NavigatorEx;\n map.set(\n \"OS\",\n (localNavigator?.userAgentData?.platform ?? localNavigator?.platform ?? \"unknown\").replace(\n \" \",\n \"\"\n )\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.js deleted file mode 100644 index b9e83e7..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import * as os from "os"; -/** - * @internal - */ -export function getHeaderName() { - return "User-Agent"; -} -/** - * @internal - */ -export function setPlatformSpecificData(map) { - map.set("Node", process.version); - map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); -} -//# sourceMappingURL=userAgentPlatform.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.js.map deleted file mode 100644 index 2331ea9..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAwB;IAC9D,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as os from \"os\";\n\n/**\n * @internal\n */\nexport function getHeaderName(): string {\n return \"User-Agent\";\n}\n\n/**\n * @internal\n */\nexport function setPlatformSpecificData(map: Map): void {\n map.set(\"Node\", process.version);\n map.set(\"OS\", `(${os.arch()}-${os.type()}-${os.release()})`);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.native.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.native.js deleted file mode 100644 index 4975bde..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.native.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/* - * NOTE: When moving this file, please update "react-native" section in package.json. - */ -const { Platform } = require("react-native"); // eslint-disable-line import/no-extraneous-dependencies, @typescript-eslint/no-require-imports -/** - * @internal - */ -export function getHeaderName() { - return "x-ms-useragent"; -} -/** - * @internal - */ -export function setPlatformSpecificData(map) { - var _a; - if ((_a = Platform.constants) === null || _a === void 0 ? void 0 : _a.reactNativeVersion) { - const { major, minor, patch } = Platform.constants.reactNativeVersion; - map.set("react-native", `${major}.${minor}.${patch}`); - } - map.set("OS", `${Platform.OS}-${Platform.Version}`); -} -//# sourceMappingURL=userAgentPlatform.native.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.native.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.native.js.map deleted file mode 100644 index e1a81a6..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.native.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userAgentPlatform.native.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.native.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,+FAA+F;AAE7I;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAwB;;IAC9D,IAAI,MAAA,QAAQ,CAAC,SAAS,0CAAE,kBAAkB,EAAE;QAC1C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC;QACtE,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;KACvD;IACD,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"react-native\" section in package.json.\n */\nconst { Platform } = require(\"react-native\"); // eslint-disable-line import/no-extraneous-dependencies, @typescript-eslint/no-require-imports\n\n/**\n * @internal\n */\nexport function getHeaderName(): string {\n return \"x-ms-useragent\";\n}\n\n/**\n * @internal\n */\nexport function setPlatformSpecificData(map: Map): void {\n if (Platform.constants?.reactNativeVersion) {\n const { major, minor, patch } = Platform.constants.reactNativeVersion;\n map.set(\"react-native\", `${major}.${minor}.${patch}`);\n }\n map.set(\"OS\", `${Platform.OS}-${Platform.Version}`);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/xhrHttpClient.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/xhrHttpClient.js deleted file mode 100644 index 9402a24..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/xhrHttpClient.js +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { AbortError } from "@azure/abort-controller"; -import { createHttpHeaders } from "./httpHeaders"; -import { RestError } from "./restError"; -function isNodeReadableStream(body) { - return body && typeof body.pipe === "function"; -} -/** - * Checks if the body is a ReadableStream supported by browsers - */ -function isReadableStream(body) { - return Boolean(body && - typeof body.getReader === "function" && - typeof body.tee === "function"); -} -/** - * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. - * @internal - */ -class XhrHttpClient { - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (isInsecure && !request.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); - } - const xhr = new XMLHttpRequest(); - if (request.proxySettings) { - throw new Error("HTTP proxy is not supported in browser environment"); - } - const abortSignal = request.abortSignal; - if (abortSignal) { - if (abortSignal.aborted) { - throw new AbortError("The operation was aborted."); - } - const listener = () => { - xhr.abort(); - }; - abortSignal.addEventListener("abort", listener); - xhr.addEventListener("readystatechange", () => { - if (xhr.readyState === XMLHttpRequest.DONE) { - abortSignal.removeEventListener("abort", listener); - } - }); - } - addProgressListener(xhr.upload, request.onUploadProgress); - addProgressListener(xhr, request.onDownloadProgress); - xhr.open(request.method, request.url); - xhr.timeout = request.timeout; - xhr.withCredentials = request.withCredentials; - for (const [name, value] of request.headers) { - xhr.setRequestHeader(name, value); - } - xhr.responseType = ((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.size) ? "blob" : "text"; - const body = typeof request.body === "function" ? request.body() : request.body; - if (isNodeReadableStream(body) || isReadableStream(body)) { - throw new Error("streams are not supported in XhrHttpClient."); - } - xhr.send(body === undefined ? null : body); - if (xhr.responseType === "blob") { - return new Promise((resolve, reject) => { - handleBlobResponse(xhr, request, resolve, reject); - rejectOnTerminalEvent(request, xhr, reject); - }); - } - else { - return new Promise(function (resolve, reject) { - xhr.addEventListener("load", () => resolve({ - request, - status: xhr.status, - headers: parseHeaders(xhr), - bodyAsText: xhr.responseText, - })); - rejectOnTerminalEvent(request, xhr, reject); - }); - } - } -} -function handleBlobResponse(xhr, request, res, rej) { - xhr.addEventListener("readystatechange", () => { - var _a, _b; - // Resolve as soon as headers are loaded - if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) { - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(Number.POSITIVE_INFINITY)) || - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(xhr.status))) { - const blobBody = new Promise((resolve, reject) => { - xhr.addEventListener("load", () => { - resolve(xhr.response); - }); - rejectOnTerminalEvent(request, xhr, reject); - }); - res({ - request, - status: xhr.status, - headers: parseHeaders(xhr), - blobBody, - }); - } - else { - xhr.addEventListener("load", () => { - // xhr.response is of Blob type if the request is sent with xhr.responseType === "blob" - // but the status code is not one of the stream response status codes, - // so treat it as text and convert from Blob to text - if (xhr.response) { - xhr.response - .text() - .then((text) => { - res({ - request: request, - status: xhr.status, - headers: parseHeaders(xhr), - bodyAsText: text, - }); - return; - }) - .catch((e) => { - rej(e); - }); - } - else { - res({ - request, - status: xhr.status, - headers: parseHeaders(xhr), - }); - } - }); - } - } - }); -} -function addProgressListener(xhr, listener) { - if (listener) { - xhr.addEventListener("progress", (rawEvent) => listener({ - loadedBytes: rawEvent.loaded, - })); - } -} -function parseHeaders(xhr) { - const responseHeaders = createHttpHeaders(); - const headerLines = xhr - .getAllResponseHeaders() - .trim() - .split(/[\r\n]+/); - for (const line of headerLines) { - const index = line.indexOf(":"); - const headerName = line.slice(0, index); - const headerValue = line.slice(index + 2); - responseHeaders.set(headerName, headerValue); - } - return responseHeaders; -} -function rejectOnTerminalEvent(request, xhr, reject) { - xhr.addEventListener("error", () => reject(new RestError(`Failed to send request to ${request.url}`, { - code: RestError.REQUEST_SEND_ERROR, - request, - }))); - const abortError = new AbortError("The operation was aborted."); - xhr.addEventListener("abort", () => reject(abortError)); - xhr.addEventListener("timeout", () => reject(abortError)); -} -/** - * Create a new HttpClient instance for the browser environment. - * @internal - */ -export function createXhrHttpClient() { - return new XhrHttpClient(); -} -//# sourceMappingURL=xhrHttpClient.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/xhrHttpClient.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/xhrHttpClient.js.map deleted file mode 100644 index 6934e73..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist-esm/src/xhrHttpClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"xhrHttpClient.js","sourceRoot":"","sources":["../../src/xhrHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAQrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,SAAS,oBAAoB,CAAC,IAAS;IACrC,OAAO,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,IAAa;IACrC,OAAO,OAAO,CACZ,IAAI;QACF,OAAQ,IAAuB,CAAC,SAAS,KAAK,UAAU;QACxD,OAAQ,IAAuB,CAAC,GAAG,KAAK,UAAU,CACrD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,aAAa;IACjB;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,OAAwB;;QAC/C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,UAAU,GAAG,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC;QAE7C,IAAI,UAAU,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE;YAClD,MAAM,IAAI,KAAK,CAAC,qBAAqB,OAAO,CAAC,GAAG,0CAA0C,CAAC,CAAC;SAC7F;QAED,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QAEjC,IAAI,OAAO,CAAC,aAAa,EAAE;YACzB,MAAM,IAAI,K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,CACF,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;IAChE,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IACxD,GAAG,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,aAAa,EAAE,CAAC;AAC7B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError } from \"@azure/abort-controller\";\nimport {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n TransferProgressEvent,\n} from \"./interfaces\";\nimport { createHttpHeaders } from \"./httpHeaders\";\nimport { RestError } from \"./restError\";\n\nfunction isNodeReadableStream(body: any): body is NodeJS.ReadableStream {\n return body && typeof body.pipe === \"function\";\n}\n\n/**\n * Checks if the body is a ReadableStream supported by browsers\n */\nfunction isReadableStream(body: unknown): body is ReadableStream {\n return Boolean(\n body &&\n typeof (body as ReadableStream).getReader === \"function\" &&\n typeof (body as ReadableStream).tee === \"function\"\n );\n}\n\n/**\n * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests.\n * @internal\n */\nclass XhrHttpClient implements HttpClient {\n /**\n * Makes a request over an underlying transport layer and returns the response.\n * @param request - The request to be made.\n */\n public async sendRequest(request: PipelineRequest): Promise {\n const url = new URL(request.url);\n const isInsecure = url.protocol !== \"https:\";\n\n if (isInsecure && !request.allowInsecureConnection) {\n throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n }\n\n const xhr = new XMLHttpRequest();\n\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n\n const abortSignal = request.abortSignal;\n if (abortSignal) {\n if (abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n\n const listener = (): void => {\n xhr.abort();\n };\n abortSignal.addEventListener(\"abort\", listener);\n xhr.addEventListener(\"readystatechange\", () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n abortSignal.removeEventListener(\"abort\", listener);\n }\n });\n }\n\n addProgressListener(xhr.upload, request.onUploadProgress);\n addProgressListener(xhr, request.onDownloadProgress);\n\n xhr.open(request.method, request.url);\n xhr.timeout = request.timeout;\n xhr.withCredentials = request.withCredentials;\n for (const [name, value] of request.headers) {\n xhr.setRequestHeader(name, value);\n }\n\n xhr.responseType = request.streamResponseStatusCodes?.size ? \"blob\" : \"text\";\n\n const body = typeof request.body === \"function\" ? request.body() : request.body;\n if (isNodeReadableStream(body) || isReadableStream(body)) {\n throw new Error(\"streams are not supported in XhrHttpClient.\");\n }\n\n xhr.send(body === undefined ? null : body);\n\n if (xhr.responseType === \"blob\") {\n return new Promise((resolve, reject) => {\n handleBlobResponse(xhr, request, resolve, reject);\n rejectOnTerminalEvent(request, xhr, reject);\n });\n } else {\n return new Promise(function (resolve, reject) {\n xhr.addEventListener(\"load\", () =>\n resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n bodyAsText: xhr.responseText,\n })\n );\n rejectOnTerminalEvent(request, xhr, reject);\n });\n }\n }\n}\n\nfunction handleBlobResponse(\n xhr: XMLHttpRequest,\n request: PipelineRequest,\n res: (value: PipelineResponse | PromiseLike) => void,\n rej: (reason?: any) => void\n): void {\n xhr.addEventListener(\"readystatechange\", () => {\n // Resolve as soon as headers are loaded\n if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {\n if (\n // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) ||\n request.streamResponseStatusCodes?.has(xhr.status)\n ) {\n const blobBody = new Promise((resolve, reject) => {\n xhr.addEventListener(\"load\", () => {\n resolve(xhr.response);\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n res({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n blobBody,\n });\n } else {\n xhr.addEventListener(\"load\", () => {\n // xhr.response is of Blob type if the request is sent with xhr.responseType === \"blob\"\n // but the status code is not one of the stream response status codes,\n // so treat it as text and convert from Blob to text\n if (xhr.response) {\n xhr.response\n .text()\n .then((text: string) => {\n res({\n request: request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n bodyAsText: text,\n });\n return;\n })\n .catch((e: any) => {\n rej(e);\n });\n } else {\n res({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n });\n }\n });\n }\n }\n });\n}\n\nfunction addProgressListener(\n xhr: XMLHttpRequestEventTarget,\n listener?: (progress: TransferProgressEvent) => void\n): void {\n if (listener) {\n xhr.addEventListener(\"progress\", (rawEvent) =>\n listener({\n loadedBytes: rawEvent.loaded,\n })\n );\n }\n}\n\nfunction parseHeaders(xhr: XMLHttpRequest): HttpHeaders {\n const responseHeaders = createHttpHeaders();\n const headerLines = xhr\n .getAllResponseHeaders()\n .trim()\n .split(/[\\r\\n]+/);\n for (const line of headerLines) {\n const index = line.indexOf(\":\");\n const headerName = line.slice(0, index);\n const headerValue = line.slice(index + 2);\n responseHeaders.set(headerName, headerValue);\n }\n return responseHeaders;\n}\n\nfunction rejectOnTerminalEvent(\n request: PipelineRequest,\n xhr: XMLHttpRequest,\n reject: (err: any) => void\n): void {\n xhr.addEventListener(\"error\", () =>\n reject(\n new RestError(`Failed to send request to ${request.url}`, {\n code: RestError.REQUEST_SEND_ERROR,\n request,\n })\n )\n );\n const abortError = new AbortError(\"The operation was aborted.\");\n xhr.addEventListener(\"abort\", () => reject(abortError));\n xhr.addEventListener(\"timeout\", () => reject(abortError));\n}\n\n/**\n * Create a new HttpClient instance for the browser environment.\n * @internal\n */\nexport function createXhrHttpClient(): HttpClient {\n return new XhrHttpClient();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist/index.js b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist/index.js deleted file mode 100644 index 2c9269b..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist/index.js +++ /dev/null @@ -1,2333 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var logger$1 = require('@azure/logger'); -var coreUtil = require('@azure/core-util'); -var os = require('os'); -var abortController = require('@azure/abort-controller'); -var FormData = require('form-data'); -var httpsProxyAgent = require('https-proxy-agent'); -var httpProxyAgent = require('http-proxy-agent'); -var coreTracing = require('@azure/core-tracing'); -var util = require('util'); -var http = require('http'); -var https = require('https'); -var zlib = require('zlib'); -var stream = require('stream'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var os__namespace = /*#__PURE__*/_interopNamespace(os); -var FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData); -var http__namespace = /*#__PURE__*/_interopNamespace(http); -var https__namespace = /*#__PURE__*/_interopNamespace(https); -var zlib__namespace = /*#__PURE__*/_interopNamespace(zlib); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); -/** - * A private implementation of Pipeline. - * Do not export this class from the package. - * @internal - */ -class HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = undefined; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options, - }); - this._orderedPolicies = undefined; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if ((options.name && policyDescriptor.policy.name === options.name) || - (options.phase && policyDescriptor.options.phase === options.phase)) { - removedPolicies.push(policyDescriptor.policy); - return false; - } - else { - return true; - } - }); - this._orderedPolicies = undefined; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new HttpPipeline(this._policies); - } - static create() { - return new HttpPipeline(); - } - orderPolicies() { - /** - * The goal of this method is to reliably order pipeline policies - * based on their declared requirements when they were added. - * - * Order is first determined by phase: - * - * 1. Serialize Phase - * 2. Policies not in a phase - * 3. Deserialize Phase - * 4. Retry Phase - * 5. Sign Phase - * - * Within each phase, policies are executed in the order - * they were added unless they were specified to execute - * before/after other policies or after a particular phase. - * - * To determine the final order, we will walk the policy list - * in phase order multiple times until all dependencies are - * satisfied. - * - * `afterPolicies` are the set of policies that must be - * executed before a given policy. This requirement is - * considered satisfied when each of the listed policies - * have been scheduled. - * - * `beforePolicies` are the set of policies that must be - * executed after a given policy. Since this dependency - * can be expressed by converting it into a equivalent - * `afterPolicies` declarations, they are normalized - * into that form for simplicity. - * - * An `afterPhase` dependency is considered satisfied when all - * policies in that phase have scheduled. - * - */ - const result = []; - // Track all policies we know about. - const policyMap = new Map(); - function createPhase(name) { - return { - name, - policies: new Set(), - hasRun: false, - hasAfterPolicies: false, - }; - } - // Track policies for each phase. - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - // a list of phases in order - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - // Small helper function to map phase name to each Phase - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } - else if (phase === "Serialize") { - return serializePhase; - } - else if (phase === "Deserialize") { - return deserializePhase; - } - else if (phase === "Sign") { - return signPhase; - } - else { - return noPhase; - } - } - // First walk each policy and create a node to track metadata. - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: new Set(), - dependants: new Set(), - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - // Now that each policy has a node, connect dependency references. - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - // Linking in both directions helps later - // when we want to notify dependants. - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - // To execute before another node, make it - // depend on the current node. - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - // Sets iterate in insertion order - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - // If this node is waiting on a phase to complete, - // we need to skip it for now. - // Even if the phase is empty, we should wait for it - // to be walked to avoid re-ordering policies. - continue; - } - if (node.dependsOn.size === 0) { - // If there's nothing else we're waiting for, we can - // add this policy to the result list. - result.push(node.policy); - // Notify anything that depends on this policy that - // the policy has been scheduled. - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - // if the phase isn't complete - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - // Try running noPhase to see if that unblocks this phase next tick. - // This can happen if a phase that happens before noPhase - // is waiting on a noPhase policy to complete. - walkPhase(noPhase); - } - // Don't proceed to the next phase until this phase finishes. - return; - } - if (phase.hasAfterPolicies) { - // Run any policies unblocked by this phase - walkPhase(noPhase); - } - } - } - // Iterate until we've put every node in the result list. - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - // Keep walking each phase in order until we can order every node. - walkPhases(); - // The result list *should* get at least one larger each time - // after the first full pass. - // Otherwise, we're going to loop forever. - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } -} -/** - * Creates a totally empty pipeline. - * Useful for testing or creating a custom one. - */ -function createEmptyPipeline() { - return HttpPipeline.create(); -} - -// Copyright (c) Microsoft Corporation. -const logger = logger$1.createClientLogger("core-rest-pipeline"); - -// Copyright (c) Microsoft Corporation. -const RedactedString = "REDACTED"; -// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts -const defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate", -]; -const defaultAllowedQueryParameters = ["api-version"]; -/** - * @internal - */ -class Sanitizer { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = new Set(); - return JSON.stringify(obj, (key, value) => { - // Ensure Errors include their interesting non-enumerable members - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } - else if (key === "url") { - return this.sanitizeUrl(value); - } - else if (key === "query") { - return this.sanitizeQuery(value); - } - else if (key === "body") { - // Don't log the request body - return undefined; - } - else if (key === "response") { - // Don't log response again - return undefined; - } - else if (key === "operationSpec") { - // When using sendOperationRequest, the request carries a massive - // field with the autorest spec. No need to log it. - return undefined; - } - else if (Array.isArray(value) || coreUtil.isObject(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } - else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } - else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null) { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } -} - -// Copyright (c) Microsoft Corporation. -/** - * The programmatic identifier of the logPolicy. - */ -const logPolicyName = "logPolicy"; -/** - * A policy that logs all requests and responses. - * @param options - Options to configure logPolicy. - */ -function logPolicy(options = {}) { - var _a; - const logger$1 = (_a = options.logger) !== null && _a !== void 0 ? _a : logger.info; - const sanitizer = new Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, - }); - return { - name: logPolicyName, - async sendRequest(request, next) { - if (!logger$1.enabled) { - return next(request); - } - logger$1(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger$1(`Response status code: ${response.status}`); - logger$1(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the redirectPolicy. - */ -const redirectPolicyName = "redirectPolicy"; -/** - * Methods that are allowed to follow redirects 301 and 302 - */ -const allowedRedirect = ["GET", "HEAD"]; -/** - * A policy to follow Location headers from the server in order - * to support server-side redirection. - * In the browser, this policy is not used. - * @param options - Options to control policy behavior. - */ -function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - }, - }; -} -async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - const { request, status, headers } = response; - const locationHeader = headers.get("location"); - if (locationHeader && - (status === 300 || - (status === 301 && allowedRedirect.includes(request.method)) || - (status === 302 && allowedRedirect.includes(request.method)) || - (status === 303 && request.method === "POST") || - status === 307) && - currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); - // POST request with Status code 303 should be converted into a - // redirected GET request if the redirect url is present in the location header - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; -} - -// Copyright (c) Microsoft Corporation. -/** - * @internal - */ -function getHeaderName() { - return "User-Agent"; -} -/** - * @internal - */ -function setPlatformSpecificData(map) { - map.set("Node", process.version); - map.set("OS", `(${os__namespace.arch()}-${os__namespace.type()}-${os__namespace.release()})`); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const SDK_VERSION = "1.12.0"; -const DEFAULT_RETRY_POLICY_COUNT = 3; - -// Copyright (c) Microsoft Corporation. -function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); -} -/** - * @internal - */ -function getUserAgentHeaderName() { - return getHeaderName(); -} -/** - * @internal - */ -function getUserAgentValue(prefix) { - const runtimeInfo = new Map(); - runtimeInfo.set("core-rest-pipeline", SDK_VERSION); - setPlatformSpecificData(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; -} - -// Copyright (c) Microsoft Corporation. -const UserAgentHeaderName = getUserAgentHeaderName(); -/** - * The programmatic identifier of the userAgentPolicy. - */ -const userAgentPolicyName = "userAgentPolicy"; -/** - * A policy that sets the User-Agent header (or equivalent) to reflect - * the library version. - * @param options - Options to customize the user agent value. - */ -function userAgentPolicy(options = {}) { - const userAgentValue = getUserAgentValue(options.userAgentPrefix); - return { - name: userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, userAgentValue); - } - return next(request); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the decompressResponsePolicy. - */ -const decompressResponsePolicyName = "decompressResponsePolicy"; -/** - * A policy to enable response decompression according to Accept-Encoding header - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding - */ -function decompressResponsePolicy() { - return { - name: decompressResponsePolicyName, - async sendRequest(request, next) { - // HEAD requests have no body - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -const StandardAbortMessage = "The operation was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. - * @param delayInMs - The number of milliseconds to be delayed. - * @param value - The value to be resolved with after a timeout of t milliseconds. - * @param options - The options for delay - currently abort options - * - abortSignal - The abortSignal associated with containing operation. - * - abortErrorMsg - The abort error message associated with containing operation. - * @returns Resolved promise - */ -function delay(delayInMs, value, options) { - return new Promise((resolve, reject) => { - let timer = undefined; - let onAborted = undefined; - const rejectOnAbort = () => { - return reject(new abortController.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); - } - timer = setTimeout(() => { - removeListeners(); - resolve(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); - } - }); -} -/** - * @internal - * @returns the parsed value or undefined if the parsed value is invalid. - */ -function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; -} - -// Copyright (c) Microsoft Corporation. -/** - * The header that comes back from Azure services representing - * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). - */ -const RetryAfterHeader = "Retry-After"; -/** - * The headers that come back from Azure services representing - * the amount of time (minimum) to wait to retry. - * - * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds - * "Retry-After" : seconds or timestamp - */ -const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; -/** - * A response is a throttling retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. - * - * Returns the `retryAfterInMs` value if the response is a throttling retry response. - * If not throttling retry response, returns `undefined`. - * - * @internal - */ -function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return undefined; - try { - // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = parseHeaderValueAsNumber(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - // "Retry-After" header ==> seconds - // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds - const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; - return retryAfterValue * multiplyingFactor; // in milli-seconds - } - } - // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) - return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - // negative diff would mean a date in the past, so retry asap with 0 milliseconds - return Number.isFinite(diff) ? Math.max(0, diff) : undefined; - } - catch (e) { - return undefined; - } -} -/** - * A response is a retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. - */ -function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); -} -function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs, - }; - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// intervals are in milliseconds -const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; -const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; -/** - * A retry strategy that retries with an exponentially increasing delay in these two cases: - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). - */ -function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - // Exponentially increase the delay each time - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - // Don't let the delay exceed the maximum - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - // Allow the final value to have some "jitter" (within 50% of the delay size) so - // that retries across multiple clients don't occur simultaneously. - retryAfterInMs = - clampedExponentialDelay / 2 + coreUtil.getRandomIntegerInclusive(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - }, - }; -} -/** - * A response is a retry response if it has status codes: - * - 408, or - * - Greater or equal than 500, except for 501 and 505. - */ -function isExponentialRetryResponse(response) { - return Boolean(response && - response.status !== undefined && - (response.status >= 500 || response.status === 408) && - response.status !== 501 && - response.status !== 505); -} -/** - * Determines whether an error from a pipeline response was triggered in the network layer. - */ -function isSystemError(err) { - if (!err) { - return false; - } - return (err.code === "ETIMEDOUT" || - err.code === "ESOCKETTIMEDOUT" || - err.code === "ECONNREFUSED" || - err.code === "ECONNRESET" || - err.code === "ENOENT"); -} - -// Copyright (c) Microsoft Corporation. -const retryPolicyLogger = logger$1.createClientLogger("core-rest-pipeline retryPolicy"); -/** - * The programmatic identifier of the retryPolicy. - */ -const retryPolicyName = "retryPolicy"; -/** - * retryPolicy is a generic policy to enable retrying requests when certain conditions are met - */ -function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - // eslint-disable-next-line no-constant-condition - retryRequest: while (true) { - retryCount += 1; - response = undefined; - responseError = undefined; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } - catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - // RestErrors are valid targets for the retry strategies. - // If none of the retry strategies can work with them, they will be thrown later in this policy. - // If the received error is not a RestError, it is immediately thrown. - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abortController.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } - else if (response) { - return response; - } - else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError, - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await delay(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } - // If all the retries skip and there's no response, - // we're still in the retry loop, so a new request will be sent - // until `maxRetries` is reached. - } - }, - }; -} - -// Copyright (c) Microsoft Corporation. -/** - * Name of the {@link defaultRetryPolicy} - */ -const defaultRetryPolicyName = "defaultRetryPolicy"; -/** - * A policy that retries according to three strategies: - * - When the server sends a 429 response with a Retry-After header. - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. - */ -function defaultRetryPolicy(options = {}) { - var _a; - return { - name: defaultRetryPolicyName, - sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; -} - -// Copyright (c) Microsoft Corporation. -/** - * The programmatic identifier of the formDataPolicy. - */ -const formDataPolicyName = "formDataPolicy"; -/** - * A policy that encodes FormData on the request into the body. - */ -function formDataPolicy() { - return { - name: formDataPolicyName, - async sendRequest(request, next) { - if (request.formData) { - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { - request.body = wwwFormUrlEncode(request.formData); - request.formData = undefined; - } - else { - await prepareFormData(request.formData, request); - } - } - return next(request); - }, - }; -} -function wwwFormUrlEncode(formData) { - const urlSearchParams = new URLSearchParams(); - for (const [key, value] of Object.entries(formData)) { - if (Array.isArray(value)) { - for (const subValue of value) { - urlSearchParams.append(key, subValue.toString()); - } - } - else { - urlSearchParams.append(key, value.toString()); - } - } - return urlSearchParams.toString(); -} -async function prepareFormData(formData, request) { - const requestForm = new FormData__default["default"](); - for (const formKey of Object.keys(formData)) { - const formValue = formData[formKey]; - if (Array.isArray(formValue)) { - for (const subValue of formValue) { - requestForm.append(formKey, subValue); - } - } - else { - requestForm.append(formKey, formValue); - } - } - request.body = requestForm; - request.formData = undefined; - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("multipart/form-data") !== -1) { - request.headers.set("Content-Type", `multipart/form-data; boundary=${requestForm.getBoundary()}`); - } - try { - const contentLength = await new Promise((resolve, reject) => { - requestForm.getLength((err, length) => { - if (err) { - reject(err); - } - else { - resolve(length); - } - }); - }); - request.headers.set("Content-Length", contentLength); - } - catch (e) { - // ignore setting the length if this fails - } -} - -// Copyright (c) Microsoft Corporation. -const HTTPS_PROXY = "HTTPS_PROXY"; -const HTTP_PROXY = "HTTP_PROXY"; -const ALL_PROXY = "ALL_PROXY"; -const NO_PROXY = "NO_PROXY"; -/** - * The programmatic identifier of the proxyPolicy. - */ -const proxyPolicyName = "proxyPolicy"; -/** - * Stores the patterns specified in NO_PROXY environment variable. - * @internal - */ -const globalNoProxyList = []; -let noProxyListLoaded = false; -/** A cache of whether a host should bypass the proxy. */ -const globalBypassedMap = new Map(); -function getEnvironmentValue(name) { - if (process.env[name]) { - return process.env[name]; - } - else if (process.env[name.toLowerCase()]) { - return process.env[name.toLowerCase()]; - } - return undefined; -} -function loadEnvironmentProxyValue() { - if (!process) { - return undefined; - } - const httpsProxy = getEnvironmentValue(HTTPS_PROXY); - const allProxy = getEnvironmentValue(ALL_PROXY); - const httpProxy = getEnvironmentValue(HTTP_PROXY); - return httpsProxy || allProxy || httpProxy; -} -/** - * Check whether the host of a given `uri` matches any pattern in the no proxy list. - * If there's a match, any request sent to the same host shouldn't have the proxy settings set. - * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 - */ -function isBypassed(uri, noProxyList, bypassedMap) { - if (noProxyList.length === 0) { - return false; - } - const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { - return bypassedMap.get(host); - } - let isBypassedFlag = false; - for (const pattern of noProxyList) { - if (pattern[0] === ".") { - // This should match either domain it self or any subdomain or host - // .foo.com will match foo.com it self or *.foo.com - if (host.endsWith(pattern)) { - isBypassedFlag = true; - } - else { - if (host.length === pattern.length - 1 && host === pattern.slice(1)) { - isBypassedFlag = true; - } - } - } - else { - if (host === pattern) { - isBypassedFlag = true; - } - } - } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); - return isBypassedFlag; -} -function loadNoProxy() { - const noProxy = getEnvironmentValue(NO_PROXY); - noProxyListLoaded = true; - if (noProxy) { - return noProxy - .split(",") - .map((item) => item.trim()) - .filter((item) => item.length); - } - return []; -} -/** - * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. - * If no argument is given, it attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - * @param proxyUrl - The url of the proxy to use. May contain authentication information. - */ -function getDefaultProxySettings(proxyUrl) { - if (!proxyUrl) { - proxyUrl = loadEnvironmentProxyValue(); - if (!proxyUrl) { - return undefined; - } - } - const parsedUrl = new URL(proxyUrl); - const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; - return { - host: schema + parsedUrl.hostname, - port: Number.parseInt(parsedUrl.port || "80"), - username: parsedUrl.username, - password: parsedUrl.password, - }; -} -/** - * @internal - */ -function getProxyAgentOptions(proxySettings, { headers, tlsSettings }) { - let parsedProxyUrl; - try { - parsedProxyUrl = new URL(proxySettings.host); - } - catch (_error) { - throw new Error(`Expecting a valid host string in proxy settings, but found "${proxySettings.host}".`); - } - if (tlsSettings) { - logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); - } - const proxyAgentOptions = { - hostname: parsedProxyUrl.hostname, - port: proxySettings.port, - protocol: parsedProxyUrl.protocol, - headers: headers.toJSON(), - }; - if (proxySettings.username && proxySettings.password) { - proxyAgentOptions.auth = `${proxySettings.username}:${proxySettings.password}`; - } - else if (proxySettings.username) { - proxyAgentOptions.auth = `${proxySettings.username}`; - } - return proxyAgentOptions; -} -function setProxyAgentOnRequest(request, cachedAgents) { - // Custom Agent should take precedence so if one is present - // we should skip to avoid overwriting it. - if (request.agent) { - return; - } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - const proxySettings = request.proxySettings; - if (proxySettings) { - if (isInsecure) { - if (!cachedAgents.httpProxyAgent) { - const proxyAgentOptions = getProxyAgentOptions(proxySettings, request); - cachedAgents.httpProxyAgent = new httpProxyAgent.HttpProxyAgent(proxyAgentOptions); - } - request.agent = cachedAgents.httpProxyAgent; - } - else { - if (!cachedAgents.httpsProxyAgent) { - const proxyAgentOptions = getProxyAgentOptions(proxySettings, request); - cachedAgents.httpsProxyAgent = new httpsProxyAgent.HttpsProxyAgent(proxyAgentOptions); - } - request.agent = cachedAgents.httpsProxyAgent; - } - } -} -/** - * A policy that allows one to apply proxy settings to all requests. - * If not passed static settings, they will be retrieved from the HTTPS_PROXY - * or HTTP_PROXY environment variables. - * @param proxySettings - ProxySettings to use on each request. - * @param options - additional settings, for example, custom NO_PROXY patterns - */ -function proxyPolicy(proxySettings = getDefaultProxySettings(), options) { - if (!noProxyListLoaded) { - globalNoProxyList.push(...loadNoProxy()); - } - const cachedAgents = {}; - return { - name: proxyPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.proxySettings && - !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) { - request.proxySettings = proxySettings; - } - if (request.proxySettings) { - setProxyAgentOnRequest(request, cachedAgents); - } - return next(request); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the setClientRequestIdPolicy. - */ -const setClientRequestIdPolicyName = "setClientRequestIdPolicy"; -/** - * Each PipelineRequest gets a unique id upon creation. - * This policy passes that unique id along via an HTTP header to enable better - * telemetry and tracing. - * @param requestIdHeaderName - The name of the header to pass the request ID to. - */ -function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { - return { - name: setClientRequestIdPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(requestIdHeaderName)) { - request.headers.set(requestIdHeaderName, request.requestId); - } - return next(request); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Name of the TLS Policy - */ -const tlsPolicyName = "tlsPolicy"; -/** - * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. - */ -function tlsPolicy(tlsSettings) { - return { - name: tlsPolicyName, - sendRequest: async (req, next) => { - // Users may define a request tlsSettings, honor those over the client level one - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -const custom = util.inspect.custom; - -// Copyright (c) Microsoft Corporation. -const errorSanitizer = new Sanitizer(); -/** - * A custom error type for failed pipeline requests. - */ -class RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - this.request = options.request; - this.response = options.response; - Object.setPrototypeOf(this, RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [custom]() { - return `RestError: ${this.message} \n ${errorSanitizer.sanitize(this)}`; - } -} -/** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ -RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; -/** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ -RestError.PARSE_ERROR = "PARSE_ERROR"; -/** - * Typeguard for RestError - * @param e - Something caught by a catch clause. - */ -function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return coreUtil.isError(e) && e.name === "RestError"; -} - -// Copyright (c) Microsoft Corporation. -/** - * The programmatic identifier of the tracingPolicy. - */ -const tracingPolicyName = "tracingPolicy"; -/** - * A simple policy to create OpenTelemetry Spans for each request made by the pipeline - * that has SpanOptions with a parent. - * Requests made without a parent Span will not be recorded. - * @param options - Options to configure the telemetry logged by the tracing policy. - */ -function tracingPolicy(options = {}) { - const userAgent = getUserAgentValue(options.userAgentPrefix); - const tracingClient = tryCreateTracingClient(); - return { - name: tracingPolicyName, - async sendRequest(request, next) { - var _a, _b; - if (!tracingClient || !((_a = request.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext)) { - return next(request); - } - const { span, tracingContext } = (_b = tryCreateSpan(tracingClient, request, userAgent)) !== null && _b !== void 0 ? _b : {}; - if (!span || !tracingContext) { - return next(request); - } - try { - const response = await tracingClient.withContext(tracingContext, next, request); - tryProcessResponse(span, response); - return response; - } - catch (err) { - tryProcessError(span, err); - throw err; - } - }, - }; -} -function tryCreateTracingClient() { - try { - return coreTracing.createTracingClient({ - namespace: "", - packageName: "@azure/core-rest-pipeline", - packageVersion: SDK_VERSION, - }); - } - catch (e) { - logger.warning(`Error when creating the TracingClient: ${coreUtil.getErrorMessage(e)}`); - return undefined; - } -} -function tryCreateSpan(tracingClient, request, userAgent) { - try { - // As per spec, we do not need to differentiate between HTTP and HTTPS in span name. - const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { - spanKind: "client", - spanAttributes: { - "http.method": request.method, - "http.url": request.url, - requestId: request.requestId, - }, - }); - // If the span is not recording, don't do any more work. - if (!span.isRecording()) { - span.end(); - return undefined; - } - if (userAgent) { - span.setAttribute("http.user_agent", userAgent); - } - // set headers - const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); - for (const [key, value] of Object.entries(headers)) { - request.headers.set(key, value); - } - return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; - } - catch (e) { - logger.warning(`Skipping creating a tracing span due to an error: ${coreUtil.getErrorMessage(e)}`); - return undefined; - } -} -function tryProcessError(span, error) { - try { - span.setStatus({ - status: "error", - error: coreUtil.isError(error) ? error : undefined, - }); - if (isRestError(error) && error.statusCode) { - span.setAttribute("http.status_code", error.statusCode); - } - span.end(); - } - catch (e) { - logger.warning(`Skipping tracing span processing due to an error: ${coreUtil.getErrorMessage(e)}`); - } -} -function tryProcessResponse(span, response) { - try { - span.setAttribute("http.status_code", response.status); - const serviceRequestId = response.headers.get("x-ms-request-id"); - if (serviceRequestId) { - span.setAttribute("serviceRequestId", serviceRequestId); - } - span.setStatus({ - status: "success", - }); - span.end(); - } - catch (e) { - logger.warning(`Skipping tracing span processing due to an error: ${coreUtil.getErrorMessage(e)}`); - } -} - -// Copyright (c) Microsoft Corporation. -/** - * Create a new pipeline with a default set of customizable policies. - * @param options - Options to configure a custom pipeline. - */ -function createPipelineFromOptions(options) { - var _a; - const pipeline = createEmptyPipeline(); - if (coreUtil.isNode) { - if (options.tlsOptions) { - pipeline.addPolicy(tlsPolicy(options.tlsOptions)); - } - pipeline.addPolicy(proxyPolicy(options.proxyOptions)); - pipeline.addPolicy(decompressResponsePolicy()); - } - pipeline.addPolicy(formDataPolicy()); - pipeline.addPolicy(userAgentPolicy(options.userAgentOptions)); - pipeline.addPolicy(setClientRequestIdPolicy((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); - pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy(tracingPolicy(options.userAgentOptions), { afterPhase: "Retry" }); - if (coreUtil.isNode) { - // Both XHR and Fetch expect to handle redirects automatically, - // so only include this policy when we're in Node. - pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: "Retry" }); - } - pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: "Sign" }); - return pipeline; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -function normalizeName(name) { - return name.toLowerCase(); -} -function* headerIterator(map) { - for (const entry of map.values()) { - yield [entry.name, entry.value]; - } -} -class HttpHeadersImpl { - constructor(rawHeaders) { - this._headersMap = new Map(); - if (rawHeaders) { - for (const headerName of Object.keys(rawHeaders)) { - this.set(headerName, rawHeaders[headerName]); - } - } - } - /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param name - The name of the header to set. This value is case-insensitive. - * @param value - The value of the header to set. - */ - set(name, value) { - this._headersMap.set(normalizeName(name), { name, value: String(value) }); - } - /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param name - The name of the header. This value is case-insensitive. - */ - get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; - } - /** - * Get whether or not this header collection contains a header entry for the provided header name. - * @param name - The name of the header to set. This value is case-insensitive. - */ - has(name) { - return this._headersMap.has(normalizeName(name)); - } - /** - * Remove the header with the provided headerName. - * @param name - The name of the header to remove. - */ - delete(name) { - this._headersMap.delete(normalizeName(name)); - } - /** - * Get the JSON object representation of this HTTP header collection. - */ - toJSON(options = {}) { - const result = {}; - if (options.preserveCase) { - for (const entry of this._headersMap.values()) { - result[entry.name] = entry.value; - } - } - else { - for (const [normalizedName, entry] of this._headersMap) { - result[normalizedName] = entry.value; - } - } - return result; - } - /** - * Get the string representation of this HTTP header collection. - */ - toString() { - return JSON.stringify(this.toJSON({ preserveCase: true })); - } - /** - * Iterate over tuples of header [name, value] pairs. - */ - [Symbol.iterator]() { - return headerIterator(this._headersMap); - } -} -/** - * Creates an object that satisfies the `HttpHeaders` interface. - * @param rawHeaders - A simple object representing initial headers - */ -function createHttpHeaders(rawHeaders) { - return new HttpHeadersImpl(rawHeaders); -} - -// Copyright (c) Microsoft Corporation. -const DEFAULT_TLS_SETTINGS = {}; -function isReadableStream(body) { - return body && typeof body.pipe === "function"; -} -function isStreamComplete(stream) { - return new Promise((resolve) => { - stream.on("close", resolve); - stream.on("end", resolve); - stream.on("error", resolve); - }); -} -function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; -} -class ReportTransform extends stream.Transform { - // eslint-disable-next-line @typescript-eslint/ban-types - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } - catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } -} -/** - * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. - * @internal - */ -class NodeHttpClient { - constructor() { - this.cachedHttpsAgents = new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController$1 = new abortController.AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abortController.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController$1.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController$1.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } - else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController$1, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request, - }; - // Responses to HEAD must not have a body. - // If they do return a body, that body must be ignored. - if (request.method === "HEAD") { - // call resume() and not destroy() to avoid closing the socket - // and losing keep alive - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || - ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status))) { - response.readableStreamBody = responseStream; - } - else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } - finally { - // clean up event listener - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]) - .then(() => { - var _a; - // eslint-disable-next-line promise/always-return - if (abortListener) { - (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); - } - }) - .catch((e) => { - logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController$1, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (isInsecure && !request.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); - } - const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); - const options = { - agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }), - }; - return new Promise((resolve, reject) => { - const req = isInsecure ? http__namespace.request(options, resolve) : https__namespace.request(options, resolve); - req.once("error", (err) => { - var _a; - reject(new RestError(err.message, { code: (_a = err.code) !== null && _a !== void 0 ? _a : RestError.REQUEST_SEND_ERROR, request })); - }); - abortController$1.signal.addEventListener("abort", () => { - const abortError = new abortController.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } - else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } - else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } - else { - logger.error("Unrecognized body type", body); - reject(new RestError("Unrecognized body type")); - } - } - else { - // streams don't like "undefined" being passed as data - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - // Handle Insecure requests first - if (isInsecure) { - if (disableKeepAlive) { - // keepAlive:false is the default so we don't need a custom Agent - return http__namespace.globalAgent; - } - if (!this.cachedHttpAgent) { - // If there is no cached agent create a new one and cache it. - this.cachedHttpAgent = new http__namespace.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } - else { - if (disableKeepAlive && !request.tlsSettings) { - // When there are no tlsSettings and keepAlive is false - // we don't need a custom agent - return https__namespace.globalAgent; - } - // We use the tlsSettings to index cached clients - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - // Get the cached agent or create a new one with the - // provided values for keepAlive and tlsSettings - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https__namespace.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } -} -function getResponseHeaders(res) { - const headers = createHttpHeaders(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } - else if (value) { - headers.set(header, value); - } - } - return headers; -} -function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib__namespace.createGunzip(); - stream.pipe(unzip); - return unzip; - } - else if (contentEncoding === "deflate") { - const inflate = zlib__namespace.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; -} -function streamToText(stream) { - return new Promise((resolve, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } - else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } - else { - reject(new RestError(`Error reading response as text: ${e.message}`, { - code: RestError.PARSE_ERROR, - })); - } - }); - }); -} -/** @internal */ -function getBodyLength(body) { - if (!body) { - return 0; - } - else if (Buffer.isBuffer(body)) { - return body.length; - } - else if (isReadableStream(body)) { - return null; - } - else if (isArrayBuffer(body)) { - return body.byteLength; - } - else if (typeof body === "string") { - return Buffer.from(body).length; - } - else { - return null; - } -} -/** - * Create a new HttpClient instance for the NodeJS environment. - * @internal - */ -function createNodeHttpClient() { - return new NodeHttpClient(); -} - -// Copyright (c) Microsoft Corporation. -/** - * Create the correct HttpClient for the current environment. - */ -function createDefaultHttpClient() { - return createNodeHttpClient(); -} - -// Copyright (c) Microsoft Corporation. -class PipelineRequestImpl { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : createHttpHeaders(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || coreUtil.randomUUID(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } -} -/** - * Creates a new pipeline request with the given options. - * This method is to allow for the easy setting of default values and not required. - * @param options - The options to create the request with. - */ -function createPipelineRequest(options) { - return new PipelineRequestImpl(options); -} - -// Copyright (c) Microsoft Corporation. -/** - * The programmatic identifier of the exponentialRetryPolicy. - */ -const exponentialRetryPolicyName = "exponentialRetryPolicy"; -/** - * A policy that attempts to retry requests while introducing an exponentially increasing delay. - * @param options - Options that configure retry logic. - */ -function exponentialRetryPolicy(options = {}) { - var _a; - return retryPolicy([ - exponentialRetryStrategy(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }); -} - -// Copyright (c) Microsoft Corporation. -/** - * Name of the {@link systemErrorRetryPolicy} - */ -const systemErrorRetryPolicyName = "systemErrorRetryPolicy"; -/** - * A retry policy that specifically seeks to handle errors in the - * underlying transport layer (e.g. DNS lookup failures) rather than - * retryable error codes from the server itself. - * @param options - Options that customize the policy. - */ -function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: systemErrorRetryPolicyName, - sendRequest: retryPolicy([ - exponentialRetryStrategy(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; -} - -// Copyright (c) Microsoft Corporation. -/** - * Name of the {@link throttlingRetryPolicy} - */ -const throttlingRetryPolicyName = "throttlingRetryPolicy"; -/** - * A policy that retries when the server sends a 429 response with a Retry-After header. - * - * To learn more, please refer to - * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors - * - * @param options - Options that configure retry logic. - */ -function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: throttlingRetryPolicyName, - sendRequest: retryPolicy([throttlingRetryStrategy()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; -} - -// Copyright (c) Microsoft Corporation. -// Default options for the cycler if none are provided -const DEFAULT_CYCLER_OPTIONS = { - forcedRefreshWindowInMs: 1000, - retryIntervalInMs: 3000, - refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry -}; -/** - * Converts an an unreliable access token getter (which may resolve with null) - * into an AccessTokenGetter by retrying the unreliable getter in a regular - * interval. - * - * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null. - * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts. - * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception. - * @returns - A promise that, if it resolves, will resolve with an access token. - */ -async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { - // This wrapper handles exceptions gracefully as long as we haven't exceeded - // the timeout. - async function tryGetAccessToken() { - if (Date.now() < refreshTimeout) { - try { - return await getAccessToken(); - } - catch (_a) { - return null; - } - } - else { - const finalToken = await getAccessToken(); - // Timeout is up, so throw if it's still null - if (finalToken === null) { - throw new Error("Failed to refresh access token."); - } - return finalToken; - } - } - let token = await tryGetAccessToken(); - while (token === null) { - await delay(retryIntervalInMs); - token = await tryGetAccessToken(); - } - return token; -} -/** - * Creates a token cycler from a credential, scopes, and optional settings. - * - * A token cycler represents a way to reliably retrieve a valid access token - * from a TokenCredential. It will handle initializing the token, refreshing it - * when it nears expiration, and synchronizes refresh attempts to avoid - * concurrency hazards. - * - * @param credential - the underlying TokenCredential that provides the access - * token - * @param tokenCyclerOptions - optionally override default settings for the cycler - * - * @returns - a function that reliably produces a valid access token - */ -function createTokenCycler(credential, tokenCyclerOptions) { - let refreshWorker = null; - let token = null; - let tenantId; - const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); - /** - * This little holder defines several predicates that we use to construct - * the rules of refreshing the token. - */ - const cycler = { - /** - * Produces true if a refresh job is currently in progress. - */ - get isRefreshing() { - return refreshWorker !== null; - }, - /** - * Produces true if the cycler SHOULD refresh (we are within the refresh - * window and not already refreshing) - */ - get shouldRefresh() { - var _a; - return (!cycler.isRefreshing && - ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now()); - }, - /** - * Produces true if the cycler MUST refresh (null or nearly-expired - * token). - */ - get mustRefresh() { - return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()); - }, - }; - /** - * Starts a refresh job or returns the existing job if one is already - * running. - */ - function refresh(scopes, getTokenOptions) { - var _a; - if (!cycler.isRefreshing) { - // We bind `scopes` here to avoid passing it around a lot - const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); - // Take advantage of promise chaining to insert an assignment to `token` - // before the refresh can be considered done. - refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, - // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now()) - .then((_token) => { - refreshWorker = null; - token = _token; - tenantId = getTokenOptions.tenantId; - return token; - }) - .catch((reason) => { - // We also should reset the refresher if we enter a failed state. All - // existing awaiters will throw, but subsequent requests will start a - // new retry chain. - refreshWorker = null; - token = null; - tenantId = undefined; - throw reason; - }); - } - return refreshWorker; - } - return async (scopes, tokenOptions) => { - // - // Simple rules: - // - If we MUST refresh, then return the refresh task, blocking - // the pipeline until a token is available. - // - If we SHOULD refresh, then run refresh but don't return it - // (we can still use the cached token). - // - Return the token, since it's fine if we didn't return in - // step 1. - // - // If the tenantId passed in token options is different to the one we have - // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to - // refresh the token with the new tenantId or token. - const mustRefresh = tenantId !== tokenOptions.tenantId || Boolean(tokenOptions.claims) || cycler.mustRefresh; - if (mustRefresh) - return refresh(scopes, tokenOptions); - if (cycler.shouldRefresh) { - refresh(scopes, tokenOptions); - } - return token; - }; -} - -// Copyright (c) Microsoft Corporation. -/** - * The programmatic identifier of the bearerTokenAuthenticationPolicy. - */ -const bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; -/** - * Default authorize request handler - */ -async function defaultAuthorizeRequest(options) { - const { scopes, getAccessToken, request } = options; - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - }; - const accessToken = await getAccessToken(scopes, getTokenOptions); - if (accessToken) { - options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); - } -} -/** - * We will retrieve the challenge only if the response status code was 401, - * and if the response contained the header "WWW-Authenticate" with a non-empty value. - */ -function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; - } - return; -} -/** - * A policy that can request a token from a TokenCredential implementation and - * then apply it to the Authorization header of a request as a Bearer token. - */ -function bearerTokenAuthenticationPolicy(options) { - var _a; - const { credential, scopes, challengeCallbacks } = options; - const logger$1 = options.logger || logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); - // This function encapsulates the entire process of reliably retrieving the token - // The options are left out of the public API until there's demand to configure this. - // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions` - // in order to pass through the `options` object. - const getAccessToken = credential - ? createTokenCycler(credential /* , options */) - : () => Promise.resolve(null); - return { - name: bearerTokenAuthenticationPolicyName, - /** - * If there's no challenge parameter: - * - It will try to retrieve the token using the cache, or the credential's getToken. - * - Then it will try the next policy with or without the retrieved token. - * - * It uses the challenge parameters to: - * - Skip a first attempt to get the token from the credential if there's no cached token, - * since it expects the token to be retrievable only after the challenge. - * - Prepare the outgoing request if the `prepareRequest` method has been provided. - * - Send an initial request to receive the challenge if it fails. - * - Process a challenge if the response contains it. - * - Retrieve a token with the challenge information, then re-send the request. - */ - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); - } - await callbacks.authorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger: logger$1, - }); - let response; - let error; - try { - response = await next(request); - } - catch (err) { - error = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && - (response === null || response === void 0 ? void 0 : response.status) === 401 && - getChallenge(response)) { - // processes challenge - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger: logger$1, - }); - if (shouldSendRequest) { - return next(request); - } - } - if (error) { - throw error; - } - else { - return response; - } - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The programmatic identifier of the ndJsonPolicy. - */ -const ndJsonPolicyName = "ndJsonPolicy"; -/** - * ndJsonPolicy is a policy used to control keep alive settings for every request. - */ -function ndJsonPolicy() { - return { - name: ndJsonPolicyName, - async sendRequest(request, next) { - // There currently isn't a good way to bypass the serializer - if (typeof request.body === "string" && request.body.startsWith("[")) { - const body = JSON.parse(request.body); - if (Array.isArray(body)) { - request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); - } - } - return next(request); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -/** - * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. - */ -const auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; -const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; -async function sendAuthorizeRequest(options) { - var _a, _b; - const { scopes, getAccessToken, request } = options; - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - }; - return (_b = (_a = (await getAccessToken(scopes, getTokenOptions))) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; -} -/** - * A policy for external tokens to `x-ms-authorization-auxiliary` header. - * This header will be used when creating a cross-tenant application we may need to handle authentication requests - * for resources that are in different tenants. - * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works - */ -function auxiliaryAuthenticationHeaderPolicy(options) { - const { credentials, scopes } = options; - const logger$1 = options.logger || logger; - const tokenCyclerMap = new WeakMap(); - return { - name: auxiliaryAuthenticationHeaderPolicyName, - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); - } - if (!credentials || credentials.length === 0) { - logger$1.info(`${auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); - return next(request); - } - const tokenPromises = []; - for (const credential of credentials) { - let getAccessToken = tokenCyclerMap.get(credential); - if (!getAccessToken) { - getAccessToken = createTokenCycler(credential); - tokenCyclerMap.set(credential, getAccessToken); - } - tokenPromises.push(sendAuthorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger: logger$1, - })); - } - const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); - if (auxiliaryTokens.length === 0) { - logger$1.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); - return next(request); - } - request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); - return next(request); - }, - }; -} - -exports.RestError = RestError; -exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; -exports.auxiliaryAuthenticationHeaderPolicyName = auxiliaryAuthenticationHeaderPolicyName; -exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; -exports.bearerTokenAuthenticationPolicyName = bearerTokenAuthenticationPolicyName; -exports.createDefaultHttpClient = createDefaultHttpClient; -exports.createEmptyPipeline = createEmptyPipeline; -exports.createHttpHeaders = createHttpHeaders; -exports.createPipelineFromOptions = createPipelineFromOptions; -exports.createPipelineRequest = createPipelineRequest; -exports.decompressResponsePolicy = decompressResponsePolicy; -exports.decompressResponsePolicyName = decompressResponsePolicyName; -exports.defaultRetryPolicy = defaultRetryPolicy; -exports.exponentialRetryPolicy = exponentialRetryPolicy; -exports.exponentialRetryPolicyName = exponentialRetryPolicyName; -exports.formDataPolicy = formDataPolicy; -exports.formDataPolicyName = formDataPolicyName; -exports.getDefaultProxySettings = getDefaultProxySettings; -exports.isRestError = isRestError; -exports.logPolicy = logPolicy; -exports.logPolicyName = logPolicyName; -exports.ndJsonPolicy = ndJsonPolicy; -exports.ndJsonPolicyName = ndJsonPolicyName; -exports.proxyPolicy = proxyPolicy; -exports.proxyPolicyName = proxyPolicyName; -exports.redirectPolicy = redirectPolicy; -exports.redirectPolicyName = redirectPolicyName; -exports.retryPolicy = retryPolicy; -exports.setClientRequestIdPolicy = setClientRequestIdPolicy; -exports.setClientRequestIdPolicyName = setClientRequestIdPolicyName; -exports.systemErrorRetryPolicy = systemErrorRetryPolicy; -exports.systemErrorRetryPolicyName = systemErrorRetryPolicyName; -exports.throttlingRetryPolicy = throttlingRetryPolicy; -exports.throttlingRetryPolicyName = throttlingRetryPolicyName; -exports.tlsPolicy = tlsPolicy; -exports.tlsPolicyName = tlsPolicyName; -exports.tracingPolicy = tracingPolicy; -exports.tracingPolicyName = tracingPolicyName; -exports.userAgentPolicy = userAgentPolicy; -exports.userAgentPolicyName = userAgentPolicyName; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist/index.js.map b/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist/index.js.map deleted file mode 100644 index aa2a332..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/pipeline.ts","../src/log.ts","../src/util/sanitizer.ts","../src/policies/logPolicy.ts","../src/policies/redirectPolicy.ts","../src/util/userAgentPlatform.ts","../src/constants.ts","../src/util/userAgent.ts","../src/policies/userAgentPolicy.ts","../src/policies/decompressResponsePolicy.ts","../src/util/helpers.ts","../src/retryStrategies/throttlingRetryStrategy.ts","../src/retryStrategies/exponentialRetryStrategy.ts","../src/policies/retryPolicy.ts","../src/policies/defaultRetryPolicy.ts","../src/policies/formDataPolicy.ts","../src/policies/proxyPolicy.ts","../src/policies/setClientRequestIdPolicy.ts","../src/policies/tlsPolicy.ts","../src/util/inspect.ts","../src/restError.ts","../src/policies/tracingPolicy.ts","../src/createPipelineFromOptions.ts","../src/httpHeaders.ts","../src/nodeHttpClient.ts","../src/defaultHttpClient.ts","../src/pipelineRequest.ts","../src/policies/exponentialRetryPolicy.ts","../src/policies/systemErrorRetryPolicy.ts","../src/policies/throttlingRetryPolicy.ts","../src/util/tokenCycler.ts","../src/policies/bearerTokenAuthenticationPolicy.ts","../src/policies/ndJsonPolicy.ts","../src/policies/auxiliaryAuthenticationHeaderPolicy.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient, PipelineRequest, PipelineResponse, SendRequest } from \"./interfaces\";\n\n/**\n * Policies are executed in phases.\n * The execution order is:\n * 1. Serialize Phase\n * 2. Policies not in a phase\n * 3. Deserialize Phase\n * 4. Retry Phase\n * 5. Sign Phase\n */\nexport type PipelinePhase = \"Deserialize\" | \"Serialize\" | \"Retry\" | \"Sign\";\n\nconst ValidPhaseNames = new Set([\"Deserialize\", \"Serialize\", \"Retry\", \"Sign\"]);\n\n/**\n * Options when adding a policy to the pipeline.\n * Used to express dependencies on other policies.\n */\nexport interface AddPolicyOptions {\n /**\n * Policies that this policy must come before.\n */\n beforePolicies?: string[];\n /**\n * Policies that this policy must come after.\n */\n afterPolicies?: string[];\n /**\n * The phase that this policy must come after.\n */\n afterPhase?: PipelinePhase;\n /**\n * The phase this policy belongs to.\n */\n phase?: PipelinePhase;\n}\n\n/**\n * A pipeline policy manipulates a request as it travels through the pipeline.\n * It is conceptually a middleware that is allowed to modify the request before\n * it is made as well as the response when it is received.\n */\nexport interface PipelinePolicy {\n /**\n * The policy name. Must be a unique string in the pipeline.\n */\n name: string;\n /**\n * The main method to implement that manipulates a request/response.\n * @param request - The request being performed.\n * @param next - The next policy in the pipeline. Must be called to continue the pipeline.\n */\n sendRequest(request: PipelineRequest, next: SendRequest): Promise;\n}\n\n/**\n * Represents a pipeline for making a HTTP request to a URL.\n * Pipelines can have multiple policies to manage manipulating each request\n * before and after it is made to the server.\n */\nexport interface Pipeline {\n /**\n * Add a new policy to the pipeline.\n * @param policy - A policy that manipulates a request.\n * @param options - A set of options for when the policy should run.\n */\n addPolicy(policy: PipelinePolicy, options?: AddPolicyOptions): void;\n /**\n * Remove a policy from the pipeline.\n * @param options - Options that let you specify which policies to remove.\n */\n removePolicy(options: { name?: string; phase?: PipelinePhase }): PipelinePolicy[];\n /**\n * Uses the pipeline to make a HTTP request.\n * @param httpClient - The HttpClient that actually performs the request.\n * @param request - The request to be made.\n */\n sendRequest(httpClient: HttpClient, request: PipelineRequest): Promise;\n /**\n * Returns the current set of policies in the pipeline in the order in which\n * they will be applied to the request. Later in the list is closer to when\n * the request is performed.\n */\n getOrderedPolicies(): PipelinePolicy[];\n /**\n * Duplicates this pipeline to allow for modifying an existing one without mutating it.\n */\n clone(): Pipeline;\n}\n\ninterface PipelineDescriptor {\n policy: PipelinePolicy;\n options: AddPolicyOptions;\n}\n\ninterface PolicyGraphNode {\n policy: PipelinePolicy;\n dependsOn: Set;\n dependants: Set;\n afterPhase?: Phase;\n}\n\ninterface Phase {\n name: PipelinePhase | \"None\";\n policies: Set;\n hasRun: boolean;\n hasAfterPolicies: boolean;\n}\n\n/**\n * A private implementation of Pipeline.\n * Do not export this class from the package.\n * @internal\n */\nclass HttpPipeline implements Pipeline {\n private _policies: PipelineDescriptor[] = [];\n private _orderedPolicies?: PipelinePolicy[];\n\n private constructor(policies?: PipelineDescriptor[]) {\n this._policies = policies?.slice(0) ?? [];\n this._orderedPolicies = undefined;\n }\n\n public addPolicy(policy: PipelinePolicy, options: AddPolicyOptions = {}): void {\n if (options.phase && options.afterPhase) {\n throw new Error(\"Policies inside a phase cannot specify afterPhase.\");\n }\n if (options.phase && !ValidPhaseNames.has(options.phase)) {\n throw new Error(`Invalid phase name: ${options.phase}`);\n }\n if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) {\n throw new Error(`Invalid afterPhase name: ${options.afterPhase}`);\n }\n this._policies.push({\n policy,\n options,\n });\n this._orderedPolicies = undefined;\n }\n\n public removePolicy(options: { name?: string; phase?: string }): PipelinePolicy[] {\n const removedPolicies: PipelinePolicy[] = [];\n\n this._policies = this._policies.filter((policyDescriptor) => {\n if (\n (options.name && policyDescriptor.policy.name === options.name) ||\n (options.phase && policyDescriptor.options.phase === options.phase)\n ) {\n removedPolicies.push(policyDescriptor.policy);\n return false;\n } else {\n return true;\n }\n });\n this._orderedPolicies = undefined;\n\n return removedPolicies;\n }\n\n public sendRequest(httpClient: HttpClient, request: PipelineRequest): Promise {\n const policies = this.getOrderedPolicies();\n\n const pipeline = policies.reduceRight(\n (next, policy) => {\n return (req: PipelineRequest) => {\n return policy.sendRequest(req, next);\n };\n },\n (req: PipelineRequest) => httpClient.sendRequest(req)\n );\n\n return pipeline(request);\n }\n\n public getOrderedPolicies(): PipelinePolicy[] {\n if (!this._orderedPolicies) {\n this._orderedPolicies = this.orderPolicies();\n }\n return this._orderedPolicies;\n }\n\n public clone(): Pipeline {\n return new HttpPipeline(this._policies);\n }\n\n public static create(): Pipeline {\n return new HttpPipeline();\n }\n\n private orderPolicies(): PipelinePolicy[] {\n /**\n * The goal of this method is to reliably order pipeline policies\n * based on their declared requirements when they were added.\n *\n * Order is first determined by phase:\n *\n * 1. Serialize Phase\n * 2. Policies not in a phase\n * 3. Deserialize Phase\n * 4. Retry Phase\n * 5. Sign Phase\n *\n * Within each phase, policies are executed in the order\n * they were added unless they were specified to execute\n * before/after other policies or after a particular phase.\n *\n * To determine the final order, we will walk the policy list\n * in phase order multiple times until all dependencies are\n * satisfied.\n *\n * `afterPolicies` are the set of policies that must be\n * executed before a given policy. This requirement is\n * considered satisfied when each of the listed policies\n * have been scheduled.\n *\n * `beforePolicies` are the set of policies that must be\n * executed after a given policy. Since this dependency\n * can be expressed by converting it into a equivalent\n * `afterPolicies` declarations, they are normalized\n * into that form for simplicity.\n *\n * An `afterPhase` dependency is considered satisfied when all\n * policies in that phase have scheduled.\n *\n */\n const result: PipelinePolicy[] = [];\n\n // Track all policies we know about.\n const policyMap: Map = new Map();\n\n function createPhase(name: PipelinePhase | \"None\"): Phase {\n return {\n name,\n policies: new Set(),\n hasRun: false,\n hasAfterPolicies: false,\n };\n }\n\n // Track policies for each phase.\n const serializePhase = createPhase(\"Serialize\");\n const noPhase = createPhase(\"None\");\n const deserializePhase = createPhase(\"Deserialize\");\n const retryPhase = createPhase(\"Retry\");\n const signPhase = createPhase(\"Sign\");\n\n // a list of phases in order\n const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase];\n\n // Small helper function to map phase name to each Phase\n function getPhase(phase: PipelinePhase | undefined): Phase {\n if (phase === \"Retry\") {\n return retryPhase;\n } else if (phase === \"Serialize\") {\n return serializePhase;\n } else if (phase === \"Deserialize\") {\n return deserializePhase;\n } else if (phase === \"Sign\") {\n return signPhase;\n } else {\n return noPhase;\n }\n }\n\n // First walk each policy and create a node to track metadata.\n for (const descriptor of this._policies) {\n const policy = descriptor.policy;\n const options = descriptor.options;\n const policyName = policy.name;\n if (policyMap.has(policyName)) {\n throw new Error(\"Duplicate policy names not allowed in pipeline\");\n }\n const node: PolicyGraphNode = {\n policy,\n dependsOn: new Set(),\n dependants: new Set(),\n };\n if (options.afterPhase) {\n node.afterPhase = getPhase(options.afterPhase);\n node.afterPhase.hasAfterPolicies = true;\n }\n policyMap.set(policyName, node);\n const phase = getPhase(options.phase);\n phase.policies.add(node);\n }\n\n // Now that each policy has a node, connect dependency references.\n for (const descriptor of this._policies) {\n const { policy, options } = descriptor;\n const policyName = policy.name;\n const node = policyMap.get(policyName);\n if (!node) {\n throw new Error(`Missing node for policy ${policyName}`);\n }\n\n if (options.afterPolicies) {\n for (const afterPolicyName of options.afterPolicies) {\n const afterNode = policyMap.get(afterPolicyName);\n if (afterNode) {\n // Linking in both directions helps later\n // when we want to notify dependants.\n node.dependsOn.add(afterNode);\n afterNode.dependants.add(node);\n }\n }\n }\n if (options.beforePolicies) {\n for (const beforePolicyName of options.beforePolicies) {\n const beforeNode = policyMap.get(beforePolicyName);\n if (beforeNode) {\n // To execute before another node, make it\n // depend on the current node.\n beforeNode.dependsOn.add(node);\n node.dependants.add(beforeNode);\n }\n }\n }\n }\n\n function walkPhase(phase: Phase): void {\n phase.hasRun = true;\n // Sets iterate in insertion order\n for (const node of phase.policies) {\n if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) {\n // If this node is waiting on a phase to complete,\n // we need to skip it for now.\n // Even if the phase is empty, we should wait for it\n // to be walked to avoid re-ordering policies.\n continue;\n }\n if (node.dependsOn.size === 0) {\n // If there's nothing else we're waiting for, we can\n // add this policy to the result list.\n result.push(node.policy);\n // Notify anything that depends on this policy that\n // the policy has been scheduled.\n for (const dependant of node.dependants) {\n dependant.dependsOn.delete(node);\n }\n policyMap.delete(node.policy.name);\n phase.policies.delete(node);\n }\n }\n }\n\n function walkPhases(): void {\n for (const phase of orderedPhases) {\n walkPhase(phase);\n // if the phase isn't complete\n if (phase.policies.size > 0 && phase !== noPhase) {\n if (!noPhase.hasRun) {\n // Try running noPhase to see if that unblocks this phase next tick.\n // This can happen if a phase that happens before noPhase\n // is waiting on a noPhase policy to complete.\n walkPhase(noPhase);\n }\n // Don't proceed to the next phase until this phase finishes.\n return;\n }\n\n if (phase.hasAfterPolicies) {\n // Run any policies unblocked by this phase\n walkPhase(noPhase);\n }\n }\n }\n\n // Iterate until we've put every node in the result list.\n let iteration = 0;\n while (policyMap.size > 0) {\n iteration++;\n const initialResultLength = result.length;\n // Keep walking each phase in order until we can order every node.\n walkPhases();\n // The result list *should* get at least one larger each time\n // after the first full pass.\n // Otherwise, we're going to loop forever.\n if (result.length <= initialResultLength && iteration > 1) {\n throw new Error(\"Cannot satisfy policy dependencies due to requirements cycle.\");\n }\n }\n\n return result;\n }\n}\n\n/**\n * Creates a totally empty pipeline.\n * Useful for testing or creating a custom one.\n */\nexport function createEmptyPipeline(): Pipeline {\n return HttpPipeline.create();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-rest-pipeline\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { UnknownObject, isObject } from \"@azure/core-util\";\n\n/**\n * @internal\n */\nexport interface SanitizerOptions {\n /**\n * Header names whose values will be logged when logging is enabled.\n * Defaults include a list of well-known safe headers. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n */\n additionalAllowedHeaderNames?: string[];\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n */\n additionalAllowedQueryParameters?: string[];\n}\n\nconst RedactedString = \"REDACTED\";\n\n// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts\nconst defaultAllowedHeaderNames = [\n \"x-ms-client-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-useragent\",\n \"x-ms-correlation-request-id\",\n \"x-ms-request-id\",\n \"client-request-id\",\n \"ms-cv\",\n \"return-client-request-id\",\n \"traceparent\",\n\n \"Access-Control-Allow-Credentials\",\n \"Access-Control-Allow-Headers\",\n \"Access-Control-Allow-Methods\",\n \"Access-Control-Allow-Origin\",\n \"Access-Control-Expose-Headers\",\n \"Access-Control-Max-Age\",\n \"Access-Control-Request-Headers\",\n \"Access-Control-Request-Method\",\n \"Origin\",\n\n \"Accept\",\n \"Accept-Encoding\",\n \"Cache-Control\",\n \"Connection\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"ETag\",\n \"Expires\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"Last-Modified\",\n \"Pragma\",\n \"Request-Id\",\n \"Retry-After\",\n \"Server\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"WWW-Authenticate\",\n];\n\nconst defaultAllowedQueryParameters: string[] = [\"api-version\"];\n\n/**\n * @internal\n */\nexport class Sanitizer {\n private allowedHeaderNames: Set;\n private allowedQueryParameters: Set;\n\n constructor({\n additionalAllowedHeaderNames: allowedHeaderNames = [],\n additionalAllowedQueryParameters: allowedQueryParameters = [],\n }: SanitizerOptions = {}) {\n allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames);\n allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters);\n\n this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n }\n\n public sanitize(obj: unknown): string {\n const seen = new Set();\n return JSON.stringify(\n obj,\n (key: string, value: unknown) => {\n // Ensure Errors include their interesting non-enumerable members\n if (value instanceof Error) {\n return {\n ...value,\n name: value.name,\n message: value.message,\n };\n }\n\n if (key === \"headers\") {\n return this.sanitizeHeaders(value as UnknownObject);\n } else if (key === \"url\") {\n return this.sanitizeUrl(value as string);\n } else if (key === \"query\") {\n return this.sanitizeQuery(value as UnknownObject);\n } else if (key === \"body\") {\n // Don't log the request body\n return undefined;\n } else if (key === \"response\") {\n // Don't log response again\n return undefined;\n } else if (key === \"operationSpec\") {\n // When using sendOperationRequest, the request carries a massive\n // field with the autorest spec. No need to log it.\n return undefined;\n } else if (Array.isArray(value) || isObject(value)) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n\n return value;\n },\n 2\n );\n }\n\n private sanitizeHeaders(obj: UnknownObject): UnknownObject {\n const sanitized: UnknownObject = {};\n for (const key of Object.keys(obj)) {\n if (this.allowedHeaderNames.has(key.toLowerCase())) {\n sanitized[key] = obj[key];\n } else {\n sanitized[key] = RedactedString;\n }\n }\n return sanitized;\n }\n\n private sanitizeQuery(value: UnknownObject): UnknownObject {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n const sanitized: UnknownObject = {};\n\n for (const k of Object.keys(value)) {\n if (this.allowedQueryParameters.has(k.toLowerCase())) {\n sanitized[k] = value[k];\n } else {\n sanitized[k] = RedactedString;\n }\n }\n\n return sanitized;\n }\n\n private sanitizeUrl(value: string): string {\n if (typeof value !== \"string\" || value === null) {\n return value;\n }\n\n const url = new URL(value);\n\n if (!url.search) {\n return value;\n }\n\n for (const [key] of url.searchParams) {\n if (!this.allowedQueryParameters.has(key.toLowerCase())) {\n url.searchParams.set(key, RedactedString);\n }\n }\n\n return url.toString();\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Debugger } from \"@azure/logger\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { logger as coreLogger } from \"../log\";\nimport { Sanitizer } from \"../util/sanitizer\";\n\n/**\n * The programmatic identifier of the logPolicy.\n */\nexport const logPolicyName = \"logPolicy\";\n\n/**\n * Options to configure the logPolicy.\n */\nexport interface LogPolicyOptions {\n /**\n * Header names whose values will be logged when logging is enabled.\n * Defaults include a list of well-known safe headers. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n */\n additionalAllowedHeaderNames?: string[];\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n */\n additionalAllowedQueryParameters?: string[];\n\n /**\n * The log function to use for writing pipeline logs.\n * Defaults to core-http's built-in logger.\n * Compatible with the `debug` library.\n */\n logger?: Debugger;\n}\n\n/**\n * A policy that logs all requests and responses.\n * @param options - Options to configure logPolicy.\n */\nexport function logPolicy(options: LogPolicyOptions = {}): PipelinePolicy {\n const logger = options.logger ?? coreLogger.info;\n const sanitizer = new Sanitizer({\n additionalAllowedHeaderNames: options.additionalAllowedHeaderNames,\n additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n });\n return {\n name: logPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!logger.enabled) {\n return next(request);\n }\n\n logger(`Request: ${sanitizer.sanitize(request)}`);\n\n const response = await next(request);\n\n logger(`Response status code: ${response.status}`);\n logger(`Headers: ${sanitizer.sanitize(response.headers)}`);\n\n return response;\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the redirectPolicy.\n */\nexport const redirectPolicyName = \"redirectPolicy\";\n\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\n\n/**\n * Options for how redirect responses are handled.\n */\nexport interface RedirectPolicyOptions {\n /**\n * The maximum number of times the redirect URL will be tried before\n * failing. Defaults to 20.\n */\n maxRetries?: number;\n}\n\n/**\n * A policy to follow Location headers from the server in order\n * to support server-side redirection.\n * In the browser, this policy is not used.\n * @param options - Options to control policy behavior.\n */\nexport function redirectPolicy(options: RedirectPolicyOptions = {}): PipelinePolicy {\n const { maxRetries = 20 } = options;\n return {\n name: redirectPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n const response = await next(request);\n return handleRedirect(next, response, maxRetries);\n },\n };\n}\n\nasync function handleRedirect(\n next: SendRequest,\n response: PipelineResponse,\n maxRetries: number,\n currentRetries: number = 0\n): Promise {\n const { request, status, headers } = response;\n const locationHeader = headers.get(\"location\");\n if (\n locationHeader &&\n (status === 300 ||\n (status === 301 && allowedRedirect.includes(request.method)) ||\n (status === 302 && allowedRedirect.includes(request.method)) ||\n (status === 303 && request.method === \"POST\") ||\n status === 307) &&\n currentRetries < maxRetries\n ) {\n const url = new URL(locationHeader, request.url);\n request.url = url.toString();\n\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n request.headers.delete(\"Content-Length\");\n delete request.body;\n }\n\n request.headers.delete(\"Authorization\");\n\n const res = await next(request);\n return handleRedirect(next, res, maxRetries, currentRetries + 1);\n }\n\n return response;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as os from \"os\";\n\n/**\n * @internal\n */\nexport function getHeaderName(): string {\n return \"User-Agent\";\n}\n\n/**\n * @internal\n */\nexport function setPlatformSpecificData(map: Map): void {\n map.set(\"Node\", process.version);\n map.set(\"OS\", `(${os.arch()}-${os.type()}-${os.release()})`);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"1.12.0\";\n\nexport const DEFAULT_RETRY_POLICY_COUNT = 3;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getHeaderName, setPlatformSpecificData } from \"./userAgentPlatform\";\nimport { SDK_VERSION } from \"../constants\";\n\nfunction getUserAgentString(telemetryInfo: Map): string {\n const parts: string[] = [];\n for (const [key, value] of telemetryInfo) {\n const token = value ? `${key}/${value}` : key;\n parts.push(token);\n }\n return parts.join(\" \");\n}\n\n/**\n * @internal\n */\nexport function getUserAgentHeaderName(): string {\n return getHeaderName();\n}\n\n/**\n * @internal\n */\nexport function getUserAgentValue(prefix?: string): string {\n const runtimeInfo = new Map();\n runtimeInfo.set(\"core-rest-pipeline\", SDK_VERSION);\n setPlatformSpecificData(runtimeInfo);\n const defaultAgent = getUserAgentString(runtimeInfo);\n const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;\n return userAgentValue;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { getUserAgentHeaderName, getUserAgentValue } from \"../util/userAgent\";\n\nconst UserAgentHeaderName = getUserAgentHeaderName();\n\n/**\n * The programmatic identifier of the userAgentPolicy.\n */\nexport const userAgentPolicyName = \"userAgentPolicy\";\n\n/**\n * Options for adding user agent details to outgoing requests.\n */\nexport interface UserAgentPolicyOptions {\n /**\n * String prefix to add to the user agent for outgoing requests.\n * Defaults to an empty string.\n */\n userAgentPrefix?: string;\n}\n\n/**\n * A policy that sets the User-Agent header (or equivalent) to reflect\n * the library version.\n * @param options - Options to customize the user agent value.\n */\nexport function userAgentPolicy(options: UserAgentPolicyOptions = {}): PipelinePolicy {\n const userAgentValue = getUserAgentValue(options.userAgentPrefix);\n return {\n name: userAgentPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.headers.has(UserAgentHeaderName)) {\n request.headers.set(UserAgentHeaderName, userAgentValue);\n }\n return next(request);\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the decompressResponsePolicy.\n */\nexport const decompressResponsePolicyName = \"decompressResponsePolicy\";\n\n/**\n * A policy to enable response decompression according to Accept-Encoding header\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding\n */\nexport function decompressResponsePolicy(): PipelinePolicy {\n return {\n name: decompressResponsePolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n // HEAD requests have no body\n if (request.method !== \"HEAD\") {\n request.headers.set(\"Accept-Encoding\", \"gzip,deflate\");\n }\n return next(request);\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError, AbortSignalLike } from \"@azure/abort-controller\";\nimport { PipelineResponse } from \"../interfaces\";\n\nconst StandardAbortMessage = \"The operation was aborted.\";\n\n/**\n * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds.\n * @param delayInMs - The number of milliseconds to be delayed.\n * @param value - The value to be resolved with after a timeout of t milliseconds.\n * @param options - The options for delay - currently abort options\n * - abortSignal - The abortSignal associated with containing operation.\n * - abortErrorMsg - The abort error message associated with containing operation.\n * @returns Resolved promise\n */\nexport function delay(\n delayInMs: number,\n value?: T,\n options?: {\n abortSignal?: AbortSignalLike;\n abortErrorMsg?: string;\n }\n): Promise {\n return new Promise((resolve, reject) => {\n let timer: ReturnType | undefined = undefined;\n let onAborted: (() => void) | undefined = undefined;\n\n const rejectOnAbort = (): void => {\n return reject(\n new AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)\n );\n };\n\n const removeListeners = (): void => {\n if (options?.abortSignal && onAborted) {\n options.abortSignal.removeEventListener(\"abort\", onAborted);\n }\n };\n\n onAborted = (): void => {\n if (timer) {\n clearTimeout(timer);\n }\n removeListeners();\n return rejectOnAbort();\n };\n\n if (options?.abortSignal && options.abortSignal.aborted) {\n return rejectOnAbort();\n }\n\n timer = setTimeout(() => {\n removeListeners();\n resolve(value);\n }, delayInMs);\n\n if (options?.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", onAborted);\n }\n });\n}\n\n/**\n * @internal\n * @returns the parsed value or undefined if the parsed value is invalid.\n */\nexport function parseHeaderValueAsNumber(\n response: PipelineResponse,\n headerName: string\n): number | undefined {\n const value = response.headers.get(headerName);\n if (!value) return;\n const valueAsNum = Number(value);\n if (Number.isNaN(valueAsNum)) return;\n return valueAsNum;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineResponse } from \"..\";\nimport { parseHeaderValueAsNumber } from \"../util/helpers\";\nimport { RetryStrategy } from \"./retryStrategy\";\n\n/**\n * The header that comes back from Azure services representing\n * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry).\n */\nconst RetryAfterHeader = \"Retry-After\";\n/**\n * The headers that come back from Azure services representing\n * the amount of time (minimum) to wait to retry.\n *\n * \"retry-after-ms\", \"x-ms-retry-after-ms\" : milliseconds\n * \"Retry-After\" : seconds or timestamp\n */\nconst AllRetryAfterHeaders: string[] = [\"retry-after-ms\", \"x-ms-retry-after-ms\", RetryAfterHeader];\n\n/**\n * A response is a throttling retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n *\n * Returns the `retryAfterInMs` value if the response is a throttling retry response.\n * If not throttling retry response, returns `undefined`.\n *\n * @internal\n */\nfunction getRetryAfterInMs(response?: PipelineResponse): number | undefined {\n if (!(response && [429, 503].includes(response.status))) return undefined;\n try {\n // Headers: \"retry-after-ms\", \"x-ms-retry-after-ms\", \"Retry-After\"\n for (const header of AllRetryAfterHeaders) {\n const retryAfterValue = parseHeaderValueAsNumber(response, header);\n if (retryAfterValue === 0 || retryAfterValue) {\n // \"Retry-After\" header ==> seconds\n // \"retry-after-ms\", \"x-ms-retry-after-ms\" headers ==> milli-seconds\n const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1;\n return retryAfterValue * multiplyingFactor; // in milli-seconds\n }\n }\n\n // RetryAfterHeader (\"Retry-After\") has a special case where it might be formatted as a date instead of a number of seconds\n const retryAfterHeader = response.headers.get(RetryAfterHeader);\n if (!retryAfterHeader) return;\n\n const date = Date.parse(retryAfterHeader);\n const diff = date - Date.now();\n // negative diff would mean a date in the past, so retry asap with 0 milliseconds\n return Number.isFinite(diff) ? Math.max(0, diff) : undefined;\n } catch (e: any) {\n return undefined;\n }\n}\n\n/**\n * A response is a retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n */\nexport function isThrottlingRetryResponse(response?: PipelineResponse): boolean {\n return Number.isFinite(getRetryAfterInMs(response));\n}\n\nexport function throttlingRetryStrategy(): RetryStrategy {\n return {\n name: \"throttlingRetryStrategy\",\n retry({ response }) {\n const retryAfterInMs = getRetryAfterInMs(response);\n if (!Number.isFinite(retryAfterInMs)) {\n return { skipStrategy: true };\n }\n return {\n retryAfterInMs,\n };\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineResponse } from \"../interfaces\";\nimport { RestError } from \"../restError\";\nimport { getRandomIntegerInclusive } from \"@azure/core-util\";\nimport { RetryStrategy } from \"./retryStrategy\";\nimport { isThrottlingRetryResponse } from \"./throttlingRetryStrategy\";\n\n// intervals are in milliseconds\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;\n\n/**\n * A retry strategy that retries with an exponentially increasing delay in these two cases:\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505).\n */\nexport function exponentialRetryStrategy(\n options: {\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second.) The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n\n /**\n * If true it won't retry if it received a system error.\n */\n ignoreSystemErrors?: boolean;\n\n /**\n * If true it won't retry if it received a non-fatal HTTP status code.\n */\n ignoreHttpStatusCodes?: boolean;\n } = {}\n): RetryStrategy {\n const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL;\n const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n\n let retryAfterInMs = retryInterval;\n\n return {\n name: \"exponentialRetryStrategy\",\n retry({ retryCount, response, responseError }) {\n const matchedSystemError = isSystemError(responseError);\n const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors;\n\n const isExponential = isExponentialRetryResponse(response);\n const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes;\n const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential);\n\n if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) {\n return { skipStrategy: true };\n }\n\n if (responseError && !matchedSystemError && !isExponential) {\n return { errorToThrow: responseError };\n }\n\n // Exponentially increase the delay each time\n const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount);\n // Don't let the delay exceed the maximum\n const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay);\n // Allow the final value to have some \"jitter\" (within 50% of the delay size) so\n // that retries across multiple clients don't occur simultaneously.\n retryAfterInMs =\n clampedExponentialDelay / 2 + getRandomIntegerInclusive(0, clampedExponentialDelay / 2);\n return { retryAfterInMs };\n },\n };\n}\n\n/**\n * A response is a retry response if it has status codes:\n * - 408, or\n * - Greater or equal than 500, except for 501 and 505.\n */\nexport function isExponentialRetryResponse(response?: PipelineResponse): boolean {\n return Boolean(\n response &&\n response.status !== undefined &&\n (response.status >= 500 || response.status === 408) &&\n response.status !== 501 &&\n response.status !== 505\n );\n}\n\n/**\n * Determines whether an error from a pipeline response was triggered in the network layer.\n */\nexport function isSystemError(err?: RestError): boolean {\n if (!err) {\n return false;\n }\n return (\n err.code === \"ETIMEDOUT\" ||\n err.code === \"ESOCKETTIMEDOUT\" ||\n err.code === \"ECONNREFUSED\" ||\n err.code === \"ECONNRESET\" ||\n err.code === \"ENOENT\"\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { delay } from \"../util/helpers\";\nimport { createClientLogger } from \"@azure/logger\";\nimport { RetryStrategy } from \"../retryStrategies/retryStrategy\";\nimport { RestError } from \"../restError\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\nconst retryPolicyLogger = createClientLogger(\"core-rest-pipeline retryPolicy\");\n\n/**\n * The programmatic identifier of the retryPolicy.\n */\nconst retryPolicyName = \"retryPolicy\";\n\n/**\n * Options to the {@link retryPolicy}\n */\nexport interface RetryPolicyOptions {\n /**\n * Maximum number of retries. If not specified, it will limit to 3 retries.\n */\n maxRetries?: number;\n /**\n * Logger. If it's not provided, a default logger is used.\n */\n logger?: AzureLogger;\n}\n\n/**\n * retryPolicy is a generic policy to enable retrying requests when certain conditions are met\n */\nexport function retryPolicy(\n strategies: RetryStrategy[],\n options: RetryPolicyOptions = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }\n): PipelinePolicy {\n const logger = options.logger || retryPolicyLogger;\n return {\n name: retryPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n let response: PipelineResponse | undefined;\n let responseError: RestError | undefined;\n let retryCount = -1;\n\n // eslint-disable-next-line no-constant-condition\n retryRequest: while (true) {\n retryCount += 1;\n response = undefined;\n responseError = undefined;\n\n try {\n logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId);\n response = await next(request);\n logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId);\n } catch (e: any) {\n logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId);\n\n // RestErrors are valid targets for the retry strategies.\n // If none of the retry strategies can work with them, they will be thrown later in this policy.\n // If the received error is not a RestError, it is immediately thrown.\n responseError = e as RestError;\n if (!e || responseError.name !== \"RestError\") {\n throw e;\n }\n\n response = responseError.response;\n }\n\n if (request.abortSignal?.aborted) {\n logger.error(`Retry ${retryCount}: Request aborted.`);\n const abortError = new AbortError();\n throw abortError;\n }\n\n if (retryCount >= (options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT)) {\n logger.info(\n `Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`\n );\n if (responseError) {\n throw responseError;\n } else if (response) {\n return response;\n } else {\n throw new Error(\"Maximum retries reached with no response or error to throw\");\n }\n }\n\n logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`);\n\n strategiesLoop: for (const strategy of strategies) {\n const strategyLogger = strategy.logger || retryPolicyLogger;\n strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`);\n\n const modifiers = strategy.retry({\n retryCount,\n response,\n responseError,\n });\n\n if (modifiers.skipStrategy) {\n strategyLogger.info(`Retry ${retryCount}: Skipped.`);\n continue strategiesLoop;\n }\n\n const { errorToThrow, retryAfterInMs, redirectTo } = modifiers;\n\n if (errorToThrow) {\n strategyLogger.error(\n `Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`,\n errorToThrow\n );\n throw errorToThrow;\n }\n\n if (retryAfterInMs || retryAfterInMs === 0) {\n strategyLogger.info(\n `Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`\n );\n await delay(retryAfterInMs, undefined, { abortSignal: request.abortSignal });\n continue retryRequest;\n }\n\n if (redirectTo) {\n strategyLogger.info(\n `Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`\n );\n request.url = redirectTo;\n continue retryRequest;\n }\n }\n\n if (responseError) {\n logger.info(\n `None of the retry strategies could work with the received error. Throwing it.`\n );\n throw responseError;\n }\n if (response) {\n logger.info(\n `None of the retry strategies could work with the received response. Returning it.`\n );\n return response;\n }\n\n // If all the retries skip and there's no response,\n // we're still in the retry loop, so a new request will be sent\n // until `maxRetries` is reached.\n }\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRetryOptions } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * Name of the {@link defaultRetryPolicy}\n */\nexport const defaultRetryPolicyName = \"defaultRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface DefaultRetryPolicyOptions extends PipelineRetryOptions {}\n\n/**\n * A policy that retries according to three strategies:\n * - When the server sends a 429 response with a Retry-After header.\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay.\n */\nexport function defaultRetryPolicy(options: DefaultRetryPolicyOptions = {}): PipelinePolicy {\n return {\n name: defaultRetryPolicyName,\n sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }).sendRequest,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport FormData from \"form-data\";\nimport { FormDataMap, PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the formDataPolicy.\n */\nexport const formDataPolicyName = \"formDataPolicy\";\n\n/**\n * A policy that encodes FormData on the request into the body.\n */\nexport function formDataPolicy(): PipelinePolicy {\n return {\n name: formDataPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (request.formData) {\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"application/x-www-form-urlencoded\") !== -1) {\n request.body = wwwFormUrlEncode(request.formData);\n request.formData = undefined;\n } else {\n await prepareFormData(request.formData, request);\n }\n }\n return next(request);\n },\n };\n}\n\nfunction wwwFormUrlEncode(formData: FormDataMap): string {\n const urlSearchParams = new URLSearchParams();\n for (const [key, value] of Object.entries(formData)) {\n if (Array.isArray(value)) {\n for (const subValue of value) {\n urlSearchParams.append(key, subValue.toString());\n }\n } else {\n urlSearchParams.append(key, value.toString());\n }\n }\n return urlSearchParams.toString();\n}\n\nasync function prepareFormData(formData: FormDataMap, request: PipelineRequest): Promise {\n const requestForm = new FormData();\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (const subValue of formValue) {\n requestForm.append(formKey, subValue);\n }\n } else {\n requestForm.append(formKey, formValue);\n }\n }\n\n request.body = requestForm;\n request.formData = undefined;\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n request.headers.set(\n \"Content-Type\",\n `multipart/form-data; boundary=${requestForm.getBoundary()}`\n );\n }\n try {\n const contentLength = await new Promise((resolve, reject) => {\n requestForm.getLength((err, length) => {\n if (err) {\n reject(err);\n } else {\n resolve(length);\n }\n });\n });\n request.headers.set(\"Content-Length\", contentLength);\n } catch (e: any) {\n // ignore setting the length if this fails\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport { HttpsProxyAgent, HttpsProxyAgentOptions } from \"https-proxy-agent\";\nimport { HttpProxyAgent, HttpProxyAgentOptions } from \"http-proxy-agent\";\nimport { PipelineRequest, PipelineResponse, ProxySettings, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { logger } from \"../log\";\n\nconst HTTPS_PROXY = \"HTTPS_PROXY\";\nconst HTTP_PROXY = \"HTTP_PROXY\";\nconst ALL_PROXY = \"ALL_PROXY\";\nconst NO_PROXY = \"NO_PROXY\";\n\n/**\n * The programmatic identifier of the proxyPolicy.\n */\nexport const proxyPolicyName = \"proxyPolicy\";\n\n/**\n * Stores the patterns specified in NO_PROXY environment variable.\n * @internal\n */\nexport const globalNoProxyList: string[] = [];\nlet noProxyListLoaded: boolean = false;\n\n/** A cache of whether a host should bypass the proxy. */\nconst globalBypassedMap: Map = new Map();\n\nfunction getEnvironmentValue(name: string): string | undefined {\n if (process.env[name]) {\n return process.env[name];\n } else if (process.env[name.toLowerCase()]) {\n return process.env[name.toLowerCase()];\n }\n return undefined;\n}\n\nfunction loadEnvironmentProxyValue(): string | undefined {\n if (!process) {\n return undefined;\n }\n\n const httpsProxy = getEnvironmentValue(HTTPS_PROXY);\n const allProxy = getEnvironmentValue(ALL_PROXY);\n const httpProxy = getEnvironmentValue(HTTP_PROXY);\n\n return httpsProxy || allProxy || httpProxy;\n}\n\n/**\n * Check whether the host of a given `uri` matches any pattern in the no proxy list.\n * If there's a match, any request sent to the same host shouldn't have the proxy settings set.\n * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210\n */\nfunction isBypassed(\n uri: string,\n noProxyList: string[],\n bypassedMap?: Map\n): boolean | undefined {\n if (noProxyList.length === 0) {\n return false;\n }\n const host = new URL(uri).hostname;\n if (bypassedMap?.has(host)) {\n return bypassedMap.get(host);\n }\n let isBypassedFlag = false;\n for (const pattern of noProxyList) {\n if (pattern[0] === \".\") {\n // This should match either domain it self or any subdomain or host\n // .foo.com will match foo.com it self or *.foo.com\n if (host.endsWith(pattern)) {\n isBypassedFlag = true;\n } else {\n if (host.length === pattern.length - 1 && host === pattern.slice(1)) {\n isBypassedFlag = true;\n }\n }\n } else {\n if (host === pattern) {\n isBypassedFlag = true;\n }\n }\n }\n bypassedMap?.set(host, isBypassedFlag);\n return isBypassedFlag;\n}\n\nexport function loadNoProxy(): string[] {\n const noProxy = getEnvironmentValue(NO_PROXY);\n noProxyListLoaded = true;\n if (noProxy) {\n return noProxy\n .split(\",\")\n .map((item) => item.trim())\n .filter((item) => item.length);\n }\n\n return [];\n}\n\n/**\n * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy.\n * If no argument is given, it attempts to parse a proxy URL from the environment\n * variables `HTTPS_PROXY` or `HTTP_PROXY`.\n * @param proxyUrl - The url of the proxy to use. May contain authentication information.\n */\nexport function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined {\n if (!proxyUrl) {\n proxyUrl = loadEnvironmentProxyValue();\n if (!proxyUrl) {\n return undefined;\n }\n }\n\n const parsedUrl = new URL(proxyUrl);\n const schema = parsedUrl.protocol ? parsedUrl.protocol + \"//\" : \"\";\n return {\n host: schema + parsedUrl.hostname,\n port: Number.parseInt(parsedUrl.port || \"80\"),\n username: parsedUrl.username,\n password: parsedUrl.password,\n };\n}\n\n/**\n * @internal\n */\nexport function getProxyAgentOptions(\n proxySettings: ProxySettings,\n { headers, tlsSettings }: PipelineRequest\n): HttpProxyAgentOptions {\n let parsedProxyUrl: URL;\n try {\n parsedProxyUrl = new URL(proxySettings.host);\n } catch (_error) {\n throw new Error(\n `Expecting a valid host string in proxy settings, but found \"${proxySettings.host}\".`\n );\n }\n\n if (tlsSettings) {\n logger.warning(\n \"TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.\"\n );\n }\n\n const proxyAgentOptions: HttpsProxyAgentOptions = {\n hostname: parsedProxyUrl.hostname,\n port: proxySettings.port,\n protocol: parsedProxyUrl.protocol,\n headers: headers.toJSON(),\n };\n if (proxySettings.username && proxySettings.password) {\n proxyAgentOptions.auth = `${proxySettings.username}:${proxySettings.password}`;\n } else if (proxySettings.username) {\n proxyAgentOptions.auth = `${proxySettings.username}`;\n }\n return proxyAgentOptions;\n}\n\nfunction setProxyAgentOnRequest(request: PipelineRequest, cachedAgents: CachedAgents): void {\n // Custom Agent should take precedence so if one is present\n // we should skip to avoid overwriting it.\n if (request.agent) {\n return;\n }\n\n const url = new URL(request.url);\n\n const isInsecure = url.protocol !== \"https:\";\n\n const proxySettings = request.proxySettings;\n if (proxySettings) {\n if (isInsecure) {\n if (!cachedAgents.httpProxyAgent) {\n const proxyAgentOptions = getProxyAgentOptions(proxySettings, request);\n cachedAgents.httpProxyAgent = new HttpProxyAgent(proxyAgentOptions);\n }\n request.agent = cachedAgents.httpProxyAgent;\n } else {\n if (!cachedAgents.httpsProxyAgent) {\n const proxyAgentOptions = getProxyAgentOptions(proxySettings, request);\n cachedAgents.httpsProxyAgent = new HttpsProxyAgent(proxyAgentOptions);\n }\n request.agent = cachedAgents.httpsProxyAgent;\n }\n }\n}\n\ninterface CachedAgents {\n httpsProxyAgent?: https.Agent;\n httpProxyAgent?: http.Agent;\n}\n\n/**\n * A policy that allows one to apply proxy settings to all requests.\n * If not passed static settings, they will be retrieved from the HTTPS_PROXY\n * or HTTP_PROXY environment variables.\n * @param proxySettings - ProxySettings to use on each request.\n * @param options - additional settings, for example, custom NO_PROXY patterns\n */\nexport function proxyPolicy(\n proxySettings = getDefaultProxySettings(),\n options?: {\n /** a list of patterns to override those loaded from NO_PROXY environment variable. */\n customNoProxyList?: string[];\n }\n): PipelinePolicy {\n if (!noProxyListLoaded) {\n globalNoProxyList.push(...loadNoProxy());\n }\n\n const cachedAgents: CachedAgents = {};\n\n return {\n name: proxyPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (\n !request.proxySettings &&\n !isBypassed(\n request.url,\n options?.customNoProxyList ?? globalNoProxyList,\n options?.customNoProxyList ? undefined : globalBypassedMap\n )\n ) {\n request.proxySettings = proxySettings;\n }\n\n if (request.proxySettings) {\n setProxyAgentOnRequest(request, cachedAgents);\n }\n return next(request);\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the setClientRequestIdPolicy.\n */\nexport const setClientRequestIdPolicyName = \"setClientRequestIdPolicy\";\n\n/**\n * Each PipelineRequest gets a unique id upon creation.\n * This policy passes that unique id along via an HTTP header to enable better\n * telemetry and tracing.\n * @param requestIdHeaderName - The name of the header to pass the request ID to.\n */\nexport function setClientRequestIdPolicy(\n requestIdHeaderName = \"x-ms-client-request-id\"\n): PipelinePolicy {\n return {\n name: setClientRequestIdPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.headers.has(requestIdHeaderName)) {\n request.headers.set(requestIdHeaderName, request.requestId);\n }\n return next(request);\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { TlsSettings } from \"../interfaces\";\n\n/**\n * Name of the TLS Policy\n */\nexport const tlsPolicyName = \"tlsPolicy\";\n\n/**\n * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication.\n */\nexport function tlsPolicy(tlsSettings?: TlsSettings): PipelinePolicy {\n return {\n name: tlsPolicyName,\n sendRequest: async (req, next) => {\n // Users may define a request tlsSettings, honor those over the client level one\n if (!req.tlsSettings) {\n req.tlsSettings = tlsSettings;\n }\n return next(req);\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { inspect } from \"util\";\n\nexport const custom = inspect.custom;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isError } from \"@azure/core-util\";\nimport { PipelineRequest, PipelineResponse } from \"./interfaces\";\nimport { custom } from \"./util/inspect\";\nimport { Sanitizer } from \"./util/sanitizer\";\n\nconst errorSanitizer = new Sanitizer();\n\n/**\n * The options supported by RestError.\n */\nexport interface RestErrorOptions {\n /**\n * The code of the error itself (use statics on RestError if possible.)\n */\n code?: string;\n /**\n * The HTTP status code of the request (if applicable.)\n */\n statusCode?: number;\n /**\n * The request that was made.\n */\n request?: PipelineRequest;\n /**\n * The response received (if any.)\n */\n response?: PipelineResponse;\n}\n\n/**\n * A custom error type for failed pipeline requests.\n */\nexport class RestError extends Error {\n /**\n * Something went wrong when making the request.\n * This means the actual request failed for some reason,\n * such as a DNS issue or the connection being lost.\n */\n static readonly REQUEST_SEND_ERROR: string = \"REQUEST_SEND_ERROR\";\n /**\n * This means that parsing the response from the server failed.\n * It may have been malformed.\n */\n static readonly PARSE_ERROR: string = \"PARSE_ERROR\";\n\n /**\n * The code of the error itself (use statics on RestError if possible.)\n */\n public code?: string;\n /**\n * The HTTP status code of the request (if applicable.)\n */\n public statusCode?: number;\n /**\n * The request that was made.\n */\n public request?: PipelineRequest;\n /**\n * The response received (if any.)\n */\n public response?: PipelineResponse;\n /**\n * Bonus property set by the throw site.\n */\n public details?: unknown;\n\n constructor(message: string, options: RestErrorOptions = {}) {\n super(message);\n this.name = \"RestError\";\n this.code = options.code;\n this.statusCode = options.statusCode;\n this.request = options.request;\n this.response = options.response;\n\n Object.setPrototypeOf(this, RestError.prototype);\n }\n\n /**\n * Logging method for util.inspect in Node\n */\n [custom](): string {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }\n}\n\n/**\n * Typeguard for RestError\n * @param e - Something caught by a catch clause.\n */\nexport function isRestError(e: unknown): e is RestError {\n if (e instanceof RestError) {\n return true;\n }\n return isError(e) && e.name === \"RestError\";\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n TracingClient,\n TracingContext,\n TracingSpan,\n createTracingClient,\n} from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"../constants\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { getUserAgentValue } from \"../util/userAgent\";\nimport { logger } from \"../log\";\nimport { getErrorMessage, isError } from \"@azure/core-util\";\nimport { isRestError } from \"../restError\";\n\n/**\n * The programmatic identifier of the tracingPolicy.\n */\nexport const tracingPolicyName = \"tracingPolicy\";\n\n/**\n * Options to configure the tracing policy.\n */\nexport interface TracingPolicyOptions {\n /**\n * String prefix to add to the user agent logged as metadata\n * on the generated Span.\n * Defaults to an empty string.\n */\n userAgentPrefix?: string;\n}\n\n/**\n * A simple policy to create OpenTelemetry Spans for each request made by the pipeline\n * that has SpanOptions with a parent.\n * Requests made without a parent Span will not be recorded.\n * @param options - Options to configure the telemetry logged by the tracing policy.\n */\nexport function tracingPolicy(options: TracingPolicyOptions = {}): PipelinePolicy {\n const userAgent = getUserAgentValue(options.userAgentPrefix);\n const tracingClient = tryCreateTracingClient();\n\n return {\n name: tracingPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!tracingClient || !request.tracingOptions?.tracingContext) {\n return next(request);\n }\n\n const { span, tracingContext } = tryCreateSpan(tracingClient, request, userAgent) ?? {};\n\n if (!span || !tracingContext) {\n return next(request);\n }\n\n try {\n const response = await tracingClient.withContext(tracingContext, next, request);\n tryProcessResponse(span, response);\n return response;\n } catch (err: any) {\n tryProcessError(span, err);\n throw err;\n }\n },\n };\n}\n\nfunction tryCreateTracingClient(): TracingClient | undefined {\n try {\n return createTracingClient({\n namespace: \"\",\n packageName: \"@azure/core-rest-pipeline\",\n packageVersion: SDK_VERSION,\n });\n } catch (e: unknown) {\n logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\n\nfunction tryCreateSpan(\n tracingClient: TracingClient,\n request: PipelineRequest,\n userAgent?: string\n): { span: TracingSpan; tracingContext: TracingContext } | undefined {\n try {\n // As per spec, we do not need to differentiate between HTTP and HTTPS in span name.\n const { span, updatedOptions } = tracingClient.startSpan(\n `HTTP ${request.method}`,\n { tracingOptions: request.tracingOptions },\n {\n spanKind: \"client\",\n spanAttributes: {\n \"http.method\": request.method,\n \"http.url\": request.url,\n requestId: request.requestId,\n },\n }\n );\n\n // If the span is not recording, don't do any more work.\n if (!span.isRecording()) {\n span.end();\n return undefined;\n }\n\n if (userAgent) {\n span.setAttribute(\"http.user_agent\", userAgent);\n }\n\n // set headers\n const headers = tracingClient.createRequestHeaders(\n updatedOptions.tracingOptions.tracingContext\n );\n for (const [key, value] of Object.entries(headers)) {\n request.headers.set(key, value);\n }\n return { span, tracingContext: updatedOptions.tracingOptions.tracingContext };\n } catch (e: any) {\n logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\n\nfunction tryProcessError(span: TracingSpan, error: unknown): void {\n try {\n span.setStatus({\n status: \"error\",\n error: isError(error) ? error : undefined,\n });\n if (isRestError(error) && error.statusCode) {\n span.setAttribute(\"http.status_code\", error.statusCode);\n }\n span.end();\n } catch (e: any) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\n\nfunction tryProcessResponse(span: TracingSpan, response: PipelineResponse): void {\n try {\n span.setAttribute(\"http.status_code\", response.status);\n const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n if (serviceRequestId) {\n span.setAttribute(\"serviceRequestId\", serviceRequestId);\n }\n span.setStatus({\n status: \"success\",\n });\n span.end();\n } catch (e: any) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { LogPolicyOptions, logPolicy } from \"./policies/logPolicy\";\nimport { Pipeline, createEmptyPipeline } from \"./pipeline\";\nimport { PipelineRetryOptions, TlsSettings } from \"./interfaces\";\nimport { RedirectPolicyOptions, redirectPolicy } from \"./policies/redirectPolicy\";\nimport { UserAgentPolicyOptions, userAgentPolicy } from \"./policies/userAgentPolicy\";\n\nimport { ProxySettings } from \".\";\nimport { decompressResponsePolicy } from \"./policies/decompressResponsePolicy\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy\";\nimport { formDataPolicy } from \"./policies/formDataPolicy\";\nimport { isNode } from \"@azure/core-util\";\nimport { proxyPolicy } from \"./policies/proxyPolicy\";\nimport { setClientRequestIdPolicy } from \"./policies/setClientRequestIdPolicy\";\nimport { tlsPolicy } from \"./policies/tlsPolicy\";\nimport { tracingPolicy } from \"./policies/tracingPolicy\";\n\n/**\n * Defines options that are used to configure the HTTP pipeline for\n * an SDK client.\n */\nexport interface PipelineOptions {\n /**\n * Options that control how to retry failed requests.\n */\n retryOptions?: PipelineRetryOptions;\n\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxySettings;\n\n /** Options for configuring TLS authentication */\n tlsOptions?: TlsSettings;\n\n /**\n * Options for how redirect responses are handled.\n */\n redirectOptions?: RedirectPolicyOptions;\n\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentPolicyOptions;\n\n /**\n * Options for setting common telemetry and tracing info to outgoing requests.\n */\n telemetryOptions?: TelemetryOptions;\n}\n\n/**\n * Defines options that are used to configure common telemetry and tracing info\n */\nexport interface TelemetryOptions {\n /**\n * The name of the header to pass the request ID to.\n */\n clientRequestIdHeaderName?: string;\n}\n\n/**\n * Defines options that are used to configure internal options of\n * the HTTP pipeline for an SDK client.\n */\nexport interface InternalPipelineOptions extends PipelineOptions {\n /**\n * Options to configure request/response logging.\n */\n loggingOptions?: LogPolicyOptions;\n}\n\n/**\n * Create a new pipeline with a default set of customizable policies.\n * @param options - Options to configure a custom pipeline.\n */\nexport function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline {\n const pipeline = createEmptyPipeline();\n\n if (isNode) {\n if (options.tlsOptions) {\n pipeline.addPolicy(tlsPolicy(options.tlsOptions));\n }\n pipeline.addPolicy(proxyPolicy(options.proxyOptions));\n pipeline.addPolicy(decompressResponsePolicy());\n }\n\n pipeline.addPolicy(formDataPolicy());\n pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));\n pipeline.addPolicy(setClientRequestIdPolicy(options.telemetryOptions?.clientRequestIdHeaderName));\n pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: \"Retry\" });\n pipeline.addPolicy(tracingPolicy(options.userAgentOptions), { afterPhase: \"Retry\" });\n if (isNode) {\n // Both XHR and Fetch expect to handle redirects automatically,\n // so only include this policy when we're in Node.\n pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: \"Retry\" });\n }\n pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: \"Sign\" });\n\n return pipeline;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpHeaders, RawHttpHeaders, RawHttpHeadersInput } from \"./interfaces\";\n\ninterface HeaderEntry {\n name: string;\n value: string;\n}\n\nfunction normalizeName(name: string): string {\n return name.toLowerCase();\n}\n\nfunction* headerIterator(map: Map): IterableIterator<[string, string]> {\n for (const entry of map.values()) {\n yield [entry.name, entry.value];\n }\n}\n\nclass HttpHeadersImpl implements HttpHeaders {\n private readonly _headersMap: Map;\n\n constructor(rawHeaders?: RawHttpHeaders | RawHttpHeadersInput) {\n this._headersMap = new Map();\n if (rawHeaders) {\n for (const headerName of Object.keys(rawHeaders)) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param name - The name of the header to set. This value is case-insensitive.\n * @param value - The value of the header to set.\n */\n public set(name: string, value: string | number | boolean): void {\n this._headersMap.set(normalizeName(name), { name, value: String(value) });\n }\n\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param name - The name of the header. This value is case-insensitive.\n */\n public get(name: string): string | undefined {\n return this._headersMap.get(normalizeName(name))?.value;\n }\n\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n * @param name - The name of the header to set. This value is case-insensitive.\n */\n public has(name: string): boolean {\n return this._headersMap.has(normalizeName(name));\n }\n\n /**\n * Remove the header with the provided headerName.\n * @param name - The name of the header to remove.\n */\n public delete(name: string): void {\n this._headersMap.delete(normalizeName(name));\n }\n\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n public toJSON(options: { preserveCase?: boolean } = {}): RawHttpHeaders {\n const result: RawHttpHeaders = {};\n if (options.preserveCase) {\n for (const entry of this._headersMap.values()) {\n result[entry.name] = entry.value;\n }\n } else {\n for (const [normalizedName, entry] of this._headersMap) {\n result[normalizedName] = entry.value;\n }\n }\n\n return result;\n }\n\n /**\n * Get the string representation of this HTTP header collection.\n */\n public toString(): string {\n return JSON.stringify(this.toJSON({ preserveCase: true }));\n }\n\n /**\n * Iterate over tuples of header [name, value] pairs.\n */\n [Symbol.iterator](): Iterator<[string, string]> {\n return headerIterator(this._headersMap);\n }\n}\n\n/**\n * Creates an object that satisfies the `HttpHeaders` interface.\n * @param rawHeaders - A simple object representing initial headers\n */\nexport function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders {\n return new HttpHeadersImpl(rawHeaders);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport * as zlib from \"zlib\";\nimport { Transform } from \"stream\";\nimport { AbortController, AbortError } from \"@azure/abort-controller\";\nimport {\n HttpClient,\n HttpHeaders,\n PipelineRequest,\n PipelineResponse,\n RequestBodyType,\n TlsSettings,\n TransferProgressEvent,\n} from \"./interfaces\";\nimport { createHttpHeaders } from \"./httpHeaders\";\nimport { RestError } from \"./restError\";\nimport { IncomingMessage } from \"http\";\nimport { logger } from \"./log\";\n\nconst DEFAULT_TLS_SETTINGS = {};\n\nfunction isReadableStream(body: any): body is NodeJS.ReadableStream {\n return body && typeof body.pipe === \"function\";\n}\n\nfunction isStreamComplete(stream: NodeJS.ReadableStream): Promise {\n return new Promise((resolve) => {\n stream.on(\"close\", resolve);\n stream.on(\"end\", resolve);\n stream.on(\"error\", resolve);\n });\n}\n\nfunction isArrayBuffer(body: any): body is ArrayBuffer | ArrayBufferView {\n return body && typeof body.byteLength === \"number\";\n}\n\nclass ReportTransform extends Transform {\n private loadedBytes = 0;\n private progressCallback: (progress: TransferProgressEvent) => void;\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n _transform(chunk: string | Buffer, _encoding: string, callback: Function): void {\n this.push(chunk);\n this.loadedBytes += chunk.length;\n try {\n this.progressCallback({ loadedBytes: this.loadedBytes });\n callback();\n } catch (e: any) {\n callback(e);\n }\n }\n\n constructor(progressCallback: (progress: TransferProgressEvent) => void) {\n super();\n this.progressCallback = progressCallback;\n }\n}\n\n/**\n * A HttpClient implementation that uses Node's \"https\" module to send HTTPS requests.\n * @internal\n */\nclass NodeHttpClient implements HttpClient {\n private cachedHttpAgent?: http.Agent;\n private cachedHttpsAgents: WeakMap = new WeakMap();\n\n /**\n * Makes a request over an underlying transport layer and returns the response.\n * @param request - The request to be made.\n */\n public async sendRequest(request: PipelineRequest): Promise {\n const abortController = new AbortController();\n let abortListener: ((event: any) => void) | undefined;\n if (request.abortSignal) {\n if (request.abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n\n abortListener = (event: Event) => {\n if (event.type === \"abort\") {\n abortController.abort();\n }\n };\n request.abortSignal.addEventListener(\"abort\", abortListener);\n }\n\n if (request.timeout > 0) {\n setTimeout(() => {\n abortController.abort();\n }, request.timeout);\n }\n\n const acceptEncoding = request.headers.get(\"Accept-Encoding\");\n const shouldDecompress =\n acceptEncoding?.includes(\"gzip\") || acceptEncoding?.includes(\"deflate\");\n\n let body = typeof request.body === \"function\" ? request.body() : request.body;\n if (body && !request.headers.has(\"Content-Length\")) {\n const bodyLength = getBodyLength(body);\n if (bodyLength !== null) {\n request.headers.set(\"Content-Length\", bodyLength);\n }\n }\n\n let responseStream: NodeJS.ReadableStream | undefined;\n try {\n if (body && request.onUploadProgress) {\n const onUploadProgress = request.onUploadProgress;\n const uploadReportStream = new ReportTransform(onUploadProgress);\n uploadReportStream.on(\"error\", (e) => {\n logger.error(\"Error in upload progress\", e);\n });\n if (isReadableStream(body)) {\n body.pipe(uploadReportStream);\n } else {\n uploadReportStream.end(body);\n }\n\n body = uploadReportStream;\n }\n\n const res = await this.makeRequest(request, abortController, body);\n\n const headers = getResponseHeaders(res);\n\n const status = res.statusCode ?? 0;\n const response: PipelineResponse = {\n status,\n headers,\n request,\n };\n\n // Responses to HEAD must not have a body.\n // If they do return a body, that body must be ignored.\n if (request.method === \"HEAD\") {\n // call resume() and not destroy() to avoid closing the socket\n // and losing keep alive\n res.resume();\n return response;\n }\n\n responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res;\n\n const onDownloadProgress = request.onDownloadProgress;\n if (onDownloadProgress) {\n const downloadReportStream = new ReportTransform(onDownloadProgress);\n downloadReportStream.on(\"error\", (e) => {\n logger.error(\"Error in download progress\", e);\n });\n responseStream.pipe(downloadReportStream);\n responseStream = downloadReportStream;\n }\n\n if (\n // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) ||\n request.streamResponseStatusCodes?.has(response.status)\n ) {\n response.readableStreamBody = responseStream;\n } else {\n response.bodyAsText = await streamToText(responseStream);\n }\n\n return response;\n } finally {\n // clean up event listener\n if (request.abortSignal && abortListener) {\n let uploadStreamDone = Promise.resolve();\n if (isReadableStream(body)) {\n uploadStreamDone = isStreamComplete(body as NodeJS.ReadableStream);\n }\n let downloadStreamDone = Promise.resolve();\n if (isReadableStream(responseStream)) {\n downloadStreamDone = isStreamComplete(responseStream);\n }\n\n Promise.all([uploadStreamDone, downloadStreamDone])\n .then(() => {\n // eslint-disable-next-line promise/always-return\n if (abortListener) {\n request.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n })\n .catch((e) => {\n logger.warning(\"Error when cleaning up abortListener on httpRequest\", e);\n });\n }\n }\n }\n\n private makeRequest(\n request: PipelineRequest,\n abortController: AbortController,\n body?: RequestBodyType\n ): Promise {\n const url = new URL(request.url);\n\n const isInsecure = url.protocol !== \"https:\";\n\n if (isInsecure && !request.allowInsecureConnection) {\n throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n }\n\n const agent = (request.agent as http.Agent) ?? this.getOrCreateAgent(request, isInsecure);\n const options: http.RequestOptions = {\n agent,\n hostname: url.hostname,\n path: `${url.pathname}${url.search}`,\n port: url.port,\n method: request.method,\n headers: request.headers.toJSON({ preserveCase: true }),\n };\n\n return new Promise((resolve, reject) => {\n const req = isInsecure ? http.request(options, resolve) : https.request(options, resolve);\n\n req.once(\"error\", (err: Error & { code?: string }) => {\n reject(\n new RestError(err.message, { code: err.code ?? RestError.REQUEST_SEND_ERROR, request })\n );\n });\n\n abortController.signal.addEventListener(\"abort\", () => {\n const abortError = new AbortError(\"The operation was aborted.\");\n req.destroy(abortError);\n reject(abortError);\n });\n if (body && isReadableStream(body)) {\n body.pipe(req);\n } else if (body) {\n if (typeof body === \"string\" || Buffer.isBuffer(body)) {\n req.end(body);\n } else if (isArrayBuffer(body)) {\n req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body));\n } else {\n logger.error(\"Unrecognized body type\", body);\n reject(new RestError(\"Unrecognized body type\"));\n }\n } else {\n // streams don't like \"undefined\" being passed as data\n req.end();\n }\n });\n }\n\n private getOrCreateAgent(request: PipelineRequest, isInsecure: boolean): http.Agent {\n const disableKeepAlive = request.disableKeepAlive;\n\n // Handle Insecure requests first\n if (isInsecure) {\n if (disableKeepAlive) {\n // keepAlive:false is the default so we don't need a custom Agent\n return http.globalAgent;\n }\n\n if (!this.cachedHttpAgent) {\n // If there is no cached agent create a new one and cache it.\n this.cachedHttpAgent = new http.Agent({ keepAlive: true });\n }\n return this.cachedHttpAgent;\n } else {\n if (disableKeepAlive && !request.tlsSettings) {\n // When there are no tlsSettings and keepAlive is false\n // we don't need a custom agent\n return https.globalAgent;\n }\n\n // We use the tlsSettings to index cached clients\n const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS;\n\n // Get the cached agent or create a new one with the\n // provided values for keepAlive and tlsSettings\n let agent = this.cachedHttpsAgents.get(tlsSettings);\n\n if (agent && agent.options.keepAlive === !disableKeepAlive) {\n return agent;\n }\n\n logger.info(\"No cached TLS Agent exist, creating a new Agent\");\n agent = new https.Agent({\n // keepAlive is true if disableKeepAlive is false.\n keepAlive: !disableKeepAlive,\n // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options.\n ...tlsSettings,\n });\n\n this.cachedHttpsAgents.set(tlsSettings, agent);\n return agent;\n }\n }\n}\n\nfunction getResponseHeaders(res: IncomingMessage): HttpHeaders {\n const headers = createHttpHeaders();\n for (const header of Object.keys(res.headers)) {\n const value = res.headers[header];\n if (Array.isArray(value)) {\n if (value.length > 0) {\n headers.set(header, value[0]);\n }\n } else if (value) {\n headers.set(header, value);\n }\n }\n return headers;\n}\n\nfunction getDecodedResponseStream(\n stream: IncomingMessage,\n headers: HttpHeaders\n): NodeJS.ReadableStream {\n const contentEncoding = headers.get(\"Content-Encoding\");\n if (contentEncoding === \"gzip\") {\n const unzip = zlib.createGunzip();\n stream.pipe(unzip);\n return unzip;\n } else if (contentEncoding === \"deflate\") {\n const inflate = zlib.createInflate();\n stream.pipe(inflate);\n return inflate;\n }\n\n return stream;\n}\n\nfunction streamToText(stream: NodeJS.ReadableStream): Promise {\n return new Promise((resolve, reject) => {\n const buffer: Buffer[] = [];\n\n stream.on(\"data\", (chunk) => {\n if (Buffer.isBuffer(chunk)) {\n buffer.push(chunk);\n } else {\n buffer.push(Buffer.from(chunk));\n }\n });\n stream.on(\"end\", () => {\n resolve(Buffer.concat(buffer).toString(\"utf8\"));\n });\n stream.on(\"error\", (e) => {\n if (e && e?.name === \"AbortError\") {\n reject(e);\n } else {\n reject(\n new RestError(`Error reading response as text: ${e.message}`, {\n code: RestError.PARSE_ERROR,\n })\n );\n }\n });\n });\n}\n\n/** @internal */\nexport function getBodyLength(body: RequestBodyType): number | null {\n if (!body) {\n return 0;\n } else if (Buffer.isBuffer(body)) {\n return body.length;\n } else if (isReadableStream(body)) {\n return null;\n } else if (isArrayBuffer(body)) {\n return body.byteLength;\n } else if (typeof body === \"string\") {\n return Buffer.from(body).length;\n } else {\n return null;\n }\n}\n\n/**\n * Create a new HttpClient instance for the NodeJS environment.\n * @internal\n */\nexport function createNodeHttpClient(): HttpClient {\n return new NodeHttpClient();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient } from \"./interfaces\";\nimport { createNodeHttpClient } from \"./nodeHttpClient\";\n\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient(): HttpClient {\n return createNodeHttpClient();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n FormDataMap,\n HttpHeaders,\n HttpMethods,\n PipelineRequest,\n ProxySettings,\n RequestBodyType,\n TransferProgressEvent,\n} from \"./interfaces\";\nimport { createHttpHeaders } from \"./httpHeaders\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { randomUUID } from \"@azure/core-util\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * Settings to initialize a request.\n * Almost equivalent to Partial, but url is mandatory.\n */\nexport interface PipelineRequestOptions {\n /**\n * The URL to make the request to.\n */\n url: string;\n\n /**\n * The HTTP method to use when making the request.\n */\n method?: HttpMethods;\n\n /**\n * The HTTP headers to use when making the request.\n */\n headers?: HttpHeaders;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n * Defaults to 0, which disables the timeout.\n */\n timeout?: number;\n\n /**\n * If credentials (cookies) should be sent along during an XHR.\n * Defaults to false.\n */\n withCredentials?: boolean;\n\n /**\n * A unique identifier for the request. Used for logging and tracing.\n */\n requestId?: string;\n\n /**\n * The HTTP body content (if any)\n */\n body?: RequestBodyType;\n\n /**\n * To simulate a browser form post\n */\n formData?: FormDataMap;\n\n /**\n * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream.\n */\n streamResponseStatusCodes?: Set;\n\n /**\n * BROWSER ONLY\n *\n * A browser only option to enable use of the Streams API. If this option is set and streaming is used\n * (see `streamResponseStatusCodes`), the response will have a property `browserStream` instead of\n * `blobBody` which will be undefined.\n *\n * Default value is false\n */\n enableBrowserStreams?: boolean;\n\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n\n /**\n * If the connection should not be reused.\n */\n disableKeepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Options used to create a span when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Set to true if the request is sent over HTTP instead of HTTPS */\n allowInsecureConnection?: boolean;\n}\n\nclass PipelineRequestImpl implements PipelineRequest {\n public url: string;\n public method: HttpMethods;\n public headers: HttpHeaders;\n public timeout: number;\n public withCredentials: boolean;\n public body?: RequestBodyType;\n public formData?: FormDataMap;\n public streamResponseStatusCodes?: Set;\n public enableBrowserStreams: boolean;\n\n public proxySettings?: ProxySettings;\n public disableKeepAlive: boolean;\n public abortSignal?: AbortSignalLike;\n public requestId: string;\n public tracingOptions?: OperationTracingOptions;\n public allowInsecureConnection?: boolean;\n public onUploadProgress?: (progress: TransferProgressEvent) => void;\n public onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n constructor(options: PipelineRequestOptions) {\n this.url = options.url;\n this.body = options.body;\n this.headers = options.headers ?? createHttpHeaders();\n this.method = options.method ?? \"GET\";\n this.timeout = options.timeout ?? 0;\n this.formData = options.formData;\n this.disableKeepAlive = options.disableKeepAlive ?? false;\n this.proxySettings = options.proxySettings;\n this.streamResponseStatusCodes = options.streamResponseStatusCodes;\n this.withCredentials = options.withCredentials ?? false;\n this.abortSignal = options.abortSignal;\n this.tracingOptions = options.tracingOptions;\n this.onUploadProgress = options.onUploadProgress;\n this.onDownloadProgress = options.onDownloadProgress;\n this.requestId = options.requestId || randomUUID();\n this.allowInsecureConnection = options.allowInsecureConnection ?? false;\n this.enableBrowserStreams = options.enableBrowserStreams ?? false;\n }\n}\n\n/**\n * Creates a new pipeline request with the given options.\n * This method is to allow for the easy setting of default values and not required.\n * @param options - The options to create the request with.\n */\nexport function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest {\n return new PipelineRequestImpl(options);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * The programmatic identifier of the exponentialRetryPolicy.\n */\nexport const exponentialRetryPolicyName = \"exponentialRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface ExponentialRetryPolicyOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second.) The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * A policy that attempts to retry requests while introducing an exponentially increasing delay.\n * @param options - Options that configure retry logic.\n */\nexport function exponentialRetryPolicy(\n options: ExponentialRetryPolicyOptions = {}\n): PipelinePolicy {\n return retryPolicy(\n [\n exponentialRetryStrategy({\n ...options,\n ignoreSystemErrors: true,\n }),\n ],\n {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * Name of the {@link systemErrorRetryPolicy}\n */\nexport const systemErrorRetryPolicyName = \"systemErrorRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface SystemErrorRetryPolicyOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 1000\n * (1 second.) The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 64000 (64 seconds).\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * A retry policy that specifically seeks to handle errors in the\n * underlying transport layer (e.g. DNS lookup failures) rather than\n * retryable error codes from the server itself.\n * @param options - Options that customize the policy.\n */\nexport function systemErrorRetryPolicy(\n options: SystemErrorRetryPolicyOptions = {}\n): PipelinePolicy {\n return {\n name: systemErrorRetryPolicyName,\n sendRequest: retryPolicy(\n [\n exponentialRetryStrategy({\n ...options,\n ignoreHttpStatusCodes: true,\n }),\n ],\n {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }\n ).sendRequest,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelinePolicy } from \"../pipeline\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n\n/**\n * Name of the {@link throttlingRetryPolicy}\n */\nexport const throttlingRetryPolicyName = \"throttlingRetryPolicy\";\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface ThrottlingRetryPolicyOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n}\n\n/**\n * A policy that retries when the server sends a 429 response with a Retry-After header.\n *\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n *\n * @param options - Options that configure retry logic.\n */\nexport function throttlingRetryPolicy(options: ThrottlingRetryPolicyOptions = {}): PipelinePolicy {\n return {\n name: throttlingRetryPolicyName,\n sendRequest: retryPolicy([throttlingRetryStrategy()], {\n maxRetries: options.maxRetries ?? DEFAULT_RETRY_POLICY_COUNT,\n }).sendRequest,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { delay } from \"./helpers\";\n\n/**\n * A function that gets a promise of an access token and allows providing\n * options.\n *\n * @param options - the options to pass to the underlying token provider\n */\nexport type AccessTokenGetter = (\n scopes: string | string[],\n options: GetTokenOptions\n) => Promise;\n\nexport interface TokenCyclerOptions {\n /**\n * The window of time before token expiration during which the token will be\n * considered unusable due to risk of the token expiring before sending the\n * request.\n *\n * This will only become meaningful if the refresh fails for over\n * (refreshWindow - forcedRefreshWindow) milliseconds.\n */\n forcedRefreshWindowInMs: number;\n /**\n * Interval in milliseconds to retry failed token refreshes.\n */\n retryIntervalInMs: number;\n /**\n * The window of time before token expiration during which\n * we will attempt to refresh the token.\n */\n refreshWindowInMs: number;\n}\n\n// Default options for the cycler if none are provided\nexport const DEFAULT_CYCLER_OPTIONS: TokenCyclerOptions = {\n forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires\n retryIntervalInMs: 3000, // Allow refresh attempts every 3s\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null.\n * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts.\n * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception.\n * @returns - A promise that, if it resolves, will resolve with an access token.\n */\nasync function beginRefresh(\n getAccessToken: () => Promise,\n retryIntervalInMs: number,\n refreshTimeout: number\n): Promise {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken(): Promise {\n if (Date.now() < refreshTimeout) {\n try {\n return await getAccessToken();\n } catch {\n return null;\n }\n } else {\n const finalToken = await getAccessToken();\n\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n\n return finalToken;\n }\n }\n\n let token: AccessToken | null = await tryGetAccessToken();\n\n while (token === null) {\n await delay(retryIntervalInMs);\n\n token = await tryGetAccessToken();\n }\n\n return token;\n}\n\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nexport function createTokenCycler(\n credential: TokenCredential,\n tokenCyclerOptions?: Partial\n): AccessTokenGetter {\n let refreshWorker: Promise | null = null;\n let token: AccessToken | null = null;\n let tenantId: string | undefined;\n\n const options = {\n ...DEFAULT_CYCLER_OPTIONS,\n ...tokenCyclerOptions,\n };\n\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing(): boolean {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh(): boolean {\n return (\n !cycler.isRefreshing &&\n (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now()\n );\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh(): boolean {\n return (\n token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()\n );\n },\n };\n\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(\n scopes: string | string[],\n getTokenOptions: GetTokenOptions\n ): Promise {\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = (): Promise =>\n credential.getToken(scopes, getTokenOptions);\n\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(\n tryGetAccessToken,\n options.retryIntervalInMs,\n // If we don't have a token, then we should timeout immediately\n token?.expiresOnTimestamp ?? Date.now()\n )\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n tenantId = getTokenOptions.tenantId;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n tenantId = undefined;\n throw reason;\n });\n }\n\n return refreshWorker as Promise;\n }\n\n return async (scopes: string | string[], tokenOptions: GetTokenOptions): Promise => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n\n // If the tenantId passed in token options is different to the one we have\n // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to\n // refresh the token with the new tenantId or token.\n const mustRefresh =\n tenantId !== tokenOptions.tenantId || Boolean(tokenOptions.claims) || cycler.mustRefresh;\n\n if (mustRefresh) return refresh(scopes, tokenOptions);\n\n if (cycler.shouldRefresh) {\n refresh(scopes, tokenOptions);\n }\n\n return token as AccessToken;\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { createTokenCycler } from \"../util/tokenCycler\";\nimport { logger as coreLogger } from \"../log\";\n\n/**\n * The programmatic identifier of the bearerTokenAuthenticationPolicy.\n */\nexport const bearerTokenAuthenticationPolicyName = \"bearerTokenAuthenticationPolicy\";\n\n/**\n * Options sent to the authorizeRequest callback\n */\nexport interface AuthorizeRequestOptions {\n /**\n * The scopes for which the bearer token applies.\n */\n scopes: string[];\n /**\n * Function that retrieves either a cached access token or a new access token.\n */\n getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise;\n /**\n * Request that the policy is trying to fulfill.\n */\n request: PipelineRequest;\n /**\n * A logger, if one was sent through the HTTP pipeline.\n */\n logger?: AzureLogger;\n}\n\n/**\n * Options sent to the authorizeRequestOnChallenge callback\n */\nexport interface AuthorizeRequestOnChallengeOptions {\n /**\n * The scopes for which the bearer token applies.\n */\n scopes: string[];\n /**\n * Function that retrieves either a cached access token or a new access token.\n */\n getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise;\n /**\n * Request that the policy is trying to fulfill.\n */\n request: PipelineRequest;\n /**\n * Response containing the challenge.\n */\n response: PipelineResponse;\n /**\n * A logger, if one was sent through the HTTP pipeline.\n */\n logger?: AzureLogger;\n}\n\n/**\n * Options to override the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges.\n */\nexport interface ChallengeCallbacks {\n /**\n * Allows for the authorization of the main request of this policy before it's sent.\n */\n authorizeRequest?(options: AuthorizeRequestOptions): Promise;\n /**\n * Allows to handle authentication challenges and to re-authorize the request.\n * The response containing the challenge is `options.response`.\n * If this method returns true, the underlying request will be sent once again.\n * The request may be modified before being sent.\n */\n authorizeRequestOnChallenge?(options: AuthorizeRequestOnChallengeOptions): Promise;\n}\n\n/**\n * Options to configure the bearerTokenAuthenticationPolicy\n */\nexport interface BearerTokenAuthenticationPolicyOptions {\n /**\n * The TokenCredential implementation that can supply the bearer token.\n */\n credential?: TokenCredential;\n /**\n * The scopes for which the bearer token applies.\n */\n scopes: string | string[];\n /**\n * Allows for the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges.\n * If provided, it must contain at least the `authorizeRequestOnChallenge` method.\n * If provided, after a request is sent, if it has a challenge, it can be processed to re-send the original request with the relevant challenge information.\n */\n challengeCallbacks?: ChallengeCallbacks;\n /**\n * A logger can be sent for debugging purposes.\n */\n logger?: AzureLogger;\n}\n\n/**\n * Default authorize request handler\n */\nasync function defaultAuthorizeRequest(options: AuthorizeRequestOptions): Promise {\n const { scopes, getAccessToken, request } = options;\n const getTokenOptions: GetTokenOptions = {\n abortSignal: request.abortSignal,\n tracingOptions: request.tracingOptions,\n };\n const accessToken = await getAccessToken(scopes, getTokenOptions);\n\n if (accessToken) {\n options.request.headers.set(\"Authorization\", `Bearer ${accessToken.token}`);\n }\n}\n\n/**\n * We will retrieve the challenge only if the response status code was 401,\n * and if the response contained the header \"WWW-Authenticate\" with a non-empty value.\n */\nfunction getChallenge(response: PipelineResponse): string | undefined {\n const challenge = response.headers.get(\"WWW-Authenticate\");\n if (response.status === 401 && challenge) {\n return challenge;\n }\n return;\n}\n\n/**\n * A policy that can request a token from a TokenCredential implementation and\n * then apply it to the Authorization header of a request as a Bearer token.\n */\nexport function bearerTokenAuthenticationPolicy(\n options: BearerTokenAuthenticationPolicyOptions\n): PipelinePolicy {\n const { credential, scopes, challengeCallbacks } = options;\n const logger = options.logger || coreLogger;\n const callbacks = {\n authorizeRequest: challengeCallbacks?.authorizeRequest ?? defaultAuthorizeRequest,\n authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge,\n // keep all other properties\n ...challengeCallbacks,\n };\n\n // This function encapsulates the entire process of reliably retrieving the token\n // The options are left out of the public API until there's demand to configure this.\n // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions`\n // in order to pass through the `options` object.\n const getAccessToken = credential\n ? createTokenCycler(credential /* , options */)\n : () => Promise.resolve(null);\n\n return {\n name: bearerTokenAuthenticationPolicyName,\n /**\n * If there's no challenge parameter:\n * - It will try to retrieve the token using the cache, or the credential's getToken.\n * - Then it will try the next policy with or without the retrieved token.\n *\n * It uses the challenge parameters to:\n * - Skip a first attempt to get the token from the credential if there's no cached token,\n * since it expects the token to be retrievable only after the challenge.\n * - Prepare the outgoing request if the `prepareRequest` method has been provided.\n * - Send an initial request to receive the challenge if it fails.\n * - Process a challenge if the response contains it.\n * - Retrieve a token with the challenge information, then re-send the request.\n */\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\n \"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\"\n );\n }\n\n await callbacks.authorizeRequest({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n getAccessToken,\n logger,\n });\n\n let response: PipelineResponse;\n let error: Error | undefined;\n try {\n response = await next(request);\n } catch (err: any) {\n error = err;\n response = err.response;\n }\n\n if (\n callbacks.authorizeRequestOnChallenge &&\n response?.status === 401 &&\n getChallenge(response)\n ) {\n // processes challenge\n const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n response,\n getAccessToken,\n logger,\n });\n\n if (shouldSendRequest) {\n return next(request);\n }\n }\n\n if (error) {\n throw error;\n } else {\n return response;\n }\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\n\n/**\n * The programmatic identifier of the ndJsonPolicy.\n */\nexport const ndJsonPolicyName = \"ndJsonPolicy\";\n\n/**\n * ndJsonPolicy is a policy used to control keep alive settings for every request.\n */\nexport function ndJsonPolicy(): PipelinePolicy {\n return {\n name: ndJsonPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n // There currently isn't a good way to bypass the serializer\n if (typeof request.body === \"string\" && request.body.startsWith(\"[\")) {\n const body = JSON.parse(request.body);\n if (Array.isArray(body)) {\n request.body = body.map((item) => JSON.stringify(item) + \"\\n\").join(\"\");\n }\n }\n return next(request);\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"../interfaces\";\nimport { PipelinePolicy } from \"../pipeline\";\nimport { AccessTokenGetter, createTokenCycler } from \"../util/tokenCycler\";\nimport { logger as coreLogger } from \"../log\";\nimport { AuthorizeRequestOptions } from \"./bearerTokenAuthenticationPolicy\";\n\n/**\n * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy.\n */\nexport const auxiliaryAuthenticationHeaderPolicyName = \"auxiliaryAuthenticationHeaderPolicy\";\nconst AUTHORIZATION_AUXILIARY_HEADER = \"x-ms-authorization-auxiliary\";\n\n/**\n * Options to configure the auxiliaryAuthenticationHeaderPolicy\n */\nexport interface AuxiliaryAuthenticationHeaderPolicyOptions {\n /**\n * TokenCredential list used to get token from auxiliary tenants and\n * one credential for each tenant the client may need to access\n */\n credentials?: TokenCredential[];\n /**\n * Scopes depend on the cloud your application runs in\n */\n scopes: string | string[];\n /**\n * A logger can be sent for debugging purposes.\n */\n logger?: AzureLogger;\n}\n\nasync function sendAuthorizeRequest(options: AuthorizeRequestOptions): Promise {\n const { scopes, getAccessToken, request } = options;\n const getTokenOptions: GetTokenOptions = {\n abortSignal: request.abortSignal,\n tracingOptions: request.tracingOptions,\n };\n\n return (await getAccessToken(scopes, getTokenOptions))?.token ?? \"\";\n}\n\n/**\n * A policy for external tokens to `x-ms-authorization-auxiliary` header.\n * This header will be used when creating a cross-tenant application we may need to handle authentication requests\n * for resources that are in different tenants.\n * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works\n */\nexport function auxiliaryAuthenticationHeaderPolicy(\n options: AuxiliaryAuthenticationHeaderPolicyOptions\n): PipelinePolicy {\n const { credentials, scopes } = options;\n const logger = options.logger || coreLogger;\n const tokenCyclerMap = new WeakMap();\n\n return {\n name: auxiliaryAuthenticationHeaderPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise {\n if (!request.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\n \"Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.\"\n );\n }\n if (!credentials || credentials.length === 0) {\n logger.info(\n `${auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`\n );\n return next(request);\n }\n\n const tokenPromises: Promise[] = [];\n for (const credential of credentials) {\n let getAccessToken = tokenCyclerMap.get(credential);\n if (!getAccessToken) {\n getAccessToken = createTokenCycler(credential);\n tokenCyclerMap.set(credential, getAccessToken);\n }\n tokenPromises.push(\n sendAuthorizeRequest({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n getAccessToken,\n logger,\n })\n );\n }\n const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token));\n if (auxiliaryTokens.length === 0) {\n logger.warning(\n `None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`\n );\n return next(request);\n }\n request.headers.set(\n AUTHORIZATION_AUXILIARY_HEADER,\n auxiliaryTokens.map((token) => `Bearer ${token}`).join(\", \")\n );\n\n return next(request);\n },\n };\n}\n"],"names":["createClientLogger","isObject","logger","coreLogger","os","AbortError","getRandomIntegerInclusive","FormData","HttpProxyAgent","HttpsProxyAgent","inspect","isError","createTracingClient","getErrorMessage","isNode","Transform","abortController","AbortController","http","https","zlib","randomUUID"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAeA,MAAM,eAAe,GAAG,IAAI,GAAG,CAAgB,CAAC,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAiG9F;;;;AAIG;AACH,MAAM,YAAY,CAAA;AAIhB,IAAA,WAAA,CAAoB,QAA+B,EAAA;;QAH3C,IAAS,CAAA,SAAA,GAAyB,EAAE,CAAC;AAI3C,QAAA,IAAI,CAAC,SAAS,GAAG,CAAA,EAAA,GAAA,QAAQ,aAAR,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAR,QAAQ,CAAE,KAAK,CAAC,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,EAAE,CAAC;AAC1C,QAAA,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;KACnC;AAEM,IAAA,SAAS,CAAC,MAAsB,EAAE,OAAA,GAA4B,EAAE,EAAA;AACrE,QAAA,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE;AACvC,YAAA,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACvE,SAAA;AACD,QAAA,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,eAAe,CAAC,GAAG,CA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AAC,OAAO,CAAC,GAAG,CACjB,8BAA8B,EAC9B,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,CAAU,OAAA,EAAA,KAAK,CAAE,CAAA,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7D,CAAC;AAEF,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;SACtB;KACF,CAAC;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/package.json b/reverse_engineering/node_modules/@azure/core-rest-pipeline/package.json deleted file mode 100644 index 0ccb1d8..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/package.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "name": "@azure/core-rest-pipeline", - "version": "1.12.0", - "description": "Isomorphic client library for making HTTP requests in node.js and browser.", - "sdk-type": "client", - "main": "dist/index.js", - "module": "dist-esm/src/index.js", - "browser": { - "./dist-esm/src/defaultHttpClient.js": "./dist-esm/src/defaultHttpClient.browser.js", - "./dist-esm/src/policies/decompressResponsePolicy.js": "./dist-esm/src/policies/decompressResponsePolicy.browser.js", - "./dist-esm/src/policies/formDataPolicy.js": "./dist-esm/src/policies/formDataPolicy.browser.js", - "./dist-esm/src/policies/proxyPolicy.js": "./dist-esm/src/policies/proxyPolicy.browser.js", - "./dist-esm/src/util/inspect.js": "./dist-esm/src/util/inspect.browser.js", - "./dist-esm/src/util/userAgentPlatform.js": "./dist-esm/src/util/userAgentPlatform.browser.js" - }, - "react-native": { - "./dist/index.js": "./dist-esm/src/index.js", - "./dist-esm/src/defaultHttpClient.js": "./dist-esm/src/defaultHttpClient.native.js", - "./dist-esm/src/util/userAgentPlatform.js": "./dist-esm/src/util/userAgentPlatform.native.js" - }, - "types": "core-rest-pipeline.shims.d.ts", - "typesVersions": { - "<3.6": { - "core-rest-pipeline.shims.d.ts": [ - "core-rest-pipeline.shims-3_1.d.ts" - ] - } - }, - "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:samples": "echo Obsolete", - "build:test": "tsc -p . && dev-tool run bundle", - "build:types": "downlevel-dts types/latest/ types/3.1/", - "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local && npm run build:types", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-* temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "echo skipped", - "integration-test:node": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", - "pack": "npm pack 2>&1", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", - "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" - }, - "files": [ - "dist/", - "dist-esm/src/", - "types/3.1/core-rest-pipeline.d.ts", - "types/latest/core-rest-pipeline.d.ts", - "core-rest-pipeline.shims.d.ts", - "core-rest-pipeline.shims-3_1.d.ts", - "LICENSE", - "README.md" - ], - "repository": "github:Azure/azure-sdk-for-js", - "keywords": [ - "azure", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "engines": { - "node": ">=14.0.0" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/", - "sideEffects": false, - "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", - "//metadata": { - "constantPaths": [ - { - "path": "src/constants.ts", - "prefix": "SDK_VERSION" - } - ], - "sampleConfiguration": { - "skipFolder": true, - "disableDocsMs": true, - "productName": "Azure SDK Core", - "productSlugs": [ - "azure" - ] - }, - "migrationDate": "2023-03-08T18:36:03.000Z" - }, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.3.0", - "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "tslib": "^2.2.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0" - }, - "devDependencies": { - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@microsoft/api-extractor": "^7.31.1", - "@opentelemetry/api": "^1.4.1", - "@types/chai": "^4.1.6", - "@types/chai-as-promised": "^7.1.0", - "@types/mocha": "^7.0.2", - "@types/node": "^14.0.0", - "@types/sinon": "^10.0.0", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", - "downlevel-dts": "^0.10.0", - "cross-env": "^7.0.2", - "eslint": "^8.0.0", - "inherits": "^2.0.3", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage": "^2.0.0", - "karma-env-preprocessor": "^0.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-junit-reporter": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-mocha": "^2.0.1", - "karma-sourcemap-loader": "^0.3.8", - "karma": "^6.3.0", - "mocha-junit-reporter": "^2.0.0", - "mocha": "^7.1.1", - "prettier": "^2.5.1", - "puppeteer": "^19.2.2", - "rimraf": "^3.0.0", - "sinon": "^15.0.0", - "source-map-support": "^0.5.9", - "typescript": "~5.0.0", - "util": "^0.12.1", - "ts-node": "^10.0.0" - } -} diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/types/3.1/core-rest-pipeline.d.ts b/reverse_engineering/node_modules/@azure/core-rest-pipeline/types/3.1/core-rest-pipeline.d.ts deleted file mode 100644 index ea48b5f..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/types/3.1/core-rest-pipeline.d.ts +++ /dev/null @@ -1,1127 +0,0 @@ -/// -import { AbortSignalLike } from '@azure/abort-controller'; -import { AccessToken } from '@azure/core-auth'; -import { AzureLogger } from '@azure/logger'; -import { Debugger } from '@azure/logger'; -import { GetTokenOptions } from '@azure/core-auth'; -import { OperationTracingOptions } from '@azure/core-tracing'; -import { TokenCredential } from '@azure/core-auth'; -/** - * Options when adding a policy to the pipeline. - * Used to express dependencies on other policies. - */ -export declare interface AddPipelineOptions { - /** - * Policies that this policy must come before. - */ - beforePolicies?: string[]; - /** - * Policies that this policy must come after. - */ - afterPolicies?: string[]; - /** - * The phase that this policy must come after. - */ - afterPhase?: PipelinePhase; - /** - * The phase this policy belongs to. - */ - phase?: PipelinePhase; -} -/** - * An interface compatible with NodeJS's `http.Agent`. - * We want to avoid publicly re-exporting the actual interface, - * since it might vary across runtime versions. - */ -export declare interface Agent { - /** - * Destroy any sockets that are currently in use by the agent. - */ - destroy(): void; - /** - * For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state. - */ - maxFreeSockets: number; - /** - * Determines how many concurrent sockets the agent can have open per origin. - */ - maxSockets: number; - /** - * An object which contains queues of requests that have not yet been assigned to sockets. - */ - requests: unknown; - /** - * An object which contains arrays of sockets currently in use by the agent. - */ - sockets: unknown; -} -/** - * Options sent to the authorizeRequestOnChallenge callback - */ -export declare interface AuthorizeRequestOnChallengeOptions { - /** - * The scopes for which the bearer token applies. - */ - scopes: string[]; - /** - * Function that retrieves either a cached access token or a new access token. - */ - getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise; - /** - * Request that the policy is trying to fulfill. - */ - request: PipelineRequest; - /** - * Response containing the challenge. - */ - response: PipelineResponse; - /** - * A logger, if one was sent through the HTTP pipeline. - */ - logger?: AzureLogger; -} -/** - * Options sent to the authorizeRequest callback - */ -export declare interface AuthorizeRequestOptions { - /** - * The scopes for which the bearer token applies. - */ - scopes: string[]; - /** - * Function that retrieves either a cached access token or a new access token. - */ - getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise; - /** - * Request that the policy is trying to fulfill. - */ - request: PipelineRequest; - /** - * A logger, if one was sent through the HTTP pipeline. - */ - logger?: AzureLogger; -} -/** - * A policy for external tokens to `x-ms-authorization-auxiliary` header. - * This header will be used when creating a cross-tenant application we may need to handle authentication requests - * for resources that are in different tenants. - * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works - */ -export declare function auxiliaryAuthenticationHeaderPolicy(options: AuxiliaryAuthenticationHeaderPolicyOptions): PipelinePolicy; -/** - * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. - */ -export declare const auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; -/** - * Options to configure the auxiliaryAuthenticationHeaderPolicy - */ -export declare interface AuxiliaryAuthenticationHeaderPolicyOptions { - /** - * TokenCredential list used to get token from auxiliary tenants and - * one credential for each tenant the client may need to access - */ - credentials?: TokenCredential[]; - /** - * Scopes depend on the cloud your application runs in - */ - scopes: string | string[]; - /** - * A logger can be sent for debugging purposes. - */ - logger?: AzureLogger; -} -/** - * A policy that can request a token from a TokenCredential implementation and - * then apply it to the Authorization header of a request as a Bearer token. - */ -export declare function bearerTokenAuthenticationPolicy(options: BearerTokenAuthenticationPolicyOptions): PipelinePolicy; -/** - * The programmatic identifier of the bearerTokenAuthenticationPolicy. - */ -export declare const bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; -/** - * Options to configure the bearerTokenAuthenticationPolicy - */ -export declare interface BearerTokenAuthenticationPolicyOptions { - /** - * The TokenCredential implementation that can supply the bearer token. - */ - credential?: TokenCredential; - /** - * The scopes for which the bearer token applies. - */ - scopes: string | string[]; - /** - * Allows for the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges. - * If provided, it must contain at least the `authorizeRequestOnChallenge` method. - * If provided, after a request is sent, if it has a challenge, it can be processed to re-send the original request with the relevant challenge information. - */ - challengeCallbacks?: ChallengeCallbacks; - /** - * A logger can be sent for debugging purposes. - */ - logger?: AzureLogger; -} -/** - * Options to override the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges. - */ -export declare interface ChallengeCallbacks { - /** - * Allows for the authorization of the main request of this policy before it's sent. - */ - authorizeRequest?(options: AuthorizeRequestOptions): Promise; - /** - * Allows to handle authentication challenges and to re-authorize the request. - * The response containing the challenge is `options.response`. - * If this method returns true, the underlying request will be sent once again. - * The request may be modified before being sent. - */ - authorizeRequestOnChallenge?(options: AuthorizeRequestOnChallengeOptions): Promise; -} -/** - * Create the correct HttpClient for the current environment. - */ -export declare function createDefaultHttpClient(): HttpClient; -/** - * Creates a totally empty pipeline. - * Useful for testing or creating a custom one. - */ -export declare function createEmptyPipeline(): Pipeline; -/** - * Creates an object that satisfies the `HttpHeaders` interface. - * @param rawHeaders - A simple object representing initial headers - */ -export declare function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders; -/** - * Create a new pipeline with a default set of customizable policies. - * @param options - Options to configure a custom pipeline. - */ -export declare function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline; -/** - * Creates a new pipeline request with the given options. - * This method is to allow for the easy setting of default values and not required. - * @param options - The options to create the request with. - */ -export declare function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest; -/** - * A policy to enable response decompression according to Accept-Encoding header - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding - */ -export declare function decompressResponsePolicy(): PipelinePolicy; -/** - * The programmatic identifier of the decompressResponsePolicy. - */ -export declare const decompressResponsePolicyName = "decompressResponsePolicy"; -/** - * A policy that retries according to three strategies: - * - When the server sends a 429 response with a Retry-After header. - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. - */ -export declare function defaultRetryPolicy(options?: DefaultRetryPolicyOptions): PipelinePolicy; -/** - * Options that control how to retry failed requests. - */ -export declare interface DefaultRetryPolicyOptions extends PipelineRetryOptions { -} -/** - * A policy that attempts to retry requests while introducing an exponentially increasing delay. - * @param options - Options that configure retry logic. - */ -export declare function exponentialRetryPolicy(options?: ExponentialRetryPolicyOptions): PipelinePolicy; -/** - * The programmatic identifier of the exponentialRetryPolicy. - */ -export declare const exponentialRetryPolicyName = "exponentialRetryPolicy"; -/** - * Options that control how to retry failed requests. - */ -export declare interface ExponentialRetryPolicyOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; - /** - * The amount of delay in milliseconds between retry attempts. Defaults to 1000 - * (1 second.) The delay increases exponentially with each retry up to a maximum - * specified by maxRetryDelayInMs. - */ - retryDelayInMs?: number; - /** - * The maximum delay in milliseconds allowed before retrying an operation. Defaults - * to 64000 (64 seconds). - */ - maxRetryDelayInMs?: number; -} -/** - * A simple object that provides form data, as if from a browser form. - */ -export declare type FormDataMap = { - [key: string]: FormDataValue | FormDataValue[]; -}; -/** - * A policy that encodes FormData on the request into the body. - */ -export declare function formDataPolicy(): PipelinePolicy; -/** - * The programmatic identifier of the formDataPolicy. - */ -export declare const formDataPolicyName = "formDataPolicy"; -/** - * Each form data entry can be a string or (in the browser) a Blob. - */ -export declare type FormDataValue = string | Blob; -/** - * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. - * If no argument is given, it attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - * @param proxyUrl - The url of the proxy to use. May contain authentication information. - */ -export declare function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined; -/** - * The required interface for a client that makes HTTP requests - * on behalf of a pipeline. - */ -export declare interface HttpClient { - /** - * The method that makes the request and returns a response. - */ - sendRequest: SendRequest; -} -/** - * Represents a set of HTTP headers on a request/response. - * Header names are treated as case insensitive. - */ -export declare interface HttpHeaders extends Iterable<[ - string, - string -]> { - /** - * Returns the value of a specific header or undefined if not set. - * @param name - The name of the header to retrieve. - */ - get(name: string): string | undefined; - /** - * Returns true if the specified header exists. - * @param name - The name of the header to check. - */ - has(name: string): boolean; - /** - * Sets a specific header with a given value. - * @param name - The name of the header to set. - * @param value - The value to use for the header. - */ - set(name: string, value: string | number | boolean): void; - /** - * Removes a specific header from the collection. - * @param name - The name of the header to delete. - */ - delete(name: string): void; - /** - * Accesses a raw JS object that acts as a simple map - * of header names to values. - */ - toJSON(options?: { - preserveCase?: boolean; - }): RawHttpHeaders; -} -/** - * Supported HTTP methods to use when making requests. - */ -export declare type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; -/** - * Defines options that are used to configure internal options of - * the HTTP pipeline for an SDK client. - */ -export declare interface InternalPipelineOptions extends PipelineOptions { - /** - * Options to configure request/response logging. - */ - loggingOptions?: LogPolicyOptions; -} -/** - * Typeguard for RestError - * @param e - Something caught by a catch clause. - */ -export declare function isRestError(e: unknown): e is RestError; -/** - * An interface compatible with NodeJS's `tls.KeyObject`. - * We want to avoid publicly re-exporting the actual interface, - * since it might vary across runtime versions. - */ -export declare interface KeyObject { - /** - * Private keys in PEM format. - */ - pem: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; -} -/** - * A policy that logs all requests and responses. - * @param options - Options to configure logPolicy. - */ -export declare function logPolicy(options?: LogPolicyOptions): PipelinePolicy; -/** - * The programmatic identifier of the logPolicy. - */ -export declare const logPolicyName = "logPolicy"; -/** - * Options to configure the logPolicy. - */ -export declare interface LogPolicyOptions { - /** - * Header names whose values will be logged when logging is enabled. - * Defaults include a list of well-known safe headers. Any headers - * specified in this field will be added to that list. Any other values will - * be written to logs as "REDACTED". - */ - additionalAllowedHeaderNames?: string[]; - /** - * Query string names whose values will be logged when logging is enabled. By default no - * query string values are logged. - */ - additionalAllowedQueryParameters?: string[]; - /** - * The log function to use for writing pipeline logs. - * Defaults to core-http's built-in logger. - * Compatible with the `debug` library. - */ - logger?: Debugger; -} -/** - * ndJsonPolicy is a policy used to control keep alive settings for every request. - */ -export declare function ndJsonPolicy(): PipelinePolicy; -/** - * The programmatic identifier of the ndJsonPolicy. - */ -export declare const ndJsonPolicyName = "ndJsonPolicy"; -/** - * Represents a pipeline for making a HTTP request to a URL. - * Pipelines can have multiple policies to manage manipulating each request - * before and after it is made to the server. - */ -export declare interface Pipeline { - /** - * Add a new policy to the pipeline. - * @param policy - A policy that manipulates a request. - * @param options - A set of options for when the policy should run. - */ - addPolicy(policy: PipelinePolicy, options?: AddPipelineOptions): void; - /** - * Remove a policy from the pipeline. - * @param options - Options that let you specify which policies to remove. - */ - removePolicy(options: { - name?: string; - phase?: PipelinePhase; - }): PipelinePolicy[]; - /** - * Uses the pipeline to make a HTTP request. - * @param httpClient - The HttpClient that actually performs the request. - * @param request - The request to be made. - */ - sendRequest(httpClient: HttpClient, request: PipelineRequest): Promise; - /** - * Returns the current set of policies in the pipeline in the order in which - * they will be applied to the request. Later in the list is closer to when - * the request is performed. - */ - getOrderedPolicies(): PipelinePolicy[]; - /** - * Duplicates this pipeline to allow for modifying an existing one without mutating it. - */ - clone(): Pipeline; -} -/** - * Defines options that are used to configure the HTTP pipeline for - * an SDK client. - */ -export declare interface PipelineOptions { - /** - * Options that control how to retry failed requests. - */ - retryOptions?: PipelineRetryOptions; - /** - * Options to configure a proxy for outgoing requests. - */ - proxyOptions?: ProxySettings; - /** Options for configuring TLS authentication */ - tlsOptions?: TlsSettings; - /** - * Options for how redirect responses are handled. - */ - redirectOptions?: RedirectPolicyOptions; - /** - * Options for adding user agent details to outgoing requests. - */ - userAgentOptions?: UserAgentPolicyOptions; - /** - * Options for setting common telemetry and tracing info to outgoing requests. - */ - telemetryOptions?: TelemetryOptions; -} -/** - * Policies are executed in phases. - * The execution order is: - * 1. Serialize Phase - * 2. Policies not in a phase - * 3. Deserialize Phase - * 4. Retry Phase - * 5. Sign Phase - */ -export declare type PipelinePhase = "Deserialize" | "Serialize" | "Retry" | "Sign"; -/** - * A pipeline policy manipulates a request as it travels through the pipeline. - * It is conceptually a middleware that is allowed to modify the request before - * it is made as well as the response when it is received. - */ -export declare interface PipelinePolicy { - /** - * The policy name. Must be a unique string in the pipeline. - */ - name: string; - /** - * The main method to implement that manipulates a request/response. - * @param request - The request being performed. - * @param next - The next policy in the pipeline. Must be called to continue the pipeline. - */ - sendRequest(request: PipelineRequest, next: SendRequest): Promise; -} -/** - * Metadata about a request being made by the pipeline. - */ -export declare interface PipelineRequest { - /** - * The URL to make the request to. - */ - url: string; - /** - * The HTTP method to use when making the request. - */ - method: HttpMethods; - /** - * The HTTP headers to use when making the request. - */ - headers: HttpHeaders; - /** - * The number of milliseconds a request can take before automatically being terminated. - * If the request is terminated, an `AbortError` is thrown. - * Defaults to 0, which disables the timeout. - */ - timeout: number; - /** - * Indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests. - * Defaults to false. - */ - withCredentials: boolean; - /** - * A unique identifier for the request. Used for logging and tracing. - */ - requestId: string; - /** - * The HTTP body content (if any) - */ - body?: RequestBodyType; - /** - * To simulate a browser form post - */ - formData?: FormDataMap; - /** - * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream. - * When streamResponseStatusCodes contains the value Number.POSITIVE_INFINITY any status would be treated as a stream. - */ - streamResponseStatusCodes?: Set; - /** - * Proxy configuration. - */ - proxySettings?: ProxySettings; - /** - * If the connection should not be reused. - */ - disableKeepAlive?: boolean; - /** - * Used to abort the request later. - */ - abortSignal?: AbortSignalLike; - /** - * Tracing options to use for any created Spans. - */ - tracingOptions?: OperationTracingOptions; - /** - * Callback which fires upon upload progress. - */ - onUploadProgress?: (progress: TransferProgressEvent) => void; - /** Callback which fires upon download progress. */ - onDownloadProgress?: (progress: TransferProgressEvent) => void; - /** Set to true if the request is sent over HTTP instead of HTTPS */ - allowInsecureConnection?: boolean; - /** - * NODEJS ONLY - * - * A Node-only option to provide a custom `http.Agent`/`https.Agent`. - * Does nothing when running in the browser. - */ - agent?: Agent; - /** - * BROWSER ONLY - * - * A browser only option to enable browser Streams. If this option is set and a response is a stream - * the response will have a property `browserStream` instead of `blobBody` which will be undefined. - * - * Default value is false - */ - enableBrowserStreams?: boolean; - /** Settings for configuring TLS authentication */ - tlsSettings?: TlsSettings; -} -/** - * Settings to initialize a request. - * Almost equivalent to Partial, but url is mandatory. - */ -export declare interface PipelineRequestOptions { - /** - * The URL to make the request to. - */ - url: string; - /** - * The HTTP method to use when making the request. - */ - method?: HttpMethods; - /** - * The HTTP headers to use when making the request. - */ - headers?: HttpHeaders; - /** - * The number of milliseconds a request can take before automatically being terminated. - * If the request is terminated, an `AbortError` is thrown. - * Defaults to 0, which disables the timeout. - */ - timeout?: number; - /** - * If credentials (cookies) should be sent along during an XHR. - * Defaults to false. - */ - withCredentials?: boolean; - /** - * A unique identifier for the request. Used for logging and tracing. - */ - requestId?: string; - /** - * The HTTP body content (if any) - */ - body?: RequestBodyType; - /** - * To simulate a browser form post - */ - formData?: FormDataMap; - /** - * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream. - */ - streamResponseStatusCodes?: Set; - /** - * BROWSER ONLY - * - * A browser only option to enable use of the Streams API. If this option is set and streaming is used - * (see `streamResponseStatusCodes`), the response will have a property `browserStream` instead of - * `blobBody` which will be undefined. - * - * Default value is false - */ - enableBrowserStreams?: boolean; - /** - * Proxy configuration. - */ - proxySettings?: ProxySettings; - /** - * If the connection should not be reused. - */ - disableKeepAlive?: boolean; - /** - * Used to abort the request later. - */ - abortSignal?: AbortSignalLike; - /** - * Options used to create a span when tracing is enabled. - */ - tracingOptions?: OperationTracingOptions; - /** - * Callback which fires upon upload progress. - */ - onUploadProgress?: (progress: TransferProgressEvent) => void; - /** Callback which fires upon download progress. */ - onDownloadProgress?: (progress: TransferProgressEvent) => void; - /** Set to true if the request is sent over HTTP instead of HTTPS */ - allowInsecureConnection?: boolean; -} -/** - * Metadata about a response received by the pipeline. - */ -export declare interface PipelineResponse { - /** - * The request that generated this response. - */ - request: PipelineRequest; - /** - * The HTTP status code of the response. - */ - status: number; - /** - * The HTTP response headers. - */ - headers: HttpHeaders; - /** - * The response body as text (string format) - */ - bodyAsText?: string | null; - /** - * BROWSER ONLY - * - * The response body as a browser Blob. - * Always undefined in node.js. - */ - blobBody?: Promise; - /** - * BROWSER ONLY - * - * The response body as a browser ReadableStream. - * Always undefined in node.js. - */ - browserStreamBody?: ReadableStream; - /** - * NODEJS ONLY - * - * The response body as a node.js Readable stream. - * Always undefined in the browser. - */ - readableStreamBody?: NodeJS.ReadableStream; -} -/** - * Options that control how to retry failed requests. - */ -export declare interface PipelineRetryOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; - /** - * The amount of delay in milliseconds between retry attempts. Defaults to 1000 - * (1 second). The delay increases exponentially with each retry up to a maximum - * specified by maxRetryDelayInMs. - */ - retryDelayInMs?: number; - /** - * The maximum delay in milliseconds allowed before retrying an operation. Defaults - * to 64000 (64 seconds). - */ - maxRetryDelayInMs?: number; -} -/** - * A policy that allows one to apply proxy settings to all requests. - * If not passed static settings, they will be retrieved from the HTTPS_PROXY - * or HTTP_PROXY environment variables. - * @param proxySettings - ProxySettings to use on each request. - * @param options - additional settings, for example, custom NO_PROXY patterns - */ -export declare function proxyPolicy(proxySettings?: ProxySettings | undefined, options?: { - /** a list of patterns to override those loaded from NO_PROXY environment variable. */ - customNoProxyList?: string[]; -}): PipelinePolicy; -/** - * The programmatic identifier of the proxyPolicy. - */ -export declare const proxyPolicyName = "proxyPolicy"; -/** - * Options to configure a proxy for outgoing requests (Node.js only). - */ -export declare interface ProxySettings { - /** - * The proxy's host address. - */ - host: string; - /** - * The proxy host's port. - */ - port: number; - /** - * The user name to authenticate with the proxy, if required. - */ - username?: string; - /** - * The password to authenticate with the proxy, if required. - */ - password?: string; -} -/** - * An interface compatible with NodeJS's `tls.PxfObject`. - * We want to avoid publicly re-exporting the actual interface, - * since it might vary across runtime versions. - */ -export declare interface PxfObject { - /** - * PFX or PKCS12 encoded private key and certificate chain. - */ - buf: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; -} -/** - * A HttpHeaders collection represented as a simple JSON object. - */ -export declare type RawHttpHeaders = { - [headerName: string]: string; -}; -/** - * A HttpHeaders collection for input, represented as a simple JSON object. - */ -export declare type RawHttpHeadersInput = Record; -/** - * A policy to follow Location headers from the server in order - * to support server-side redirection. - * In the browser, this policy is not used. - * @param options - Options to control policy behavior. - */ -export declare function redirectPolicy(options?: RedirectPolicyOptions): PipelinePolicy; -/** - * The programmatic identifier of the redirectPolicy. - */ -export declare const redirectPolicyName = "redirectPolicy"; -/** - * Options for how redirect responses are handled. - */ -export declare interface RedirectPolicyOptions { - /** - * The maximum number of times the redirect URL will be tried before - * failing. Defaults to 20. - */ - maxRetries?: number; -} -/** - * Types of bodies supported on the request. - * NodeJS.ReadableStream and () =\> NodeJS.ReadableStream is Node only. - * Blob, ReadableStream, and () =\> ReadableStream are browser only. - */ -export declare type RequestBodyType = NodeJS.ReadableStream | (() => NodeJS.ReadableStream) | ReadableStream | (() => ReadableStream) | Blob | ArrayBuffer | ArrayBufferView | FormData | string | null; -/** - * A custom error type for failed pipeline requests. - */ -export declare class RestError extends Error { - /** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ - static readonly REQUEST_SEND_ERROR: string; - /** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ - static readonly PARSE_ERROR: string; - /** - * The code of the error itself (use statics on RestError if possible.) - */ - code?: string; - /** - * The HTTP status code of the request (if applicable.) - */ - statusCode?: number; - /** - * The request that was made. - */ - request?: PipelineRequest; - /** - * The response received (if any.) - */ - response?: PipelineResponse; - /** - * Bonus property set by the throw site. - */ - details?: unknown; - constructor(message: string, options?: RestErrorOptions); -} -/** - * The options supported by RestError. - */ -export declare interface RestErrorOptions { - /** - * The code of the error itself (use statics on RestError if possible.) - */ - code?: string; - /** - * The HTTP status code of the request (if applicable.) - */ - statusCode?: number; - /** - * The request that was made. - */ - request?: PipelineRequest; - /** - * The response received (if any.) - */ - response?: PipelineResponse; -} -/** - * Information provided to the retry strategy about the current progress of the retry policy. - */ -export declare interface RetryInformation { - /** - * A {@link PipelineResponse}, if the last retry attempt succeeded. - */ - response?: PipelineResponse; - /** - * A {@link RestError}, if the last retry attempt failed. - */ - responseError?: RestError; - /** - * Total number of retries so far. - */ - retryCount: number; -} -/** - * Properties that can modify the behavior of the retry policy. - */ -export declare interface RetryModifiers { - /** - * If true, allows skipping the current strategy from running on the retry policy. - */ - skipStrategy?: boolean; - /** - * Indicates to retry against this URL. - */ - redirectTo?: string; - /** - * Controls whether to retry in a given number of milliseconds. - * If provided, a new retry will be attempted. - */ - retryAfterInMs?: number; - /** - * Indicates to throw this error instead of retrying. - */ - errorToThrow?: RestError; -} -/** - * retryPolicy is a generic policy to enable retrying requests when certain conditions are met - */ -export declare function retryPolicy(strategies: RetryStrategy[], options?: RetryPolicyOptions): PipelinePolicy; -/** - * Options to the {@link retryPolicy} - */ -export declare interface RetryPolicyOptions { - /** - * Maximum number of retries. If not specified, it will limit to 3 retries. - */ - maxRetries?: number; - /** - * Logger. If it's not provided, a default logger is used. - */ - logger?: AzureLogger; -} -/** - * A retry strategy is intended to define whether to retry or not, and how to retry. - */ -export declare interface RetryStrategy { - /** - * Name of the retry strategy. Used for logging. - */ - name: string; - /** - * Logger. If it's not provided, a default logger for all retry strategies is used. - */ - logger?: AzureLogger; - /** - * Function that determines how to proceed with the subsequent requests. - * @param state - Retry state - */ - retry(state: RetryInformation): RetryModifiers; -} -/** - * A simple interface for making a pipeline request and receiving a response. - */ -export declare type SendRequest = (request: PipelineRequest) => Promise; -/** - * Each PipelineRequest gets a unique id upon creation. - * This policy passes that unique id along via an HTTP header to enable better - * telemetry and tracing. - * @param requestIdHeaderName - The name of the header to pass the request ID to. - */ -export declare function setClientRequestIdPolicy(requestIdHeaderName?: string): PipelinePolicy; -/** - * The programmatic identifier of the setClientRequestIdPolicy. - */ -export declare const setClientRequestIdPolicyName = "setClientRequestIdPolicy"; -/** - * A retry policy that specifically seeks to handle errors in the - * underlying transport layer (e.g. DNS lookup failures) rather than - * retryable error codes from the server itself. - * @param options - Options that customize the policy. - */ -export declare function systemErrorRetryPolicy(options?: SystemErrorRetryPolicyOptions): PipelinePolicy; -/** - * Name of the {@link systemErrorRetryPolicy} - */ -export declare const systemErrorRetryPolicyName = "systemErrorRetryPolicy"; -/** - * Options that control how to retry failed requests. - */ -export declare interface SystemErrorRetryPolicyOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; - /** - * The amount of delay in milliseconds between retry attempts. Defaults to 1000 - * (1 second.) The delay increases exponentially with each retry up to a maximum - * specified by maxRetryDelayInMs. - */ - retryDelayInMs?: number; - /** - * The maximum delay in milliseconds allowed before retrying an operation. Defaults - * to 64000 (64 seconds). - */ - maxRetryDelayInMs?: number; -} -/** - * Defines options that are used to configure common telemetry and tracing info - */ -export declare interface TelemetryOptions { - /** - * The name of the header to pass the request ID to. - */ - clientRequestIdHeaderName?: string; -} -/** - * A policy that retries when the server sends a 429 response with a Retry-After header. - * - * To learn more, please refer to - * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors - * - * @param options - Options that configure retry logic. - */ -export declare function throttlingRetryPolicy(options?: ThrottlingRetryPolicyOptions): PipelinePolicy; -/** - * Name of the {@link throttlingRetryPolicy} - */ -export declare const throttlingRetryPolicyName = "throttlingRetryPolicy"; -/** - * Options that control how to retry failed requests. - */ -export declare interface ThrottlingRetryPolicyOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; -} -/** - * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. - */ -export declare function tlsPolicy(tlsSettings?: TlsSettings): PipelinePolicy; -/** - * Name of the TLS Policy - */ -export declare const tlsPolicyName = "tlsPolicy"; -/** - * Represents a certificate for TLS authentication. - */ -export declare interface TlsSettings { - /** - * Optionally override the trusted CA certificates. Default is to trust - * the well-known CAs curated by Mozilla. Mozilla's CAs are completely - * replaced when CAs are explicitly specified using this option. - */ - ca?: string | Buffer | Array | undefined; - /** - * Cert chains in PEM format. One cert chain should be provided per - * private key. Each cert chain should consist of the PEM formatted - * certificate for a provided private key, followed by the PEM - * formatted intermediate certificates (if any), in order, and not - * including the root CA (the root CA must be pre-known to the peer, - * see ca). When providing multiple cert chains, they do not have to - * be in the same order as their private keys in key. If the - * intermediate certificates are not provided, the peer will not be - * able to validate the certificate, and the handshake will fail. - */ - cert?: string | Buffer | Array | undefined; - /** - * Private keys in PEM format. PEM allows the option of private keys - * being encrypted. Encrypted keys will be decrypted with - * options.passphrase. Multiple keys using different algorithms can be - * provided either as an array of unencrypted key strings or buffers, - * or an array of objects in the form `{pem: [,passphrase: ]}`. - * The object form can only occur in an array.object.passphrase is optional. - * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not. - */ - key?: string | Buffer | Array | undefined; - /** - * Shared passphrase used for a single private key and/or a PFX. - */ - passphrase?: string | undefined; - /** - * PFX or PKCS12 encoded private key and certificate chain. pfx is an - * alternative to providing key and cert individually. PFX is usually - * encrypted, if it is, passphrase will be used to decrypt it. Multiple - * PFX can be provided either as an array of unencrypted PFX buffers, - * or an array of objects in the form `{buf: [,passphrase: ]}`. - * The object form can only occur in an array.object.passphrase is optional. - * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not. - */ - pfx?: string | Buffer | Array | undefined; -} -/** - * A simple policy to create OpenTelemetry Spans for each request made by the pipeline - * that has SpanOptions with a parent. - * Requests made without a parent Span will not be recorded. - * @param options - Options to configure the telemetry logged by the tracing policy. - */ -export declare function tracingPolicy(options?: TracingPolicyOptions): PipelinePolicy; -/** - * The programmatic identifier of the tracingPolicy. - */ -export declare const tracingPolicyName = "tracingPolicy"; -/** - * Options to configure the tracing policy. - */ -export declare interface TracingPolicyOptions { - /** - * String prefix to add to the user agent logged as metadata - * on the generated Span. - * Defaults to an empty string. - */ - userAgentPrefix?: string; -} -/** - * Fired in response to upload or download progress. - */ -export declare type TransferProgressEvent = { - /** - * The number of bytes loaded so far. - */ - loadedBytes: number; -}; -/** - * A policy that sets the User-Agent header (or equivalent) to reflect - * the library version. - * @param options - Options to customize the user agent value. - */ -export declare function userAgentPolicy(options?: UserAgentPolicyOptions): PipelinePolicy; -/** - * The programmatic identifier of the userAgentPolicy. - */ -export declare const userAgentPolicyName = "userAgentPolicy"; -/** - * Options for adding user agent details to outgoing requests. - */ -export declare interface UserAgentPolicyOptions { - /** - * String prefix to add to the user agent for outgoing requests. - * Defaults to an empty string. - */ - userAgentPrefix?: string; -} -export {}; diff --git a/reverse_engineering/node_modules/@azure/core-rest-pipeline/types/latest/core-rest-pipeline.d.ts b/reverse_engineering/node_modules/@azure/core-rest-pipeline/types/latest/core-rest-pipeline.d.ts deleted file mode 100644 index bee96f9..0000000 --- a/reverse_engineering/node_modules/@azure/core-rest-pipeline/types/latest/core-rest-pipeline.d.ts +++ /dev/null @@ -1,1210 +0,0 @@ -/// - -import { AbortSignalLike } from '@azure/abort-controller'; -import { AccessToken } from '@azure/core-auth'; -import { AzureLogger } from '@azure/logger'; -import { Debugger } from '@azure/logger'; -import { GetTokenOptions } from '@azure/core-auth'; -import { OperationTracingOptions } from '@azure/core-tracing'; -import { TokenCredential } from '@azure/core-auth'; - -/** - * Options when adding a policy to the pipeline. - * Used to express dependencies on other policies. - */ -export declare interface AddPipelineOptions { - /** - * Policies that this policy must come before. - */ - beforePolicies?: string[]; - /** - * Policies that this policy must come after. - */ - afterPolicies?: string[]; - /** - * The phase that this policy must come after. - */ - afterPhase?: PipelinePhase; - /** - * The phase this policy belongs to. - */ - phase?: PipelinePhase; -} - -/** - * An interface compatible with NodeJS's `http.Agent`. - * We want to avoid publicly re-exporting the actual interface, - * since it might vary across runtime versions. - */ -export declare interface Agent { - /** - * Destroy any sockets that are currently in use by the agent. - */ - destroy(): void; - /** - * For agents with keepAlive enabled, this sets the maximum number of sockets that will be left open in the free state. - */ - maxFreeSockets: number; - /** - * Determines how many concurrent sockets the agent can have open per origin. - */ - maxSockets: number; - /** - * An object which contains queues of requests that have not yet been assigned to sockets. - */ - requests: unknown; - /** - * An object which contains arrays of sockets currently in use by the agent. - */ - sockets: unknown; -} - -/** - * Options sent to the authorizeRequestOnChallenge callback - */ -export declare interface AuthorizeRequestOnChallengeOptions { - /** - * The scopes for which the bearer token applies. - */ - scopes: string[]; - /** - * Function that retrieves either a cached access token or a new access token. - */ - getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise; - /** - * Request that the policy is trying to fulfill. - */ - request: PipelineRequest; - /** - * Response containing the challenge. - */ - response: PipelineResponse; - /** - * A logger, if one was sent through the HTTP pipeline. - */ - logger?: AzureLogger; -} - -/** - * Options sent to the authorizeRequest callback - */ -export declare interface AuthorizeRequestOptions { - /** - * The scopes for which the bearer token applies. - */ - scopes: string[]; - /** - * Function that retrieves either a cached access token or a new access token. - */ - getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise; - /** - * Request that the policy is trying to fulfill. - */ - request: PipelineRequest; - /** - * A logger, if one was sent through the HTTP pipeline. - */ - logger?: AzureLogger; -} - -/** - * A policy for external tokens to `x-ms-authorization-auxiliary` header. - * This header will be used when creating a cross-tenant application we may need to handle authentication requests - * for resources that are in different tenants. - * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works - */ -export declare function auxiliaryAuthenticationHeaderPolicy(options: AuxiliaryAuthenticationHeaderPolicyOptions): PipelinePolicy; - -/** - * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. - */ -export declare const auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; - -/** - * Options to configure the auxiliaryAuthenticationHeaderPolicy - */ -export declare interface AuxiliaryAuthenticationHeaderPolicyOptions { - /** - * TokenCredential list used to get token from auxiliary tenants and - * one credential for each tenant the client may need to access - */ - credentials?: TokenCredential[]; - /** - * Scopes depend on the cloud your application runs in - */ - scopes: string | string[]; - /** - * A logger can be sent for debugging purposes. - */ - logger?: AzureLogger; -} - -/** - * A policy that can request a token from a TokenCredential implementation and - * then apply it to the Authorization header of a request as a Bearer token. - */ -export declare function bearerTokenAuthenticationPolicy(options: BearerTokenAuthenticationPolicyOptions): PipelinePolicy; - -/** - * The programmatic identifier of the bearerTokenAuthenticationPolicy. - */ -export declare const bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; - -/** - * Options to configure the bearerTokenAuthenticationPolicy - */ -export declare interface BearerTokenAuthenticationPolicyOptions { - /** - * The TokenCredential implementation that can supply the bearer token. - */ - credential?: TokenCredential; - /** - * The scopes for which the bearer token applies. - */ - scopes: string | string[]; - /** - * Allows for the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges. - * If provided, it must contain at least the `authorizeRequestOnChallenge` method. - * If provided, after a request is sent, if it has a challenge, it can be processed to re-send the original request with the relevant challenge information. - */ - challengeCallbacks?: ChallengeCallbacks; - /** - * A logger can be sent for debugging purposes. - */ - logger?: AzureLogger; -} - -/** - * Options to override the processing of [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) challenges. - */ -export declare interface ChallengeCallbacks { - /** - * Allows for the authorization of the main request of this policy before it's sent. - */ - authorizeRequest?(options: AuthorizeRequestOptions): Promise; - /** - * Allows to handle authentication challenges and to re-authorize the request. - * The response containing the challenge is `options.response`. - * If this method returns true, the underlying request will be sent once again. - * The request may be modified before being sent. - */ - authorizeRequestOnChallenge?(options: AuthorizeRequestOnChallengeOptions): Promise; -} - -/** - * Create the correct HttpClient for the current environment. - */ -export declare function createDefaultHttpClient(): HttpClient; - -/** - * Creates a totally empty pipeline. - * Useful for testing or creating a custom one. - */ -export declare function createEmptyPipeline(): Pipeline; - -/** - * Creates an object that satisfies the `HttpHeaders` interface. - * @param rawHeaders - A simple object representing initial headers - */ -export declare function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders; - -/** - * Create a new pipeline with a default set of customizable policies. - * @param options - Options to configure a custom pipeline. - */ -export declare function createPipelineFromOptions(options: InternalPipelineOptions): Pipeline; - -/** - * Creates a new pipeline request with the given options. - * This method is to allow for the easy setting of default values and not required. - * @param options - The options to create the request with. - */ -export declare function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest; - -/** - * A policy to enable response decompression according to Accept-Encoding header - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding - */ -export declare function decompressResponsePolicy(): PipelinePolicy; - -/** - * The programmatic identifier of the decompressResponsePolicy. - */ -export declare const decompressResponsePolicyName = "decompressResponsePolicy"; - -/** - * A policy that retries according to three strategies: - * - When the server sends a 429 response with a Retry-After header. - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. - */ -export declare function defaultRetryPolicy(options?: DefaultRetryPolicyOptions): PipelinePolicy; - -/** - * Options that control how to retry failed requests. - */ -export declare interface DefaultRetryPolicyOptions extends PipelineRetryOptions { -} - -/** - * A policy that attempts to retry requests while introducing an exponentially increasing delay. - * @param options - Options that configure retry logic. - */ -export declare function exponentialRetryPolicy(options?: ExponentialRetryPolicyOptions): PipelinePolicy; - -/** - * The programmatic identifier of the exponentialRetryPolicy. - */ -export declare const exponentialRetryPolicyName = "exponentialRetryPolicy"; - -/** - * Options that control how to retry failed requests. - */ -export declare interface ExponentialRetryPolicyOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; - /** - * The amount of delay in milliseconds between retry attempts. Defaults to 1000 - * (1 second.) The delay increases exponentially with each retry up to a maximum - * specified by maxRetryDelayInMs. - */ - retryDelayInMs?: number; - /** - * The maximum delay in milliseconds allowed before retrying an operation. Defaults - * to 64000 (64 seconds). - */ - maxRetryDelayInMs?: number; -} - -/** - * A simple object that provides form data, as if from a browser form. - */ -export declare type FormDataMap = { - [key: string]: FormDataValue | FormDataValue[]; -}; - -/** - * A policy that encodes FormData on the request into the body. - */ -export declare function formDataPolicy(): PipelinePolicy; - -/** - * The programmatic identifier of the formDataPolicy. - */ -export declare const formDataPolicyName = "formDataPolicy"; - -/** - * Each form data entry can be a string or (in the browser) a Blob. - */ -export declare type FormDataValue = string | Blob; - -/** - * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. - * If no argument is given, it attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - * @param proxyUrl - The url of the proxy to use. May contain authentication information. - */ -export declare function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined; - -/** - * The required interface for a client that makes HTTP requests - * on behalf of a pipeline. - */ -export declare interface HttpClient { - /** - * The method that makes the request and returns a response. - */ - sendRequest: SendRequest; -} - -/** - * Represents a set of HTTP headers on a request/response. - * Header names are treated as case insensitive. - */ -export declare interface HttpHeaders extends Iterable<[string, string]> { - /** - * Returns the value of a specific header or undefined if not set. - * @param name - The name of the header to retrieve. - */ - get(name: string): string | undefined; - /** - * Returns true if the specified header exists. - * @param name - The name of the header to check. - */ - has(name: string): boolean; - /** - * Sets a specific header with a given value. - * @param name - The name of the header to set. - * @param value - The value to use for the header. - */ - set(name: string, value: string | number | boolean): void; - /** - * Removes a specific header from the collection. - * @param name - The name of the header to delete. - */ - delete(name: string): void; - /** - * Accesses a raw JS object that acts as a simple map - * of header names to values. - */ - toJSON(options?: { - preserveCase?: boolean; - }): RawHttpHeaders; -} - -/** - * Supported HTTP methods to use when making requests. - */ -export declare type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; - -/** - * Defines options that are used to configure internal options of - * the HTTP pipeline for an SDK client. - */ -export declare interface InternalPipelineOptions extends PipelineOptions { - /** - * Options to configure request/response logging. - */ - loggingOptions?: LogPolicyOptions; -} - -/** - * Typeguard for RestError - * @param e - Something caught by a catch clause. - */ -export declare function isRestError(e: unknown): e is RestError; - -/** - * An interface compatible with NodeJS's `tls.KeyObject`. - * We want to avoid publicly re-exporting the actual interface, - * since it might vary across runtime versions. - */ -export declare interface KeyObject { - /** - * Private keys in PEM format. - */ - pem: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; -} - -/** - * A policy that logs all requests and responses. - * @param options - Options to configure logPolicy. - */ -export declare function logPolicy(options?: LogPolicyOptions): PipelinePolicy; - -/** - * The programmatic identifier of the logPolicy. - */ -export declare const logPolicyName = "logPolicy"; - -/** - * Options to configure the logPolicy. - */ -export declare interface LogPolicyOptions { - /** - * Header names whose values will be logged when logging is enabled. - * Defaults include a list of well-known safe headers. Any headers - * specified in this field will be added to that list. Any other values will - * be written to logs as "REDACTED". - */ - additionalAllowedHeaderNames?: string[]; - /** - * Query string names whose values will be logged when logging is enabled. By default no - * query string values are logged. - */ - additionalAllowedQueryParameters?: string[]; - /** - * The log function to use for writing pipeline logs. - * Defaults to core-http's built-in logger. - * Compatible with the `debug` library. - */ - logger?: Debugger; -} - -/** - * ndJsonPolicy is a policy used to control keep alive settings for every request. - */ -export declare function ndJsonPolicy(): PipelinePolicy; - -/** - * The programmatic identifier of the ndJsonPolicy. - */ -export declare const ndJsonPolicyName = "ndJsonPolicy"; - -/** - * Represents a pipeline for making a HTTP request to a URL. - * Pipelines can have multiple policies to manage manipulating each request - * before and after it is made to the server. - */ -export declare interface Pipeline { - /** - * Add a new policy to the pipeline. - * @param policy - A policy that manipulates a request. - * @param options - A set of options for when the policy should run. - */ - addPolicy(policy: PipelinePolicy, options?: AddPipelineOptions): void; - /** - * Remove a policy from the pipeline. - * @param options - Options that let you specify which policies to remove. - */ - removePolicy(options: { - name?: string; - phase?: PipelinePhase; - }): PipelinePolicy[]; - /** - * Uses the pipeline to make a HTTP request. - * @param httpClient - The HttpClient that actually performs the request. - * @param request - The request to be made. - */ - sendRequest(httpClient: HttpClient, request: PipelineRequest): Promise; - /** - * Returns the current set of policies in the pipeline in the order in which - * they will be applied to the request. Later in the list is closer to when - * the request is performed. - */ - getOrderedPolicies(): PipelinePolicy[]; - /** - * Duplicates this pipeline to allow for modifying an existing one without mutating it. - */ - clone(): Pipeline; -} - -/** - * Defines options that are used to configure the HTTP pipeline for - * an SDK client. - */ -export declare interface PipelineOptions { - /** - * Options that control how to retry failed requests. - */ - retryOptions?: PipelineRetryOptions; - /** - * Options to configure a proxy for outgoing requests. - */ - proxyOptions?: ProxySettings; - /** Options for configuring TLS authentication */ - tlsOptions?: TlsSettings; - /** - * Options for how redirect responses are handled. - */ - redirectOptions?: RedirectPolicyOptions; - /** - * Options for adding user agent details to outgoing requests. - */ - userAgentOptions?: UserAgentPolicyOptions; - /** - * Options for setting common telemetry and tracing info to outgoing requests. - */ - telemetryOptions?: TelemetryOptions; -} - -/** - * Policies are executed in phases. - * The execution order is: - * 1. Serialize Phase - * 2. Policies not in a phase - * 3. Deserialize Phase - * 4. Retry Phase - * 5. Sign Phase - */ -export declare type PipelinePhase = "Deserialize" | "Serialize" | "Retry" | "Sign"; - -/** - * A pipeline policy manipulates a request as it travels through the pipeline. - * It is conceptually a middleware that is allowed to modify the request before - * it is made as well as the response when it is received. - */ -export declare interface PipelinePolicy { - /** - * The policy name. Must be a unique string in the pipeline. - */ - name: string; - /** - * The main method to implement that manipulates a request/response. - * @param request - The request being performed. - * @param next - The next policy in the pipeline. Must be called to continue the pipeline. - */ - sendRequest(request: PipelineRequest, next: SendRequest): Promise; -} - -/** - * Metadata about a request being made by the pipeline. - */ -export declare interface PipelineRequest { - /** - * The URL to make the request to. - */ - url: string; - /** - * The HTTP method to use when making the request. - */ - method: HttpMethods; - /** - * The HTTP headers to use when making the request. - */ - headers: HttpHeaders; - /** - * The number of milliseconds a request can take before automatically being terminated. - * If the request is terminated, an `AbortError` is thrown. - * Defaults to 0, which disables the timeout. - */ - timeout: number; - /** - * Indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests. - * Defaults to false. - */ - withCredentials: boolean; - /** - * A unique identifier for the request. Used for logging and tracing. - */ - requestId: string; - /** - * The HTTP body content (if any) - */ - body?: RequestBodyType; - /** - * To simulate a browser form post - */ - formData?: FormDataMap; - /** - * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream. - * When streamResponseStatusCodes contains the value Number.POSITIVE_INFINITY any status would be treated as a stream. - */ - streamResponseStatusCodes?: Set; - /** - * Proxy configuration. - */ - proxySettings?: ProxySettings; - /** - * If the connection should not be reused. - */ - disableKeepAlive?: boolean; - /** - * Used to abort the request later. - */ - abortSignal?: AbortSignalLike; - /** - * Tracing options to use for any created Spans. - */ - tracingOptions?: OperationTracingOptions; - /** - * Callback which fires upon upload progress. - */ - onUploadProgress?: (progress: TransferProgressEvent) => void; - /** Callback which fires upon download progress. */ - onDownloadProgress?: (progress: TransferProgressEvent) => void; - /** Set to true if the request is sent over HTTP instead of HTTPS */ - allowInsecureConnection?: boolean; - /** - * NODEJS ONLY - * - * A Node-only option to provide a custom `http.Agent`/`https.Agent`. - * Does nothing when running in the browser. - */ - agent?: Agent; - /** - * BROWSER ONLY - * - * A browser only option to enable browser Streams. If this option is set and a response is a stream - * the response will have a property `browserStream` instead of `blobBody` which will be undefined. - * - * Default value is false - */ - enableBrowserStreams?: boolean; - /** Settings for configuring TLS authentication */ - tlsSettings?: TlsSettings; -} - -/** - * Settings to initialize a request. - * Almost equivalent to Partial, but url is mandatory. - */ -export declare interface PipelineRequestOptions { - /** - * The URL to make the request to. - */ - url: string; - /** - * The HTTP method to use when making the request. - */ - method?: HttpMethods; - /** - * The HTTP headers to use when making the request. - */ - headers?: HttpHeaders; - /** - * The number of milliseconds a request can take before automatically being terminated. - * If the request is terminated, an `AbortError` is thrown. - * Defaults to 0, which disables the timeout. - */ - timeout?: number; - /** - * If credentials (cookies) should be sent along during an XHR. - * Defaults to false. - */ - withCredentials?: boolean; - /** - * A unique identifier for the request. Used for logging and tracing. - */ - requestId?: string; - /** - * The HTTP body content (if any) - */ - body?: RequestBodyType; - /** - * To simulate a browser form post - */ - formData?: FormDataMap; - /** - * A list of response status codes whose corresponding PipelineResponse body should be treated as a stream. - */ - streamResponseStatusCodes?: Set; - /** - * BROWSER ONLY - * - * A browser only option to enable use of the Streams API. If this option is set and streaming is used - * (see `streamResponseStatusCodes`), the response will have a property `browserStream` instead of - * `blobBody` which will be undefined. - * - * Default value is false - */ - enableBrowserStreams?: boolean; - /** - * Proxy configuration. - */ - proxySettings?: ProxySettings; - /** - * If the connection should not be reused. - */ - disableKeepAlive?: boolean; - /** - * Used to abort the request later. - */ - abortSignal?: AbortSignalLike; - /** - * Options used to create a span when tracing is enabled. - */ - tracingOptions?: OperationTracingOptions; - /** - * Callback which fires upon upload progress. - */ - onUploadProgress?: (progress: TransferProgressEvent) => void; - /** Callback which fires upon download progress. */ - onDownloadProgress?: (progress: TransferProgressEvent) => void; - /** Set to true if the request is sent over HTTP instead of HTTPS */ - allowInsecureConnection?: boolean; -} - -/** - * Metadata about a response received by the pipeline. - */ -export declare interface PipelineResponse { - /** - * The request that generated this response. - */ - request: PipelineRequest; - /** - * The HTTP status code of the response. - */ - status: number; - /** - * The HTTP response headers. - */ - headers: HttpHeaders; - /** - * The response body as text (string format) - */ - bodyAsText?: string | null; - /** - * BROWSER ONLY - * - * The response body as a browser Blob. - * Always undefined in node.js. - */ - blobBody?: Promise; - /** - * BROWSER ONLY - * - * The response body as a browser ReadableStream. - * Always undefined in node.js. - */ - browserStreamBody?: ReadableStream; - /** - * NODEJS ONLY - * - * The response body as a node.js Readable stream. - * Always undefined in the browser. - */ - readableStreamBody?: NodeJS.ReadableStream; -} - -/** - * Options that control how to retry failed requests. - */ -export declare interface PipelineRetryOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; - /** - * The amount of delay in milliseconds between retry attempts. Defaults to 1000 - * (1 second). The delay increases exponentially with each retry up to a maximum - * specified by maxRetryDelayInMs. - */ - retryDelayInMs?: number; - /** - * The maximum delay in milliseconds allowed before retrying an operation. Defaults - * to 64000 (64 seconds). - */ - maxRetryDelayInMs?: number; -} - -/** - * A policy that allows one to apply proxy settings to all requests. - * If not passed static settings, they will be retrieved from the HTTPS_PROXY - * or HTTP_PROXY environment variables. - * @param proxySettings - ProxySettings to use on each request. - * @param options - additional settings, for example, custom NO_PROXY patterns - */ -export declare function proxyPolicy(proxySettings?: ProxySettings | undefined, options?: { - /** a list of patterns to override those loaded from NO_PROXY environment variable. */ - customNoProxyList?: string[]; -}): PipelinePolicy; - -/** - * The programmatic identifier of the proxyPolicy. - */ -export declare const proxyPolicyName = "proxyPolicy"; - -/** - * Options to configure a proxy for outgoing requests (Node.js only). - */ -export declare interface ProxySettings { - /** - * The proxy's host address. - */ - host: string; - /** - * The proxy host's port. - */ - port: number; - /** - * The user name to authenticate with the proxy, if required. - */ - username?: string; - /** - * The password to authenticate with the proxy, if required. - */ - password?: string; -} - -/** - * An interface compatible with NodeJS's `tls.PxfObject`. - * We want to avoid publicly re-exporting the actual interface, - * since it might vary across runtime versions. - */ -export declare interface PxfObject { - /** - * PFX or PKCS12 encoded private key and certificate chain. - */ - buf: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; -} - -/** - * A HttpHeaders collection represented as a simple JSON object. - */ -export declare type RawHttpHeaders = { - [headerName: string]: string; -}; - -/** - * A HttpHeaders collection for input, represented as a simple JSON object. - */ -export declare type RawHttpHeadersInput = Record; - -/** - * A policy to follow Location headers from the server in order - * to support server-side redirection. - * In the browser, this policy is not used. - * @param options - Options to control policy behavior. - */ -export declare function redirectPolicy(options?: RedirectPolicyOptions): PipelinePolicy; - -/** - * The programmatic identifier of the redirectPolicy. - */ -export declare const redirectPolicyName = "redirectPolicy"; - -/** - * Options for how redirect responses are handled. - */ -export declare interface RedirectPolicyOptions { - /** - * The maximum number of times the redirect URL will be tried before - * failing. Defaults to 20. - */ - maxRetries?: number; -} - -/** - * Types of bodies supported on the request. - * NodeJS.ReadableStream and () =\> NodeJS.ReadableStream is Node only. - * Blob, ReadableStream, and () =\> ReadableStream are browser only. - */ -export declare type RequestBodyType = NodeJS.ReadableStream | (() => NodeJS.ReadableStream) | ReadableStream | (() => ReadableStream) | Blob | ArrayBuffer | ArrayBufferView | FormData | string | null; - -/** - * A custom error type for failed pipeline requests. - */ -export declare class RestError extends Error { - /** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ - static readonly REQUEST_SEND_ERROR: string; - /** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ - static readonly PARSE_ERROR: string; - /** - * The code of the error itself (use statics on RestError if possible.) - */ - code?: string; - /** - * The HTTP status code of the request (if applicable.) - */ - statusCode?: number; - /** - * The request that was made. - */ - request?: PipelineRequest; - /** - * The response received (if any.) - */ - response?: PipelineResponse; - /** - * Bonus property set by the throw site. - */ - details?: unknown; - constructor(message: string, options?: RestErrorOptions); -} - -/** - * The options supported by RestError. - */ -export declare interface RestErrorOptions { - /** - * The code of the error itself (use statics on RestError if possible.) - */ - code?: string; - /** - * The HTTP status code of the request (if applicable.) - */ - statusCode?: number; - /** - * The request that was made. - */ - request?: PipelineRequest; - /** - * The response received (if any.) - */ - response?: PipelineResponse; -} - -/** - * Information provided to the retry strategy about the current progress of the retry policy. - */ -export declare interface RetryInformation { - /** - * A {@link PipelineResponse}, if the last retry attempt succeeded. - */ - response?: PipelineResponse; - /** - * A {@link RestError}, if the last retry attempt failed. - */ - responseError?: RestError; - /** - * Total number of retries so far. - */ - retryCount: number; -} - -/** - * Properties that can modify the behavior of the retry policy. - */ -export declare interface RetryModifiers { - /** - * If true, allows skipping the current strategy from running on the retry policy. - */ - skipStrategy?: boolean; - /** - * Indicates to retry against this URL. - */ - redirectTo?: string; - /** - * Controls whether to retry in a given number of milliseconds. - * If provided, a new retry will be attempted. - */ - retryAfterInMs?: number; - /** - * Indicates to throw this error instead of retrying. - */ - errorToThrow?: RestError; -} - -/** - * retryPolicy is a generic policy to enable retrying requests when certain conditions are met - */ -export declare function retryPolicy(strategies: RetryStrategy[], options?: RetryPolicyOptions): PipelinePolicy; - -/** - * Options to the {@link retryPolicy} - */ -export declare interface RetryPolicyOptions { - /** - * Maximum number of retries. If not specified, it will limit to 3 retries. - */ - maxRetries?: number; - /** - * Logger. If it's not provided, a default logger is used. - */ - logger?: AzureLogger; -} - -/** - * A retry strategy is intended to define whether to retry or not, and how to retry. - */ -export declare interface RetryStrategy { - /** - * Name of the retry strategy. Used for logging. - */ - name: string; - /** - * Logger. If it's not provided, a default logger for all retry strategies is used. - */ - logger?: AzureLogger; - /** - * Function that determines how to proceed with the subsequent requests. - * @param state - Retry state - */ - retry(state: RetryInformation): RetryModifiers; -} - -/** - * A simple interface for making a pipeline request and receiving a response. - */ -export declare type SendRequest = (request: PipelineRequest) => Promise; - -/** - * Each PipelineRequest gets a unique id upon creation. - * This policy passes that unique id along via an HTTP header to enable better - * telemetry and tracing. - * @param requestIdHeaderName - The name of the header to pass the request ID to. - */ -export declare function setClientRequestIdPolicy(requestIdHeaderName?: string): PipelinePolicy; - -/** - * The programmatic identifier of the setClientRequestIdPolicy. - */ -export declare const setClientRequestIdPolicyName = "setClientRequestIdPolicy"; - -/** - * A retry policy that specifically seeks to handle errors in the - * underlying transport layer (e.g. DNS lookup failures) rather than - * retryable error codes from the server itself. - * @param options - Options that customize the policy. - */ -export declare function systemErrorRetryPolicy(options?: SystemErrorRetryPolicyOptions): PipelinePolicy; - -/** - * Name of the {@link systemErrorRetryPolicy} - */ -export declare const systemErrorRetryPolicyName = "systemErrorRetryPolicy"; - -/** - * Options that control how to retry failed requests. - */ -export declare interface SystemErrorRetryPolicyOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; - /** - * The amount of delay in milliseconds between retry attempts. Defaults to 1000 - * (1 second.) The delay increases exponentially with each retry up to a maximum - * specified by maxRetryDelayInMs. - */ - retryDelayInMs?: number; - /** - * The maximum delay in milliseconds allowed before retrying an operation. Defaults - * to 64000 (64 seconds). - */ - maxRetryDelayInMs?: number; -} - -/** - * Defines options that are used to configure common telemetry and tracing info - */ -export declare interface TelemetryOptions { - /** - * The name of the header to pass the request ID to. - */ - clientRequestIdHeaderName?: string; -} - -/** - * A policy that retries when the server sends a 429 response with a Retry-After header. - * - * To learn more, please refer to - * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors - * - * @param options - Options that configure retry logic. - */ -export declare function throttlingRetryPolicy(options?: ThrottlingRetryPolicyOptions): PipelinePolicy; - -/** - * Name of the {@link throttlingRetryPolicy} - */ -export declare const throttlingRetryPolicyName = "throttlingRetryPolicy"; - -/** - * Options that control how to retry failed requests. - */ -export declare interface ThrottlingRetryPolicyOptions { - /** - * The maximum number of retry attempts. Defaults to 3. - */ - maxRetries?: number; -} - -/** - * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. - */ -export declare function tlsPolicy(tlsSettings?: TlsSettings): PipelinePolicy; - -/** - * Name of the TLS Policy - */ -export declare const tlsPolicyName = "tlsPolicy"; - -/** - * Represents a certificate for TLS authentication. - */ -export declare interface TlsSettings { - /** - * Optionally override the trusted CA certificates. Default is to trust - * the well-known CAs curated by Mozilla. Mozilla's CAs are completely - * replaced when CAs are explicitly specified using this option. - */ - ca?: string | Buffer | Array | undefined; - /** - * Cert chains in PEM format. One cert chain should be provided per - * private key. Each cert chain should consist of the PEM formatted - * certificate for a provided private key, followed by the PEM - * formatted intermediate certificates (if any), in order, and not - * including the root CA (the root CA must be pre-known to the peer, - * see ca). When providing multiple cert chains, they do not have to - * be in the same order as their private keys in key. If the - * intermediate certificates are not provided, the peer will not be - * able to validate the certificate, and the handshake will fail. - */ - cert?: string | Buffer | Array | undefined; - /** - * Private keys in PEM format. PEM allows the option of private keys - * being encrypted. Encrypted keys will be decrypted with - * options.passphrase. Multiple keys using different algorithms can be - * provided either as an array of unencrypted key strings or buffers, - * or an array of objects in the form `{pem: [,passphrase: ]}`. - * The object form can only occur in an array.object.passphrase is optional. - * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not. - */ - key?: string | Buffer | Array | undefined; - /** - * Shared passphrase used for a single private key and/or a PFX. - */ - passphrase?: string | undefined; - /** - * PFX or PKCS12 encoded private key and certificate chain. pfx is an - * alternative to providing key and cert individually. PFX is usually - * encrypted, if it is, passphrase will be used to decrypt it. Multiple - * PFX can be provided either as an array of unencrypted PFX buffers, - * or an array of objects in the form `{buf: [,passphrase: ]}`. - * The object form can only occur in an array.object.passphrase is optional. - * Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not. - */ - pfx?: string | Buffer | Array | undefined; -} - -/** - * A simple policy to create OpenTelemetry Spans for each request made by the pipeline - * that has SpanOptions with a parent. - * Requests made without a parent Span will not be recorded. - * @param options - Options to configure the telemetry logged by the tracing policy. - */ -export declare function tracingPolicy(options?: TracingPolicyOptions): PipelinePolicy; - -/** - * The programmatic identifier of the tracingPolicy. - */ -export declare const tracingPolicyName = "tracingPolicy"; - -/** - * Options to configure the tracing policy. - */ -export declare interface TracingPolicyOptions { - /** - * String prefix to add to the user agent logged as metadata - * on the generated Span. - * Defaults to an empty string. - */ - userAgentPrefix?: string; -} - -/** - * Fired in response to upload or download progress. - */ -export declare type TransferProgressEvent = { - /** - * The number of bytes loaded so far. - */ - loadedBytes: number; -}; - -/** - * A policy that sets the User-Agent header (or equivalent) to reflect - * the library version. - * @param options - Options to customize the user agent value. - */ -export declare function userAgentPolicy(options?: UserAgentPolicyOptions): PipelinePolicy; - -/** - * The programmatic identifier of the userAgentPolicy. - */ -export declare const userAgentPolicyName = "userAgentPolicy"; - -/** - * Options for adding user agent details to outgoing requests. - */ -export declare interface UserAgentPolicyOptions { - /** - * String prefix to add to the user agent for outgoing requests. - * Defaults to an empty string. - */ - userAgentPrefix?: string; -} - -export { } diff --git a/reverse_engineering/node_modules/@azure/core-tracing/CHANGELOG.md b/reverse_engineering/node_modules/@azure/core-tracing/CHANGELOG.md deleted file mode 100644 index e7c7431..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/CHANGELOG.md +++ /dev/null @@ -1,105 +0,0 @@ -# Release History - -## 1.0.1 (2022-05-05) - -### Other Changes - -- Minor improvements to the typing of `updatedOptions` when calling startSpan. - -## 1.0.0 (2022-03-31) - -This release marks the GA release of our @azure/core-tracing libraries and is unchanged from preview.14 - -## 1.0.0-preview.14 (2022-02-03) - -### Breaking Changes - -- @azure/core-tracing has been rewritten in order to provide cleaner abstractions for client libraries as well as remove @opentelemetry/api as a direct dependency. - - @opentelemetry/api is no longer a direct dependency of @azure/core-tracing providing for smaller bundle sizes and lower incidence of version conflicts - - `createSpanFunction` has been removed and replaced with a stateful `TracingClient` which can be created using the `createTracingClient` function. - - `TracingClient` introduces a new API for creating tracing spans. Use `TracingClient#withSpan` to wrap an invocation in a span, ensuring the span is ended and exceptions are captured. - - `TracingClient` also provides the lower-level APIs necessary to start a span without making it active, create request headers, serialize `traceparent` header, and wrapping a callback with an active context. - -### Other Changes - -- Updates package to work with the react native bundler. [PR #17783](https://github.com/Azure/azure-sdk-for-js/pull/17783) - -## 1.0.0-preview.13 (2021-07-15) - -### Features Added - -- Added support for disabling distributed tracing using the AZURE_TRACING_DISABLED environment variable. - -### Breaking Changes - -- Removed `TestTracer` and `TestSpan` from public API and into `@azure/test-utils`. [PR #16315](https://github.com/Azure/azure-sdk-for-js/pull/16315) - - `TestTracer` and `TestSpan` are intended for test support when used by other Azure packages and not intended for use by end users. -- Removed `setTracer`, @azure/core-tracing will now rely on the `trace` API to fetch a tracer from the global tracer provider. [PR #16347](https://github.com/Azure/azure-sdk-for-js/pull/16347) - - If you are using `setTracer`, please use `trace.setGlobalTracerProvider(provider)` instead as described in the OpenTelemetry documentation. -- Removed `NoOpTracer` and `NoOpSpan` from the public API. Please use `trace.wrapSpanContext(INVALID_SPAN_CONTEXT)` from `@opentelemetry/api` instead. [PR #16315](https://github.com/Azure/azure-sdk-for-js/pull/16315) - -## 1.0.0-preview.12 (2021-06-30) - -- Update `@opentelemetry/api` to version 1.0.0 [PR #15883](https://github.com/Azure/azure-sdk-for-js/pull/15883) - - This version ships with ESM modules and fixes an issue where Angular projects would warn ab out optimization bailouts due to dependencies on CommonJS or AMD. - -### Breaking Changes - -- Removed `OpenCensusSpanWrapper` and `OpenCensusTracerWrapper` from the public API. Customers using these wrappers should migrate to using `OpenTelemetry` directly. [PR #15770](https://github.com/Azure/azure-sdk-for-js/pull/15770) -- Update `@azure/core-tracing` to version 1.0.0-preview.12. This brings core-tracing up to date with `@opentelemetry/api@1.0.0`. - - `Span#context` was renamed to `Span#spanContext`. This change is supported in `@azure/core-http@1.2.7`. - -## 1.0.0-preview.11 (2021-03-30) - -### Breaking Changes - -- Update @azure/core-tracing to version 1.0.0-preview.11. This brings core-tracing up to date with @opentelemetry/api@1.0.0-rc.0. - There are two scenarios that will require changes if you are using tracing: - - Previously, you would pass a parent span using the `OperationOptions.tracingOptions.spanOptions.parentSpan` property. This has been - changed so that you now specify a parent `Context` using the `OperationOptions.tracingOptions.tracingContext` property instead. - - The status code for Spans is no longer of type `CanonicalCode`. Instead, it's now `SpanStatusCode`, which also has a smaller range of values. - -## 1.0.0-preview.10 (2021-03-04) - -- Internal improvements to make future opentelemetry updates simpler. - -## 1.0.0-preview.9 (2020-08-04) - -- Update `@opentelemetry/api` to version 0.10.2 [PR 10393](https://github.com/Azure/azure-sdk-for-js/pull/10393) - -## 1.0.0-preview.8 (2020-04-28) - -- Update `TestSpan` to allow setting span attributes [PR link](https://github.com/Azure/azure-sdk-for-js/pull/6565). -- [BREAKING] Migrate to OpenTelemetry 0.6 using the new `@opentelemetry/api` package. There were a few breaking changes: - - `SpanContext` now requires traceFlags to be set. - - `Tracer` has removed `recordSpanData`, `getBinaryFormat`, and `getHttpTextFormat`. - - `Tracer.getCurrentSpan` returns `undefined` instead of `null` when unset. - - `Link` objects renamed `spanContext` property to `context`. - -## 1.0.0-preview.7 (2019-12-03) - -- Updated the behavior of how incompatible versions of OpenTelemetry Tracer are handled. Now, errors will be thrown only if the user has manually set a Tracer. This means that incompatible versions will be silently ignored when tracing is not enabled. -- Updated to use OpenTelemetry 0.2 via the `@opentelemetry/types` package. There were two breaking changes in this update: - - `isRecordingEvents` on `Span` was renamed to `isRecording`. [PR link](https://github.com/open-telemetry/opentelemetry-js/pull/454) - - `addLink` was removed from `Span` as links are now only allowed to be added during span creation. This is possible by specifying any necessary links inside `SpanOptions`. [PR link](https://github.com/open-telemetry/opentelemetry-js/pull/449) - -## 1.0.0-preview.5 (2019-10-22) - -- Fixes issue where loading multiple copies of this module could result in the tracer set by `setTracer()` being reset. - -## 1.0.0-preview.4 (2019-10-08) - -- Remove dependency on the `debug` module to ensure compatibility with IE11 - -## 1.0.0-preview.3 (2019-10-07) - -- Updated to use the latest types from OpenTelemetry (PR [#5182](https://github.com/Azure/azure-sdk-for-js/pull/5182)) -- Clean up and refactored code for easier usage and testability. (PR [#5233](https://github.com/Azure/azure-sdk-for-js/pull/5233) and PR [#5283](https://github.com/Azure/azure-sdk-for-js/pull/5283)) - -## 1.0.0-preview.2 (2019-09-09) - -Updated the `OpenCensusSpanPlugin` & the `NoOpSpanPlugin` to support for retrieving span context. This allows updating of request headers with the right [span context](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format). (PR [#4712](https://github.com/Azure/azure-sdk-for-js/pull/4712)) - -## 1.0.0-preview.1 (2019-08-05) - -Provides low-level interfaces and helper methods for tracing in Azure SDK diff --git a/reverse_engineering/node_modules/@azure/core-tracing/LICENSE b/reverse_engineering/node_modules/@azure/core-tracing/LICENSE deleted file mode 100644 index ea8fb15..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@azure/core-tracing/README.md b/reverse_engineering/node_modules/@azure/core-tracing/README.md deleted file mode 100644 index 47b4c47..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Azure Core tracing library for JavaScript - -This is the core tracing library that provides low-level interfaces and helper methods for tracing in Azure SDK JavaScript libraries which work in the browser and Node.js. - -## Getting started - -### Installation - -This package is primarily used in Azure client libraries and not meant to be used directly by consumers of Azure SDKs. - -## Key Concepts - -- `TracingClient` is the primary interface providing tracing functionality to client libraries. Client libraries should only be aware of and interact with a `TracingClient` instance. - - A `TracingClient` implementation can be created using the `createTracingClient` factory function. -- `Instrumenter` provides an abstraction over an instrumentation and acts as the interop point for using third party libraries like OpenTelemetry. By default, a no-op `Instrumenter` is used. Customers who wish to enable `OpenTelemetry` based tracing will do so by installing and registering the [@azure/opentelemetry-instrumentation-azure-sdk] package. -- `TracingContext` is an **immutable** data container, used to pass operation-specific information around (such as span parenting information). -- `TracingSpan` is an abstraction of a `Span` which can be used to record events, attributes, and exceptions. - -## Examples - -Examples can be found in the `samples` folder. - -## Next steps - -You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes. - -## Troubleshooting - -If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new). - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -[@azure/opentelemetry-instrumentation-azure-sdk]: https://www.npmjs.com/package/@azure/opentelemetry-instrumentation-azure-sdk - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-tracing%2FREADME.png) diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/index.js b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/index.js deleted file mode 100644 index af9e3f4..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { useInstrumenter } from "./instrumenter"; -export { createTracingClient } from "./tracingClient"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/index.js.map b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/index.js.map deleted file mode 100644 index da37580..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmBlC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n Instrumenter,\n InstrumenterSpanOptions,\n OperationTracingOptions,\n OptionsWithTracingContext,\n Resolved,\n SpanStatus,\n SpanStatusError,\n SpanStatusSuccess,\n TracingClient,\n TracingClientOptions,\n TracingContext,\n TracingSpan,\n TracingSpanKind,\n TracingSpanLink,\n TracingSpanOptions,\n} from \"./interfaces\";\nexport { useInstrumenter } from \"./instrumenter\";\nexport { createTracingClient } from \"./tracingClient\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/instrumenter.js b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/instrumenter.js deleted file mode 100644 index 5c92593..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/instrumenter.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createTracingContext } from "./tracingContext"; -export function createDefaultTracingSpan() { - return { - end: () => { - // noop - }, - isRecording: () => false, - recordException: () => { - // noop - }, - setAttribute: () => { - // noop - }, - setStatus: () => { - // noop - }, - }; -} -export function createDefaultInstrumenter() { - return { - createRequestHeaders: () => { - return {}; - }, - parseTraceparentHeader: () => { - return undefined; - }, - startSpan: (_name, spanOptions) => { - return { - span: createDefaultTracingSpan(), - tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }), - }; - }, - withContext(_context, callback, ...callbackArgs) { - return callback(...callbackArgs); - }, - }; -} -/** @internal */ -let instrumenterImplementation; -/** - * Extends the Azure SDK with support for a given instrumenter implementation. - * - * @param instrumenter - The instrumenter implementation to use. - */ -export function useInstrumenter(instrumenter) { - instrumenterImplementation = instrumenter; -} -/** - * Gets the currently set instrumenter, a No-Op instrumenter by default. - * - * @returns The currently set instrumenter - */ -export function getInstrumenter() { - if (!instrumenterImplementation) { - instrumenterImplementation = createDefaultInstrumenter(); - } - return instrumenterImplementation; -} -//# sourceMappingURL=instrumenter.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/instrumenter.js.map b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/instrumenter.js.map deleted file mode 100644 index f5cec32..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/instrumenter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"instrumenter.js","sourceRoot":"","sources":["../../src/instrumenter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,UAAU,wBAAwB;IACtC,OAAO;QACL,GAAG,EAAE,GAAG,EAAE;YACR,OAAO;QACT,CAAC;QACD,WAAW,EAAE,GAAG,EAAE,CAAC,KAAK;QACxB,eAAe,EAAE,GAAG,EAAE;YACpB,OAAO;QACT,CAAC;QACD,YAAY,EAAE,GAAG,EAAE;YACjB,OAAO;QACT,CAAC;QACD,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,oBAAoB,EAAE,GAA2B,EAAE;YACjD,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,sBAAsB,EAAE,GAA+B,EAAE;YACvD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,CACT,KAAa,EACb,WAAoC,EACmB,EAAE;YACzD,OAAO;gBACL,IAAI,EAAE,wBAAwB,EAAE;gBAChC,cAAc,EAAE,oBAAoB,CAAC,EAAE,aAAa,EAAE,WAAW,CAAC,cAAc,EAAE,CAAC;aACpF,CAAC;QACJ,CAAC;QACD,WAAW,CAIT,QAAwB,EACxB,QAAkB,EAClB,GAAG,YAA0B;YAE7B,OAAO,QAAQ,CAAC,GAAG,YAAY,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,IAAI,0BAAoD,CAAC;AAEzD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,YAA0B;IACxD,0BAA0B,GAAG,YAAY,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC,0BAA0B,EAAE;QAC/B,0BAA0B,GAAG,yBAAyB,EAAE,CAAC;KAC1D;IACD,OAAO,0BAA0B,CAAC;AACpC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Instrumenter, InstrumenterSpanOptions, TracingContext, TracingSpan } from \"./interfaces\";\nimport { createTracingContext } from \"./tracingContext\";\n\nexport function createDefaultTracingSpan(): TracingSpan {\n return {\n end: () => {\n // noop\n },\n isRecording: () => false,\n recordException: () => {\n // noop\n },\n setAttribute: () => {\n // noop\n },\n setStatus: () => {\n // noop\n },\n };\n}\n\nexport function createDefaultInstrumenter(): Instrumenter {\n return {\n createRequestHeaders: (): Record => {\n return {};\n },\n parseTraceparentHeader: (): TracingContext | undefined => {\n return undefined;\n },\n startSpan: (\n _name: string,\n spanOptions: InstrumenterSpanOptions\n ): { span: TracingSpan; tracingContext: TracingContext } => {\n return {\n span: createDefaultTracingSpan(),\n tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }),\n };\n },\n withContext<\n CallbackArgs extends unknown[],\n Callback extends (...args: CallbackArgs) => ReturnType\n >(\n _context: TracingContext,\n callback: Callback,\n ...callbackArgs: CallbackArgs\n ): ReturnType {\n return callback(...callbackArgs);\n },\n };\n}\n\n/** @internal */\nlet instrumenterImplementation: Instrumenter | undefined;\n\n/**\n * Extends the Azure SDK with support for a given instrumenter implementation.\n *\n * @param instrumenter - The instrumenter implementation to use.\n */\nexport function useInstrumenter(instrumenter: Instrumenter): void {\n instrumenterImplementation = instrumenter;\n}\n\n/**\n * Gets the currently set instrumenter, a No-Op instrumenter by default.\n *\n * @returns The currently set instrumenter\n */\nexport function getInstrumenter(): Instrumenter {\n if (!instrumenterImplementation) {\n instrumenterImplementation = createDefaultInstrumenter();\n }\n return instrumenterImplementation;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js deleted file mode 100644 index c0a2e2e..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export {}; -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map deleted file mode 100644 index 05fc9a2..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * A narrower version of TypeScript 4.5's Awaited type which Recursively\n * unwraps the \"awaited type\", emulating the behavior of `await`.\n */\nexport type Resolved = T extends { then(onfulfilled: infer F): any } // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped\n ? F extends (value: infer V) => any // if the argument to `then` is callable, extracts the first argument\n ? Resolved // recursively unwrap the value\n : never // the argument to `then` was not callable\n : T; // non-object or non-thenable\n\n/**\n * Represents a client that can integrate with the currently configured {@link Instrumenter}.\n *\n * Create an instance using {@link createTracingClient}.\n */\nexport interface TracingClient {\n /**\n * Wraps a callback in a tracing span, calls the callback, and closes the span.\n *\n * This is the primary interface for using Tracing and will handle error recording as well as setting the status on the span.\n *\n * Both synchronous and asynchronous functions will be awaited in order to reflect the result of the callback on the span.\n *\n * Example:\n *\n * ```ts\n * const myOperationResult = await tracingClient.withSpan(\"myClassName.myOperationName\", options, (updatedOptions) => myOperation(updatedOptions));\n * ```\n * @param name - The name of the span. By convention this should be `${className}.${methodName}`.\n * @param operationOptions - The original options passed to the method. The callback will receive these options with the newly created {@link TracingContext}.\n * @param callback - The callback to be invoked with the updated options and newly created {@link TracingSpan}.\n */\n withSpan<\n Options extends { tracingOptions?: OperationTracingOptions },\n Callback extends (\n updatedOptions: Options,\n span: Omit\n ) => ReturnType\n >(\n name: string,\n operationOptions: Options,\n callback: Callback,\n spanOptions?: TracingSpanOptions\n ): Promise>>;\n /**\n * Starts a given span but does not set it as the active span.\n *\n * You must end the span using {@link TracingSpan.end}.\n *\n * Most of the time you will want to use {@link withSpan} instead.\n *\n * @param name - The name of the span. By convention this should be `${className}.${methodName}`.\n * @param operationOptions - The original operation options.\n * @param spanOptions - The options to use when creating the span.\n *\n * @returns A {@link TracingSpan} and the updated operation options.\n */\n startSpan(\n name: string,\n operationOptions?: Options,\n spanOptions?: TracingSpanOptions\n ): {\n span: TracingSpan;\n updatedOptions: OptionsWithTracingContext;\n };\n /**\n * Wraps a callback with an active context and calls the callback.\n * Depending on the implementation, this may set the globally available active context.\n *\n * Useful when you want to leave the boundaries of the SDK (make a request or callback to user code) and are unable to use the {@link withSpan} API.\n *\n * @param context - The {@link TracingContext} to use as the active context in the scope of the callback.\n * @param callback - The callback to be invoked with the given context set as the globally active context.\n * @param callbackArgs - The callback arguments.\n */\n withContext<\n CallbackArgs extends unknown[],\n Callback extends (...args: CallbackArgs) => ReturnType\n >(\n context: TracingContext,\n callback: Callback,\n ...callbackArgs: CallbackArgs\n ): ReturnType;\n\n /**\n * Parses a traceparent header value into a {@link TracingSpanContext}.\n *\n * @param traceparentHeader - The traceparent header to parse.\n * @returns An implementation-specific identifier for the span.\n */\n parseTraceparentHeader(traceparentHeader: string): TracingContext | undefined;\n\n /**\n * Creates a set of request headers to propagate tracing information to a backend.\n *\n * @param tracingContext - The context containing the span to propagate.\n * @returns The set of headers to add to a request.\n */\n createRequestHeaders(tracingContext?: TracingContext): Record;\n}\n\n/**\n * Options that can be passed to {@link createTracingClient}\n */\nexport interface TracingClientOptions {\n /** The value of the az.namespace tracing attribute on newly created spans. */\n namespace: string;\n /** The name of the package invoking this trace. */\n packageName: string;\n /** An optional version of the package invoking this trace. */\n packageVersion?: string;\n}\n\n/** The kind of span. */\nexport type TracingSpanKind = \"client\" | \"server\" | \"producer\" | \"consumer\" | \"internal\";\n\n/** Options used to configure the newly created span. */\nexport interface TracingSpanOptions {\n /** The kind of span. Implementations should default this to \"client\". */\n spanKind?: TracingSpanKind;\n /** A collection of {@link TracingSpanLink} to link to this span. */\n spanLinks?: TracingSpanLink[];\n /** Initial set of attributes to set on a span. */\n spanAttributes?: { [key: string]: unknown };\n}\n\n/** A pointer from the current {@link TracingSpan} to another span in the same or a different trace. */\nexport interface TracingSpanLink {\n /** The {@link TracingContext} containing the span context to link to. */\n tracingContext: TracingContext;\n /** A set of attributes on the link. */\n attributes?: { [key: string]: unknown };\n}\n\n/**\n * Represents an implementation agnostic instrumenter.\n */\nexport interface Instrumenter {\n /**\n * Creates a new {@link TracingSpan} with the given name and options and sets it on a new context.\n * @param name - The name of the span. By convention this should be `${className}.${methodName}`.\n * @param spanOptions - The options to use when creating the span.\n *\n * @returns A {@link TracingSpan} that can be used to end the span, and the context this span has been set on.\n */\n startSpan(\n name: string,\n spanOptions: InstrumenterSpanOptions\n ): { span: TracingSpan; tracingContext: TracingContext };\n /**\n * Wraps a callback with an active context and calls the callback.\n * Depending on the implementation, this may set the globally available active context.\n *\n * @param context - The {@link TracingContext} to use as the active context in the scope of the callback.\n * @param callback - The callback to be invoked with the given context set as the globally active context.\n * @param callbackArgs - The callback arguments.\n */\n withContext<\n CallbackArgs extends unknown[],\n Callback extends (...args: CallbackArgs) => ReturnType\n >(\n context: TracingContext,\n callback: Callback,\n ...callbackArgs: CallbackArgs\n ): ReturnType;\n\n /**\n * Provides an implementation-specific method to parse a {@link https://www.w3.org/TR/trace-context/#traceparent-header}\n * into a {@link TracingSpanContext} which can be used to link non-parented spans together.\n */\n parseTraceparentHeader(traceparentHeader: string): TracingContext | undefined;\n /**\n * Provides an implementation-specific method to serialize a {@link TracingSpan} to a set of headers.\n * @param tracingContext - The context containing the span to serialize.\n */\n createRequestHeaders(tracingContext?: TracingContext): Record;\n}\n\n/**\n * Options passed to {@link Instrumenter.startSpan} as a superset of {@link TracingSpanOptions}.\n */\nexport interface InstrumenterSpanOptions extends TracingSpanOptions {\n /** The name of the package invoking this trace. */\n packageName: string;\n /** The version of the package invoking this trace. */\n packageVersion?: string;\n /** The current tracing context. Defaults to an implementation-specific \"active\" context. */\n tracingContext?: TracingContext;\n}\n\n/**\n * Status representing a successful operation that can be sent to {@link TracingSpan.setStatus}\n */\nexport type SpanStatusSuccess = { status: \"success\" };\n\n/**\n * Status representing an error that can be sent to {@link TracingSpan.setStatus}\n */\nexport type SpanStatusError = { status: \"error\"; error?: Error | string };\n\n/**\n * Represents the statuses that can be passed to {@link TracingSpan.setStatus}.\n *\n * By default, all spans will be created with status \"unset\".\n */\nexport type SpanStatus = SpanStatusSuccess | SpanStatusError;\n\n/**\n * Represents an implementation agnostic tracing span.\n */\nexport interface TracingSpan {\n /**\n * Sets the status of the span. When an error is provided, it will be recorded on the span as well.\n *\n * @param status - The {@link SpanStatus} to set on the span.\n */\n setStatus(status: SpanStatus): void;\n\n /**\n * Sets a given attribute on a span.\n *\n * @param name - The attribute's name.\n * @param value - The attribute's value to set. May be any non-nullish value.\n */\n setAttribute(name: string, value: unknown): void;\n\n /**\n * Ends the span.\n */\n end(): void;\n\n /**\n * Records an exception on a {@link TracingSpan} without modifying its status.\n *\n * When recording an unhandled exception that should fail the span, please use {@link TracingSpan.setStatus} instead.\n *\n * @param exception - The exception to record on the span.\n *\n */\n recordException(exception: Error | string): void;\n\n /**\n * Returns true if this {@link TracingSpan} is recording information.\n *\n * Depending on the span implementation, this may return false if the span is not being sampled.\n */\n isRecording(): boolean;\n}\n\n/** An immutable context bag of tracing values for the current operation. */\nexport interface TracingContext {\n /**\n * Sets a given object on a context.\n * @param key - The key of the given context value.\n * @param value - The value to set on the context.\n *\n * @returns - A new context with the given value set.\n */\n setValue(key: symbol, value: unknown): TracingContext;\n /**\n * Gets an object from the context if it exists.\n * @param key - The key of the given context value.\n *\n * @returns - The value of the given context value if it exists, otherwise `undefined`.\n */\n getValue(key: symbol): unknown;\n /**\n * Deletes an object from the context if it exists.\n * @param key - The key of the given context value to delete.\n */\n deleteValue(key: symbol): TracingContext;\n}\n\n/**\n * Tracing options to set on an operation.\n */\nexport interface OperationTracingOptions {\n /** The context to use for created Tracing Spans. */\n tracingContext?: TracingContext;\n}\n\n/**\n * A utility type for when we know a TracingContext has been set\n * as part of an operation's options.\n */\nexport type OptionsWithTracingContext<\n Options extends { tracingOptions?: OperationTracingOptions }\n> = Options & {\n tracingOptions: {\n tracingContext: TracingContext;\n };\n};\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingClient.js b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingClient.js deleted file mode 100644 index 2b08c91..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingClient.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { getInstrumenter } from "./instrumenter"; -import { knownContextKeys } from "./tracingContext"; -/** - * Creates a new tracing client. - * - * @param options - Options used to configure the tracing client. - * @returns - An instance of {@link TracingClient}. - */ -export function createTracingClient(options) { - const { namespace, packageName, packageVersion } = options; - function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); - let tracingContext = startSpanResult.tracingContext; - const span = startSpanResult.span; - if (!tracingContext.getValue(knownContextKeys.namespace)) { - tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace); - } - span.setAttribute("az.namespace", tracingContext.getValue(knownContextKeys.namespace)); - const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }), - }); - return { - span, - updatedOptions, - }; - } - async function withSpan(name, operationOptions, callback, spanOptions) { - const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); - try { - const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); - span.setStatus({ status: "success" }); - return result; - } - catch (err) { - span.setStatus({ status: "error", error: err }); - throw err; - } - finally { - span.end(); - } - } - function withContext(context, callback, ...callbackArgs) { - return getInstrumenter().withContext(context, callback, ...callbackArgs); - } - /** - * Parses a traceparent header value into a span identifier. - * - * @param traceparentHeader - The traceparent header to parse. - * @returns An implementation-specific identifier for the span. - */ - function parseTraceparentHeader(traceparentHeader) { - return getInstrumenter().parseTraceparentHeader(traceparentHeader); - } - /** - * Creates a set of request headers to propagate tracing information to a backend. - * - * @param tracingContext - The context containing the span to serialize. - * @returns The set of headers to add to a request. - */ - function createRequestHeaders(tracingContext) { - return getInstrumenter().createRequestHeaders(tracingContext); - } - return { - startSpan, - withSpan, - withContext, - parseTraceparentHeader, - createRequestHeaders, - }; -} -//# sourceMappingURL=tracingClient.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingClient.js.map b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingClient.js.map deleted file mode 100644 index 360dd9c..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracingClient.js","sourceRoot":"","sources":["../../src/tracingClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAA6B;IAC/D,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IAE3D,SAAS,SAAS,CAChB,IAAY,EACZ,gBAA0B,EAC1B,WAAgC;;QAKhC,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC,SAAS,CAAC,IAAI,kCACnD,WAAW,KACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,cAAc,0CAAE,cAAc,IAChE,CAAC;QACH,IAAI,cAAc,GAAG,eAAe,CAAC,cAAc,CAAC;QACpD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;QAClC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE;YACxD,cAAc,GAAG,cAAc,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;SACjF;QACD,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,cAAc,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;QACvF,MAAM,cAAc,GAAuC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE;YAC7F,cAAc,kCAAO,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,cAAc,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ACR,WAAW;QACX,sBAAsB;QACtB,oBAAoB;KACrB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n OperationTracingOptions,\n OptionsWithTracingContext,\n Resolved,\n TracingClient,\n TracingClientOptions,\n TracingContext,\n TracingSpan,\n TracingSpanOptions,\n} from \"./interfaces\";\nimport { getInstrumenter } from \"./instrumenter\";\nimport { knownContextKeys } from \"./tracingContext\";\n\n/**\n * Creates a new tracing client.\n *\n * @param options - Options used to configure the tracing client.\n * @returns - An instance of {@link TracingClient}.\n */\nexport function createTracingClient(options: TracingClientOptions): TracingClient {\n const { namespace, packageName, packageVersion } = options;\n\n function startSpan(\n name: string,\n operationOptions?: Options,\n spanOptions?: TracingSpanOptions\n ): {\n span: TracingSpan;\n updatedOptions: OptionsWithTracingContext;\n } {\n const startSpanResult = getInstrumenter().startSpan(name, {\n ...spanOptions,\n packageName: packageName,\n packageVersion: packageVersion,\n tracingContext: operationOptions?.tracingOptions?.tracingContext,\n });\n let tracingContext = startSpanResult.tracingContext;\n const span = startSpanResult.span;\n if (!tracingContext.getValue(knownContextKeys.namespace)) {\n tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace);\n }\n span.setAttribute(\"az.namespace\", tracingContext.getValue(knownContextKeys.namespace));\n const updatedOptions: OptionsWithTracingContext = Object.assign({}, operationOptions, {\n tracingOptions: { ...operationOptions?.tracingOptions, tracingContext },\n });\n\n return {\n span,\n updatedOptions,\n };\n }\n\n async function withSpan<\n Options extends { tracingOptions?: OperationTracingOptions },\n Callback extends (\n updatedOptions: Options,\n span: Omit\n ) => ReturnType\n >(\n name: string,\n operationOptions: Options,\n callback: Callback,\n spanOptions?: TracingSpanOptions\n ): Promise>> {\n const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions);\n try {\n const result = await withContext(updatedOptions.tracingOptions.tracingContext, () =>\n Promise.resolve(callback(updatedOptions, span))\n );\n span.setStatus({ status: \"success\" });\n return result as ReturnType;\n } catch (err: any) {\n span.setStatus({ status: \"error\", error: err });\n throw err;\n } finally {\n span.end();\n }\n }\n\n function withContext<\n CallbackArgs extends unknown[],\n Callback extends (...args: CallbackArgs) => ReturnType\n >(\n context: TracingContext,\n callback: Callback,\n ...callbackArgs: CallbackArgs\n ): ReturnType {\n return getInstrumenter().withContext(context, callback, ...callbackArgs);\n }\n\n /**\n * Parses a traceparent header value into a span identifier.\n *\n * @param traceparentHeader - The traceparent header to parse.\n * @returns An implementation-specific identifier for the span.\n */\n function parseTraceparentHeader(traceparentHeader: string): TracingContext | undefined {\n return getInstrumenter().parseTraceparentHeader(traceparentHeader);\n }\n\n /**\n * Creates a set of request headers to propagate tracing information to a backend.\n *\n * @param tracingContext - The context containing the span to serialize.\n * @returns The set of headers to add to a request.\n */\n function createRequestHeaders(tracingContext?: TracingContext): Record {\n return getInstrumenter().createRequestHeaders(tracingContext);\n }\n\n return {\n startSpan,\n withSpan,\n withContext,\n parseTraceparentHeader,\n createRequestHeaders,\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingContext.js b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingContext.js deleted file mode 100644 index efcf609..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingContext.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** @internal */ -export const knownContextKeys = { - span: Symbol.for("@azure/core-tracing span"), - namespace: Symbol.for("@azure/core-tracing namespace"), -}; -/** - * Creates a new {@link TracingContext} with the given options. - * @param options - A set of known keys that may be set on the context. - * @returns A new {@link TracingContext} with the given options. - * - * @internal - */ -export function createTracingContext(options = {}) { - let context = new TracingContextImpl(options.parentContext); - if (options.span) { - context = context.setValue(knownContextKeys.span, options.span); - } - if (options.namespace) { - context = context.setValue(knownContextKeys.namespace, options.namespace); - } - return context; -} -/** @internal */ -export class TracingContextImpl { - constructor(initialContext) { - this._contextMap = - initialContext instanceof TracingContextImpl - ? new Map(initialContext._contextMap) - : new Map(); - } - setValue(key, value) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.set(key, value); - return newContext; - } - getValue(key) { - return this._contextMap.get(key); - } - deleteValue(key) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.delete(key); - return newContext; - } -} -//# sourceMappingURL=tracingContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingContext.js.map b/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingContext.js.map deleted file mode 100644 index 375db09..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist-esm/src/tracingContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracingContext.js","sourceRoot":"","sources":["../../src/tracingContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC;CACvD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAuC,EAAE;IAC5E,IAAI,OAAO,GAAmB,IAAI,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5E,IAAI,OAAO,CAAC,IAAI,EAAE;QAChB,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;KACjE;IACD,IAAI,OAAO,CAAC,SAAS,EAAE;QACrB,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;KAC3E;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,gBAAgB;AAChB,MAAM,OAAO,kBAAkB;IAE7B,YAAY,cAA+B;QACzC,IAAI,CAAC,WAAW;YACd,cAAc,YAAY,kBAAkB;gBAC1C,CAAC,CAAC,IAAI,GAAG,CAAkB,cAAc,CAAC,WAAW,CAAC;gBACtD,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;IAClB,CAAC;IAED,QAAQ,CAAC,GAAW,EAAE,KAAc;QAClC,MAAM,UAAU,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAChD,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,QAAQ,CAAC,GAAW;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,WAAW,CAAC,GAAW;QACrB,MAAM,UAAU,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAChD,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnC,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TracingContext, TracingSpan } from \"./interfaces\";\n\n/** @internal */\nexport const knownContextKeys = {\n span: Symbol.for(\"@azure/core-tracing span\"),\n namespace: Symbol.for(\"@azure/core-tracing namespace\"),\n};\n\n/**\n * Creates a new {@link TracingContext} with the given options.\n * @param options - A set of known keys that may be set on the context.\n * @returns A new {@link TracingContext} with the given options.\n *\n * @internal\n */\nexport function createTracingContext(options: CreateTracingContextOptions = {}): TracingContext {\n let context: TracingContext = new TracingContextImpl(options.parentContext);\n if (options.span) {\n context = context.setValue(knownContextKeys.span, options.span);\n }\n if (options.namespace) {\n context = context.setValue(knownContextKeys.namespace, options.namespace);\n }\n return context;\n}\n\n/** @internal */\nexport class TracingContextImpl implements TracingContext {\n private _contextMap: Map;\n constructor(initialContext?: TracingContext) {\n this._contextMap =\n initialContext instanceof TracingContextImpl\n ? new Map(initialContext._contextMap)\n : new Map();\n }\n\n setValue(key: symbol, value: unknown): TracingContext {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.set(key, value);\n return newContext;\n }\n\n getValue(key: symbol): unknown {\n return this._contextMap.get(key);\n }\n\n deleteValue(key: symbol): TracingContext {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.delete(key);\n return newContext;\n }\n}\n\n/**\n * Represents a set of items that can be set when creating a new {@link TracingContext}.\n */\nexport interface CreateTracingContextOptions {\n /** The {@link parentContext} - the newly created context will contain all the values of the parent context unless overridden. */\n parentContext?: TracingContext;\n /** An initial span to set on the context. */\n span?: TracingSpan;\n /** The namespace to set on any child spans. */\n namespace?: string;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist/index.js b/reverse_engineering/node_modules/@azure/core-tracing/dist/index.js deleted file mode 100644 index 5094d2e..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist/index.js +++ /dev/null @@ -1,184 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** @internal */ -const knownContextKeys = { - span: Symbol.for("@azure/core-tracing span"), - namespace: Symbol.for("@azure/core-tracing namespace"), -}; -/** - * Creates a new {@link TracingContext} with the given options. - * @param options - A set of known keys that may be set on the context. - * @returns A new {@link TracingContext} with the given options. - * - * @internal - */ -function createTracingContext(options = {}) { - let context = new TracingContextImpl(options.parentContext); - if (options.span) { - context = context.setValue(knownContextKeys.span, options.span); - } - if (options.namespace) { - context = context.setValue(knownContextKeys.namespace, options.namespace); - } - return context; -} -/** @internal */ -class TracingContextImpl { - constructor(initialContext) { - this._contextMap = - initialContext instanceof TracingContextImpl - ? new Map(initialContext._contextMap) - : new Map(); - } - setValue(key, value) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.set(key, value); - return newContext; - } - getValue(key) { - return this._contextMap.get(key); - } - deleteValue(key) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.delete(key); - return newContext; - } -} - -// Copyright (c) Microsoft Corporation. -function createDefaultTracingSpan() { - return { - end: () => { - // noop - }, - isRecording: () => false, - recordException: () => { - // noop - }, - setAttribute: () => { - // noop - }, - setStatus: () => { - // noop - }, - }; -} -function createDefaultInstrumenter() { - return { - createRequestHeaders: () => { - return {}; - }, - parseTraceparentHeader: () => { - return undefined; - }, - startSpan: (_name, spanOptions) => { - return { - span: createDefaultTracingSpan(), - tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }), - }; - }, - withContext(_context, callback, ...callbackArgs) { - return callback(...callbackArgs); - }, - }; -} -/** @internal */ -let instrumenterImplementation; -/** - * Extends the Azure SDK with support for a given instrumenter implementation. - * - * @param instrumenter - The instrumenter implementation to use. - */ -function useInstrumenter(instrumenter) { - instrumenterImplementation = instrumenter; -} -/** - * Gets the currently set instrumenter, a No-Op instrumenter by default. - * - * @returns The currently set instrumenter - */ -function getInstrumenter() { - if (!instrumenterImplementation) { - instrumenterImplementation = createDefaultInstrumenter(); - } - return instrumenterImplementation; -} - -// Copyright (c) Microsoft Corporation. -/** - * Creates a new tracing client. - * - * @param options - Options used to configure the tracing client. - * @returns - An instance of {@link TracingClient}. - */ -function createTracingClient(options) { - const { namespace, packageName, packageVersion } = options; - function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); - let tracingContext = startSpanResult.tracingContext; - const span = startSpanResult.span; - if (!tracingContext.getValue(knownContextKeys.namespace)) { - tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace); - } - span.setAttribute("az.namespace", tracingContext.getValue(knownContextKeys.namespace)); - const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }), - }); - return { - span, - updatedOptions, - }; - } - async function withSpan(name, operationOptions, callback, spanOptions) { - const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); - try { - const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); - span.setStatus({ status: "success" }); - return result; - } - catch (err) { - span.setStatus({ status: "error", error: err }); - throw err; - } - finally { - span.end(); - } - } - function withContext(context, callback, ...callbackArgs) { - return getInstrumenter().withContext(context, callback, ...callbackArgs); - } - /** - * Parses a traceparent header value into a span identifier. - * - * @param traceparentHeader - The traceparent header to parse. - * @returns An implementation-specific identifier for the span. - */ - function parseTraceparentHeader(traceparentHeader) { - return getInstrumenter().parseTraceparentHeader(traceparentHeader); - } - /** - * Creates a set of request headers to propagate tracing information to a backend. - * - * @param tracingContext - The context containing the span to serialize. - * @returns The set of headers to add to a request. - */ - function createRequestHeaders(tracingContext) { - return getInstrumenter().createRequestHeaders(tracingContext); - } - return { - startSpan, - withSpan, - withContext, - parseTraceparentHeader, - createRequestHeaders, - }; -} - -exports.createTracingClient = createTracingClient; -exports.useInstrumenter = useInstrumenter; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/@azure/core-tracing/dist/index.js.map b/reverse_engineering/node_modules/@azure/core-tracing/dist/index.js.map deleted file mode 100644 index 95096ed..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/tracingContext.ts","../src/instrumenter.ts","../src/tracingClient.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TracingContext, TracingSpan } from \"./interfaces\";\n\n/** @internal */\nexport const knownContextKeys = {\n span: Symbol.for(\"@azure/core-tracing span\"),\n namespace: Symbol.for(\"@azure/core-tracing namespace\"),\n};\n\n/**\n * Creates a new {@link TracingContext} with the given options.\n * @param options - A set of known keys that may be set on the context.\n * @returns A new {@link TracingContext} with the given options.\n *\n * @internal\n */\nexport function createTracingContext(options: CreateTracingContextOptions = {}): TracingContext {\n let context: TracingContext = new TracingContextImpl(options.parentContext);\n if (options.span) {\n context = context.setValue(knownContextKeys.span, options.span);\n }\n if (options.namespace) {\n context = context.setValue(knownContextKeys.namespace, options.namespace);\n }\n return context;\n}\n\n/** @internal */\nexport class TracingContextImpl implements TracingContext {\n private _contextMap: Map;\n constructor(initialContext?: TracingContext) {\n this._contextMap =\n initialContext instanceof TracingContextImpl\n ? new Map(initialContext._contextMap)\n : new Map();\n }\n\n setValue(key: symbol, value: unknown): TracingContext {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.set(key, value);\n return newContext;\n }\n\n getValue(key: symbol): unknown {\n return this._contextMap.get(key);\n }\n\n deleteValue(key: symbol): TracingContext {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.delete(key);\n return newContext;\n }\n}\n\n/**\n * Represents a set of items that can be set when creating a new {@link TracingContext}.\n */\nexport interface CreateTracingContextOptions {\n /** The {@link parentContext} - the newly created context will contain all the values of the parent context unless overridden. */\n parentContext?: TracingContext;\n /** An initial span to set on the context. */\n span?: TracingSpan;\n /** The namespace to set on any child spans. */\n namespace?: string;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Instrumenter, InstrumenterSpanOptions, TracingContext, TracingSpan } from \"./interfaces\";\nimport { createTracingContext } from \"./tracingContext\";\n\nexport function createDefaultTracingSpan(): TracingSpan {\n return {\n end: () => {\n // noop\n },\n isRecording: () => false,\n recordException: () => {\n // noop\n },\n setAttribute: () => {\n // noop\n },\n setStatus: () => {\n // noop\n },\n };\n}\n\nexport function createDefaultInstrumenter(): Instrumenter {\n return {\n createRequestHeaders: (): Record => {\n return {};\n },\n parseTraceparentHeader: (): TracingContext | undefined => {\n return undefined;\n },\n startSpan: (\n _name: string,\n spanOptions: InstrumenterSpanOptions\n ): { span: TracingSpan; tracingContext: TracingContext } => {\n return {\n span: createDefaultTracingSpan(),\n tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }),\n };\n },\n withContext<\n CallbackArgs extends unknown[],\n Callback extends (...args: CallbackArgs) => ReturnType\n >(\n _context: TracingContext,\n callback: Callback,\n ...callbackArgs: CallbackArgs\n ): ReturnType {\n return callback(...callbackArgs);\n },\n };\n}\n\n/** @internal */\nlet instrumenterImplementation: Instrumenter | undefined;\n\n/**\n * Extends the Azure SDK with support for a given instrumenter implementation.\n *\n * @param instrumenter - The instrumenter implementation to use.\n */\nexport function useInstrumenter(instrumenter: Instrumenter): void {\n instrumenterImplementation = instrumenter;\n}\n\n/**\n * Gets the currently set instrumenter, a No-Op instrumenter by default.\n *\n * @returns The currently set instrumenter\n */\nexport function getInstrumenter(): Instrumenter {\n if (!instrumenterImplementation) {\n instrumenterImplementation = createDefaultInstrumenter();\n }\n return instrumenterImplementation;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n OperationTracingOptions,\n OptionsWithTracingContext,\n Resolved,\n TracingClient,\n TracingClientOptions,\n TracingContext,\n TracingSpan,\n TracingSpanOptions,\n} from \"./interfaces\";\nimport { getInstrumenter } from \"./instrumenter\";\nimport { knownContextKeys } from \"./tracingContext\";\n\n/**\n * Creates a new tracing client.\n *\n * @param options - Options used to configure the tracing client.\n * @returns - An instance of {@link TracingClient}.\n */\nexport function createTracingClient(options: TracingClientOptions): TracingClient {\n const { namespace, packageName, packageVersion } = options;\n\n function startSpan(\n name: string,\n operationOptions?: Options,\n spanOptions?: TracingSpanOptions\n ): {\n span: TracingSpan;\n updatedOptions: OptionsWithTracingContext;\n } {\n const startSpanResult = getInstrumenter().startSpan(name, {\n ...spanOptions,\n packageName: packageName,\n packageVersion: packageVersion,\n tracingContext: operationOptions?.tracingOptions?.tracingContext,\n });\n let tracingContext = startSpanResult.tracingContext;\n const span = startSpanResult.span;\n if (!tracingContext.getValue(knownContextKeys.namespace)) {\n tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace);\n }\n span.setAttribute(\"az.namespace\", tracingContext.getValue(knownContextKeys.namespace));\n const updatedOptions: OptionsWithTracingContext = Object.assign({}, operationOptions, {\n tracingOptions: { ...operationOptions?.tracingOptions, tracingContext },\n });\n\n return {\n span,\n updatedOptions,\n };\n }\n\n async function withSpan<\n Options extends { tracingOptions?: OperationTracingOptions },\n Callback extends (\n updatedOptions: Options,\n span: Omit\n ) => ReturnType\n >(\n name: string,\n operationOptions: Options,\n callback: Callback,\n spanOptions?: TracingSpanOptions\n ): Promise>> {\n const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions);\n try {\n const result = await withContext(updatedOptions.tracingOptions.tracingContext, () =>\n Promise.resolve(callback(updatedOptions, span))\n );\n span.setStatus({ status: \"success\" });\n return result as ReturnType;\n } catch (err: any) {\n span.setStatus({ status: \"error\", error: err });\n throw err;\n } finally {\n span.end();\n }\n }\n\n function withContext<\n CallbackArgs extends unknown[],\n Callback extends (...args: CallbackArgs) => ReturnType\n >(\n context: TracingContext,\n callback: Callback,\n ...callbackArgs: CallbackArgs\n ): ReturnType {\n return getInstrumenter().withContext(context, callback, ...callbackArgs);\n }\n\n /**\n * Parses a traceparent header value into a span identifier.\n *\n * @param traceparentHeader - The traceparent header to parse.\n * @returns An implementation-specific identifier for the span.\n */\n function parseTraceparentHeader(traceparentHeader: string): TracingContext | undefined {\n return getInstrumenter().parseTraceparentHeader(traceparentHeader);\n }\n\n /**\n * Creates a set of request headers to propagate tracing information to a backend.\n *\n * @param tracingContext - The context containing the span to serialize.\n * @returns The set of headers to add to a request.\n */\n function createRequestHeaders(tracingContext?: TracingContext): Record {\n return getInstrumenter().createRequestHeaders(tracingContext);\n }\n\n return {\n startSpan,\n withSpan,\n withContext,\n parseTraceparentHeader,\n createRequestHeaders,\n };\n}\n"],"names":[],"mappings":";;;;AAAA;AACA;AAIA;AACO,MAAM,gBA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AO,eAAe,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;KAC/D;IAED,OAAO;QACL,SAAS;QACT,QAAQ;QACR,WAAW;QACX,sBAAsB;QACtB,oBAAoB;KACrB,CAAC;AACJ;;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-tracing/package.json b/reverse_engineering/node_modules/@azure/core-tracing/package.json deleted file mode 100644 index ef10e5e..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "name": "@azure/core-tracing", - "version": "1.0.1", - "description": "Provides low-level interfaces and helper methods for tracing in Azure SDK", - "sdk-type": "client", - "main": "dist/index.js", - "module": "dist-esm/src/index.js", - "browser": {}, - "react-native": { - "./dist/index.js": "./dist-esm/src/index.js" - }, - "types": "types/core-tracing.d.ts", - "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:samples": "echo Obsolete", - "build:test": "tsc -p . && dev-tool run bundle", - "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-* temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "echo skipped", - "integration-test:node": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", - "pack": "npm pack 2>&1", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", - "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" - }, - "files": [ - "dist/", - "dist-esm/src/", - "types/core-tracing.d.ts", - "README.md", - "LICENSE" - ], - "repository": "github:Azure/azure-sdk-for-js", - "keywords": [ - "azure", - "tracing", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "engines": { - "node": ">=12.0.0" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-tracing/README.md", - "sideEffects": false, - "dependencies": { - "tslib": "^2.2.0" - }, - "devDependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@microsoft/api-extractor": "7.18.11", - "@types/chai": "^4.1.6", - "@types/mocha": "^7.0.2", - "@types/node": "^12.0.0", - "chai": "^4.2.0", - "cross-env": "^7.0.2", - "eslint": "^7.15.0", - "inherits": "^2.0.3", - "karma": "^6.2.0", - "karma-chrome-launcher": "^3.0.0", - "karma-coverage": "^2.0.0", - "karma-edge-launcher": "^0.4.2", - "karma-env-preprocessor": "^0.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-ie-launcher": "^1.0.0", - "karma-junit-reporter": "^2.0.1", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-sourcemap-loader": "^0.3.8", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^2.0.0", - "prettier": "^2.5.1", - "rimraf": "^3.0.0", - "typescript": "~4.6.0", - "util": "^0.12.1", - "sinon": "^9.0.2", - "@types/sinon": "^9.0.4" - }, - "//sampleConfiguration": { - "disableDocsMs": true, - "productName": "Azure SDK Core", - "productSlugs": [ - "azure" - ] - } -} diff --git a/reverse_engineering/node_modules/@azure/core-tracing/types/core-tracing.d.ts b/reverse_engineering/node_modules/@azure/core-tracing/types/core-tracing.d.ts deleted file mode 100644 index 6871feb..0000000 --- a/reverse_engineering/node_modules/@azure/core-tracing/types/core-tracing.d.ts +++ /dev/null @@ -1,284 +0,0 @@ -/** - * Creates a new tracing client. - * - * @param options - Options used to configure the tracing client. - * @returns - An instance of {@link TracingClient}. - */ -export declare function createTracingClient(options: TracingClientOptions): TracingClient; - -/** - * Represents an implementation agnostic instrumenter. - */ -export declare interface Instrumenter { - /** - * Creates a new {@link TracingSpan} with the given name and options and sets it on a new context. - * @param name - The name of the span. By convention this should be `${className}.${methodName}`. - * @param spanOptions - The options to use when creating the span. - * - * @returns A {@link TracingSpan} that can be used to end the span, and the context this span has been set on. - */ - startSpan(name: string, spanOptions: InstrumenterSpanOptions): { - span: TracingSpan; - tracingContext: TracingContext; - }; - /** - * Wraps a callback with an active context and calls the callback. - * Depending on the implementation, this may set the globally available active context. - * - * @param context - The {@link TracingContext} to use as the active context in the scope of the callback. - * @param callback - The callback to be invoked with the given context set as the globally active context. - * @param callbackArgs - The callback arguments. - */ - withContext ReturnType>(context: TracingContext, callback: Callback, ...callbackArgs: CallbackArgs): ReturnType; - /** - * Provides an implementation-specific method to parse a {@link https://www.w3.org/TR/trace-context/#traceparent-header} - * into a {@link TracingSpanContext} which can be used to link non-parented spans together. - */ - parseTraceparentHeader(traceparentHeader: string): TracingContext | undefined; - /** - * Provides an implementation-specific method to serialize a {@link TracingSpan} to a set of headers. - * @param tracingContext - The context containing the span to serialize. - */ - createRequestHeaders(tracingContext?: TracingContext): Record; -} - -/** - * Options passed to {@link Instrumenter.startSpan} as a superset of {@link TracingSpanOptions}. - */ -export declare interface InstrumenterSpanOptions extends TracingSpanOptions { - /** The name of the package invoking this trace. */ - packageName: string; - /** The version of the package invoking this trace. */ - packageVersion?: string; - /** The current tracing context. Defaults to an implementation-specific "active" context. */ - tracingContext?: TracingContext; -} - -/** - * Tracing options to set on an operation. - */ -export declare interface OperationTracingOptions { - /** The context to use for created Tracing Spans. */ - tracingContext?: TracingContext; -} - -/** - * A utility type for when we know a TracingContext has been set - * as part of an operation's options. - */ -export declare type OptionsWithTracingContext = Options & { - tracingOptions: { - tracingContext: TracingContext; - }; -}; - -/** - * A narrower version of TypeScript 4.5's Awaited type which Recursively - * unwraps the "awaited type", emulating the behavior of `await`. - */ -export declare type Resolved = T extends { - then(onfulfilled: infer F): any; -} ? F extends (value: infer V) => any ? Resolved : never : T; - -/** - * Represents the statuses that can be passed to {@link TracingSpan.setStatus}. - * - * By default, all spans will be created with status "unset". - */ -export declare type SpanStatus = SpanStatusSuccess | SpanStatusError; - -/** - * Status representing an error that can be sent to {@link TracingSpan.setStatus} - */ -export declare type SpanStatusError = { - status: "error"; - error?: Error | string; -}; - -/** - * Status representing a successful operation that can be sent to {@link TracingSpan.setStatus} - */ -export declare type SpanStatusSuccess = { - status: "success"; -}; - -/** - * Represents a client that can integrate with the currently configured {@link Instrumenter}. - * - * Create an instance using {@link createTracingClient}. - */ -export declare interface TracingClient { - /** - * Wraps a callback in a tracing span, calls the callback, and closes the span. - * - * This is the primary interface for using Tracing and will handle error recording as well as setting the status on the span. - * - * Both synchronous and asynchronous functions will be awaited in order to reflect the result of the callback on the span. - * - * Example: - * - * ```ts - * const myOperationResult = await tracingClient.withSpan("myClassName.myOperationName", options, (updatedOptions) => myOperation(updatedOptions)); - * ``` - * @param name - The name of the span. By convention this should be `${className}.${methodName}`. - * @param operationOptions - The original options passed to the method. The callback will receive these options with the newly created {@link TracingContext}. - * @param callback - The callback to be invoked with the updated options and newly created {@link TracingSpan}. - */ - withSpan) => ReturnType>(name: string, operationOptions: Options, callback: Callback, spanOptions?: TracingSpanOptions): Promise>>; - /** - * Starts a given span but does not set it as the active span. - * - * You must end the span using {@link TracingSpan.end}. - * - * Most of the time you will want to use {@link withSpan} instead. - * - * @param name - The name of the span. By convention this should be `${className}.${methodName}`. - * @param operationOptions - The original operation options. - * @param spanOptions - The options to use when creating the span. - * - * @returns A {@link TracingSpan} and the updated operation options. - */ - startSpan(name: string, operationOptions?: Options, spanOptions?: TracingSpanOptions): { - span: TracingSpan; - updatedOptions: OptionsWithTracingContext; - }; - /** - * Wraps a callback with an active context and calls the callback. - * Depending on the implementation, this may set the globally available active context. - * - * Useful when you want to leave the boundaries of the SDK (make a request or callback to user code) and are unable to use the {@link withSpan} API. - * - * @param context - The {@link TracingContext} to use as the active context in the scope of the callback. - * @param callback - The callback to be invoked with the given context set as the globally active context. - * @param callbackArgs - The callback arguments. - */ - withContext ReturnType>(context: TracingContext, callback: Callback, ...callbackArgs: CallbackArgs): ReturnType; - /** - * Parses a traceparent header value into a {@link TracingSpanContext}. - * - * @param traceparentHeader - The traceparent header to parse. - * @returns An implementation-specific identifier for the span. - */ - parseTraceparentHeader(traceparentHeader: string): TracingContext | undefined; - /** - * Creates a set of request headers to propagate tracing information to a backend. - * - * @param tracingContext - The context containing the span to propagate. - * @returns The set of headers to add to a request. - */ - createRequestHeaders(tracingContext?: TracingContext): Record; -} - -/** - * Options that can be passed to {@link createTracingClient} - */ -export declare interface TracingClientOptions { - /** The value of the az.namespace tracing attribute on newly created spans. */ - namespace: string; - /** The name of the package invoking this trace. */ - packageName: string; - /** An optional version of the package invoking this trace. */ - packageVersion?: string; -} - -/** An immutable context bag of tracing values for the current operation. */ -export declare interface TracingContext { - /** - * Sets a given object on a context. - * @param key - The key of the given context value. - * @param value - The value to set on the context. - * - * @returns - A new context with the given value set. - */ - setValue(key: symbol, value: unknown): TracingContext; - /** - * Gets an object from the context if it exists. - * @param key - The key of the given context value. - * - * @returns - The value of the given context value if it exists, otherwise `undefined`. - */ - getValue(key: symbol): unknown; - /** - * Deletes an object from the context if it exists. - * @param key - The key of the given context value to delete. - */ - deleteValue(key: symbol): TracingContext; -} - -/** - * Represents an implementation agnostic tracing span. - */ -export declare interface TracingSpan { - /** - * Sets the status of the span. When an error is provided, it will be recorded on the span as well. - * - * @param status - The {@link SpanStatus} to set on the span. - */ - setStatus(status: SpanStatus): void; - /** - * Sets a given attribute on a span. - * - * @param name - The attribute's name. - * @param value - The attribute's value to set. May be any non-nullish value. - */ - setAttribute(name: string, value: unknown): void; - /** - * Ends the span. - */ - end(): void; - /** - * Records an exception on a {@link TracingSpan} without modifying its status. - * - * When recording an unhandled exception that should fail the span, please use {@link TracingSpan.setStatus} instead. - * - * @param exception - The exception to record on the span. - * - */ - recordException(exception: Error | string): void; - /** - * Returns true if this {@link TracingSpan} is recording information. - * - * Depending on the span implementation, this may return false if the span is not being sampled. - */ - isRecording(): boolean; -} - -/** The kind of span. */ -export declare type TracingSpanKind = "client" | "server" | "producer" | "consumer" | "internal"; - -/** A pointer from the current {@link TracingSpan} to another span in the same or a different trace. */ -export declare interface TracingSpanLink { - /** The {@link TracingContext} containing the span context to link to. */ - tracingContext: TracingContext; - /** A set of attributes on the link. */ - attributes?: { - [key: string]: unknown; - }; -} - -/** Options used to configure the newly created span. */ -export declare interface TracingSpanOptions { - /** The kind of span. Implementations should default this to "client". */ - spanKind?: TracingSpanKind; - /** A collection of {@link TracingSpanLink} to link to this span. */ - spanLinks?: TracingSpanLink[]; - /** Initial set of attributes to set on a span. */ - spanAttributes?: { - [key: string]: unknown; - }; -} - -/** - * Extends the Azure SDK with support for a given instrumenter implementation. - * - * @param instrumenter - The instrumenter implementation to use. - */ -export declare function useInstrumenter(instrumenter: Instrumenter): void; - -export { } diff --git a/reverse_engineering/node_modules/@azure/core-util/LICENSE b/reverse_engineering/node_modules/@azure/core-util/LICENSE deleted file mode 100644 index ea8fb15..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@azure/core-util/README.md b/reverse_engineering/node_modules/@azure/core-util/README.md deleted file mode 100644 index 516ba51..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Azure Core Util client library for JavaScript (Experimental) - -This library is intended to provide various shared utility functions for client SDK packages. - -## Getting started - -### Requirements - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. - -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - -### Installation - -This package is primarily used in authoring client SDKs and not meant to be consumed directly by end users. - -## Key concepts - -Utility methods provided by this library should be stateless. - -## Examples - -Examples can be found in the `samples` folder. - -## Next steps - -Look at usage in dependent client SDKs. - -## Troubleshooting - -If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new). - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-util%2FREADME.png) diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/base64.browser.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/base64.browser.js deleted file mode 100644 index 44324ea..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/base64.browser.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Converts a base64 string into a byte array. - * @param content - The base64 string to convert. - * @internal - */ -export function base64ToBytes(content) { - if (typeof atob !== "function") { - throw new Error(`Your browser environment is missing the global "atob" function.`); - } - const binary = atob(content); - const bytes = new Uint8Array(binary.length); - for (let i = 0; i < binary.length; i++) { - bytes[i] = binary.charCodeAt(i); - } - return bytes; -} -/** - * Converts an ArrayBuffer to base64 string. - * @param buffer - Raw binary data. - * @internal - */ -export function bufferToBase64(buffer) { - if (typeof btoa !== "function") { - throw new Error(`Your browser environment is missing the global "btoa" function.`); - } - const bytes = new Uint8Array(buffer); - let binary = ""; - for (const byte of bytes) { - binary += String.fromCharCode(byte); - } - return btoa(binary); -} -//# sourceMappingURL=base64.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/base64.browser.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/base64.browser.js.map deleted file mode 100644 index f06f731..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/base64.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base64.browser.js","sourceRoot":"","sources":["../../src/base64.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;KACpF;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KACjC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAmB;IAChD,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;KACpF;IAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KACrC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\ndeclare global {\n // stub these out for the browser\n function btoa(input: string): string;\n function atob(input: string): string;\n}\n\n/**\n * Converts a base64 string into a byte array.\n * @param content - The base64 string to convert.\n * @internal\n */\nexport function base64ToBytes(content: string): Uint8Array {\n if (typeof atob !== \"function\") {\n throw new Error(`Your browser environment is missing the global \"atob\" function.`);\n }\n\n const binary = atob(content);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n\n return bytes;\n}\n\n/**\n * Converts an ArrayBuffer to base64 string.\n * @param buffer - Raw binary data.\n * @internal\n */\nexport function bufferToBase64(buffer: ArrayBuffer): string {\n if (typeof btoa !== \"function\") {\n throw new Error(`Your browser environment is missing the global \"btoa\" function.`);\n }\n\n const bytes = new Uint8Array(buffer);\n let binary = \"\";\n for (const byte of bytes) {\n binary += String.fromCharCode(byte);\n }\n return btoa(binary);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.browser.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.browser.js deleted file mode 100644 index 14613b5..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.browser.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -export function uint8ArrayToString(bytes, format) { - switch (format) { - case "utf-8": - return uint8ArrayToUtf8String(bytes); - case "base64": - return uint8ArrayToBase64(bytes); - case "base64url": - return uint8ArrayToBase64Url(bytes); - } -} -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -export function stringToUint8Array(value, format) { - switch (format) { - case "utf-8": - return utf8StringToUint8Array(value); - case "base64": - return base64ToUint8Array(value); - case "base64url": - return base64UrlToUint8Array(value); - } -} -/** - * Decodes a Uint8Array into a Base64 string. - * @internal - */ -export function uint8ArrayToBase64(uint8Array) { - const decoder = new TextDecoder(); - const dataString = decoder.decode(uint8Array); - return btoa(dataString); -} -/** - * Decodes a Uint8Array into a Base64Url string. - * @internal - */ -export function uint8ArrayToBase64Url(bytes) { - return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); -} -/** - * Decodes a Uint8Array into a javascript string. - * @internal - */ -export function uint8ArrayToUtf8String(uint8Array) { - const decoder = new TextDecoder("utf-8"); - const dataString = decoder.decode(uint8Array); - return dataString; -} -/** - * Encodes a JavaScript string into a Uint8Array. - * @internal - */ -export function utf8StringToUint8Array(value) { - return new TextEncoder("utf-8").encode(value); -} -/** - * Encodes a Base64 string into a Uint8Array. - * @internal - */ -export function base64ToUint8Array(value) { - return new TextEncoder().encode(atob(value)); -} -/** - * Encodes a Base64Url string into a Uint8Array. - * @internal - */ -export function base64UrlToUint8Array(value) { - const base64String = value.replace(/-/g, "+").replace(/_/g, "/"); - return base64ToUint8Array(base64String); -} -//# sourceMappingURL=bytesEncoding.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.browser.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.browser.js.map deleted file mode 100644 index 6b9d259..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bytesEncoding.browser.js","sourceRoot":"","sources":["../../src/bytesEncoding.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmBlC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAiB,EAAE,MAAoB;IACxE,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;KACvC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa,EAAE,MAAoB;IACpE,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;KACvC;AACH,CAAC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ensed under the MIT license.\n\ndeclare global {\n // stub these out for the browser\n function btoa(input: string): string;\n function atob(input: string): string;\n class TextDecoder {\n constructor(encoding?: string);\n decode(input?: ArrayBufferView | ArrayBuffer): string;\n }\n class TextEncoder {\n constructor(encoding?: string);\n encode(input?: string): Uint8Array;\n }\n}\n\n/** The supported character encoding type */\nexport type EncodingType = \"utf-8\" | \"base64\" | \"base64url\";\n\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes: Uint8Array, format: EncodingType): string {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n }\n}\n\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value: string, format: EncodingType): Uint8Array {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n }\n}\n\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(uint8Array: Uint8Array): string {\n const decoder = new TextDecoder();\n const dataString = decoder.decode(uint8Array);\n return btoa(dataString);\n}\n\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes: Uint8Array): string {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(uint8Array: Uint8Array): string {\n const decoder = new TextDecoder(\"utf-8\");\n const dataString = decoder.decode(uint8Array);\n return dataString;\n}\n\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value: string): Uint8Array {\n return new TextEncoder(\"utf-8\").encode(value);\n}\n\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value: string): Uint8Array {\n return new TextEncoder().encode(atob(value));\n}\n\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value: string): Uint8Array {\n const base64String = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n return base64ToUint8Array(base64String);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.js deleted file mode 100644 index 0d18028..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -export function uint8ArrayToString(bytes, format) { - switch (format) { - case "utf-8": - return uint8ArrayToUtf8String(bytes); - case "base64": - return uint8ArrayToBase64(bytes); - case "base64url": - return uint8ArrayToBase64Url(bytes); - } -} -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -export function stringToUint8Array(value, format) { - switch (format) { - case "utf-8": - return utf8StringToUint8Array(value); - case "base64": - return base64ToUint8Array(value); - case "base64url": - return base64UrlToUint8Array(value); - } -} -/** - * Decodes a Uint8Array into a Base64 string. - * @internal - */ -export function uint8ArrayToBase64(bytes) { - return Buffer.from(bytes).toString("base64"); -} -/** - * Decodes a Uint8Array into a Base64Url string. - * @internal - */ -export function uint8ArrayToBase64Url(bytes) { - return Buffer.from(bytes).toString("base64url"); -} -/** - * Decodes a Uint8Array into a javascript string. - * @internal - */ -export function uint8ArrayToUtf8String(bytes) { - return Buffer.from(bytes).toString("utf-8"); -} -/** - * Encodes a JavaScript string into a Uint8Array. - * @internal - */ -export function utf8StringToUint8Array(value) { - return Buffer.from(value); -} -/** - * Encodes a Base64 string into a Uint8Array. - * @internal - */ -export function base64ToUint8Array(value) { - return Buffer.from(value, "base64"); -} -/** - * Encodes a Base64Url string into a Uint8Array. - * @internal - */ -export function base64UrlToUint8Array(value) { - return Buffer.from(value, "base64url"); -} -//# sourceMappingURL=bytesEncoding.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.js.map deleted file mode 100644 index 12384ff..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bytesEncoding.js","sourceRoot":"","sources":["../../src/bytesEncoding.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAiB,EAAE,MAAoB;IACxE,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;KACvC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa,EAAE,MAAoB;IACpE,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;KACvC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAiB;IAClD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiB;IACrD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAiB;IACtD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAa;IAClD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACzC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** The supported character encoding type */\nexport type EncodingType = \"utf-8\" | \"base64\" | \"base64url\";\n\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes: Uint8Array, format: EncodingType): string {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n }\n}\n\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value: string, format: EncodingType): Uint8Array {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n }\n}\n\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes: Uint8Array): string {\n return Buffer.from(bytes).toString(\"base64\");\n}\n\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes: Uint8Array): string {\n return Buffer.from(bytes).toString(\"base64url\");\n}\n\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes: Uint8Array): string {\n return Buffer.from(bytes).toString(\"utf-8\");\n}\n\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value: string): Uint8Array {\n return Buffer.from(value);\n}\n\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value: string): Uint8Array {\n return Buffer.from(value, \"base64\");\n}\n\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value: string): Uint8Array {\n return Buffer.from(value, \"base64url\");\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js deleted file mode 100644 index 5a89b5f..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -var _a, _b, _c, _d; -/** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -// eslint-disable-next-line @azure/azure-sdk/ts-no-window -export const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Web Worker. - */ -export const isWebWorker = typeof self === "object" && - typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && - (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || - ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || - ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -export const isNode = typeof process !== "undefined" && Boolean(process.version) && Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node); -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -export const isDeno = typeof Deno !== "undefined" && - typeof Deno.version !== "undefined" && - typeof Deno.version.deno !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -export const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is in React-Native. - */ -// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js -export const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; -//# sourceMappingURL=checkEnvironment.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js.map deleted file mode 100644 index c749f4f..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"checkEnvironment.js","sourceRoot":"","sources":["../../src/checkEnvironment.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAqClC;;GAEG;AACH,yDAAyD;AACzD,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GACtB,OAAO,IAAI,KAAK,QAAQ;IACxB,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,aAAa,CAAA,KAAK,UAAU;IACzC,CAAC,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,MAAK,4BAA4B;QACtD,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,MAAK,0BAA0B;QACrD,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,MAAK,yBAAyB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GACjB,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAA,OAAO,CAAC,QAAQ,0CAAE,IAAI,CAAC,CAAC;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GACjB,OAAO,IAAI,KAAK,WAAW;IAC3B,OAAO,IAAI,CAAC,OAAO,KAAK,WAAW;IACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,WAAW,CAAC;AAEtF;;GAEG;AACH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,aAAa,GACxB,OAAO,SAAS,KAAK,WAAW,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,MAAK,aAAa,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\ndeclare global {\n interface Window {\n document: unknown;\n }\n\n interface DedicatedWorkerGlobalScope {\n constructor: {\n name: string;\n };\n\n importScripts: (...paths: string[]) => void;\n }\n\n interface Navigator {\n product: string;\n }\n\n interface DenoGlobal {\n version: {\n deno: string;\n };\n }\n\n interface BunGlobal {\n version: string;\n }\n\n // eslint-disable-next-line @azure/azure-sdk/ts-no-window\n const window: Window;\n const self: DedicatedWorkerGlobalScope;\n const Deno: DenoGlobal;\n const Bun: BunGlobal;\n const navigator: Navigator;\n}\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker =\n typeof self === \"object\" &&\n typeof self?.importScripts === \"function\" &&\n (self.constructor?.name === \"DedicatedWorkerGlobalScope\" ||\n self.constructor?.name === \"ServiceWorkerGlobalScope\" ||\n self.constructor?.name === \"SharedWorkerGlobalScope\");\n\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNode =\n typeof process !== \"undefined\" && Boolean(process.version) && Boolean(process.versions?.node);\n\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno =\n typeof Deno !== \"undefined\" &&\n typeof Deno.version !== \"undefined\" &&\n typeof Deno.version.deno !== \"undefined\";\n\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun = typeof Bun !== \"undefined\" && typeof Bun.version !== \"undefined\";\n\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\n// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js\nexport const isReactNative =\n typeof navigator !== \"undefined\" && navigator?.product === \"ReactNative\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/createAbortablePromise.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/createAbortablePromise.js deleted file mode 100644 index 28c0d5a..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/createAbortablePromise.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { AbortError } from "@azure/abort-controller"; -/** - * Creates an abortable promise. - * @param buildPromise - A function that takes the resolve and reject functions as parameters. - * @param options - The options for the abortable promise. - * @returns A promise that can be aborted. - */ -export function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve, reject) => { - function rejectOnAbort() { - reject(new AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } - catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); -} -//# sourceMappingURL=createAbortablePromise.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/createAbortablePromise.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/createAbortablePromise.js.map deleted file mode 100644 index f6e2d79..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/createAbortablePromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createAbortablePromise.js","sourceRoot":"","sources":["../../src/createAbortablePromise.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AActE;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,YAGS,EACT,OAAuC;IAEvC,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;IACzE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,SAAS,aAAa;YACpB,MAAM,CAAC,IAAI,UAAU,CAAC,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,4BAA4B,CAAC,CAAC,CAAC;QACxE,CAAC;QACD,SAAS,eAAe;YACtB,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrD,CAAC;QACD,SAAS,OAAO;YACd,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,EAAI,CAAC;YACvB,eAAe,EAAE,CAAC;YAClB,aAAa,EAAE,CAAC;QAClB,CAAC;QACD,IAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,EAAE;YACxB,OAAO,aAAa,EAAE,CAAC;SACxB;QACD,IAAI;YACF,YAAY,CACV,CAAC,CAAC,EAAE,EAAE;gBACJ,eAAe,EAAE,CAAC;gBAClB,OAAO,CAAC,CAAC,CAAC,CAAC;YACb,CAAC,EACD,CAAC,CAAC,EAAE,EAAE;gBACJ,eAAe,EAAE,CAAC;gBAClB,MAAM,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC,CACF,CAAC;SACH;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,CAAC,GAAG,CAAC,CAAC;SACb;QACD,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError, AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options for the createAbortablePromise function.\n */\nexport interface CreateAbortablePromiseOptions {\n /** A function to be called if the promise was aborted */\n cleanupBeforeAbort?: () => void;\n /** An abort signal */\n abortSignal?: AbortSignalLike;\n /** An abort error message */\n abortErrorMsg?: string;\n}\n\n/**\n * Creates an abortable promise.\n * @param buildPromise - A function that takes the resolve and reject functions as parameters.\n * @param options - The options for the abortable promise.\n * @returns A promise that can be aborted.\n */\nexport function createAbortablePromise(\n buildPromise: (\n resolve: (value: T | PromiseLike) => void,\n reject: (reason?: any) => void\n ) => void,\n options?: CreateAbortablePromiseOptions\n): Promise {\n const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {};\n return new Promise((resolve, reject) => {\n function rejectOnAbort(): void {\n reject(new AbortError(abortErrorMsg ?? \"The operation was aborted.\"));\n }\n function removeListeners(): void {\n abortSignal?.removeEventListener(\"abort\", onAbort);\n }\n function onAbort(): void {\n cleanupBeforeAbort?.();\n removeListeners();\n rejectOnAbort();\n }\n if (abortSignal?.aborted) {\n return rejectOnAbort();\n }\n try {\n buildPromise(\n (x) => {\n removeListeners();\n resolve(x);\n },\n (x) => {\n removeListeners();\n reject(x);\n }\n );\n } catch (err) {\n reject(err);\n }\n abortSignal?.addEventListener(\"abort\", onAbort);\n });\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/delay.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/delay.js deleted file mode 100644 index 42003ee..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/delay.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createAbortablePromise } from "./createAbortablePromise"; -const StandardAbortMessage = "The delay was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. - * @param timeInMs - The number of milliseconds to be delayed. - * @param options - The options for delay - currently abort options - * @returns Promise that is resolved after timeInMs - */ -export function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return createAbortablePromise((resolve) => { - token = setTimeout(resolve, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage, - }); -} -//# sourceMappingURL=delay.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/delay.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/delay.js.map deleted file mode 100644 index d211527..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/delay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../src/delay.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAgBtD;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,QAAgB,EAAE,OAAsB;IAC5D,IAAI,KAAoC,CAAC;IACzC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;IACrD,OAAO,sBAAsB,CAC3B,CAAC,OAAO,EAAE,EAAE;QACV,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC,EACD;QACE,kBAAkB,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;QAC7C,WAAW;QACX,aAAa,EAAE,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,oBAAoB;KACrD,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { createAbortablePromise } from \"./createAbortablePromise\";\n\nconst StandardAbortMessage = \"The delay was aborted.\";\n\n/**\n * Options for support abort functionality for the delay method\n */\nexport interface DelayOptions {\n /**\n * The abortSignal associated with containing operation.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The abort error message associated with containing operation.\n */\n abortErrorMsg?: string;\n}\n\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs: number, options?: DelayOptions): Promise {\n let token: ReturnType;\n const { abortSignal, abortErrorMsg } = options ?? {};\n return createAbortablePromise(\n (resolve) => {\n token = setTimeout(resolve, timeInMs);\n },\n {\n cleanupBeforeAbort: () => clearTimeout(token),\n abortSignal,\n abortErrorMsg: abortErrorMsg ?? StandardAbortMessage,\n }\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/error.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/error.js deleted file mode 100644 index 55f1862..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/error.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { isObject } from "./object"; -/** - * Typeguard for an error object shape (has name and message) - * @param e - Something caught by a catch clause. - */ -export function isError(e) { - if (isObject(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; -} -/** - * Given what is thought to be an error object, return the message if possible. - * If the message is missing, returns a stringified version of the input. - * @param e - Something thrown from a try block - * @returns The error message or a string of the input - */ -export function getErrorMessage(e) { - if (isError(e)) { - return e.message; - } - else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } - else { - stringified = String(e); - } - } - catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } -} -//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/error.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/error.js.map deleted file mode 100644 index 4b7c633..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,CAAU;IAChC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;QACf,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;QAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC;QACjD,OAAO,OAAO,IAAI,UAAU,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,CAAU;IACxC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;QACd,OAAO,CAAC,CAAC,OAAO,CAAC;KAClB;SAAM;QACL,IAAI,WAAmB,CAAC;QACxB,IAAI;YACF,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,EAAE;gBAC9B,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;aACjC;iBAAM;gBACL,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;aACzB;SACF;QAAC,OAAO,GAAQ,EAAE;YACjB,WAAW,GAAG,6BAA6B,CAAC;SAC7C;QACD,OAAO,iBAAiB,WAAW,EAAE,CAAC;KACvC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isObject } from \"./object\";\n\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nexport function isError(e: unknown): e is Error {\n if (isObject(e)) {\n const hasName = typeof e.name === \"string\";\n const hasMessage = typeof e.message === \"string\";\n return hasName && hasMessage;\n }\n return false;\n}\n\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nexport function getErrorMessage(e: unknown): string {\n if (isError(e)) {\n return e.message;\n } else {\n let stringified: string;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n } else {\n stringified = String(e);\n }\n } catch (err: any) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/hex.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/hex.js deleted file mode 100644 index 13502ef..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/hex.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Converts an ArrayBuffer to a hexadecimal string. - * @param buffer - Raw binary data. - * @internal - */ -export function bufferToHex(buffer) { - const bytes = new Uint8Array(buffer); - return Array.prototype.map.call(bytes, byteToHex).join(""); -} -/** - * Converts a byte to a hexadecimal string. - * @param byte - An integer representation of a byte. - * @internal - */ -function byteToHex(byte) { - const hex = byte.toString(16); - return hex.length === 2 ? hex : `0${hex}`; -} -//# sourceMappingURL=hex.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/hex.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/hex.js.map deleted file mode 100644 index 704dfab..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/hex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hex.js","sourceRoot":"","sources":["../../src/hex.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAmB;IAC7C,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,OAAO,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC9B,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Converts an ArrayBuffer to a hexadecimal string.\n * @param buffer - Raw binary data.\n * @internal\n */\nexport function bufferToHex(buffer: ArrayBuffer): string {\n const bytes = new Uint8Array(buffer);\n return Array.prototype.map.call(bytes, byteToHex).join(\"\");\n}\n\n/**\n * Converts a byte to a hexadecimal string.\n * @param byte - An integer representation of a byte.\n * @internal\n */\nfunction byteToHex(byte: number): string {\n const hex = byte.toString(16);\n return hex.length === 2 ? hex : `0${hex}`;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/index.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/index.js deleted file mode 100644 index 97be0f4..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/index.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { delay } from "./delay"; -export { createAbortablePromise } from "./createAbortablePromise"; -export { getRandomIntegerInclusive } from "./random"; -export { isObject } from "./object"; -export { isError, getErrorMessage } from "./error"; -export { computeSha256Hash, computeSha256Hmac } from "./sha256"; -export { isDefined, isObjectWithProperties, objectHasProperty } from "./typeGuards"; -export { randomUUID } from "./uuidUtils"; -export { isBrowser, isBun, isNode, isDeno, isReactNative, isWebWorker } from "./checkEnvironment"; -export { uint8ArrayToString, stringToUint8Array } from "./bytesEncoding"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/index.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/index.js.map deleted file mode 100644 index 7d2e071..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAiC,MAAM,0BAA0B,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAiB,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAgB,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { delay, DelayOptions } from \"./delay\";\nexport { createAbortablePromise, CreateAbortablePromiseOptions } from \"./createAbortablePromise\";\nexport { getRandomIntegerInclusive } from \"./random\";\nexport { isObject, UnknownObject } from \"./object\";\nexport { isError, getErrorMessage } from \"./error\";\nexport { computeSha256Hash, computeSha256Hmac } from \"./sha256\";\nexport { isDefined, isObjectWithProperties, objectHasProperty } from \"./typeGuards\";\nexport { randomUUID } from \"./uuidUtils\";\nexport { isBrowser, isBun, isNode, isDeno, isReactNative, isWebWorker } from \"./checkEnvironment\";\nexport { uint8ArrayToString, stringToUint8Array, EncodingType } from \"./bytesEncoding\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/object.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/object.js deleted file mode 100644 index ff04af8..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/object.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Helper to determine when an input is a generic JS object. - * @returns true when input is an object type that is not null, Array, RegExp, or Date. - */ -export function isObject(input) { - return (typeof input === "object" && - input !== null && - !Array.isArray(input) && - !(input instanceof RegExp) && - !(input instanceof Date)); -} -//# sourceMappingURL=object.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/object.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/object.js.map deleted file mode 100644 index 3a5f096..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/object.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"object.js","sourceRoot":"","sources":["../../src/object.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,CAAC,CAAC,KAAK,YAAY,MAAM,CAAC;QAC1B,CAAC,CAAC,KAAK,YAAY,IAAI,CAAC,CACzB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * A generic shape for a plain JS object.\n */\nexport type UnknownObject = { [s: string]: unknown };\n\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nexport function isObject(input: unknown): input is UnknownObject {\n return (\n typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date)\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/random.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/random.js deleted file mode 100644 index aef3288..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/random.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Returns a random integer value between a lower and upper bound, - * inclusive of both bounds. - * Note that this uses Math.random and isn't secure. If you need to use - * this for any kind of security purpose, find a better source of random. - * @param min - The smallest integer value allowed. - * @param max - The largest integer value allowed. - */ -export function getRandomIntegerInclusive(min, max) { - // Make sure inputs are integers. - min = Math.ceil(min); - max = Math.floor(max); - // Pick a random offset from zero to the size of the range. - // Since Math.random() can never return 1, we have to make the range one larger - // in order to be inclusive of the maximum value after we take the floor. - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; -} -//# sourceMappingURL=random.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/random.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/random.js.map deleted file mode 100644 index 93d4d74..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/random.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.js","sourceRoot":"","sources":["../../src/random.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAAW,EAAE,GAAW;IAChE,iCAAiC;IACjC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtB,2DAA2D;IAC3D,+EAA+E;IAC/E,yEAAyE;IACzE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,MAAM,GAAG,GAAG,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nexport function getRandomIntegerInclusive(min: number, max: number): number {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.browser.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.browser.js deleted file mode 100644 index 3cdba8e..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.browser.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { base64ToBytes, bufferToBase64 } from "./base64.browser"; -import { bufferToHex } from "./hex"; -import { utf8ToBytes } from "./utf8.browser"; -let subtleCrypto; -/** - * Returns a cached reference to the Web API crypto.subtle object. - * @internal - */ -function getCrypto() { - if (subtleCrypto) { - return subtleCrypto; - } - if (!self.crypto || !self.crypto.subtle) { - throw new Error("Your browser environment does not support cryptography functions."); - } - subtleCrypto = self.crypto.subtle; - return subtleCrypto; -} -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -export async function computeSha256Hmac(key, stringToSign, encoding) { - const crypto = getCrypto(); - const keyBytes = base64ToBytes(key); - const stringToSignBytes = utf8ToBytes(stringToSign); - const cryptoKey = await crypto.importKey("raw", keyBytes, { - name: "HMAC", - hash: { name: "SHA-256" }, - }, false, ["sign"]); - const signature = await crypto.sign({ - name: "HMAC", - hash: { name: "SHA-256" }, - }, cryptoKey, stringToSignBytes); - switch (encoding) { - case "base64": - return bufferToBase64(signature); - case "hex": - return bufferToHex(signature); - } -} -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -export async function computeSha256Hash(content, encoding) { - const contentBytes = utf8ToBytes(content); - const digest = await getCrypto().digest({ name: "SHA-256" }, contentBytes); - switch (encoding) { - case "base64": - return bufferToBase64(digest); - case "hex": - return bufferToHex(digest); - } -} -//# sourceMappingURL=sha256.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.browser.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.browser.js.map deleted file mode 100644 index a92331f..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.browser.js","sourceRoot":"","sources":["../../src/sha256.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA6C7C,IAAI,YAAsC,CAAC;AAE3C;;;GAGG;AACH,SAAS,SAAS;IAChB,IAAI,YAAY,EAAE;QAChB,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I,EAAE,SAAS,EAAE,EAAE,YAAY,CAAC,CAAC;IAE3E,QAAQ,QAAQ,EAAE;QAChB,KAAK,QAAQ;YACX,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;QAChC,KAAK,KAAK;YACR,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;KAC9B;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { base64ToBytes, bufferToBase64 } from \"./base64.browser\";\nimport { bufferToHex } from \"./hex\";\nimport { utf8ToBytes } from \"./utf8.browser\";\n\n// stubs for browser self.crypto\ninterface JsonWebKey {}\ninterface CryptoKey {}\ntype KeyUsage =\n | \"decrypt\"\n | \"deriveBits\"\n | \"deriveKey\"\n | \"encrypt\"\n | \"sign\"\n | \"unwrapKey\"\n | \"verify\"\n | \"wrapKey\";\ninterface Algorithm {\n name: string;\n}\ninterface SubtleCrypto {\n importKey(\n format: string,\n keyData: JsonWebKey,\n algorithm: HmacImportParams,\n extractable: boolean,\n usage: KeyUsage[]\n ): Promise;\n sign(\n algorithm: HmacImportParams,\n key: CryptoKey,\n data: ArrayBufferView | ArrayBuffer\n ): Promise;\n digest(algorithm: Algorithm, data: ArrayBufferView | ArrayBuffer): Promise;\n}\ninterface Crypto {\n readonly subtle: SubtleCrypto;\n getRandomValues(array: T): T;\n}\ndeclare const self: {\n crypto: Crypto;\n};\ninterface HmacImportParams {\n name: string;\n hash: Algorithm;\n length?: number;\n}\n\nlet subtleCrypto: SubtleCrypto | undefined;\n\n/**\n * Returns a cached reference to the Web API crypto.subtle object.\n * @internal\n */\nfunction getCrypto(): SubtleCrypto {\n if (subtleCrypto) {\n return subtleCrypto;\n }\n\n if (!self.crypto || !self.crypto.subtle) {\n throw new Error(\"Your browser environment does not support cryptography functions.\");\n }\n\n subtleCrypto = self.crypto.subtle;\n return subtleCrypto;\n}\n\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(\n key: string,\n stringToSign: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n const crypto = getCrypto();\n const keyBytes = base64ToBytes(key);\n const stringToSignBytes = utf8ToBytes(stringToSign);\n\n const cryptoKey = await crypto.importKey(\n \"raw\",\n keyBytes,\n {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n },\n false,\n [\"sign\"]\n );\n const signature = await crypto.sign(\n {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n },\n cryptoKey,\n stringToSignBytes\n );\n\n switch (encoding) {\n case \"base64\":\n return bufferToBase64(signature);\n case \"hex\":\n return bufferToHex(signature);\n }\n}\n\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(\n content: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n const contentBytes = utf8ToBytes(content);\n const digest = await getCrypto().digest({ name: \"SHA-256\" }, contentBytes);\n\n switch (encoding) {\n case \"base64\":\n return bufferToBase64(digest);\n case \"hex\":\n return bufferToHex(digest);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.js deleted file mode 100644 index 6704d38..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createHash, createHmac } from "crypto"; -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -export async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return createHmac("sha256", decodedKey).update(stringToSign).digest(encoding); -} -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -export async function computeSha256Hash(content, encoding) { - return createHash("sha256").update(content).digest(encoding); -} -//# sourceMappingURL=sha256.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.js.map deleted file mode 100644 index f21f808..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/sha256.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sha256.js","sourceRoot":"","sources":["../../src/sha256.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAW,EACX,YAAoB,EACpB,QAA0B;IAE1B,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAE9C,OAAO,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAChF,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,QAA0B;IAE1B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createHash, createHmac } from \"crypto\";\n\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(\n key: string,\n stringToSign: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n const decodedKey = Buffer.from(key, \"base64\");\n\n return createHmac(\"sha256\", decodedKey).update(stringToSign).digest(encoding);\n}\n\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(\n content: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n return createHash(\"sha256\").update(content).digest(encoding);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/typeGuards.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/typeGuards.js deleted file mode 100644 index f45852d..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/typeGuards.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Helper TypeGuard that checks if something is defined or not. - * @param thing - Anything - */ -export function isDefined(thing) { - return typeof thing !== "undefined" && thing !== null; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified properties. - * @param thing - Anything. - * @param properties - The name of the properties that should appear in the object. - */ -export function isObjectWithProperties(thing, properties) { - if (!isDefined(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified property. - * @param thing - Any object. - * @param property - The name of the property that should appear in the object. - */ -export function objectHasProperty(thing, property) { - return (isDefined(thing) && typeof thing === "object" && property in thing); -} -//# sourceMappingURL=typeGuards.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/typeGuards.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/typeGuards.js.map deleted file mode 100644 index 04e168f..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/typeGuards.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../../src/typeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAI,KAA2B;IACtD,OAAO,OAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,IAAI,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAY,EACZ,UAA0B;IAE1B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAClD,OAAO,KAAK,CAAC;KACd;IAED,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE;QACjC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;YACvC,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAY,EACZ,QAAsB;IAEtB,OAAO,CACL,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAK,KAAiC,CAChG,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n */\nexport function isDefined(thing: T | undefined | null): thing is T {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n */\nexport function isObjectWithProperties(\n thing: Thing,\n properties: PropertyName[]\n): thing is Thing & Record {\n if (!isDefined(thing) || typeof thing !== \"object\") {\n return false;\n }\n\n for (const property of properties) {\n if (!objectHasProperty(thing, property)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n */\nexport function objectHasProperty(\n thing: Thing,\n property: PropertyName\n): thing is Thing & Record {\n return (\n isDefined(thing) && typeof thing === \"object\" && property in (thing as Record)\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/utf8.browser.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/utf8.browser.js deleted file mode 100644 index f31af48..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/utf8.browser.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -let encoder; -/** - * Returns a cached TextEncoder. - * @internal - */ -function getTextEncoder() { - if (encoder) { - return encoder; - } - if (typeof TextEncoder === "undefined") { - throw new Error(`Your browser environment is missing "TextEncoder".`); - } - encoder = new TextEncoder(); - return encoder; -} -/** - * Converts a utf8 string into a byte array. - * @param content - The utf8 string to convert. - * @internal - */ -export function utf8ToBytes(content) { - return getTextEncoder().encode(content); -} -//# sourceMappingURL=utf8.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/utf8.browser.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/utf8.browser.js.map deleted file mode 100644 index 2c6588b..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/utf8.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utf8.browser.js","sourceRoot":"","sources":["../../src/utf8.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,IAAI,OAAgC,CAAC;AAErC;;;GAGG;AACH,SAAS,cAAc;IACrB,IAAI,OAAO,EAAE;QACX,OAAO,OAAO,CAAC;KAChB;IAED,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE;QACtC,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;KACvE;IAED,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAC5B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,OAAO,cAAc,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// stubs for browser TextEncoder\ninterface TextEncoder {\n encode(input?: string): Uint8Array;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\ndeclare const TextEncoder: {\n prototype: TextEncoder;\n new (): TextEncoder;\n};\n\nlet encoder: TextEncoder | undefined;\n\n/**\n * Returns a cached TextEncoder.\n * @internal\n */\nfunction getTextEncoder(): TextEncoder {\n if (encoder) {\n return encoder;\n }\n\n if (typeof TextEncoder === \"undefined\") {\n throw new Error(`Your browser environment is missing \"TextEncoder\".`);\n }\n\n encoder = new TextEncoder();\n return encoder;\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function utf8ToBytes(content: string): Uint8Array {\n return getTextEncoder().encode(content);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.browser.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.browser.js deleted file mode 100644 index cc7abe1..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.browser.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -var _a; -import { generateUUID } from "./uuidUtils.native"; -// NOTE: This could be undefined if not used in a secure context -const uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" - ? globalThis.crypto.randomUUID.bind(globalThis.crypto) - : generateUUID; -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -export function randomUUID() { - return uuidFunction(); -} -//# sourceMappingURL=uuidUtils.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.browser.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.browser.js.map deleted file mode 100644 index 20112b4..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uuidUtils.browser.js","sourceRoot":"","sources":["../../src/uuidUtils.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAUlD,gEAAgE;AAChE,MAAM,YAAY,GAChB,OAAO,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,0CAAE,UAAU,CAAA,KAAK,UAAU;IAClD,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IACtD,CAAC,CAAC,YAAY,CAAC;AAEnB;;;;GAIG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,YAAY,EAAE,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { generateUUID } from \"./uuidUtils.native\";\n\ninterface Crypto {\n randomUUID(): string;\n}\n\ndeclare const globalThis: {\n crypto: Crypto;\n};\n\n// NOTE: This could be undefined if not used in a secure context\nconst uuidFunction =\n typeof globalThis?.crypto?.randomUUID === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : generateUUID;\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return uuidFunction();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.js deleted file mode 100644 index 206a9f9..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -var _a; -import { randomUUID as v4RandomUUID } from "crypto"; -import { generateUUID } from "./uuidUtils.native"; -// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+. -let uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" - ? globalThis.crypto.randomUUID.bind(globalThis.crypto) - : v4RandomUUID; -// Not defined in earlier versions of Node.js 14 -if (!uuidFunction) { - uuidFunction = generateUUID; -} -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -export function randomUUID() { - return uuidFunction(); -} -//# sourceMappingURL=uuidUtils.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.js.map deleted file mode 100644 index 8e2a3b7..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uuidUtils.js","sourceRoot":"","sources":["../../src/uuidUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAUlD,6FAA6F;AAC7F,IAAI,YAAY,GACd,OAAO,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,0CAAE,UAAU,CAAA,KAAK,UAAU;IAClD,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IACtD,CAAC,CAAC,YAAY,CAAC;AAEnB,gDAAgD;AAChD,IAAI,CAAC,YAAY,EAAE;IACjB,YAAY,GAAG,YAAY,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,YAAY,EAAE,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { randomUUID as v4RandomUUID } from \"crypto\";\nimport { generateUUID } from \"./uuidUtils.native\";\n\ninterface Crypto {\n randomUUID(): string;\n}\n\ndeclare const globalThis: {\n crypto: Crypto;\n};\n\n// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+.\nlet uuidFunction =\n typeof globalThis?.crypto?.randomUUID === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : v4RandomUUID;\n\n// Not defined in earlier versions of Node.js 14\nif (!uuidFunction) {\n uuidFunction = generateUUID;\n}\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return uuidFunction();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.native.js b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.native.js deleted file mode 100644 index 9e1e24d..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.native.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/* - * NOTE: When moving this file, please update "react-native" section in package.json. - */ -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -export function generateUUID() { - let uuid = ""; - for (let i = 0; i < 32; i++) { - // Generate a random number between 0 and 15 - const randomNumber = Math.floor(Math.random() * 16); - // Set the UUID version to 4 in the 13th position - if (i === 12) { - uuid += "4"; - } - else if (i === 16) { - // Set the UUID variant to "10" in the 17th position - uuid += (randomNumber & 0x3) | 0x8; - } - else { - // Add a random hexadecimal digit to the UUID string - uuid += randomNumber.toString(16); - } - // Add hyphens to the UUID string at the appropriate positions - if (i === 7 || i === 11 || i === 15 || i === 19) { - uuid += "-"; - } - } - return uuid; -} -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -export function randomUUID() { - return generateUUID(); -} -//# sourceMappingURL=uuidUtils.native.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.native.js.map b/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.native.js.map deleted file mode 100644 index 6b18387..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist-esm/src/uuidUtils.native.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uuidUtils.native.js","sourceRoot":"","sources":["../../src/uuidUtils.native.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AAEH;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QAC3B,4CAA4C;QAC5C,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACpD,iDAAiD;QACjD,IAAI,CAAC,KAAK,EAAE,EAAE;YACZ,IAAI,IAAI,GAAG,CAAC;SACb;aAAM,IAAI,CAAC,KAAK,EAAE,EAAE;YACnB,oDAAoD;YACpD,IAAI,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;SACpC;aAAM;YACL,oDAAoD;YACpD,IAAI,IAAI,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;SACnC;QACD,8DAA8D;QAC9D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE;YAC/C,IAAI,IAAI,GAAG,CAAC;SACb;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,YAAY,EAAE,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"react-native\" section in package.json.\n */\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function generateUUID(): string {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n } else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += (randomNumber & 0x3) | 0x8;\n } else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return generateUUID();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/dist/index.js b/reverse_engineering/node_modules/@azure/core-util/dist/index.js deleted file mode 100644 index 22d406a..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist/index.js +++ /dev/null @@ -1,385 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var abortController = require('@azure/abort-controller'); -var crypto = require('crypto'); - -// Copyright (c) Microsoft Corporation. -/** - * Creates an abortable promise. - * @param buildPromise - A function that takes the resolve and reject functions as parameters. - * @param options - The options for the abortable promise. - * @returns A promise that can be aborted. - */ -function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve, reject) => { - function rejectOnAbort() { - reject(new abortController.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } - catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); -} - -// Copyright (c) Microsoft Corporation. -const StandardAbortMessage = "The delay was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. - * @param timeInMs - The number of milliseconds to be delayed. - * @param options - The options for delay - currently abort options - * @returns Promise that is resolved after timeInMs - */ -function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return createAbortablePromise((resolve) => { - token = setTimeout(resolve, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage, - }); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Returns a random integer value between a lower and upper bound, - * inclusive of both bounds. - * Note that this uses Math.random and isn't secure. If you need to use - * this for any kind of security purpose, find a better source of random. - * @param min - The smallest integer value allowed. - * @param max - The largest integer value allowed. - */ -function getRandomIntegerInclusive(min, max) { - // Make sure inputs are integers. - min = Math.ceil(min); - max = Math.floor(max); - // Pick a random offset from zero to the size of the range. - // Since Math.random() can never return 1, we have to make the range one larger - // in order to be inclusive of the maximum value after we take the floor. - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Helper to determine when an input is a generic JS object. - * @returns true when input is an object type that is not null, Array, RegExp, or Date. - */ -function isObject(input) { - return (typeof input === "object" && - input !== null && - !Array.isArray(input) && - !(input instanceof RegExp) && - !(input instanceof Date)); -} - -// Copyright (c) Microsoft Corporation. -/** - * Typeguard for an error object shape (has name and message) - * @param e - Something caught by a catch clause. - */ -function isError(e) { - if (isObject(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; -} -/** - * Given what is thought to be an error object, return the message if possible. - * If the message is missing, returns a stringified version of the input. - * @param e - Something thrown from a try block - * @returns The error message or a string of the input - */ -function getErrorMessage(e) { - if (isError(e)) { - return e.message; - } - else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } - else { - stringified = String(e); - } - } - catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } -} - -// Copyright (c) Microsoft Corporation. -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return crypto.createHmac("sha256", decodedKey).update(stringToSign).digest(encoding); -} -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -async function computeSha256Hash(content, encoding) { - return crypto.createHash("sha256").update(content).digest(encoding); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Helper TypeGuard that checks if something is defined or not. - * @param thing - Anything - */ -function isDefined(thing) { - return typeof thing !== "undefined" && thing !== null; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified properties. - * @param thing - Anything. - * @param properties - The name of the properties that should appear in the object. - */ -function isObjectWithProperties(thing, properties) { - if (!isDefined(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified property. - * @param thing - Any object. - * @param property - The name of the property that should appear in the object. - */ -function objectHasProperty(thing, property) { - return (isDefined(thing) && typeof thing === "object" && property in thing); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/* - * NOTE: When moving this file, please update "react-native" section in package.json. - */ -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -function generateUUID() { - let uuid = ""; - for (let i = 0; i < 32; i++) { - // Generate a random number between 0 and 15 - const randomNumber = Math.floor(Math.random() * 16); - // Set the UUID version to 4 in the 13th position - if (i === 12) { - uuid += "4"; - } - else if (i === 16) { - // Set the UUID variant to "10" in the 17th position - uuid += (randomNumber & 0x3) | 0x8; - } - else { - // Add a random hexadecimal digit to the UUID string - uuid += randomNumber.toString(16); - } - // Add hyphens to the UUID string at the appropriate positions - if (i === 7 || i === 11 || i === 15 || i === 19) { - uuid += "-"; - } - } - return uuid; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -var _a$1; -// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+. -let uuidFunction = typeof ((_a$1 = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a$1 === void 0 ? void 0 : _a$1.randomUUID) === "function" - ? globalThis.crypto.randomUUID.bind(globalThis.crypto) - : crypto.randomUUID; -// Not defined in earlier versions of Node.js 14 -if (!uuidFunction) { - uuidFunction = generateUUID; -} -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -function randomUUID() { - return uuidFunction(); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -var _a, _b, _c, _d; -/** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -// eslint-disable-next-line @azure/azure-sdk/ts-no-window -const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Web Worker. - */ -const isWebWorker = typeof self === "object" && - typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && - (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || - ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || - ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -const isNode = typeof process !== "undefined" && Boolean(process.version) && Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node); -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -const isDeno = typeof Deno !== "undefined" && - typeof Deno.version !== "undefined" && - typeof Deno.version.deno !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is in React-Native. - */ -// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js -const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -function uint8ArrayToString(bytes, format) { - switch (format) { - case "utf-8": - return uint8ArrayToUtf8String(bytes); - case "base64": - return uint8ArrayToBase64(bytes); - case "base64url": - return uint8ArrayToBase64Url(bytes); - } -} -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -function stringToUint8Array(value, format) { - switch (format) { - case "utf-8": - return utf8StringToUint8Array(value); - case "base64": - return base64ToUint8Array(value); - case "base64url": - return base64UrlToUint8Array(value); - } -} -/** - * Decodes a Uint8Array into a Base64 string. - * @internal - */ -function uint8ArrayToBase64(bytes) { - return Buffer.from(bytes).toString("base64"); -} -/** - * Decodes a Uint8Array into a Base64Url string. - * @internal - */ -function uint8ArrayToBase64Url(bytes) { - return Buffer.from(bytes).toString("base64url"); -} -/** - * Decodes a Uint8Array into a javascript string. - * @internal - */ -function uint8ArrayToUtf8String(bytes) { - return Buffer.from(bytes).toString("utf-8"); -} -/** - * Encodes a JavaScript string into a Uint8Array. - * @internal - */ -function utf8StringToUint8Array(value) { - return Buffer.from(value); -} -/** - * Encodes a Base64 string into a Uint8Array. - * @internal - */ -function base64ToUint8Array(value) { - return Buffer.from(value, "base64"); -} -/** - * Encodes a Base64Url string into a Uint8Array. - * @internal - */ -function base64UrlToUint8Array(value) { - return Buffer.from(value, "base64url"); -} - -exports.computeSha256Hash = computeSha256Hash; -exports.computeSha256Hmac = computeSha256Hmac; -exports.createAbortablePromise = createAbortablePromise; -exports.delay = delay; -exports.getErrorMessage = getErrorMessage; -exports.getRandomIntegerInclusive = getRandomIntegerInclusive; -exports.isBrowser = isBrowser; -exports.isBun = isBun; -exports.isDefined = isDefined; -exports.isDeno = isDeno; -exports.isError = isError; -exports.isNode = isNode; -exports.isObject = isObject; -exports.isObjectWithProperties = isObjectWithProperties; -exports.isReactNative = isReactNative; -exports.isWebWorker = isWebWorker; -exports.objectHasProperty = objectHasProperty; -exports.randomUUID = randomUUID; -exports.stringToUint8Array = stringToUint8Array; -exports.uint8ArrayToString = uint8ArrayToString; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/@azure/core-util/dist/index.js.map b/reverse_engineering/node_modules/@azure/core-util/dist/index.js.map deleted file mode 100644 index 254a04c..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/createAbortablePromise.ts","../src/delay.ts","../src/random.ts","../src/object.ts","../src/error.ts","../src/sha256.ts","../src/typeGuards.ts","../src/uuidUtils.native.ts","../src/uuidUtils.ts","../src/checkEnvironment.ts","../src/bytesEncoding.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError, AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options for the createAbortablePromise function.\n */\nexport interface CreateAbortablePromiseOptions {\n /** A function to be called if the promise was aborted */\n cleanupBeforeAbort?: () => void;\n /** An abort signal */\n abortSignal?: AbortSignalLike;\n /** An abort error message */\n abortErrorMsg?: string;\n}\n\n/**\n * Creates an abortable promise.\n * @param buildPromise - A function that takes the resolve and reject functions as parameters.\n * @param options - The options for the abortable promise.\n * @returns A promise that can be aborted.\n */\nexport function createAbortablePromise(\n buildPromise: (\n resolve: (value: T | PromiseLike) => void,\n reject: (reason?: any) => void\n ) => void,\n options?: CreateAbortablePromiseOptions\n): Promise {\n const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {};\n return new Promise((resolve, reject) => {\n function rejectOnAbort(): void {\n reject(new AbortError(abortErrorMsg ?? \"The operation was aborted.\"));\n }\n function removeListeners(): void {\n abortSignal?.removeEventListener(\"abort\", onAbort);\n }\n function onAbort(): void {\n cleanupBeforeAbort?.();\n removeListeners();\n rejectOnAbort();\n }\n if (abortSignal?.aborted) {\n return rejectOnAbort();\n }\n try {\n buildPromise(\n (x) => {\n removeListeners();\n resolve(x);\n },\n (x) => {\n removeListeners();\n reject(x);\n }\n );\n } catch (err) {\n reject(err);\n }\n abortSignal?.addEventListener(\"abort\", onAbort);\n });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { createAbortablePromise } from \"./createAbortablePromise\";\n\nconst StandardAbortMessage = \"The delay was aborted.\";\n\n/**\n * Options for support abort functionality for the delay method\n */\nexport interface DelayOptions {\n /**\n * The abortSignal associated with containing operation.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The abort error message associated with containing operation.\n */\n abortErrorMsg?: string;\n}\n\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs: number, options?: DelayOptions): Promise {\n let token: ReturnType;\n const { abortSignal, abortErrorMsg } = options ?? {};\n return createAbortablePromise(\n (resolve) => {\n token = setTimeout(resolve, timeInMs);\n },\n {\n cleanupBeforeAbort: () => clearTimeout(token),\n abortSignal,\n abortErrorMsg: abortErrorMsg ?? StandardAbortMessage,\n }\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nexport function getRandomIntegerInclusive(min: number, max: number): number {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * A generic shape for a plain JS object.\n */\nexport type UnknownObject = { [s: string]: unknown };\n\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nexport function isObject(input: unknown): input is UnknownObject {\n return (\n typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date)\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isObject } from \"./object\";\n\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nexport function isError(e: unknown): e is Error {\n if (isObject(e)) {\n const hasName = typeof e.name === \"string\";\n const hasMessage = typeof e.message === \"string\";\n return hasName && hasMessage;\n }\n return false;\n}\n\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nexport function getErrorMessage(e: unknown): string {\n if (isError(e)) {\n return e.message;\n } else {\n let stringified: string;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n } else {\n stringified = String(e);\n }\n } catch (err: any) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createHash, createHmac } from \"crypto\";\n\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(\n key: string,\n stringToSign: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n const decodedKey = Buffer.from(key, \"base64\");\n\n return createHmac(\"sha256\", decodedKey).update(stringToSign).digest(encoding);\n}\n\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(\n content: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n return createHash(\"sha256\").update(content).digest(encoding);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n */\nexport function isDefined(thing: T | undefined | null): thing is T {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n */\nexport function isObjectWithProperties(\n thing: Thing,\n properties: PropertyName[]\n): thing is Thing & Record {\n if (!isDefined(thing) || typeof thing !== \"object\") {\n return false;\n }\n\n for (const property of properties) {\n if (!objectHasProperty(thing, property)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n */\nexport function objectHasProperty(\n thing: Thing,\n property: PropertyName\n): thing is Thing & Record {\n return (\n isDefined(thing) && typeof thing === \"object\" && property in (thing as Record)\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"react-native\" section in package.json.\n */\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function generateUUID(): string {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n } else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += (randomNumber & 0x3) | 0x8;\n } else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return generateUUID();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { randomUUID as v4RandomUUID } from \"crypto\";\nimport { generateUUID } from \"./uuidUtils.native\";\n\ninterface Crypto {\n randomUUID(): string;\n}\n\ndeclare const globalThis: {\n crypto: Crypto;\n};\n\n// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+.\nlet uuidFunction =\n typeof globalThis?.crypto?.randomUUID === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : v4RandomUUID;\n\n// Not defined in earlier versions of Node.js 14\nif (!uuidFunction) {\n uuidFunction = generateUUID;\n}\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return uuidFunction();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\ndeclare global {\n interface Window {\n document: unknown;\n }\n\n interface DedicatedWorkerGlobalScope {\n constructor: {\n name: string;\n };\n\n importScripts: (...paths: string[]) => void;\n }\n\n interface Navigator {\n product: string;\n }\n\n interface DenoGlobal {\n version: {\n deno: string;\n };\n }\n\n interface BunGlobal {\n version: string;\n }\n\n // eslint-disable-next-line @azure/azure-sdk/ts-no-window\n const window: Window;\n const self: DedicatedWorkerGlobalScope;\n const Deno: DenoGlobal;\n const Bun: BunGlobal;\n const navigator: Navigator;\n}\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker =\n typeof self === \"object\" &&\n typeof self?.importScripts === \"function\" &&\n (self.constructor?.name === \"DedicatedWorkerGlobalScope\" ||\n self.constructor?.name === \"ServiceWorkerGlobalScope\" ||\n self.constructor?.name === \"SharedWorkerGlobalScope\");\n\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNode =\n typeof process !== \"undefined\" && Boolean(process.version) && Boolean(process.versions?.node);\n\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno =\n typeof Deno !== \"undefined\" &&\n typeof Deno.version !== \"undefined\" &&\n typeof Deno.version.deno !== \"undefined\";\n\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun = typeof Bun !== \"undefined\" && typeof Bun.version !== \"undefined\";\n\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\n// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js\nexport const isReactNative =\n typeof navigator !== \"undefined\" && navigator?.product === \"ReactNative\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** The supported character encoding type */\nexport type EncodingType = \"utf-8\" | \"base64\" | \"base64url\";\n\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes: Uint8Array, format: EncodingType): string {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n }\n}\n\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value: string, format: EncodingType): Uint8Array {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n }\n}\n\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes: Uint8Array): string {\n return Buffer.from(bytes).toString(\"base64\");\n}\n\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes: Uint8Array): string {\n return Buffer.from(bytes).toString(\"base64url\");\n}\n\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes: Uint8Array): string {\n return Buffer.from(bytes).toString(\"utf-8\");\n}\n\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value: string): Uint8Array {\n return Buffer.from(value);\n}\n\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value: string): Uint8Array {\n return Buffer.from(value, \"base64\");\n}\n\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value: string): Uint8Array {\n return Buffer.from(value, \"base64url\");\n}\n"],"names":["AbortError","createHmac","createHash","_a","v4RandomUUID"],"mappings":";;;;;;;AAAA;AAiBA;;;;;AAKG;AACa,SAAA,sBAAsB,CACpC,YAGS,EACT,OAAuC,EAAA;AAEvC,IAAA,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,OAAO,aAAP,OAAO,KAAA,KAAA,CAAA,GAAP,OAAO,GAAI,EAAE,CAAC;IACzE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,QAAA,SAAS,aAAa,GAAA;AACpB,YAAA,MAAM,CAAC,IAAIA,0BAAU,CAAC,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,KAAA,CAAA,GAAb,aAAa,GAAI,4BAA4B,CAAC,CAAC,CAAC;SACvE;AACD,QAAA,SAAS,eAAe,GAAA;YACtB,WAAW,KAAA,IAAA,IAAX,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAX,WAAW,CAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SACpD;AACD,QAAA,SAAS,OAAO,GAAA;AACd,YAAA,kBAAkB,KAAlB,IAAA,IAAA,kBAAkB,KAAlB,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,kBAAkB,EAAI,CAAC;AACvB,YAAA,eAAe,EAAE,CAAC;AAClB,YAAA,aAAa,EAAE,CAAC;SACjB;AACD,QAAA,IAAI,WAAW,KAAX,IAAA,IAAA,WAAW,uBAAX,WAAW,CAAE,OAAO,EAAE;YACxB,OAAO,aAAa,EAAE,CAAC;AACxB,SAAA;QACD,IAAI;AACF,YAAA,YAAY,CACV,CAAC,CAAC,KAAI;AACJ,gBAAA,eAAe,EAAE,CAAC;gBAClB,OAAO,CAAC,CAAC,CAAC,CAAC;AACb,aAAC,EACD,CAAC,CAAC,KAAI;AACJ,gBAAA,eAAe,EAAE,CAAC;gBAClB,MAAM,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AA;IACtD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED;;;AAGG;AACG,SAAU,sBAAsB,CAAC,KAAa,EAAA;AAClD,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED;;;AAGG;AACG,SAAU,kBAAkB,CAAC,KAAa,EAAA;IAC9C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED;;;AAGG;AACG,SAAU,qBAAqB,CAAC,KAAa,EAAA;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACzC;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/core-util/package.json b/reverse_engineering/node_modules/@azure/core-util/package.json deleted file mode 100644 index dc28f58..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "name": "@azure/core-util", - "version": "1.4.0", - "description": "Core library for shared utility methods", - "sdk-type": "client", - "main": "dist/index.js", - "module": "dist-esm/src/index.js", - "browser": { - "./dist-esm/src/sha256.js": "./dist-esm/src/sha256.browser.js", - "./dist-esm/src/uuidUtils.js": "./dist-esm/src/uuidUtils.browser.js", - "./dist-esm/src/bytesEncoding.js": "./dist-esm/src/bytesEncoding.browser.js" - }, - "react-native": { - "./dist/index.js": "./dist-esm/src/index.js", - "./dist-esm/src/uuidUtils.js": "./dist-esm/src/uuidUtils.native.js" - }, - "types": "types/latest/core-util.d.ts", - "typesVersions": { - "<3.6": { - "types/latest/*": [ - "types/3.1/*" - ] - } - }, - "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:samples": "echo Obsolete", - "build:test": "tsc -p . && dev-tool run bundle", - "build:types": "downlevel-dts types/latest/ types/3.1/", - "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local && npm run build:types", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-* temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "echo skipped", - "integration-test:node": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", - "pack": "npm pack 2>&1", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", - "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" - }, - "files": [ - "dist/", - "dist-esm/src/", - "types/latest/core-util.d.ts", - "types/3.1/core-util.d.ts", - "README.md", - "LICENSE" - ], - "repository": "github:Azure/azure-sdk-for-js", - "keywords": [ - "azure", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "engines": { - "node": ">=14.0.0" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/", - "sideEffects": false, - "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - }, - "devDependencies": { - "@azure/dev-tool": "^1.0.0", - "@microsoft/api-extractor": "^7.31.1", - "@types/chai": "^4.1.6", - "@types/chai-as-promised": "^7.1.4", - "@types/mocha": "^7.0.2", - "@types/node": "^14.0.0", - "@types/sinon": "^10.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", - "downlevel-dts": "^0.10.0", - "cross-env": "^7.0.2", - "eslint": "^8.0.0", - "inherits": "^2.0.3", - "karma": "^6.2.0", - "karma-chrome-launcher": "^3.0.0", - "karma-coverage": "^2.0.0", - "karma-env-preprocessor": "^0.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-junit-reporter": "^2.0.1", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-sourcemap-loader": "^0.3.8", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^2.0.0", - "prettier": "^2.5.1", - "rimraf": "^3.0.0", - "sinon": "^15.0.0", - "typescript": "~5.0.0", - "util": "^0.12.1" - }, - "//metadata": { - "migrationDate": "2023-03-08T18:36:03.000Z" - } -} diff --git a/reverse_engineering/node_modules/@azure/core-util/types/3.1/core-util.d.ts b/reverse_engineering/node_modules/@azure/core-util/types/3.1/core-util.d.ts deleted file mode 100644 index 0a5e1f1..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/types/3.1/core-util.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { AbortSignalLike } from '@azure/abort-controller'; -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -export declare function computeSha256Hash(content: string, encoding: "base64" | "hex"): Promise; -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -export declare function computeSha256Hmac(key: string, stringToSign: string, encoding: "base64" | "hex"): Promise; -/** - * Creates an abortable promise. - * @param buildPromise - A function that takes the resolve and reject functions as parameters. - * @param options - The options for the abortable promise. - * @returns A promise that can be aborted. - */ -export declare function createAbortablePromise(buildPromise: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void, options?: CreateAbortablePromiseOptions): Promise; -/** - * Options for the createAbortablePromise function. - */ -export declare interface CreateAbortablePromiseOptions { - /** A function to be called if the promise was aborted */ - cleanupBeforeAbort?: () => void; - /** An abort signal */ - abortSignal?: AbortSignalLike; - /** An abort error message */ - abortErrorMsg?: string; -} -/** - * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. - * @param timeInMs - The number of milliseconds to be delayed. - * @param options - The options for delay - currently abort options - * @returns Promise that is resolved after timeInMs - */ -export declare function delay(timeInMs: number, options?: DelayOptions): Promise; -/** - * Options for support abort functionality for the delay method - */ -export declare interface DelayOptions { - /** - * The abortSignal associated with containing operation. - */ - abortSignal?: AbortSignalLike; - /** - * The abort error message associated with containing operation. - */ - abortErrorMsg?: string; -} -/** The supported character encoding type */ -export declare type EncodingType = "utf-8" | "base64" | "base64url"; -/** - * Given what is thought to be an error object, return the message if possible. - * If the message is missing, returns a stringified version of the input. - * @param e - Something thrown from a try block - * @returns The error message or a string of the input - */ -export declare function getErrorMessage(e: unknown): string; -/** - * Returns a random integer value between a lower and upper bound, - * inclusive of both bounds. - * Note that this uses Math.random and isn't secure. If you need to use - * this for any kind of security purpose, find a better source of random. - * @param min - The smallest integer value allowed. - * @param max - The largest integer value allowed. - */ -export declare function getRandomIntegerInclusive(min: number, max: number): number; -/** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -export declare const isBrowser: boolean; -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -export declare const isBun: boolean; -/** - * Helper TypeGuard that checks if something is defined or not. - * @param thing - Anything - */ -export declare function isDefined(thing: T | undefined | null): thing is T; -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -export declare const isDeno: boolean; -/** - * Typeguard for an error object shape (has name and message) - * @param e - Something caught by a catch clause. - */ -export declare function isError(e: unknown): e is Error; -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -export declare const isNode: boolean; -/** - * Helper to determine when an input is a generic JS object. - * @returns true when input is an object type that is not null, Array, RegExp, or Date. - */ -export declare function isObject(input: unknown): input is UnknownObject; -/** - * Helper TypeGuard that checks if the input is an object with the specified properties. - * @param thing - Anything. - * @param properties - The name of the properties that should appear in the object. - */ -export declare function isObjectWithProperties(thing: Thing, properties: PropertyName[]): thing is Thing & Record; -/** - * A constant that indicates whether the environment the code is running is in React-Native. - */ -export declare const isReactNative: boolean; -/** - * A constant that indicates whether the environment the code is running is a Web Worker. - */ -export declare const isWebWorker: boolean; -/** - * Helper TypeGuard that checks if the input is an object with the specified property. - * @param thing - Any object. - * @param property - The name of the property that should appear in the object. - */ -export declare function objectHasProperty(thing: Thing, property: PropertyName): thing is Thing & Record; -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -export declare function randomUUID(): string; -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -export declare function stringToUint8Array(value: string, format: EncodingType): Uint8Array; -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -export declare function uint8ArrayToString(bytes: Uint8Array, format: EncodingType): string; -/** - * A generic shape for a plain JS object. - */ -export declare type UnknownObject = { - [s: string]: unknown; -}; -export {}; diff --git a/reverse_engineering/node_modules/@azure/core-util/types/latest/core-util.d.ts b/reverse_engineering/node_modules/@azure/core-util/types/latest/core-util.d.ts deleted file mode 100644 index b7ea2eb..0000000 --- a/reverse_engineering/node_modules/@azure/core-util/types/latest/core-util.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { AbortSignalLike } from '@azure/abort-controller'; - -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -export declare function computeSha256Hash(content: string, encoding: "base64" | "hex"): Promise; - -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -export declare function computeSha256Hmac(key: string, stringToSign: string, encoding: "base64" | "hex"): Promise; - -/** - * Creates an abortable promise. - * @param buildPromise - A function that takes the resolve and reject functions as parameters. - * @param options - The options for the abortable promise. - * @returns A promise that can be aborted. - */ -export declare function createAbortablePromise(buildPromise: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void, options?: CreateAbortablePromiseOptions): Promise; - -/** - * Options for the createAbortablePromise function. - */ -export declare interface CreateAbortablePromiseOptions { - /** A function to be called if the promise was aborted */ - cleanupBeforeAbort?: () => void; - /** An abort signal */ - abortSignal?: AbortSignalLike; - /** An abort error message */ - abortErrorMsg?: string; -} - -/** - * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. - * @param timeInMs - The number of milliseconds to be delayed. - * @param options - The options for delay - currently abort options - * @returns Promise that is resolved after timeInMs - */ -export declare function delay(timeInMs: number, options?: DelayOptions): Promise; - -/** - * Options for support abort functionality for the delay method - */ -export declare interface DelayOptions { - /** - * The abortSignal associated with containing operation. - */ - abortSignal?: AbortSignalLike; - /** - * The abort error message associated with containing operation. - */ - abortErrorMsg?: string; -} - -/** The supported character encoding type */ -export declare type EncodingType = "utf-8" | "base64" | "base64url"; - -/** - * Given what is thought to be an error object, return the message if possible. - * If the message is missing, returns a stringified version of the input. - * @param e - Something thrown from a try block - * @returns The error message or a string of the input - */ -export declare function getErrorMessage(e: unknown): string; - -/** - * Returns a random integer value between a lower and upper bound, - * inclusive of both bounds. - * Note that this uses Math.random and isn't secure. If you need to use - * this for any kind of security purpose, find a better source of random. - * @param min - The smallest integer value allowed. - * @param max - The largest integer value allowed. - */ -export declare function getRandomIntegerInclusive(min: number, max: number): number; - -/** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -export declare const isBrowser: boolean; - -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -export declare const isBun: boolean; - -/** - * Helper TypeGuard that checks if something is defined or not. - * @param thing - Anything - */ -export declare function isDefined(thing: T | undefined | null): thing is T; - -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -export declare const isDeno: boolean; - -/** - * Typeguard for an error object shape (has name and message) - * @param e - Something caught by a catch clause. - */ -export declare function isError(e: unknown): e is Error; - -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -export declare const isNode: boolean; - -/** - * Helper to determine when an input is a generic JS object. - * @returns true when input is an object type that is not null, Array, RegExp, or Date. - */ -export declare function isObject(input: unknown): input is UnknownObject; - -/** - * Helper TypeGuard that checks if the input is an object with the specified properties. - * @param thing - Anything. - * @param properties - The name of the properties that should appear in the object. - */ -export declare function isObjectWithProperties(thing: Thing, properties: PropertyName[]): thing is Thing & Record; - -/** - * A constant that indicates whether the environment the code is running is in React-Native. - */ -export declare const isReactNative: boolean; - -/** - * A constant that indicates whether the environment the code is running is a Web Worker. - */ -export declare const isWebWorker: boolean; - -/** - * Helper TypeGuard that checks if the input is an object with the specified property. - * @param thing - Any object. - * @param property - The name of the property that should appear in the object. - */ -export declare function objectHasProperty(thing: Thing, property: PropertyName): thing is Thing & Record; - -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -export declare function randomUUID(): string; - -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -export declare function stringToUint8Array(value: string, format: EncodingType): Uint8Array; - -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -export declare function uint8ArrayToString(bytes: Uint8Array, format: EncodingType): string; - -/** - * A generic shape for a plain JS object. - */ -export declare type UnknownObject = { - [s: string]: unknown; -}; - -export { } diff --git a/reverse_engineering/node_modules/@azure/cosmos/CHANGELOG.md b/reverse_engineering/node_modules/@azure/cosmos/CHANGELOG.md deleted file mode 100644 index 34f3100..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/CHANGELOG.md +++ /dev/null @@ -1,977 +0,0 @@ -# Release History - -## 3.17.3 (2023-02-13) - -### Features Added - -- Changes in bulk api to honour size restictions (i.e 2Mb) while creating individual batches.[#23923](https://github.com/Azure/azure-sdk-for-js/issues/23923) -- Enriched Timeout error response. We had defined Timeout error as custom error in our sdk but we were not sending up any message along with it, now we are throwing the specific Error. [#23025](https://github.com/Azure/azure-sdk-for-js/issues/23025) -- Added functionality to delete entire data for a partition id. [#22091](https://github.com/Azure/azure-sdk-for-js/issues/22091) -- SDK now defines all possible error types, namely Export RestError, AbortError, TimeoutError, and ErrorResponse. [22789](https://github.com/Azure/azure-sdk-for-js/issues/22789) -### Bugs Fixed - -- Removed excessive log warnings during bulk operations on a container with no partitionkey set. -- Fix issue with GlobalEndpointManager never making endpoints available after they fall-back [#22726](https://github.com/Azure/azure-sdk-for-js/issues/22726) -- Fix issue that caused parallel queries to break when returning a result of 0 or false. [#24493](https://github.com/Azure/azure-sdk-for-js/issues/24493) - -### Other Changes -- Error handling guidelines are added in README.md -## 3.17.2 (2022-11-15) - -### Bugs Fixed - -- Fix issue with patch api not working with aadCredentials [#20689](https://github.com/Azure/azure-sdk-for-js/issues/20689) -- Improve the contract of Item.batch operation from type any to OperationResponse [#23652](https://github.com/Azure/azure-sdk-for-js/issues/20689) -- Add section for the current limitations with the SDK [#21650](https://github.com/Azure/azure-sdk-for-js/issues/21650) -- Fix issue aad refresh token automatically getting refreshed [#22620](https://github.com/Azure/azure-sdk-for-js/issues/22620) - -## 3.17.1 (2022-09-12) - -### Bugs Fixed - -- Fix issue with unwanted runtime dependency on `@azure/identity` [#22968](https://github.com/Azure/azure-sdk-for-js/issues/22968) - -## 3.17.0 (2022-08-19) - -### Features Added - -#### GA: Azure Cosmos DB Integrated Cache - -- Support DedicatedGatewayRequestOptions and MaxIntegratedCacheStaleness [#21240](https://github.com/Azure/azure-sdk-for-js/pull/21240) -- Upgrade cosmos with azure core tracing [#22284](https://github.com/Azure/azure-sdk-for-js/pull/22284) -- Removed old logging and implement Azure core logging coverage [#18723](https://github.com/Azure/azure-sdk-for-js/pull/18723?) - -### Bugs Fixed - -- ParallelQueryExecutionContextBase breaks use of abortSignal [#18544](https://github.com/Azure/azure-sdk-for-js/pull/18544) -- Fixes id encoding issues when using special characters fo RoutingGateway - -## 3.16.3 (2022-07-13) - -### Bugs Fixed - -- Fixes issues with "id" encoding when using special characters that should be allowed in the "id" property of a document. [#22548](https://github.com/Azure/azure-sdk-for-js/pull/22548) - -## 3.16.2 (2022-06-24) - -### Bugs Fixed - -- Adds support to run queries with group by over a column with null values. [#22345](https://github.com/Azure/azure-sdk-for-js/pull/22345) - -## 3.16.1 (2022-05-31) - -### Bugs Fixed - -- Fix [#22003](https://github.com/Azure/azure-sdk-for-js/issues/22003) missing interface error. [#22015](https://github.com/Azure/azure-sdk-for-js/pull/22015) - -## 3.16.0 (2022-05-23) - -### Features Added - -- Allow users like cosmos-explorer to specify hierarchical partition keys. https://github.com/Azure/azure-sdk-for-js/pull/21934 -- Support Dedicated Gateway RequestOptions and Max Integrated Cache Staleness. https://github.com/Azure/azure-sdk-for-js/pull/21240 - -## 3.15.1 (2022-01-24) - -### Bugs Fixed - -- Fixed the paths mapped by the `browser` entry in `package.json` to be correct for the package's new output structure. This solves errors with bundling the package for browsers. - -## 3.15.0 (2021-11-22) - -### Features Added - -- _GA_ Adds `container.item(itemId).patch()`. `patch()` is an alternative to `replace()` for item updates. https://github.com/Azure/azure-sdk-for-js/pull/16264/files#diff-7caca690c469e2025576523c0377ac71815f001024fde7c48b20cd24adaa6977R561 -- _GA_ support for Bulk operation PATCH. -- _GA_ support for Batch operation PATCH. -- Added the `SasTokenProperties` type and a `createAuthorizationSasToken` function to enable scoped access to Cosmos resources with SAS tokens. For an example that demonstrates creating a SAS token and using it to authenticate a `CosmosClient`, see [the `SasTokenAuth` sample](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/cosmos/samples/v3/typescript/src/SasTokenAuth.ts). - -### Other Changes - -- Made several changes to the sample programs to improve code quality and compatibility with Node 12, and upgraded the sample programs' dependencies. - -## 3.14.1 (2021-09-02) - -### Bugs Fixed - -- Fix @azure/core-rest-pipeline version for AAD auth. - -## 3.14.0 (2021-09-01) - -### Features Added - -- _PREVIEW_ Adds `container.item(itemId).patch()`. `patch()` is an alternative to `replace()` for item updates. https://github.com/Azure/azure-sdk-for-js/pull/16264/files#diff-7caca690c469e2025576523c0377ac71815f001024fde7c48b20cd24adaa6977R561 -- _PREVIEW_ Adds support for Bulk operation PATCH. -- _PREVIEW_ Adds support for Batch operation PATCH. - -### Bugs Fixed - -- Fixes bug where Batch was passing the wrong header for batch requests with partition keys -- Fixes 401s when using AAD auth. AAD credentials should now work and no longer cause 429s from @azure/identity at high throughput. - -## 3.13.1 (2021-08-23) - -### Bugs Fixed - -- Fixed bugs in session token clearing logic. Session Not found (404, substatus 1002) was not being handled correctly by the session retry policy and would mistakenly retry the request with the same session token. - -## 3.13.0 (2021-08-10) - -### Features Added - -- Adds TransactionalBatch to items `container.items.batch(operations)` - -### Bugs Fixed - -- Fixed bulk requests which had operations without partitionKey specified. - -## 3.12.3 (2021-07-23) - -### Bugs Fixed - -- Fix bulk operations on containers with multiple partitions with nested partition keys - -## 3.12.2 (2021-07-21) - -### Features Added - -- Adopted target ES2017 to reduce bundle size. - -## 3.12.1 (2021-07-16) - -### Bugs Fixed - -- Returned default retryPolicy option `fixedRetryIntervalInMilliseconds` to its original default 0. - -## 3.12.0 (2021-07-06) - -### Features Added - -- With the dropping of support for Node.js versions that are no longer in LTS, the dependency on `@types/node` has been updated to version 12. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. -- Added background refresher for endpoints, and new `ConnectionPolicy` options. Refreshing defaults to true, and the default refresh rate is every 5 minutes. - -```js -const client = new CosmosClient({ - endpoint, - key: masterKey, - connectionPolicy: { - ...defaultConnectionPolicy, - endpointRefreshRateInMs: 700, - enableBackgroundEndpointRefreshing: true, - }, -}); -``` - -- Added `client.dispose()` for closing the endpoint refresher verbosely. Necessary when destroying the CosmosClient inside existing processes like an express web server, or when you want to destroy the client and create a new one in the same process. - -```js -const client = new CosmosClient(); -client.dispose(); // cancels background endpoint refreshing -``` - -## 3.11.5 (2021-06-10) - -### Features Added - -### Breaking Changes - -### Key Bugs Fixed - -### Fixed - -- BUGFIX: Adds another failover condition. - -## 3.11.4 (2021-06-10) - -- BUGFIX: Correctly failover to new regions when regional DNS has gone offline. - -## 3.11.3 (2021-05-21) - -- BUGFIX: Sanitize user endpoint URLs for AAD DataPlane RBAC token generation. - -## 3.11.2 (2021-05-11) - -- BUGFIX: Cache https client between requests. - -## 3.11.1 (2021-05-06) - -- BUGFIX: Import URL from Browser/Node shim rather than built-in module. - -## 3.11.0 (2021-04-21) - -- FEATURE: Internal client update. No user facing changes, but major version bump to be safe. - -## 3.10.6 (2021-04-14) - -- BUGFIX: Adds partitionKey parameter to `container.conflicts.delete` - -## 3.10.5 (2021-03-25) - -- BUGFIX: Pins node-abort-controller version as we depend on a type in v1.2.0. - -## 3.10.4 (2021-03-23) - -- FEATURE: Adds Bulk continueOnError option. - -## 3.10.3 (2021-03-12) - -- BUGFIX: Removes direct dependency on @azure/identity while retaining compatibility. - -## 3.10.2 (2021-03-11) - -- BUGFIX: Fixes @azure/identity dependency in dev deps. - -## 3.10.1 (2021-03-10) - -- BUGFIX: Autogenerates IDs for Upsert operations in bulk. - -## 3.10.0 (2021-01-21) - -- FEATURE: Adds AAD authentication via @azure/identity. - -## 3.9.5 (2021-01-18) - -- BUGFIX: Throws correct Invalid Continuation Token error when making request with malformed token -- BUGFIX: Defaults partitionKeyValue to `'[{}]'` when missing in Read/Delete bulk operations -- BUGFIX: Sums group by operations for cross-partition queries correctly with null values. - -## 3.9.3 (2020-10-19) - -- BUGFIX: Fixes bulk operations with top level partitionKey values that are undefined or null. - -## 3.9.2 (2020-09-16) - -- BUGFIX: Fixes slow `userAgent` lookup on azure functions. - -## 3.9.1 (2020-08-28) - -- BUGFIX: Fixes `OperationInput` type to be more accurate based on `OperationType`. -- FEATURE: Bulk requests with `Create` operations will now autogenerate IDs if they are not present. -- FEATURE: The `BulkOperationType` enum now exists and can be used when making bulk requests. - -## 3.9.0 (2020-08-13) - -- FEATURE: Adds support for autoscale parameters on container and database create methods - -Note that `maxThroughput` cannot be passed with `throughput`. - -```js -// correct -const containerDefinition = { - id: "sample container", - indexingPolicy: { indexingMode: IndexingMode.consistent }, - maxThroughput: 500, - autoUpgradePolicy: { - throughputPolicy: { - incrementPercent: 15 - } - } -}; -database.container.create(containerDefinition) - -// incorrect -const containerDefinition = { - id: "sample container", - indexingPolicy: { indexingMode: IndexingMode.consistent }, - throughput: 500, // do not specify throughput with maxThroughput - maxThroughput: 500 - autoUpgradePolicy: { - throughputPolicy: { - incrementPercent: 15 - } - } -}; -database.container.create(containerDefinition) -``` - -## 3.8.2 (2020-08-12) - -- BUGFIX: Fix checkURL function for Node 8 - -## 3.8.1 (2020-08-12) - -- BUGFIX: Adds separate URL module for browser/node. - -## 3.8.0 (2020-08-10) - -- FEATURE: Throws when initializing ClientContext with an invalid endpoint -- FEATURE: Changes JSONArray type internal from Array to ArrayLike to avoid requiring type coercion for immutable data -- FEATURE: Adds bulk request to container.items. Allows aggregate bulk request for up to 100 operations on items with the types: Create, Upsert, Read, Replace, Delete - -```js -// up to 100 operations -const operations: OperationInput[] = [ - { - operationType: "Create", - resourceBody: { id: "doc1", name: "sample", key: "A" }, - }, - { - operationType: "Upsert", - resourceBody: { id: "doc2", name: "other", key: "A" }, - }, - { - operationType: "Read", - id: "readItemId", - partitionKey: "key", - }, -]; - -await database.container.items.bulk(operations); -``` - -## 3.7.4 (2020-06-30) - -- BUGFIX: Properly escape ASCII "DEL" character in partition key header - -## 3.7.3 (2020-06-29) - -- BUGFIX: Cannot create item with automatic id generation and a container partitioned on ID (#9734) - -## 3.7.2 (2020-06-16) - -- BUGFIX: Internal abort signal incorrectly triggered when user passes a custom abort signal. See #9510 for details. - -## 3.7.1 (2020-06-12) - -- BUGFIX: Typo in globalCrypto.js causing errors in IE browser -- BUGFIX: Resource tokens not matching for item delete operations (#9110) - -## 3.7.0 (2020-06-08) - -- BUGFIX: Support crypto functions in Internet Explorer browser -- BUGFIX: Incorrect key casing in object returned by `setAuthorizationHeader` -- FEATURE: Adds `readOffer` methods to container and database -- FEATURE: Allows string value `partitionKey` parameter when creating containers - -The following result in the same behavior: - -```js -const containerDefinition = { - id: "sample container", - indexingPolicy: { indexingMode: IndexingMode.consistent }, - throughput: 400, - partitionKey: { paths: ["/key"] } -}; -database.container.create(containerDefinition); - -// OR as a string - -const containerDefinition = { - id: "sample container", - indexingPolicy: { indexingMode: IndexingMode.consistent }, - throughput: 400, - partitionKey: "/key" } // must have leading slash "/" -}; -database.container.create(containerDefinition); -``` - -## 3.6.3 (2020-04-08) - -- FEATURE: Add `partitionKey` to `FeedOptions` for scoping a query to a single partition key value - -@azure/cosmos V2 has two different but equivalent ways to specify the partition key for a query: - -```js -// V2 These are effectively the same -container.items.query("SELECT * from c", { partitionKey: "foo" }).toArray(); -container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray(); -``` - -In an effort to simplify, the V3 SDK removed `partitionKey` from `FeedOptions` so there was only one way to specify the partition key: - -```js -// V3 -container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').fetchAll(); -``` - -Based on customer feedback, we identified scenarios where it still makes sense to support passing the partition key via `FeedOptions` and have decided to restore the behavior. - -## 3.6.2 (2020-02-20) - -- BUG FIX: Support signing in web workers where this === self - -## 3.6.1 (2020-02-11) - -- BUG FIX: Normalize location names when selecting endpoint. Allows passing of normalized endpoint names - -## 3.6.0 (2020-02-10) - -- FEATURE: Add support for spatial indexing, bounding boxes, and geospatial configuration -- BUG FIX: Fix bug when passing forceQueryPlan to QueryIterator for non-item resources (#7333) - -## 3.5.4 (2020-01-28) - -- BUG FIX: Return parsed number instead of string for request charge - -## 3.5.3 (2020-01-06) - -- BUG FIX: maxDegreeOfParallelism was defaulting to 1 and should default to the number of partitions of the collection -- BUG FIX: maxItemCount was defaulting to 10 and should default to undefined -- Set default TLS version to 1.2 (#6761) -- Use tslib 1.10.0 (#6710) -- Add partition key to code sample (#6612) - -## 3.5.2 (2019-12-03) - -- Fix handling of special characters in item ids when signing tokens in the browser (#6379) - -## 3.5.1 (2019-11-25) - -- Fix bug when paginating GROUP BY queries or using in conjunction with TOP/OFFSET/LIMIT (#6003) -- Improve error message for mixed type ORDER BY (#6306) - -## 3.5.0 (2019-11-21) - -- FEATURE: Endpoint discovery and multi-region failover improvements. See https://github.com/Azure/azure-sdk-for-js/pull/6283 for more information on this change. (#6283) -- Makes changeFeed and query options optional. Fix #6232 Fix #6277 (#6273) - -## 3.4.2 (2019-11-07) - -- Fixes bug where the query may throw a 410 error during a split operation. Instead, throw 503 (#6074) - -## 3.4.1 (2019-11-05) - -- Fix region drop failover scenario and add test (#5892) - -## 3.4.0 (2019-10-28) - -- FEATURE: GROUP BY query support (#5749) -- Update proxy-agent. Remove types folder (#5854) -- Typo: Fix "an" vs "a" (#5812) -- Update to Mocha 6.2.2 (#5824) -- Remove unused Range type (#5686) -- Remove universal-user-agent (#5869) - -## 3.3.4 (2019-10-14) - -- Query bug fix. Empty result last call not reporting proper RUs (#5517) -- Sign headers using internal package (#5523) -- Use internal digest function instead of crypto-hash package (#5493) -- Remove internal binary-search-bounds package (#5417) -- Fix atob bug impacting browser users (#5375) - -## 3.3.2 (2019-10-03) - -- Export TokenProvider and RequestInfo types (#5262) -- Remove atob package in favor of local version (#5334) -- Fix incorrect lib version in UserAgent (#5295) -- Allow zero for Item TTL (#5257) - -## 3.3.0 (2019-09-24) - -- FEATURE: Add userAgentSuffix to CosmosClient constructor options (#5068) -- Guard process.env to fix webpack issues (#5223) -- Fixes bug where initial QueryIterator promise was not being created (#5215) -- Fix aggregates bug when query was returning no results (#5184) -- sideEffects field set to false (#5022) - -## 3.2.0 (2019-08-26) - -- FEATURE: Endpoint resolution now blocks until initialized (#409) -- FEATURE: Add bufferItems support & other cross-partition perf improvements (#397) -- Fix missing AbortSignal type for users not targeting the DOM (#416) -- Add sample for bulk update with continuation token (#402) -- Export default partition key path (#405) - -## 3.1.1 (2019-08-07) - -- Fix bug where offset limit iterator was being called for each item under the offset count (#398) -- Add retry on EPIPE error (#400) - -## 3.1.0 (2019-07-26) - -- FEATURE: Set default ResponseContinuationTokenLimitInKB to 1kb. Prevents header limit errors (#384) -- Remove unused disableSSLVerification options (#388) - -## 3.0.4 (2019-07-22) - -- Allow initialHeaders to explicitly set partition key header (#383) -- Use package.json#files to prevent extraneous files from being pubished (#382) -- Fix for routing map sort error on older version of node+v8 (#378) -- Fixes bug when user supplies partial retry options. Close #377 (#379) -- README updates (#374) - -## 3.0.3 (2019-07-17) - -- Fix webpack usage. Prevent resolving modules called with `require` (#373) -- Various internal API cleanups and sample fixes - -## 3.0.2 (2019-07-09) - -Fixes a long outstanding bug where RUs were always being reported as 0 for aggregate queries (#366) - -## 3.0.1 (2019-07-02) - -Fixes broken session tokens in the browser. Cosmos uses file system friendly base64 to represent resources internally but does not work with the builtin browser atob function (#363) - -## 3.0.0 (2019-06-28) - -🎉 v3 release! 🎉 Many new features, bug fixes, and a few breaking changes. Primary goals of this release: - -- Implement major new features: - - DISTINCT queries - - LIMIT/OFFSET queries - - User cancelable requests -- Update to the latest Cosmos REST API version where [all containers have unlimited scale](https://docs.microsoft.com/azure/cosmos-db/migrate-containers-partitioned-to-nonpartitioned) -- Make it easier to use Cosmos from the browser -- Better align with the new [Azure JS SDK guidlines](https://azure.github.io/azure-sdk/typescript_introduction.html) - -### Migration Guide for Breaking Changes - -#### Improved Client Constructor Options (#246) - -Constructor options have been simplified: - -- `masterKey` was renamed `key` and moved to the top-level -- Properties previously under `options.auth` have moved to the top-level - -```js -// v2 -const client = new CosmosClient({ - endpoint: "https://your-database.cosmos.azure.com", - auth: { - masterKey: "your-primary-key", - }, -}); - -// v3 -const client = new CosmosClient({ - endpoint: "https://your-database.cosmos.azure.com", - key: "your-primary-key", -}); -``` - -#### Simplified QueryIterator API (#238 #316) - -In v2 there were many different ways to iterate or retrieve results from a query. We have attempted to simplify the v3 API and remove similar or duplciate APIs: - -- Remove iterator.next() and iterator.current(). Use fetchNext() to get pages of results. -- Remove iterator.forEach(). Use async iterators instead. -- iterator.executeNext() renamed to iterator.fetchNext() -- iterator.toArray() renamed to iterator.fetchAll() -- Pages are now proper `Response` objects intead of plain JS objects - -```js -const container = client.database(dbId).container(containerId) - -// v2 -container.items.query('SELECT * from c').toArray() -container.items.query('SELECT * from c').executeNext() -container.items.query('SELECT * from c').forEach(({ body: item }) => { console.log(item.id) }) - -// v3 -container.items.query('SELECT * from c').fetchAll() -container.items.query('SELECT * from c').fetchNext() -for await(const { result: item } in client.databases.readAll().getAsyncIterator()) { - console.log(item.id) -} -``` - -#### Simplified Partition Keys for Queries - -v2 has two different but equivalent ways to specify the partition key for a query: - -```js -// v2. These are effectively the same -container.items.query("SELECT * from c", { partitionKey: "foo" }).toArray(); -container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray(); -``` - -v3 removed `partitionKey` from `FeedOptions` so there is now only one way to specify the partition key: - -```js -// v3 -container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').fetchAll(); -``` - -#### Fixed Containers are now Paritioned (#308) - -[The Cosmos service now supports partition keys on all containers, including those that were previously created as fixed containers](https://docs.microsoft.com/azure/cosmos-db/migrate-containers-partitioned-to-nonpartitioned). The v3 SDK updates to the latest API version that implements this change, but it is not breaking. If you do not supply a partition key for operations, we will default to a system key that works with all your existing containers and documents. - -#### `upsert` removed for Stored Procedures (#356) - -Previously `upsert` was allowed for non-partitioned collections, but with the API version update, all collections are partitioned so we removed it entirely. - -#### Item reads will not throw on 404 (#343, Community Request) - -```js -const container = client.database(dbId).container(containerId); - -// v2 -try { - container.items.read(id, undefined); -} catch (e) { - if (e.code === 404) { - console.log("item not found"); - } -} - -// v3 -const { result: item } = container.items.read(id, undefined); -if (item === undefined) { - console.log("item not found"); -} -``` - -#### Default Multi Region Write (#335) - -The SDK will now write to multiple regions by default if your database configuration supports it. This was previously opt-in behavior. - -#### Proper Error Objects (#334, Community Request) - -Failed requests now throw proper `Error` or subclasses of `Error`. Previously they threw plain JS objects. - -### New Features - -#### User Cancellable Requests (#263, Community Request) - -The move to `fetch` internally allows us to use the browser `AbortController` API to support user cancellable operations. In the case of operations where multiple requests are potentially in progress (like cross partition queries), all requests for the operation will be canceled. Modern browser users will already have `AbortController`. Node.js users will need to use a [polyfill library](https://www.npmjs.com/package/node-abort-controller) - -```js -const controller = new AbortController(); -const { result: item } = await items.query("SELECT * from c", { abortSignal: controller.signal }); -controller.abort(); -``` - -#### Set throughput as part of db/container create operation (#220) - -```js -const { database } = client.databases.create({ id: "my-database", throughput: 10000 }); -database.containers.create({ id: "my-container", throughput: 10000 }); -``` - -#### @azure/cosmos-sign (#213) - -Header token generation was split out into a new library, @azure/cosmos-sign. Anyone calling the Cosmos REST API directly can use this to sign headers using the same code we call inside @azure/cosmos. - -#### UUID for generated IDs (#355) - -v2 had custom code to generate item IDs. We have switched to the well known and maintained community library `uuid`. - -#### Connection Strings (#350, Community Request) - -It is now possible to pass a connection string copied from the Azure portal: - -```js -const client = new CosmosClient( - "AccountEndpoint=https://test-account.documents.azure.com:443/;AccountKey=;" -); -``` - -#### Add DISTINCT and LIMIT/OFFSET queries (#306) - -```js -const { results } = await items.query("SELECT DISTINCT VALUE r.name FROM ROOT").fetchAll(); -const { results } = await items.query("SELECT * FROM root r OFFSET 1 LIMIT 2").fetchAll(); -``` - -### Improved Browser Experience - -While it was possible to use the v2 SDK in the browser it was not an ideal experience. You needed to polyfill several node.js built-in libraries and use a bundler like Webpack or Parcel. The v3 SDK makes the out of the box experience much better for browser users. - -- Replace request internals with `fetch` (#245) -- Remove usage of Buffer (#330) -- Remove node builtin usage in favor of universal packages/APIs (#328) -- Switch to node-abort-controller (#294) - -### Bug Fixes - -- Fix offer read and bring back offer tests (#224) -- Fix EnableEndpointDiscovery (#207) -- Fix missing RUs on paginated results (#360) -- Expand SQL query parameter type (#346) -- Add ttl to ItemDefinition (#341) -- Fix CP query metrics (#311) -- Add activityId to FeedResponse (#293) -- Switch \_ts type from string to number (#252)(#295) -- Fix Request Charge Aggregation (#289) -- Allow blank string partition keys (#277) -- Add string to conflict query type (#237) -- Add uniqueKeyPolicy to container (#234) - -### Engineering Systems - -Not always the most visible changes, but they help our team ship better code, faster. - -- Use rollup for production builds (#104) -- Update to Typescript 3.5 (#327) -- Convert to TS project references. Extract test folder (#270) -- Enable noUnusedLocals and noUnusedParameters (#275) -- Azure Pipelines YAML for CI builds (#298) - -## 2.0.1 (2018-09-25) - -- Fix type issue (See #141) - -## 2.0.0 (2018-09-24) - -- Multi-region Write support -- Shared resource response properties added to responses -- Changed query to allow for customer types for all Resource types -- Modified items.query to allow for cross partition query -- Misc fixes/doc updates - -## 2.0.0-3 (2018-08-02) - -- New object model -- Updated documentation and samples -- Improved types -- Added `createdIfNotExists` for database and container -- Added prettier -- Added public CI (Travis and VSTS) - -## 2.0.0-0 (2018-08-01) - -- Added Promise support -- Added token handler option for auth -- typings now emitted from source (moved source to TypeScript) -- Added CosmosClient (DocumentClient now considered deprecated) - -## 1.14.4 (2018-05-03) - -- npm documentation fixed. - -## 1.14.3 (2018-05-03) - -- Added support for default retries on connection issues. -- Added support to read collection change feed. -- Fixed session consistency bug that intermittently caused "read session not available". -- Added support for query metrics. -- Modified http Agent's maximum number of connections. - -## 1.14.2 (2017-12-21) - -- Updated documentation to use Azure Cosmos DB. -- Added Support for proxyUrl setting in ConnectionPolicy. - -## 1.14.1 (2017-11-10) - -- Minor fix for case sensitive file systems. - -## 1.14.0 (2017-11-09) - -- Adds support for Session Consistency. -- This SDK version requires the latest version of Azure Cosmos DB Emulator available for download from https://aka.ms/cosmosdb-emulator. - -## 1.13.0 (2017-10-11) - -- Splitproofed cross partition queries. -- Adds supports for resource link with leading and trailing slashes (and corresponding tests). - -## 1.12.2 (2017-08-10) - -- npm documentation fixed. - -## 1.12.1 (2017-08-10) - -- Fixed bug in executeStoredProcedure where documents involved had special unicode characters (LS, PS). -- Fixed bug in handling documents with unicode characters in partition key. -- Fixed support for creating collection with name media (github #114). -- Fixed support for permission authorization token (github #178). - -## 1.12.0 (2017-05-10) - -- Added support for Request Unit per Minute (RU/m) feature. -- Added support for a new consistency level called ConsistentPrefix. -- Added support for UriFactory. -- Fixed the unicode support bug (github #171) - -## 1.11.0 (2017-03-16) - -- Added the support for aggregation queries (COUNT, MIN, MAX, SUM, and AVG). -- Added the option for controlling degree of parallelism for cross partition queries. -- Added the option for disabling SSL verification when running against Emulator. -- Lowered minimum throughput on partitioned collections from 10,100 RU/s to 2500 RU/s. -- Fixed the continuation token bug for single partition collection (github #107). -- Fixed the executeStoredProcedure bug in handling 0 as single param (github #155). - -## 1.10.2 (2017-01-27) - -- Fixed user-agent header to include the SDK version. -- Minor code cleanup. - -## 1.10.1 (2016-12-22) - -- Disabling SSL verification when using the SDK to target the emulator(hostname=localhost). -- Added support for enabling script logging during stored procedure execution. - -## 1.10.0 (2016-10-03) - -- Added support for cross partition parallel queries. -- Added support for TOP/ORDER BY queries for partitioned collections. - -## 1.9.0 (2016-07-07) - -- Added retry policy support for throttled requests. (Throttled requests receive a request rate too large exception, error code 429.) - By default, DocumentClient retries nine times for each request when error code 429 is encountered, honoring the retryAfter time in the response header. - A fixed retry interval time can now be set as part of the RetryOptions property on the ConnectionPolicy object if you want to ignore the retryAfter time returned by server between the retries. - DocumentClient now waits for a maximum of 30 seconds for each request that is being throttled (irrespective of retry count) and returns the response with error code 429. - This time can also be overriden in the RetryOptions property on ConnectionPolicy object. - -- DocumentClient now returns x-ms-throttle-retry-count and x-ms-throttle-retry-wait-time-ms as the response headers in every request to denote the throttle retry count and the cummulative time the request waited between the retries. - -- The RetryOptions class was added, exposing the RetryOptions property on the ConnectionPolicy class that can be used to override some of the default retry options. - -## 1.8.0 (2016-06-14) - -- Added the support for geo-replicated database accounts. - -## 1.7.0 (2016-04-26) - -- Added the support for TimeToLive(TTL) feature for documents. - -## 1.6.0 (2016-03-29) - -- Added support for Partitioned Collections. -- Added support for new offer types. - -## 1.5.6 (2016-03-08) - -- Fixed RangePartitionResolver.resolveForRead bug where it was not returning links due to a bad concat of results. -- Move compareFunction from Range class to RangePartitionResolver class. - -## 1.5.5 (2016-02-02) - -- Fixed hashParitionResolver resolveForRead(): When no partition key supplied was throwing exception, instead of returning a list of all registered links. - -## 1.5.4 (2016-02-01) - -- Dedicated HTTPS Agent: Avoid modifying the global. Use a dedicated agent for all of the lib’s requests. - -## 1.5.3 (2016-01-26) - -- Properly handle dashes in the mediaIds. - -## 1.5.2 (2016-01-22) - -- Fix memory leak. - -## 1.5.1 (2016-01-04) - -- Renamed "Hash" directory to "hash". - -## 1.5.0 (2015-12-31) - -- Added client-side sharding support. -- Added hash partition resolver implementation. -- Added range partitoin resolver implementation. - -## 1.4.0 (2015-10-06) - -- Implement Upsert. New upsertXXX methods on documentClient. - -## 1.3.0 (2015-10-06) - -- Skipped to bring version numbers in alignment with other SDKs. - -## 1.2.2 (2015-09-10) - -- Split Q promises wrapper to new repository. -- Update to package file for npm registry. - -## 1.2.1 (2015-08-15) - -- Implements ID Based Routing. -- Fixes Issue [#49](https://github.com/Azure/azure-documentdb-node/issues/49) - current property conflicts with method current(). - -## 1.2.0 (2015-08-05) - -- Added support for GeoSpatial index. -- Validates id property for all resources. Ids for resources cannot contain ?, /, #, \\, characters or end with a space. -- Adds new header "index transformation progress" to ResourceResponse. - -## 1.1.0 (2015-07-09) - -- Implements V2 indexing policy. - -## 1.0.3 (2015-06-04) - -- Issue [#40](https://github.com/Azure/azure-documentdb-node/issues/40) - Implemented eslint and grunt configurations in the core and promise SDK. - -## 1.0.2 (2015-05-23) - -- Issue [#45](https://github.com/Azure/azure-documentdb-node/issues/45) - Promises wrapper does not include header with error. - -## 1.0.1 (2015-05-15) - -- Implemented ability to query for conflicts by adding readConflicts, readConflictAsync, queryConflicts. -- Updated API documentation. -- Issue [#41](https://github.com/Azure/azure-documentdb-node/issues/41) - client.createDocumentAsync error. - -Microsoft will provide notification at least **12 months** in advance of retiring an SDK in order to smooth the transition to a newer/supported version. - -New features, functionality, and optimizations are only added to the current SDK. So it's recommended that you always upgrade to the latest SDK version as early as possible. - -Any request to Cosmos DB using a retired SDK will be rejected by the service. - -> [!WARNING] -> All versions **1.x** of the Cosmos JavaScript SDK for SQL API will be retired on **August 30, 2020**. -> ->
- -| Version | Release Date | Retirement Date | -| ------------------------ | ------------------ | --------------- | -| [3.4.2](#3.4.2) | November 7, 2019 | --- | -| [3.4.1](#3.4.1) | November 5, 2019 | --- | -| [3.4.0](#3.4.0) | October 28, 2019 | --- | -| [3.3.6](#3.3.6) | October 14, 2019 | --- | -| [3.3.5](#3.3.5) | October 14, 2019 | --- | -| [3.3.4](#3.3.4) | October 14, 2019 | --- | -| [3.3.3](#3.3.3) | October 3, 2019 | --- | -| [3.3.2](#3.3.2) | October 3, 2019 | --- | -| [3.3.1](#3.3.1) | October 1, 2019 | --- | -| [3.3.0](#3.3.0) | September 24, 2019 | --- | -| [3.2.0](#3.2.0) | August 26, 2019 | --- | -| [3.1.1](#3.1.1) | August 7, 2019 | --- | -| [3.1.0](#3.1.0) | July 26, 2019 | --- | -| [3.0.4](#3.0.4) | July 22, 2019 | --- | -| [3.0.3](#3.0.3) | July 17, 2019 | --- | -| [3.0.2](#3.0.2) | July 9, 2019 | --- | -| [3.0.0](#3.0.0) | June 28, 2019 | --- | -| [2.1.5](#2.1.5) | March 20, 2019 | --- | -| [2.1.4](#2.1.4) | March 15, 2019 | --- | -| [2.1.3](#2.1.3) | March 8, 2019 | --- | -| [2.1.2](#2.1.2) | January 28, 2019 | --- | -| [2.1.1](#2.1.1) | December 5, 2018 | --- | -| [2.1.0](#2.1.0) | December 4, 2018 | --- | -| [2.0.5](#2.0.5) | November 7, 2018 | --- | -| [2.0.4](#2.0.4) | October 30, 2018 | --- | -| [2.0.3](#2.0.3) | October 30, 2018 | --- | -| [2.0.2](#2.0.2) | October 10, 2018 | --- | -| [2.0.1](#2.0.1) | September 25, 2018 | --- | -| [2.0.0](#2.0.0) | September 24, 2018 | --- | -| [2.0.0-3 (RC)](#2.0.0-3) | August 2, 2018 | --- | -| [1.14.4](#1.14.4) | May 03, 2018 | August 30, 2020 | -| [1.14.3](#1.14.3) | May 03, 2018 | August 30, 2020 | -| [1.14.2](#1.14.2) | December 21, 2017 | August 30, 2020 | -| [1.14.1](#1.14.1) | November 10, 2017 | August 30, 2020 | -| [1.14.0](#1.14.0) | November 9, 2017 | August 30, 2020 | -| [1.13.0](#1.13.0) | October 11, 2017 | August 30, 2020 | -| [1.12.2](#1.12.2) | August 10, 2017 | August 30, 2020 | -| [1.12.1](#1.12.1) | August 10, 2017 | August 30, 2020 | -| [1.12.0](#1.12.0) | May 10, 2017 | August 30, 2020 | -| [1.11.0](#1.11.0) | March 16, 2017 | August 30, 2020 | -| [1.10.2](#1.10.2) | January 27, 2017 | August 30, 2020 | -| [1.10.1](#1.10.1) | December 22, 2016 | August 30, 2020 | -| [1.10.0](#1.10.0) | October 03, 2016 | August 30, 2020 | -| [1.9.0](#1.9.0) | July 07, 2016 | August 30, 2020 | -| [1.8.0](#1.8.0) | June 14, 2016 | August 30, 2020 | -| [1.7.0](#1.7.0) | April 26, 2016 | August 30, 2020 | -| [1.6.0](#1.6.0) | March 29, 2016 | August 30, 2020 | -| [1.5.6](#1.5.6) | March 08, 2016 | August 30, 2020 | -| [1.5.5](#1.5.5) | February 02, 2016 | August 30, 2020 | -| [1.5.4](#1.5.4) | February 01, 2016 | August 30, 2020 | -| [1.5.3](#1.5.2) | January 26, 2016 | August 30, 2020 | -| [1.5.2](#1.5.2) | January 22, 2016 | August 30, 2020 | -| [1.5.1](#1.5.1) | January 4, 2016 | August 30, 2020 | -| [1.5.0](#1.5.0) | December 31, 2015 | August 30, 2020 | -| [1.4.0](#1.4.0) | October 06, 2015 | August 30, 2020 | -| [1.3.0](#1.3.0) | October 06, 2015 | August 30, 2020 | -| [1.2.2](#1.2.2) | September 10, 2015 | August 30, 2020 | -| [1.2.1](#1.2.1) | August 15, 2015 | August 30, 2020 | -| [1.2.0](#1.2.0) | August 05, 2015 | August 30, 2020 | -| [1.1.0](#1.1.0) | July 09, 2015 | August 30, 2020 | -| [1.0.3](#1.0.3) | June 04, 2015 | August 30, 2020 | -| [1.0.2](#1.0.2) | May 23, 2015 | August 30, 2020 | -| [1.0.1](#1.0.1) | May 15, 2015 | August 30, 2020 | -| [1.0.0](#1.0.0) | April 08, 2015 | August 30, 2020 | diff --git a/reverse_engineering/node_modules/@azure/cosmos/LICENSE b/reverse_engineering/node_modules/@azure/cosmos/LICENSE deleted file mode 100644 index ea8fb15..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@azure/cosmos/README.md b/reverse_engineering/node_modules/@azure/cosmos/README.md deleted file mode 100644 index 8765d52..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/README.md +++ /dev/null @@ -1,348 +0,0 @@ -# Azure Cosmos DB client library for JavaScript/TypeScript - -[![latest npm badge](https://img.shields.io/npm/v/%40azure%2Fcosmos/latest.svg)][npm] -[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/js/js%20-%20cosmosdb%20-%20ci?branchName=main)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=850&branchName=main) - -Azure Cosmos DB is a globally distributed, multi-model database service that supports document, key-value, wide-column, and graph databases. This package is intended for JavaScript/TypeScript applications to interact with **SQL API** databases and the JSON documents they contain: - -- Create Cosmos DB databases and modify their settings -- Create and modify containers to store collections of JSON documents -- Create, read, update, and delete the items (JSON documents) in your containers -- Query the documents in your database using SQL-like syntax - -Key links: - -- [Package (npm)][npm] -- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/cosmos/?view=azure-node-lates) -- [Product documentation][cosmos_docs] - -## Getting started - -### Prerequisites - -#### Azure Subscription and Cosmos DB SQL API Account - -You must have an [Azure Subscription][azure_sub], and a [Cosmos DB account][cosmos_account] (SQL API) to use this package. - -If you need a Cosmos DB SQL API account, you can use the Azure [Cloud Shell][cloud_shell_bash] to create one with this Azure CLI command: - -```Bash -az cosmosdb create --resource-group --name -``` - -Or you can create an account in the [Azure Portal](https://portal.azure.com/#create/microsoft.documentdb) - -#### NodeJS - -This package is distributed via [npm][npm] which comes preinstalled with [NodeJS](https://nodejs.org/en/). You should be using Node v10 or above. - -#### CORS - -You need to set up [Cross-Origin Resource Sharing (CORS)](https://docs.microsoft.com/azure/cosmos-db/how-to-configure-cross-origin-resource-sharing) rules for your Cosmos DB account if you need to develop for browsers. Follow the instructions in the linked document to create new CORS rules for your Cosmos DB. - -### Install this package - -```Bash -npm install @azure/cosmos -``` - -### Get Account Credentials - -You will need your Cosmos DB **Account Endpoint** and **Key**. You can find these in the [Azure Portal](https://portal.azure.com/#blade/hubsextension/browseresource/resourcetype/microsoft.documentdb%2fdatabaseaccounts) or use the [Azure CLI][azure_cli] snippet below. The snippet is formatted for the Bash shell. - -```Bash -az cosmosdb show --resource-group --name --query documentEndpoint --output tsv -az cosmosdb keys list --resource-group --name --query primaryMasterKey --output tsv -``` - -### Create an instance of `CosmosClient` - -Interaction with Cosmos DB starts with an instance of the [CosmosClient](https://docs.microsoft.com/javascript/api/@azure/cosmos/cosmosclient?view=azure-node-latest) class - -```js -const { CosmosClient } = require("@azure/cosmos"); - -const endpoint = "https://your-account.documents.azure.com"; -const key = ""; -const client = new CosmosClient({ endpoint, key }); - -async function main() { - // The rest of the README samples are designed to be pasted into this function body -} - -main().catch((error) => { - console.error(error); -}); -``` - -For simplicity we have included the `key` and `endpoint` directly in the code but you will likely want to load these from a file not in source control using a project such as [dotenv](https://www.npmjs.com/package/dotenv) or loading from environment variables - -In production environments, secrets like keys should be stored in [Azure Key Vault](https://azure.microsoft.com/services/key-vault/) - -## Key concepts - -Once you've initialized a [CosmosClient](https://docs.microsoft.com/javascript/api/@azure/cosmos/cosmosclient?view=azure-node-lates), you can interact with the primary resource types in Cosmos DB: - -- [Database](https://docs.microsoft.com/javascript/api/@azure/cosmos/database?view=azure-node-latest): A Cosmos DB account can contain multiple databases. When you create a database, you specify the API you'd like to use when interacting with its documents: SQL, MongoDB, Gremlin, Cassandra, or Azure Table. Use the [Database](https://docs.microsoft.com/javascript/api/@azure/cosmos/database?view=azure-node-latest) object to manage its containers. - -- [Container](https://docs.microsoft.com/javascript/api/@azure/cosmos/container?view=azure-node-latest): A container is a collection of JSON documents. You create (insert), read, update, and delete items in a container by using methods on the [Container](https://docs.microsoft.com/javascript/api/@azure/cosmos/container?view=azure-node-latest) object. - -- [Item](https://docs.microsoft.com/javascript/api/@azure/cosmos/item?view=azure-node-latest): An Item is a JSON document stored in a container. Each Item must include an `id` key with a value that uniquely identifies the item within the container. If you do not provide an `id`, the SDK will generate one automatically. - -For more information about these resources, see [Working with Azure Cosmos databases, containers and items][cosmos_resources]. - -## Examples - -The following sections provide several code snippets covering some of the most common Cosmos DB tasks, including: - -- [Create a database](#create-a-database) -- [Create a container](#create-a-container) -- [Insert items](#insert-items) -- [Query documents](#query-the-database) -- [Read an item](#read-an-item) -- [Delete an item](#delete-an-data) - -### Create a database - -After authenticating your [CosmosClient](https://docs.microsoft.com/javascript/api/@azure/cosmos/cosmosclient?view=azure-node-latest), you can work with any resource in the account. The code snippet below creates a SQL API database. - -```js -const { database } = await client.databases.createIfNotExists({ id: "Test Database" }); -console.log(database.id); -``` - -### Create a container - -This example creates a container with default settings - -```js -const { container } = await database.containers.createIfNotExists({ id: "Test Database" }); -console.log(container.id); -``` - -### Insert items - -To insert items into a container, pass an object containing your data to [Items.upsert](https://docs.microsoft.com/javascript/api/@azure/cosmos/items?view=azure-node-latest#upsert-t--requestoptions-). The Cosmos DB service requires each item has an `id` key. If you do not provide one, the SDK will generate an `id` automatically. - -This example inserts several items into the container - -```js -const cities = [ - { id: "1", name: "Olympia", state: "WA", isCapitol: true }, - { id: "2", name: "Redmond", state: "WA", isCapitol: false }, - { id: "3", name: "Chicago", state: "IL", isCapitol: false } -]; -for (const city of cities) { - await container.items.create(city); -} -``` - -### Read an item - -To read a single item from a container, use [Item.read](https://docs.microsoft.com/javascript/api/@azure/cosmos/item?view=azure-node-latest#read-requestoptions-). This is a less expensive operation than using SQL to query by `id`. - -```js -await container.item("1").read(); -``` - -### Delete an item - -To delete items from a container, use [Item.delete](https://docs.microsoft.com/javascript/api/@azure/cosmos/item?view=azure-node-latest#delete-requestoptions-). - -```js -// Delete the first item returned by the query above -await container.item("1").delete(); -``` - -### Query the database - -A Cosmos DB SQL API database supports querying the items in a container with [Items.query](https://docs.microsoft.com/javascript/api/@azure/cosmos/items?view=azure-node-latest#query-string---sqlqueryspec--feedoptions-) using SQL-like syntax: - -```js -const { resources } = await container.items - .query("SELECT * from c WHERE c.isCapitol = true") - .fetchAll(); -for (const city of resources) { - console.log(`${city.name}, ${city.state} is a capitol `); -} -``` - -Perform parameterized queries by passing an object containing the parameters and their values to [Items.query](https://docs.microsoft.com/javascript/api/@azure/cosmos/items?view=azure-node-latest#query-string---sqlqueryspec--feedoptions-): - -```js -const { resources } = await container.items - .query({ - query: "SELECT * from c WHERE c.isCapitol = @isCapitol", - parameters: [{ name: "@isCapitol", value: true }] - }) - .fetchAll(); -for (const city of resources) { - console.log(`${city.name}, ${city.state} is a capitol `); -} -``` - -For more information on querying Cosmos DB databases using the SQL API, see [Query Azure Cosmos DB data with SQL queries][cosmos_sql_queries]. - -## Error Handling - -The SDK generates various types of errors that can occur during an operation. - -1. `ErrorResponse` is thrown if the response of an operation returns an error code of >=400. -2. `TimeoutError` is thrown if Abort is called internally due to timeout. -3. `AbortError` is thrown if any user passed signal caused the abort. -4. `RestError` is thrown in case of failure of underlying system call due to network issues. -5. Errors generated by any devDependencies. For Eg. `@azure/identity` package could throw `CredentialUnavailableError`. - -Following is an example for handling errors of type `ErrorResponse`, `TimeoutError`, `AbortError`, and `RestError`. - -```js -try { - // some code -} catch (err) { - if (err instanceof ErrorResponse) { - // some specific error handling. - } else if (err instanceof RestError) { - // some specific error handling. - } - // handle other type of errors in similar way. - else { - // for any other error. - } -} -``` - -It's important to properly handle these errors to ensure that your application can gracefully recover from any failures and continue functioning as expected. More details about some of these errors and their possible solutions can be found [here](https://learn.microsoft.com/azure/cosmos-db/nosql/conceptual-resilient-sdk-applications#should-my-application-retry-on-errors). - -## Troubleshooting - -### General - -When you interact with Cosmos DB errors returned by the service correspond to the same HTTP status codes returned for REST API requests: - -[HTTP Status Codes for Azure Cosmos DB][cosmos_http_status_codes] - -#### Conflicts - -For example, if you try to create an item using an `id` that's already in use in your Cosmos DB database, a `409` error is returned, indicating the conflict. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error. - -```js -try { - await containers.items.create({ id: "existing-item-id" }); -} catch (error) { - if (error.code === 409) { - console.log("There was a conflict with an existing item"); - } -} -``` - -### Transpiling - -The Azure SDKs are designed to support ES5 JavaScript syntax and [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). If you need support for earlier JavaScript runtimes such as Internet Explorer or Node 6, you will need to transpile the SDK code as part of your build process. - -### Handle transient errors with retries - -While working with Cosmos DB, you might encounter transient failures caused by [rate limits][cosmos_request_units] enforced by the service, or other transient problems like network outages. For information about handling these types of failures, see [Retry pattern][azure_pattern_retry] in the Cloud Design Patterns guide, and the related [Circuit Breaker pattern][azure_pattern_circuit_breaker]. - -### Logging - -Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`. While using `AZURE_LOG_LEVEL` make sure to set it before logging library is initialized. -Ideally pass it through command line, if using libraries like `dotenv` make sure such libraries are initialized before logging library. - -```javascript -const { setLogLevel } = require("@azure/logger"); -setLogLevel("info"); -``` - -For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). - -## Next steps - -### More sample code - -[Several samples][cosmos_samples] are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Cosmos DB: - -- Database Operations -- Container Operations -- Item Operations -- Configuring Indexing -- Reading a container Change Feed -- Stored Procedures -- Changing Database/Container throughput settings -- Multi Region Write Operations - -### Limitations - -Currently the features below are **not supported**. For alternatives options, check the **Workarounds** section below. - -### Data Plane Limitations: - -* Queries with COUNT from a DISTINCT subquery​ -* Direct TCP Mode access​ -* Continuation token for cross partitions queries -* Change Feed: Processor -* Change Feed: Read multiple partitions key values -* Change Feed: Read specific time -* Change Feed: Read from the beginning -* Change Feed: Pull model -* Cross-partition ORDER BY for mixed types - -### Control Plane Limitations: - -* Get CollectionSizeUsage, DatabaseUsage, and DocumentUsage metrics​ -* Create Geospatial Index -* Update Autoscale throughput - -## Workarounds - -### Continuation token for cross partitions queries -You can achieve cross partition queries with continuation token support by using -[Side car pattern](https://github.com/Azure-Samples/Cosmosdb-query-sidecar). -This pattern can also enable applications to be composed of heterogeneous components and technologies. - -### Control Plane operations -Typically, you can use [Azure Portal](https://portal.azure.com/), [Azure Cosmos DB Resource Provider REST API](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider), [Azure CLI](https://docs.microsoft.com/cli/azure/azure-cli-reference-for-cosmos-db) or [PowerShell](https://docs.microsoft.com/azure/cosmos-db/manage-with-powershell) for the control plane unsupported limitations. - - -### Additional documentation - -For more extensive documentation on the Cosmos DB service, see the [Azure Cosmos DB documentation][cosmos_docs] on docs.microsoft.com. - -## Useful links - -- [Welcome to Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/community) -- [Quick start](https://docs.microsoft.com/azure/cosmos-db/sql-api-nodejs-get-started) -- [Tutorial](https://docs.microsoft.com/azure/cosmos-db/sql-api-nodejs-application) -- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/cosmos/samples) -- [Introduction to Resource Model of Azure Cosmos DB Service](https://docs.microsoft.com/azure/cosmos-db/sql-api-resources) -- [Introduction to SQL API of Azure Cosmos DB Service](https://docs.microsoft.com/azure/cosmos-db/sql-api-sql-query) -- [Partitioning](https://docs.microsoft.com/azure/cosmos-db/sql-api-partition-data) -- [API Documentation](https://docs.microsoft.com/javascript/api/%40azure/cosmos/?view=azure-node-latest) - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcosmosdb%2Fcosmos%2FREADME.png) - - - -[azure_cli]: https://docs.microsoft.com/cli/azure -[azure_pattern_circuit_breaker]: https://docs.microsoft.com/azure/architecture/patterns/circuit-breaker -[azure_pattern_retry]: https://docs.microsoft.com/azure/architecture/patterns/retry -[azure_portal]: https://portal.azure.com -[azure_sub]: https://azure.microsoft.com/free/ -[cloud_shell]: https://docs.microsoft.com/azure/cloud-shell/overview -[cloud_shell_bash]: https://shell.azure.com/bash -[cosmos_account_create]: https://docs.microsoft.com/azure/cosmos-db/how-to-manage-database-account -[cosmos_account]: https://docs.microsoft.com/azure/cosmos-db/account-overview -[cosmos_container]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-containers -[cosmos_database]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-databases -[cosmos_docs]: https://docs.microsoft.com/azure/cosmos-db/ -[cosmos_http_status_codes]: https://docs.microsoft.com/rest/api/cosmos-db/http-status-codes-for-cosmosdb -[cosmos_item]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-items -[cosmos_request_units]: https://docs.microsoft.com/azure/cosmos-db/request-units -[cosmos_resources]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items -[cosmos_samples]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/cosmos/samples -[cosmos_sql_queries]: https://docs.microsoft.com/azure/cosmos-db/how-to-sql-query -[cosmos_ttl]: https://docs.microsoft.com/azure/cosmos-db/time-to-live -[npm]: https://www.npmjs.com/package/@azure/cosmos diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.d.ts deleted file mode 100644 index d19f6fd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/// -import { ChangeFeedResponse } from "./ChangeFeedResponse"; -import { Resource } from "./client"; -/** - * Provides iterator for change feed. - * - * Use `Items.changeFeed()` to get an instance of the iterator. - */ -export declare class ChangeFeedIterator { - private clientContext; - private resourceId; - private resourceLink; - private partitionKey; - private changeFeedOptions; - private static readonly IfNoneMatchAllHeaderValue; - private nextIfNoneMatch; - private ifModifiedSince; - private lastStatusCode; - private isPartitionSpecified; - /** - * Gets a value indicating whether there are potentially additional results that can be retrieved. - * - * Initially returns true. This value is set based on whether the last execution returned a continuation token. - * - * @returns Boolean value representing if whether there are potentially additional results that can be retrieved. - */ - get hasMoreResults(): boolean; - /** - * Gets an async iterator which will yield pages of results from Azure Cosmos DB. - */ - getAsyncIterator(): AsyncIterable>>; - /** - * Read feed and retrieves the next page of results in Azure Cosmos DB. - */ - fetchNext(): Promise>>; - private getFeedResponse; -} -//# sourceMappingURL=ChangeFeedIterator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.d.ts.map deleted file mode 100644 index 187c2c3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChangeFeedIterator.d.ts","sourceRoot":"","sources":["../../src/ChangeFeedIterator.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAMpC;;;;GAIG;AACH,qBAAa,kBAAkB,CAAC,CAAC;IAW7B,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,iBAAiB;IAd3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAO;IACxD,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,oBAAoB,CAAU;IAmCtC;;;;;;OAMG;IACH,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED;;OAEG;IACW,gBAAgB,IAAI,aAAa,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IASxF;;OAEG;IACU,SAAS,IAAI,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;YAO5D,eAAe;CA4C9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.js deleted file mode 100644 index 620ba49..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.js +++ /dev/null @@ -1,103 +0,0 @@ -import { __asyncGenerator, __await } from "tslib"; -import { ChangeFeedResponse } from "./ChangeFeedResponse"; -import { Constants, ResourceType, StatusCodes } from "./common"; -/** - * Provides iterator for change feed. - * - * Use `Items.changeFeed()` to get an instance of the iterator. - */ -export class ChangeFeedIterator { - /** - * @internal - */ - constructor(clientContext, resourceId, resourceLink, partitionKey, changeFeedOptions) { - this.clientContext = clientContext; - this.resourceId = resourceId; - this.resourceLink = resourceLink; - this.partitionKey = partitionKey; - this.changeFeedOptions = changeFeedOptions; - // partition key XOR partition key range id - const partitionKeyValid = partitionKey !== undefined; - this.isPartitionSpecified = partitionKeyValid; - let canUseStartFromBeginning = true; - if (changeFeedOptions.continuation) { - this.nextIfNoneMatch = changeFeedOptions.continuation; - canUseStartFromBeginning = false; - } - if (changeFeedOptions.startTime) { - // .toUTCString() is platform specific, but most platforms use RFC 1123. - // In ECMAScript 2018, this was standardized to RFC 1123. - // See for more info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString - this.ifModifiedSince = changeFeedOptions.startTime.toUTCString(); - canUseStartFromBeginning = false; - } - if (canUseStartFromBeginning && !changeFeedOptions.startFromBeginning) { - this.nextIfNoneMatch = ChangeFeedIterator.IfNoneMatchAllHeaderValue; - } - } - /** - * Gets a value indicating whether there are potentially additional results that can be retrieved. - * - * Initially returns true. This value is set based on whether the last execution returned a continuation token. - * - * @returns Boolean value representing if whether there are potentially additional results that can be retrieved. - */ - get hasMoreResults() { - return this.lastStatusCode !== StatusCodes.NotModified; - } - /** - * Gets an async iterator which will yield pages of results from Azure Cosmos DB. - */ - getAsyncIterator() { - return __asyncGenerator(this, arguments, function* getAsyncIterator_1() { - do { - const result = yield __await(this.fetchNext()); - if (result.count > 0) { - yield yield __await(result); - } - } while (this.hasMoreResults); - }); - } - /** - * Read feed and retrieves the next page of results in Azure Cosmos DB. - */ - async fetchNext() { - const response = await this.getFeedResponse(); - this.lastStatusCode = response.statusCode; - this.nextIfNoneMatch = response.headers[Constants.HttpHeaders.ETag]; - return response; - } - async getFeedResponse() { - if (!this.isPartitionSpecified) { - throw new Error("Container is partitioned, but no partition key or partition key range id was specified."); - } - const feedOptions = { initialHeaders: {}, useIncrementalFeed: true }; - if (typeof this.changeFeedOptions.maxItemCount === "number") { - feedOptions.maxItemCount = this.changeFeedOptions.maxItemCount; - } - if (this.changeFeedOptions.sessionToken) { - feedOptions.sessionToken = this.changeFeedOptions.sessionToken; - } - if (this.nextIfNoneMatch) { - feedOptions.accessCondition = { - type: Constants.HttpHeaders.IfNoneMatch, - condition: this.nextIfNoneMatch, - }; - } - if (this.ifModifiedSince) { - feedOptions.initialHeaders[Constants.HttpHeaders.IfModifiedSince] = this.ifModifiedSince; - } - const response = await this.clientContext.queryFeed({ - path: this.resourceLink, - resourceType: ResourceType.item, - resourceId: this.resourceId, - resultFn: (result) => (result ? result.Documents : []), - query: undefined, - options: feedOptions, - partitionKey: this.partitionKey, - }); // TODO: some funky issues with query feed. Probably need to change it up. - return new ChangeFeedResponse(response.result, response.result ? response.result.length : 0, response.code, response.headers); - } -} -ChangeFeedIterator.IfNoneMatchAllHeaderValue = "*"; -//# sourceMappingURL=ChangeFeedIterator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.js.map deleted file mode 100644 index 7768db5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedIterator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChangeFeedIterator.js","sourceRoot":"","sources":["../../src/ChangeFeedIterator.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIhE;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IAO7B;;OAEG;IACH,YACU,aAA4B,EAC5B,UAAkB,EAClB,YAAoB,EACpB,YAAuC,EACvC,iBAAoC;QAJpC,kBAAa,GAAb,aAAa,CAAe;QAC5B,eAAU,GAAV,UAAU,CAAQ;QAClB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,iBAAY,GAAZ,YAAY,CAA2B;QACvC,sBAAiB,GAAjB,iBAAiB,CAAmB;QAE5C,2CAA2C;QAC3C,MAAM,iBAAiB,GAAG,YAAY,KAAK,SAAS,CAAC;QACrD,IAAI,CAAC,oBAAoB,GAAG,iBAAiB,CAAC;QAE9C,IAAI,wBAAwB,GAAG,IAAI,CAAC;QACpC,IAAI,iBAAiB,CAAC,YAAY,EAAE;YAClC,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAC,YAAY,CAAC;YACtD,wBAAwB,GAAG,KAAK,CAAC;SAClC;QAED,IAAI,iBAAiB,CAAC,SAAS,EAAE;YAC/B,wEAAwE;YACxE,yDAAyD;YACzD,uHAAuH;YACvH,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAC,SAAS,CAAC,WAAW,EAAE,C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vC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC;SAChE;QAED,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,WAAW,CAAC,eAAe,GAAG;gBAC5B,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,WAAW;gBACvC,SAAS,EAAE,IAAI,CAAC,eAAe;aAChC,CAAC;SACH;QAED,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;SAC1F;QAED,MAAM,QAAQ,GAAkC,MAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAI;YACrF,IAAI,EAAE,IAAI,CAAC,YAAY;YACvB,YAAY,EAAE,YAAY,CAAC,IAAI;YAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,WAAW;YACpB,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAkB,CAAC,CAAC,0EAA0E;QAE/F,OAAO,IAAI,kBAAkB,CAC3B,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAC5C,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,OAAO,CACjB,CAAC;IACJ,CAAC;;AAnHuB,4CAAyB,GAAG,GAAG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// \nimport { ChangeFeedOptions } from \"./ChangeFeedOptions\";\nimport { ChangeFeedResponse } from \"./ChangeFeedResponse\";\nimport { Resource } from \"./client\";\nimport { ClientContext } from \"./ClientContext\";\nimport { Constants, ResourceType, StatusCodes } from \"./common\";\nimport { FeedOptions } from \"./request\";\nimport { Response } from \"./request\";\n\n/**\n * Provides iterator for change feed.\n *\n * Use `Items.changeFeed()` to get an instance of the iterator.\n */\nexport class ChangeFeedIterator {\n private static readonly IfNoneMatchAllHeaderValue = \"*\";\n private nextIfNoneMatch: string;\n private ifModifiedSince: string;\n private lastStatusCode: number;\n private isPartitionSpecified: boolean;\n\n /**\n * @internal\n */\n constructor(\n private clientContext: ClientContext,\n private resourceId: string,\n private resourceLink: string,\n private partitionKey: string | number | boolean,\n private changeFeedOptions: ChangeFeedOptions\n ) {\n // partition key XOR partition key range id\n const partitionKeyValid = partitionKey !== undefined;\n this.isPartitionSpecified = partitionKeyValid;\n\n let canUseStartFromBeginning = true;\n if (changeFeedOptions.continuation) {\n this.nextIfNoneMatch = changeFeedOptions.continuation;\n canUseStartFromBeginning = false;\n }\n\n if (changeFeedOptions.startTime) {\n // .toUTCString() is platform specific, but most platforms use RFC 1123.\n // In ECMAScript 2018, this was standardized to RFC 1123.\n // See for more info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString\n this.ifModifiedSince = changeFeedOptions.startTime.toUTCString();\n canUseStartFromBeginning = false;\n }\n\n if (canUseStartFromBeginning && !changeFeedOptions.startFromBeginning) {\n this.nextIfNoneMatch = ChangeFeedIterator.IfNoneMatchAllHeaderValue;\n }\n }\n\n /**\n * Gets a value indicating whether there are potentially additional results that can be retrieved.\n *\n * Initially returns true. This value is set based on whether the last execution returned a continuation token.\n *\n * @returns Boolean value representing if whether there are potentially additional results that can be retrieved.\n */\n get hasMoreResults(): boolean {\n return this.lastStatusCode !== StatusCodes.NotModified;\n }\n\n /**\n * Gets an async iterator which will yield pages of results from Azure Cosmos DB.\n */\n public async *getAsyncIterator(): AsyncIterable>> {\n do {\n const result = await this.fetchNext();\n if (result.count > 0) {\n yield result;\n }\n } while (this.hasMoreResults);\n }\n\n /**\n * Read feed and retrieves the next page of results in Azure Cosmos DB.\n */\n public async fetchNext(): Promise>> {\n const response = await this.getFeedResponse();\n this.lastStatusCode = response.statusCode;\n this.nextIfNoneMatch = response.headers[Constants.HttpHeaders.ETag];\n return response;\n }\n\n private async getFeedResponse(): Promise>> {\n if (!this.isPartitionSpecified) {\n throw new Error(\n \"Container is partitioned, but no partition key or partition key range id was specified.\"\n );\n }\n const feedOptions: FeedOptions = { initialHeaders: {}, useIncrementalFeed: true };\n\n if (typeof this.changeFeedOptions.maxItemCount === \"number\") {\n feedOptions.maxItemCount = this.changeFeedOptions.maxItemCount;\n }\n\n if (this.changeFeedOptions.sessionToken) {\n feedOptions.sessionToken = this.changeFeedOptions.sessionToken;\n }\n\n if (this.nextIfNoneMatch) {\n feedOptions.accessCondition = {\n type: Constants.HttpHeaders.IfNoneMatch,\n condition: this.nextIfNoneMatch,\n };\n }\n\n if (this.ifModifiedSince) {\n feedOptions.initialHeaders[Constants.HttpHeaders.IfModifiedSince] = this.ifModifiedSince;\n }\n\n const response: Response> = await (this.clientContext.queryFeed({\n path: this.resourceLink,\n resourceType: ResourceType.item,\n resourceId: this.resourceId,\n resultFn: (result) => (result ? result.Documents : []),\n query: undefined,\n options: feedOptions,\n partitionKey: this.partitionKey,\n }) as Promise); // TODO: some funky issues with query feed. Probably need to change it up.\n\n return new ChangeFeedResponse(\n response.result,\n response.result ? response.result.length : 0,\n response.code,\n response.headers\n );\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.d.ts deleted file mode 100644 index c326b28..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Specifies options for the change feed - * - * Some of these options control where and when to start reading from the change feed. The order of precedence is: - * - continuation - * - startTime - * - startFromBeginning - * - * If none of those options are set, it will start reading changes from the first `ChangeFeedIterator.fetchNext()` call. - */ -export interface ChangeFeedOptions { - /** - * Max amount of items to return per page - */ - maxItemCount?: number; - /** - * The continuation token to start from. - * - * This is equivalent to the etag and continuation value from the `ChangeFeedResponse` - */ - continuation?: string; - /** - * The session token to use. If not specified, will use the most recent captured session token to start with. - */ - sessionToken?: string; - /** - * Signals whether to start from the beginning or not. - */ - startFromBeginning?: boolean; - /** - * Specified the start time to start reading changes from. - */ - startTime?: Date; -} -//# sourceMappingURL=ChangeFeedOptions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.d.ts.map deleted file mode 100644 index 9940b89..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChangeFeedOptions.d.ts","sourceRoot":"","sources":["../../src/ChangeFeedOptions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.js deleted file mode 100644 index 4c929c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=ChangeFeedOptions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.js.map deleted file mode 100644 index 01b17f7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChangeFeedOptions.js","sourceRoot":"","sources":["../../src/ChangeFeedOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Specifies options for the change feed\n *\n * Some of these options control where and when to start reading from the change feed. The order of precedence is:\n * - continuation\n * - startTime\n * - startFromBeginning\n *\n * If none of those options are set, it will start reading changes from the first `ChangeFeedIterator.fetchNext()` call.\n */\nexport interface ChangeFeedOptions {\n /**\n * Max amount of items to return per page\n */\n maxItemCount?: number;\n /**\n * The continuation token to start from.\n *\n * This is equivalent to the etag and continuation value from the `ChangeFeedResponse`\n */\n continuation?: string;\n /**\n * The session token to use. If not specified, will use the most recent captured session token to start with.\n */\n sessionToken?: string;\n /**\n * Signals whether to start from the beginning or not.\n */\n startFromBeginning?: boolean;\n /**\n * Specified the start time to start reading changes from.\n */\n startTime?: Date;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.d.ts deleted file mode 100644 index c72f57c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { CosmosHeaders } from "./queryExecutionContext"; -/** - * A single response page from the Azure Cosmos DB Change Feed - */ -export declare class ChangeFeedResponse { - /** - * Gets the items returned in the response from Azure Cosmos DB - */ - readonly result: T; - /** - * Gets the number of items returned in the response from Azure Cosmos DB - */ - readonly count: number; - /** - * Gets the status code of the response from Azure Cosmos DB - */ - readonly statusCode: number; - /** - * Gets the request charge for this request from the Azure Cosmos DB service. - */ - get requestCharge(): number; - /** - * Gets the activity ID for the request from the Azure Cosmos DB service. - */ - get activityId(): string; - /** - * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service. - * - * This is equivalent to the `etag` property. - */ - get continuation(): string; - /** - * Gets the session token for use in session consistency reads from the Azure Cosmos DB service. - */ - get sessionToken(): string; - /** - * Gets the entity tag associated with last transaction in the Azure Cosmos DB service, - * which can be used as If-Non-Match Access condition for ReadFeed REST request or - * `continuation` property of `ChangeFeedOptions` parameter for - * `Items.changeFeed()` - * to get feed changes since the transaction specified by this entity tag. - * - * This is equivalent to the `continuation` property. - */ - get etag(): string; - /** - * Response headers of the response from Azure Cosmos DB - */ - headers: CosmosHeaders; -} -//# sourceMappingURL=ChangeFeedResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.d.ts.map deleted file mode 100644 index a29098f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChangeFeedResponse.d.ts","sourceRoot":"","sources":["../../src/ChangeFeedResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;GAEG;AACH,qBAAa,kBAAkB,CAAC,CAAC;IAK7B;;OAEG;aACa,MAAM,EAAE,CAAC;IACzB;;OAEG;aACa,KAAK,EAAE,MAAM;IAC7B;;OAEG;aACa,UAAU,EAAE,MAAM;IAMpC;;OAEG;IACH,IAAW,aAAa,IAAI,MAAM,CAGjC;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,MAAM,CAE9B;IAED;;;;OAIG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;;;;;;;OAQG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;OAEG;IACI,OAAO,EAAE,aAAa,CAAC;CAC/B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.js deleted file mode 100644 index 1a4fca2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "./common"; -/** - * A single response page from the Azure Cosmos DB Change Feed - */ -export class ChangeFeedResponse { - /** - * @internal - */ - constructor( - /** - * Gets the items returned in the response from Azure Cosmos DB - */ - result, - /** - * Gets the number of items returned in the response from Azure Cosmos DB - */ - count, - /** - * Gets the status code of the response from Azure Cosmos DB - */ - statusCode, headers) { - this.result = result; - this.count = count; - this.statusCode = statusCode; - this.headers = Object.freeze(headers); - } - /** - * Gets the request charge for this request from the Azure Cosmos DB service. - */ - get requestCharge() { - const rus = this.headers[Constants.HttpHeaders.RequestCharge]; - return rus ? parseInt(rus, 10) : null; - } - /** - * Gets the activity ID for the request from the Azure Cosmos DB service. - */ - get activityId() { - return this.headers[Constants.HttpHeaders.ActivityId]; - } - /** - * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service. - * - * This is equivalent to the `etag` property. - */ - get continuation() { - return this.etag; - } - /** - * Gets the session token for use in session consistency reads from the Azure Cosmos DB service. - */ - get sessionToken() { - return this.headers[Constants.HttpHeaders.SessionToken]; - } - /** - * Gets the entity tag associated with last transaction in the Azure Cosmos DB service, - * which can be used as If-Non-Match Access condition for ReadFeed REST request or - * `continuation` property of `ChangeFeedOptions` parameter for - * `Items.changeFeed()` - * to get feed changes since the transaction specified by this entity tag. - * - * This is equivalent to the `continuation` property. - */ - get etag() { - return this.headers[Constants.HttpHeaders.ETag]; - } -} -//# sourceMappingURL=ChangeFeedResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.js.map deleted file mode 100644 index 3d7dd35..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ChangeFeedResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChangeFeedResponse.js","sourceRoot":"","sources":["../../src/ChangeFeedResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACH;IACE;;OAEG;IACa,MAAS;IACzB;;OAEG;IACa,KAAa;IAC7B;;OAEG;IACa,UAAkB,EAClC,OAAsB;QATN,WAAM,GAAN,MAAM,CAAG;QAIT,UAAK,GAAL,KAAK,CAAQ;QAIb,eAAU,GAAV,UAAU,CAAQ;QAGlC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAW,aAAa;QACtB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAC9D,OAAO,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;OAQG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"./common\";\nimport { CosmosHeaders } from \"./queryExecutionContext\";\n\n/**\n * A single response page from the Azure Cosmos DB Change Feed\n */\nexport class ChangeFeedResponse {\n /**\n * @internal\n */\n constructor(\n /**\n * Gets the items returned in the response from Azure Cosmos DB\n */\n public readonly result: T,\n /**\n * Gets the number of items returned in the response from Azure Cosmos DB\n */\n public readonly count: number,\n /**\n * Gets the status code of the response from Azure Cosmos DB\n */\n public readonly statusCode: number,\n headers: CosmosHeaders\n ) {\n this.headers = Object.freeze(headers);\n }\n\n /**\n * Gets the request charge for this request from the Azure Cosmos DB service.\n */\n public get requestCharge(): number {\n const rus = this.headers[Constants.HttpHeaders.RequestCharge];\n return rus ? parseInt(rus, 10) : null;\n }\n\n /**\n * Gets the activity ID for the request from the Azure Cosmos DB service.\n */\n public get activityId(): string {\n return this.headers[Constants.HttpHeaders.ActivityId];\n }\n\n /**\n * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service.\n *\n * This is equivalent to the `etag` property.\n */\n public get continuation(): string {\n return this.etag;\n }\n\n /**\n * Gets the session token for use in session consistency reads from the Azure Cosmos DB service.\n */\n public get sessionToken(): string {\n return this.headers[Constants.HttpHeaders.SessionToken];\n }\n\n /**\n * Gets the entity tag associated with last transaction in the Azure Cosmos DB service,\n * which can be used as If-Non-Match Access condition for ReadFeed REST request or\n * `continuation` property of `ChangeFeedOptions` parameter for\n * `Items.changeFeed()`\n * to get feed changes since the transaction specified by this entity tag.\n *\n * This is equivalent to the `continuation` property.\n */\n public get etag(): string {\n return this.headers[Constants.HttpHeaders.ETag];\n }\n\n /**\n * Response headers of the response from Azure Cosmos DB\n */\n public headers: CosmosHeaders;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.d.ts deleted file mode 100644 index f6be6a7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { PartitionKeyRange } from "./client/Container/PartitionKeyRange"; -import { Resource } from "./client/Resource"; -import { HTTPMethod, ResourceType } from "./common/constants"; -import { CosmosClientOptions } from "./CosmosClientOptions"; -import { DatabaseAccount, PartitionKey } from "./documents"; -import { GlobalEndpointManager } from "./globalEndpointManager"; -import { SqlQuerySpec } from "./queryExecutionContext"; -import { QueryIterator } from "./queryIterator"; -import { FeedOptions, RequestOptions, Response } from "./request"; -import { PartitionedQueryExecutionInfo } from "./request/ErrorResponse"; -import { BulkOptions } from "./utils/batch"; -/** - * @hidden - * @hidden - */ -export declare class ClientContext { - private cosmosClientOptions; - private globalEndpointManager; - private readonly sessionContainer; - private connectionPolicy; - private pipeline; - partitionKeyDefinitionCache: { - [containerUrl: string]: any; - }; - constructor(cosmosClientOptions: CosmosClientOptions, globalEndpointManager: GlobalEndpointManager); - /** @hidden */ - read({ path, resourceType, resourceId, options, partitionKey, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - queryFeed({ path, resourceType, resourceId, resultFn, query, options, partitionKeyRangeId, partitionKey, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - resultFn: (result: { - [key: string]: any; - }) => any[]; - query: SqlQuerySpec | string; - options: FeedOptions; - partitionKeyRangeId?: string; - partitionKey?: PartitionKey; - }): Promise>; - getQueryPlan(path: string, resourceType: ResourceType, resourceId: string, query: SqlQuerySpec | string, options?: FeedOptions): Promise>; - queryPartitionKeyRanges(collectionLink: string, query?: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - delete({ path, resourceType, resourceId, options, partitionKey, method, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - method?: HTTPMethod; - }): Promise>; - patch({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: any; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - create({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: T; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - private processQueryFeedResponse; - private applySessionToken; - replace({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: any; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - upsert({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: T; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - execute({ sprocLink, params, options, partitionKey, }: { - sprocLink: string; - params?: any[]; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - /** - * Gets the Database account information. - * @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved. - * If not present, current client's url will be used. - */ - getDatabaseAccount(options?: RequestOptions): Promise>; - getWriteEndpoint(): Promise; - getReadEndpoint(): Promise; - getWriteEndpoints(): Promise; - getReadEndpoints(): Promise; - batch({ body, path, partitionKey, resourceId, options, }: { - body: T; - path: string; - partitionKey: string; - resourceId: string; - options?: RequestOptions; - }): Promise>; - bulk({ body, path, partitionKeyRangeId, resourceId, bulkOptions, options, }: { - body: T; - path: string; - partitionKeyRangeId: string; - resourceId: string; - bulkOptions?: BulkOptions; - options?: RequestOptions; - }): Promise>; - private captureSessionToken; - clearSessionToken(path: string): void; - private getSessionParams; - private isMasterResource; - private buildHeaders; - /** - * Returns collection of properties which are derived from the context for Request Creation - * @returns - */ - private getContextDerivedPropsForRequestCreation; -} -//# sourceMappingURL=ClientContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.d.ts.map deleted file mode 100644 index fc6afd3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientContext.d.ts","sourceRoot":"","sources":["../../src/ClientContext.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAa,UAAU,EAAiB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGxF,OAAO,EAAS,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAsC,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAyB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAMxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C;;;GAGG;AACH,qBAAa,aAAa;IAMtB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,qBAAqB;IAN/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAW;IAC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node_modules/@azure/cosmos/dist-esm/src/ClientContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.js deleted file mode 100644 index 0d648aa..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.js +++ /dev/null @@ -1,426 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { v4 } from "uuid"; -const uuid = v4; -import { bearerTokenAuthenticationPolicy, createEmptyPipeline, } from "@azure/core-rest-pipeline"; -import { Constants, HTTPMethod, OperationType, ResourceType } from "./common/constants"; -import { getIdFromLink, getPathFromLink, parseLink } from "./common/helper"; -import { StatusCodes, SubStatusCodes } from "./common/statusCodes"; -import { ConsistencyLevel, DatabaseAccount } from "./documents"; -import { PluginOn, executePlugins } from "./plugins/Plugin"; -import { QueryIterator } from "./queryIterator"; -import { getHeaders } from "./request/request"; -import { RequestHandler } from "./request/RequestHandler"; -import { SessionContainer } from "./session/sessionContainer"; -import { sanitizeEndpoint } from "./utils/checkURL"; -import { createClientLogger } from "@azure/logger"; -const logger = createClientLogger("ClientContext"); -const QueryJsonContentType = "application/query+json"; -/** - * @hidden - * @hidden - */ -export class ClientContext { - constructor(cosmosClientOptions, globalEndpointManager) { - this.cosmosClientOptions = cosmosClientOptions; - this.globalEndpointManager = globalEndpointManager; - this.connectionPolicy = cosmosClientOptions.connectionPolicy; - this.sessionContainer = new SessionContainer(); - this.partitionKeyDefinitionCache = {}; - this.pipeline = null; - if (cosmosClientOptions.aadCredentials) { - this.pipeline = createEmptyPipeline(); - const hrefEndpoint = sanitizeEndpoint(cosmosClientOptions.endpoint); - const scope = `${hrefEndpoint}/.default`; - this.pipeline.addPolicy(bearerTokenAuthenticationPolicy({ - credential: cosmosClientOptions.aadCredentials, - scopes: scope, - challengeCallbacks: { - async authorizeRequest({ request, getAccessToken }) { - const tokenResponse = await getAccessToken([scope], {}); - const AUTH_PREFIX = `type=aad&ver=1.0&sig=`; - const authorizationToken = `${AUTH_PREFIX}${tokenResponse.token}`; - request.headers.set("Authorization", authorizationToken); - }, - }, - })); - } - } - /** @hidden */ - async read({ path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.get, path, operationType: OperationType.Read, resourceId, - options, - resourceType, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // read will use ReadEndpoint since it uses GET operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - this.captureSessionToken(undefined, path, OperationType.Read, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - async queryFeed({ path, resourceType, resourceId, resultFn, query, options, partitionKeyRangeId, partitionKey, }) { - // Query operations will use ReadEndpoint even though it uses - // GET(for queryFeed) and POST(for regular query operations) - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.get, path, operationType: OperationType.Query, partitionKeyRangeId, - resourceId, - resourceType, - options, body: query, partitionKey }); - const requestId = uuid(); - if (query !== undefined) { - request.method = HTTPMethod.post; - } - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - request.headers = await this.buildHeaders(request); - if (query !== undefined) { - request.headers[Constants.HttpHeaders.IsQuery] = "true"; - request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType; - if (typeof query === "string") { - request.body = { query }; // Converts query text to query object. - } - } - this.applySessionToken(request); - logger.info("query " + - requestId + - " started" + - (request.partitionKeyRangeId ? " pkrid: " + request.partitionKeyRangeId : "")); - logger.verbose(request); - const start = Date.now(); - const response = await RequestHandler.request(request); - logger.info("query " + requestId + " finished - " + (Date.now() - start) + "ms"); - this.captureSessionToken(undefined, path, OperationType.Query, response.headers); - return this.processQueryFeedResponse(response, !!query, resultFn); - } - async getQueryPlan(path, resourceType, resourceId, query, options = {}) { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.post, path, operationType: OperationType.Read, resourceId, - resourceType, - options, body: query }); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsQueryPlan] = "True"; - request.headers[Constants.HttpHeaders.QueryVersion] = "1.4"; - request.headers[Constants.HttpHeaders.SupportedQueryFeatures] = - "NonValueAggregate, Aggregate, Distinct, MultipleOrderBy, OffsetAndLimit, OrderBy, Top, CompositeAggregate, GroupBy, MultipleAggregates"; - request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType; - if (typeof query === "string") { - request.body = { query }; // Converts query text to query object. - } - this.applySessionToken(request); - const response = await RequestHandler.request(request); - this.captureSessionToken(undefined, path, OperationType.Query, response.headers); - return response; - } - queryPartitionKeyRanges(collectionLink, query, options) { - const path = getPathFromLink(collectionLink, ResourceType.pkranges); - const id = getIdFromLink(collectionLink); - const cb = (innerOptions) => { - return this.queryFeed({ - path, - resourceType: ResourceType.pkranges, - resourceId: id, - resultFn: (result) => result.PartitionKeyRanges, - query, - options: innerOptions, - }); - }; - return new QueryIterator(this, query, options, cb); - } - async delete({ path, resourceType, resourceId, options = {}, partitionKey, method = HTTPMethod.delete, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: method, operationType: OperationType.Delete, path, - resourceType, - options, - resourceId, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // deleteResource will use WriteEndpoint since it uses DELETE operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - if (parseLink(path).type !== "colls") { - this.captureSessionToken(undefined, path, OperationType.Delete, response.headers); - } - else { - this.clearSessionToken(path); - } - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - async patch({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.patch, operationType: OperationType.Patch, path, - resourceType, - body, - resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // patch will use WriteEndpoint - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - this.captureSessionToken(undefined, path, OperationType.Patch, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - async create({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.post, operationType: OperationType.Create, path, - resourceType, - resourceId, - body, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - // create will use WriteEndpoint since it uses POST operation - this.applySessionToken(request); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - this.captureSessionToken(undefined, path, OperationType.Create, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - processQueryFeedResponse(res, isQuery, resultFn) { - if (isQuery) { - return { result: resultFn(res.result), headers: res.headers, code: res.code }; - } - else { - const newResult = resultFn(res.result).map((body) => body); - return { result: newResult, headers: res.headers, code: res.code }; - } - } - applySessionToken(requestContext) { - const request = this.getSessionParams(requestContext.path); - if (requestContext.headers && requestContext.headers[Constants.HttpHeaders.SessionToken]) { - return; - } - const sessionConsistency = requestContext.headers[Constants.HttpHeaders.ConsistencyLevel]; - if (!sessionConsistency) { - return; - } - if (sessionConsistency !== ConsistencyLevel.Session) { - return; - } - if (request.resourceAddress) { - const sessionToken = this.sessionContainer.get(request); - if (sessionToken) { - requestContext.headers[Constants.HttpHeaders.SessionToken] = sessionToken; - } - } - } - async replace({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.put, operationType: OperationType.Replace, path, - resourceType, - body, - resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // replace will use WriteEndpoint since it uses PUT operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - this.captureSessionToken(undefined, path, OperationType.Replace, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - async upsert({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.post, operationType: OperationType.Upsert, path, - resourceType, - body, - resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsUpsert] = true; - this.applySessionToken(request); - // upsert will use WriteEndpoint since it uses POST operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - this.captureSessionToken(undefined, path, OperationType.Upsert, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - async execute({ sprocLink, params, options = {}, partitionKey, }) { - // Accept a single parameter or an array of parameters. - // Didn't add type annotation for this because we should legacy this behavior - if (params !== null && params !== undefined && !Array.isArray(params)) { - params = [params]; - } - const path = getPathFromLink(sprocLink); - const id = getIdFromLink(sprocLink); - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.post, operationType: OperationType.Execute, path, resourceType: ResourceType.sproc, options, resourceId: id, body: params, partitionKey }); - request.headers = await this.buildHeaders(request); - // executeStoredProcedure will use WriteEndpoint since it uses POST operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - return executePlugins(request, RequestHandler.request, PluginOn.operation); - } - /** - * Gets the Database account information. - * @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved. - * If not present, current client's url will be used. - */ - async getDatabaseAccount(options = {}) { - const endpoint = options.urlConnection || this.cosmosClientOptions.endpoint; - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { endpoint, method: HTTPMethod.get, operationType: OperationType.Read, path: "", resourceType: ResourceType.none, options }); - request.headers = await this.buildHeaders(request); - // await options.beforeOperation({ endpoint, request, headers: requestHeaders }); - const { result, headers } = await executePlugins(request, RequestHandler.request, PluginOn.operation); - const databaseAccount = new DatabaseAccount(result, headers); - return { result: databaseAccount, headers }; - } - getWriteEndpoint() { - return this.globalEndpointManager.getWriteEndpoint(); - } - getReadEndpoint() { - return this.globalEndpointManager.getReadEndpoint(); - } - getWriteEndpoints() { - return this.globalEndpointManager.getWriteEndpoints(); - } - getReadEndpoints() { - return this.globalEndpointManager.getReadEndpoints(); - } - async batch({ body, path, partitionKey, resourceId, options = {}, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.post, operationType: OperationType.Batch, path, - body, resourceType: ResourceType.item, resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsBatchRequest] = true; - request.headers[Constants.HttpHeaders.IsBatchAtomic] = true; - this.applySessionToken(request); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - this.captureSessionToken(undefined, path, OperationType.Batch, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - async bulk({ body, path, partitionKeyRangeId, resourceId, bulkOptions = {}, options = {}, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: HTTPMethod.post, operationType: OperationType.Batch, path, - body, resourceType: ResourceType.item, resourceId, - options }); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsBatchRequest] = true; - request.headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId; - request.headers[Constants.HttpHeaders.IsBatchAtomic] = false; - request.headers[Constants.HttpHeaders.BatchContinueOnError] = - bulkOptions.continueOnError || false; - this.applySessionToken(request); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, PluginOn.operation); - this.captureSessionToken(undefined, path, OperationType.Batch, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, OperationType.Upsert, err.headers); - throw err; - } - } - captureSessionToken(err, path, operationType, resHeaders) { - const request = this.getSessionParams(path); - request.operationType = operationType; - if (!err || - (!this.isMasterResource(request.resourceType) && - (err.code === StatusCodes.PreconditionFailed || - err.code === StatusCodes.Conflict || - (err.code === StatusCodes.NotFound && - err.substatus !== SubStatusCodes.ReadSessionNotAvailable)))) { - this.sessionContainer.set(request, resHeaders); - } - } - clearSessionToken(path) { - const request = this.getSessionParams(path); - this.sessionContainer.remove(request); - } - getSessionParams(resourceLink) { - const resourceId = null; - let resourceAddress = null; - const parserOutput = parseLink(resourceLink); - resourceAddress = parserOutput.objectBody.self; - const resourceType = parserOutput.type; - return { - resourceId, - resourceAddress, - resourceType, - isNameBased: true, - }; - } - isMasterResource(resourceType) { - if (resourceType === Constants.Path.OffersPathSegment || - resourceType === Constants.Path.DatabasesPathSegment || - resourceType === Constants.Path.UsersPathSegment || - resourceType === Constants.Path.PermissionsPathSegment || - resourceType === Constants.Path.TopologyPathSegment || - resourceType === Constants.Path.DatabaseAccountPathSegment || - resourceType === Constants.Path.PartitionKeyRangesPathSegment || - resourceType === Constants.Path.CollectionsPathSegment) { - return true; - } - return false; - } - buildHeaders(requestContext) { - return getHeaders({ - clientOptions: this.cosmosClientOptions, - defaultHeaders: Object.assign(Object.assign({}, this.cosmosClientOptions.defaultHeaders), requestContext.options.initialHeaders), - verb: requestContext.method, - path: requestContext.path, - resourceId: requestContext.resourceId, - resourceType: requestContext.resourceType, - options: requestContext.options, - partitionKeyRangeId: requestContext.partitionKeyRangeId, - useMultipleWriteLocations: this.connectionPolicy.useMultipleWriteLocations, - partitionKey: requestContext.partitionKey, - }); - } - /** - * Returns collection of properties which are derived from the context for Request Creation - * @returns - */ - getContextDerivedPropsForRequestCreation() { - return { - globalEndpointManager: this.globalEndpointManager, - requestAgent: this.cosmosClientOptions.agent, - connectionPolicy: this.connectionPolicy, - client: this, - plugins: this.cosmosClientOptions.plugins, - pipeline: this.pipeline, - }; - } -} -//# sourceMappingURL=ClientContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.js.map deleted file mode 100644 index 8a38666..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/ClientContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClientContext.js","sourceRoot":"","sources":["../../src/ClientContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,MAAM,IAAI,GAAG,EAAE,CAAC;AAChB,OAAO,EAEL,+BAA+B,EAC/B,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAoB,gBAAgB,EAAE,eAAe,EAAgB,MAAM,aAAa,CAAC;AAEhG,OAAO,EA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gBAAgB,CAAC,yBAAyB;YAC1E,YAAY,EAAE,cAAc,CAAC,YAAY;SAC1C,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,wCAAwC;QAQ9C,OAAO;YACL,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;YACjD,YAAY,EAAE,IAAI,CAAC,mBAAmB,CAAC,KAAK;YAC5C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,OAAO;YACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { v4 } from \"uuid\";\nconst uuid = v4;\nimport {\n Pipeline,\n bearerTokenAuthenticationPolicy,\n createEmptyPipeline,\n} from \"@azure/core-rest-pipeline\";\nimport { PartitionKeyRange } from \"./client/Container/PartitionKeyRange\";\nimport { Resource } from \"./client/Resource\";\nimport { Constants, HTTPMethod, OperationType, ResourceType } from \"./common/constants\";\nimport { getIdFromLink, getPathFromLink, parseLink } from \"./common/helper\";\nimport { StatusCodes, SubStatusCodes } from \"./common/statusCodes\";\nimport { Agent, CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { ConnectionPolicy, ConsistencyLevel, DatabaseAccount, PartitionKey } from \"./documents\";\nimport { GlobalEndpointManager } from \"./globalEndpointManager\";\nimport { PluginConfig, PluginOn, executePlugins } from \"./plugins/Plugin\";\nimport { FetchFunctionCallback, SqlQuerySpec } from \"./queryExecutionContext\";\nimport { CosmosHeaders } from \"./queryExecutionContext/CosmosHeaders\";\nimport { QueryIterator } from \"./queryIterator\";\nimport { ErrorResponse } from \"./request\";\nimport { FeedOptions, RequestOptions, Response } from \"./request\";\nimport { PartitionedQueryExecutionInfo } from \"./request/ErrorResponse\";\nimport { getHeaders } from \"./request/request\";\nimport { RequestContext } from \"./request/RequestContext\";\nimport { RequestHandler } from \"./request/RequestHandler\";\nimport { SessionContainer } from \"./session/sessionContainer\";\nimport { SessionContext } from \"./session/SessionContext\";\nimport { BulkOptions } from \"./utils/batch\";\nimport { sanitizeEndpoint } from \"./utils/checkURL\";\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\n\nconst logger: AzureLogger = createClientLogger(\"ClientContext\");\n\nconst QueryJsonContentType = \"application/query+json\";\n\n/**\n * @hidden\n * @hidden\n */\nexport class ClientContext {\n private readonly sessionContainer: SessionContainer;\n private connectionPolicy: ConnectionPolicy;\n private pipeline: Pipeline;\n public partitionKeyDefinitionCache: { [containerUrl: string]: any }; // TODO: PartitionKeyDefinitionCache\n public constructor(\n private cosmosClientOptions: CosmosClientOptions,\n private globalEndpointManager: GlobalEndpointManager\n ) {\n this.connectionPolicy = cosmosClientOptions.connectionPolicy;\n this.sessionContainer = new SessionContainer();\n this.partitionKeyDefinitionCache = {};\n this.pipeline = null;\n if (cosmosClientOptions.aadCredentials) {\n this.pipeline = createEmptyPipeline();\n const hrefEndpoint = sanitizeEndpoint(cosmosClientOptions.endpoint);\n const scope = `${hrefEndpoint}/.default`;\n this.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential: cosmosClientOptions.aadCredentials,\n scopes: scope,\n challengeCallbacks: {\n async authorizeRequest({ request, getAccessToken }) {\n const tokenResponse = await getAccessToken([scope], {});\n const AUTH_PREFIX = `type=aad&ver=1.0&sig=`;\n const authorizationToken = `${AUTH_PREFIX}${tokenResponse.token}`;\n request.headers.set(\"Authorization\", authorizationToken);\n },\n },\n })\n );\n }\n }\n /** @hidden */\n public async read({\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.get,\n path,\n operationType: OperationType.Read,\n resourceId,\n options,\n resourceType,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n\n // read will use ReadEndpoint since it uses GET operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Read, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async queryFeed({\n path,\n resourceType,\n resourceId,\n resultFn,\n query,\n options,\n partitionKeyRangeId,\n partitionKey,\n }: {\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n resultFn: (result: { [key: string]: any }) => any[];\n query: SqlQuerySpec | string;\n options: FeedOptions;\n partitionKeyRangeId?: string;\n partitionKey?: PartitionKey;\n }): Promise> {\n // Query operations will use ReadEndpoint even though it uses\n // GET(for queryFeed) and POST(for regular query operations)\n\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.get,\n path,\n operationType: OperationType.Query,\n partitionKeyRangeId,\n resourceId,\n resourceType,\n options,\n body: query,\n partitionKey,\n };\n const requestId = uuid();\n if (query !== undefined) {\n request.method = HTTPMethod.post;\n }\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n request.headers = await this.buildHeaders(request);\n if (query !== undefined) {\n request.headers[Constants.HttpHeaders.IsQuery] = \"true\";\n request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType;\n if (typeof query === \"string\") {\n request.body = { query }; // Converts query text to query object.\n }\n }\n this.applySessionToken(request);\n logger.info(\n \"query \" +\n requestId +\n \" started\" +\n (request.partitionKeyRangeId ? \" pkrid: \" + request.partitionKeyRangeId : \"\")\n );\n logger.verbose(request);\n const start = Date.now();\n const response = await RequestHandler.request(request);\n logger.info(\"query \" + requestId + \" finished - \" + (Date.now() - start) + \"ms\");\n this.captureSessionToken(undefined, path, OperationType.Query, response.headers);\n return this.processQueryFeedResponse(response, !!query, resultFn);\n }\n\n public async getQueryPlan(\n path: string,\n resourceType: ResourceType,\n resourceId: string,\n query: SqlQuerySpec | string,\n options: FeedOptions = {}\n ): Promise> {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n path,\n operationType: OperationType.Read,\n resourceId,\n resourceType,\n options,\n body: query,\n };\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsQueryPlan] = \"True\";\n request.headers[Constants.HttpHeaders.QueryVersion] = \"1.4\";\n request.headers[Constants.HttpHeaders.SupportedQueryFeatures] =\n \"NonValueAggregate, Aggregate, Distinct, MultipleOrderBy, OffsetAndLimit, OrderBy, Top, CompositeAggregate, GroupBy, MultipleAggregates\";\n request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType;\n if (typeof query === \"string\") {\n request.body = { query }; // Converts query text to query object.\n }\n\n this.applySessionToken(request);\n const response = await RequestHandler.request(request);\n this.captureSessionToken(undefined, path, OperationType.Query, response.headers);\n return response as any;\n }\n\n public queryPartitionKeyRanges(\n collectionLink: string,\n query?: string | SqlQuerySpec,\n options?: FeedOptions\n ): QueryIterator {\n const path = getPathFromLink(collectionLink, ResourceType.pkranges);\n const id = getIdFromLink(collectionLink);\n const cb: FetchFunctionCallback = (innerOptions) => {\n return this.queryFeed({\n path,\n resourceType: ResourceType.pkranges,\n resourceId: id,\n resultFn: (result) => result.PartitionKeyRanges,\n query,\n options: innerOptions,\n });\n };\n return new QueryIterator(this, query, options, cb);\n }\n\n public async delete({\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n method = HTTPMethod.delete,\n }: {\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n method?: HTTPMethod;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: method,\n operationType: OperationType.Delete,\n path,\n resourceType,\n options,\n resourceId,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n // deleteResource will use WriteEndpoint since it uses DELETE operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n if (parseLink(path).type !== \"colls\") {\n this.captureSessionToken(undefined, path, OperationType.Delete, response.headers);\n } else {\n this.clearSessionToken(path);\n }\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async patch({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: any;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.patch,\n operationType: OperationType.Patch,\n path,\n resourceType,\n body,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n\n // patch will use WriteEndpoint\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Patch, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async create({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: T;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Create,\n path,\n resourceType,\n resourceId,\n body,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n // create will use WriteEndpoint since it uses POST operation\n this.applySessionToken(request);\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Create, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n private processQueryFeedResponse(\n res: Response,\n isQuery: boolean,\n resultFn: (result: { [key: string]: any }) => any[]\n ): Response {\n if (isQuery) {\n return { result: resultFn(res.result), headers: res.headers, code: res.code };\n } else {\n const newResult = resultFn(res.result).map((body: any) => body);\n return { result: newResult, headers: res.headers, code: res.code };\n }\n }\n\n private applySessionToken(requestContext: RequestContext): void {\n const request = this.getSessionParams(requestContext.path);\n\n if (requestContext.headers && requestContext.headers[Constants.HttpHeaders.SessionToken]) {\n return;\n }\n\n const sessionConsistency: ConsistencyLevel = requestContext.headers[\n Constants.HttpHeaders.ConsistencyLevel\n ] as ConsistencyLevel;\n if (!sessionConsistency) {\n return;\n }\n\n if (sessionConsistency !== ConsistencyLevel.Session) {\n return;\n }\n\n if (request.resourceAddress) {\n const sessionToken = this.sessionContainer.get(request);\n if (sessionToken) {\n requestContext.headers[Constants.HttpHeaders.SessionToken] = sessionToken;\n }\n }\n }\n\n public async replace({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: any;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.put,\n operationType: OperationType.Replace,\n path,\n resourceType,\n body,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n\n // replace will use WriteEndpoint since it uses PUT operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Replace, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async upsert({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: T;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Upsert,\n path,\n resourceType,\n body,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsUpsert] = true;\n this.applySessionToken(request);\n\n // upsert will use WriteEndpoint since it uses POST operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Upsert, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async execute({\n sprocLink,\n params,\n options = {},\n partitionKey,\n }: {\n sprocLink: string;\n params?: any[];\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n // Accept a single parameter or an array of parameters.\n // Didn't add type annotation for this because we should legacy this behavior\n if (params !== null && params !== undefined && !Array.isArray(params)) {\n params = [params];\n }\n const path = getPathFromLink(sprocLink);\n const id = getIdFromLink(sprocLink);\n\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Execute,\n path,\n resourceType: ResourceType.sproc,\n options,\n resourceId: id,\n body: params,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n // executeStoredProcedure will use WriteEndpoint since it uses POST operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n return executePlugins(request, RequestHandler.request, PluginOn.operation);\n }\n\n /**\n * Gets the Database account information.\n * @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved.\n * If not present, current client's url will be used.\n */\n public async getDatabaseAccount(\n options: RequestOptions = {}\n ): Promise> {\n const endpoint = options.urlConnection || this.cosmosClientOptions.endpoint;\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n endpoint,\n method: HTTPMethod.get,\n operationType: OperationType.Read,\n path: \"\",\n resourceType: ResourceType.none,\n options,\n };\n\n request.headers = await this.buildHeaders(request);\n // await options.beforeOperation({ endpoint, request, headers: requestHeaders });\n const { result, headers } = await executePlugins(\n request,\n RequestHandler.request,\n PluginOn.operation\n );\n\n const databaseAccount = new DatabaseAccount(result, headers);\n\n return { result: databaseAccount, headers };\n }\n\n public getWriteEndpoint(): Promise {\n return this.globalEndpointManager.getWriteEndpoint();\n }\n\n public getReadEndpoint(): Promise {\n return this.globalEndpointManager.getReadEndpoint();\n }\n\n public getWriteEndpoints(): Promise {\n return this.globalEndpointManager.getWriteEndpoints();\n }\n\n public getReadEndpoints(): Promise {\n return this.globalEndpointManager.getReadEndpoints();\n }\n\n public async batch({\n body,\n path,\n partitionKey,\n resourceId,\n options = {},\n }: {\n body: T;\n path: string;\n partitionKey: string;\n resourceId: string;\n options?: RequestOptions;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Batch,\n path,\n body,\n resourceType: ResourceType.item,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsBatchRequest] = true;\n request.headers[Constants.HttpHeaders.IsBatchAtomic] = true;\n\n this.applySessionToken(request);\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Batch, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async bulk({\n body,\n path,\n partitionKeyRangeId,\n resourceId,\n bulkOptions = {},\n options = {},\n }: {\n body: T;\n path: string;\n partitionKeyRangeId: string;\n resourceId: string;\n bulkOptions?: BulkOptions;\n options?: RequestOptions;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Batch,\n path,\n body,\n resourceType: ResourceType.item,\n resourceId,\n options,\n };\n\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsBatchRequest] = true;\n request.headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId;\n request.headers[Constants.HttpHeaders.IsBatchAtomic] = false;\n request.headers[Constants.HttpHeaders.BatchContinueOnError] =\n bulkOptions.continueOnError || false;\n\n this.applySessionToken(request);\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Batch, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n private captureSessionToken(\n err: ErrorResponse,\n path: string,\n operationType: OperationType,\n resHeaders: CosmosHeaders\n ): void {\n const request = this.getSessionParams(path);\n request.operationType = operationType;\n if (\n !err ||\n (!this.isMasterResource(request.resourceType) &&\n (err.code === StatusCodes.PreconditionFailed ||\n err.code === StatusCodes.Conflict ||\n (err.code === StatusCodes.NotFound &&\n err.substatus !== SubStatusCodes.ReadSessionNotAvailable)))\n ) {\n this.sessionContainer.set(request, resHeaders);\n }\n }\n\n public clearSessionToken(path: string): void {\n const request = this.getSessionParams(path);\n this.sessionContainer.remove(request);\n }\n\n private getSessionParams(resourceLink: string): SessionContext {\n const resourceId: string = null;\n let resourceAddress: string = null;\n const parserOutput = parseLink(resourceLink);\n\n resourceAddress = parserOutput.objectBody.self;\n\n const resourceType = parserOutput.type;\n return {\n resourceId,\n resourceAddress,\n resourceType,\n isNameBased: true,\n };\n }\n\n private isMasterResource(resourceType: string): boolean {\n if (\n resourceType === Constants.Path.OffersPathSegment ||\n resourceType === Constants.Path.DatabasesPathSegment ||\n resourceType === Constants.Path.UsersPathSegment ||\n resourceType === Constants.Path.PermissionsPathSegment ||\n resourceType === Constants.Path.TopologyPathSegment ||\n resourceType === Constants.Path.DatabaseAccountPathSegment ||\n resourceType === Constants.Path.PartitionKeyRangesPathSegment ||\n resourceType === Constants.Path.CollectionsPathSegment\n ) {\n return true;\n }\n\n return false;\n }\n\n private buildHeaders(requestContext: RequestContext): Promise {\n return getHeaders({\n clientOptions: this.cosmosClientOptions,\n defaultHeaders: {\n ...this.cosmosClientOptions.defaultHeaders,\n ...requestContext.options.initialHeaders,\n },\n verb: requestContext.method,\n path: requestContext.path,\n resourceId: requestContext.resourceId,\n resourceType: requestContext.resourceType,\n options: requestContext.options,\n partitionKeyRangeId: requestContext.partitionKeyRangeId,\n useMultipleWriteLocations: this.connectionPolicy.useMultipleWriteLocations,\n partitionKey: requestContext.partitionKey,\n });\n }\n\n /**\n * Returns collection of properties which are derived from the context for Request Creation\n * @returns\n */\n private getContextDerivedPropsForRequestCreation(): {\n globalEndpointManager: GlobalEndpointManager;\n connectionPolicy: ConnectionPolicy;\n requestAgent: Agent;\n client?: ClientContext;\n pipeline?: Pipeline;\n plugins: PluginConfig[];\n } {\n return {\n globalEndpointManager: this.globalEndpointManager,\n requestAgent: this.cosmosClientOptions.agent,\n connectionPolicy: this.connectionPolicy,\n client: this,\n plugins: this.cosmosClientOptions.plugins,\n pipeline: this.pipeline,\n };\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.d.ts deleted file mode 100644 index f4fe64a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Database, Databases } from "./client/Database"; -import { Offer, Offers } from "./client/Offer"; -import { CosmosClientOptions } from "./CosmosClientOptions"; -import { DatabaseAccount } from "./documents"; -import { RequestOptions, ResourceResponse } from "./request"; -/** - * Provides a client-side logical representation of the Azure Cosmos DB database account. - * This client is used to configure and execute requests in the Azure Cosmos DB database service. - * @example Instantiate a client and create a new database - * ```typescript - * const client = new CosmosClient({endpoint: "", auth: {masterKey: ""}}); - * await client.databases.create({id: ""}); - * ``` - * @example Instantiate a client with custom Connection Policy - * ```typescript - * const connectionPolicy = new ConnectionPolicy(); - * connectionPolicy.RequestTimeout = 10000; - * const client = new CosmosClient({ - * endpoint: "", - * auth: {masterKey: ""}, - * connectionPolicy - * }); - * ``` - */ -export declare class CosmosClient { - /** - * Used for creating new databases, or querying/reading all databases. - * - * Use `.database(id)` to read, replace, or delete a specific, existing database by id. - * - * @example Create a new database - * ```typescript - * const {resource: databaseDefinition, database} = await client.databases.create({id: ""}); - * ``` - */ - readonly databases: Databases; - /** - * Used for querying & reading all offers. - * - * Use `.offer(id)` to read, or replace existing offers. - */ - readonly offers: Offers; - private clientContext; - private endpointRefresher; - /** - * Creates a new {@link CosmosClient} object from a connection string. Your database connection string can be found in the Azure Portal - */ - constructor(connectionString: string); - /** - * Creates a new {@link CosmosClient} object. See {@link CosmosClientOptions} for more details on what options you can use. - * @param options - bag of options; require at least endpoint and auth to be configured - */ - constructor(options: CosmosClientOptions); - /** - * Get information about the current {@link DatabaseAccount} (including which regions are supported, etc.) - */ - getDatabaseAccount(options?: RequestOptions): Promise>; - /** - * Gets the currently used write endpoint url. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoint(): Promise; - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoint(): Promise; - /** - * Gets the known write endpoints. Useful for troubleshooting purposes. - * - * The urls may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoints(): Promise; - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoints(): Promise; - /** - * Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database. - * - * This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object. - * - * @param id - The id of the database. - * @example Create a new container off of an existing database - * ```typescript - * const container = client.database("").containers.create(""); - * ``` - * - * @example Delete an existing database - * ```typescript - * await client.database("").delete(); - * ``` - */ - database(id: string): Database; - /** - * Used for reading, or updating a existing offer by id. - * @param id - The id of the offer. - */ - offer(id: string): Offer; - /** - * Clears background endpoint refresher. Use client.dispose() when destroying the CosmosClient within another process. - */ - dispose(): void; - private backgroundRefreshEndpointList; -} -//# sourceMappingURL=CosmosClient.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.d.ts.map deleted file mode 100644 index ab7af01..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CosmosClient.d.ts","sourceRoot":"","sources":["../../src/CosmosClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAK/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAA2B,MAAM,aAAa,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,YAAY;IACvB;;;;;;;;;OASG;IACH,SAAgB,SAAS,EAAE,SAAS,CAAC;IACrC;;;;OAIG;IACH,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,iBAAiB,CAAe;IACxC;;OAEG;gBACS,gBAAgB,EAAE,MAAM;IACpC;;;OAGG;gBACS,OAAO,EAAE,mBAAmB;IAkDxC;;OAEG;IACU,kBAAkB,CAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAK7C;;;;OAIG;IACI,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1C;;;;OAIG;IACI,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC;;;;OAIG;IACI,iBAAiB,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAItD;;;;OAIG;IACI,gBAAgB,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAIrD;;;;;;;;;;;;;;;OAeG;IACI,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ;IAIrC;;;OAGG;IACI,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK;IAI/B;;OAEG;IACI,OAAO,IAAI,IAAI;YAIR,6BAA6B;CAe5C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.js deleted file mode 100644 index f49f7be..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.js +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Database, Databases } from "./client/Database"; -import { Offer, Offers } from "./client/Offer"; -import { ClientContext } from "./ClientContext"; -import { parseConnectionString } from "./common"; -import { Constants } from "./common/constants"; -import { getUserAgent } from "./common/platform"; -import { defaultConnectionPolicy } from "./documents"; -import { GlobalEndpointManager } from "./globalEndpointManager"; -import { ResourceResponse } from "./request"; -import { checkURL } from "./utils/checkURL"; -/** - * Provides a client-side logical representation of the Azure Cosmos DB database account. - * This client is used to configure and execute requests in the Azure Cosmos DB database service. - * @example Instantiate a client and create a new database - * ```typescript - * const client = new CosmosClient({endpoint: "", auth: {masterKey: ""}}); - * await client.databases.create({id: ""}); - * ``` - * @example Instantiate a client with custom Connection Policy - * ```typescript - * const connectionPolicy = new ConnectionPolicy(); - * connectionPolicy.RequestTimeout = 10000; - * const client = new CosmosClient({ - * endpoint: "", - * auth: {masterKey: ""}, - * connectionPolicy - * }); - * ``` - */ -export class CosmosClient { - constructor(optionsOrConnectionString) { - var _a, _b; - if (typeof optionsOrConnectionString === "string") { - optionsOrConnectionString = parseConnectionString(optionsOrConnectionString); - } - const endpoint = checkURL(optionsOrConnectionString.endpoint); - if (!endpoint) { - throw new Error("Invalid endpoint specified"); - } - optionsOrConnectionString.connectionPolicy = Object.assign({}, defaultConnectionPolicy, optionsOrConnectionString.connectionPolicy); - optionsOrConnectionString.defaultHeaders = optionsOrConnectionString.defaultHeaders || {}; - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.CacheControl] = "no-cache"; - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.Version] = - Constants.CurrentVersion; - if (optionsOrConnectionString.consistencyLevel !== undefined) { - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.ConsistencyLevel] = - optionsOrConnectionString.consistencyLevel; - } - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.UserAgent] = getUserAgent(optionsOrConnectionString.userAgentSuffix); - const globalEndpointManager = new GlobalEndpointManager(optionsOrConnectionString, async (opts) => this.getDatabaseAccount(opts)); - this.clientContext = new ClientContext(optionsOrConnectionString, globalEndpointManager); - if (((_a = optionsOrConnectionString.connectionPolicy) === null || _a === void 0 ? void 0 : _a.enableEndpointDiscovery) && - ((_b = optionsOrConnectionString.connectionPolicy) === null || _b === void 0 ? void 0 : _b.enableBackgroundEndpointRefreshing)) { - this.backgroundRefreshEndpointList(globalEndpointManager, optionsOrConnectionString.connectionPolicy.endpointRefreshRateInMs || - defaultConnectionPolicy.endpointRefreshRateInMs); - } - this.databases = new Databases(this, this.clientContext); - this.offers = new Offers(this, this.clientContext); - } - /** - * Get information about the current {@link DatabaseAccount} (including which regions are supported, etc.) - */ - async getDatabaseAccount(options) { - const response = await this.clientContext.getDatabaseAccount(options); - return new ResourceResponse(response.result, response.headers, response.code); - } - /** - * Gets the currently used write endpoint url. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoint() { - return this.clientContext.getWriteEndpoint(); - } - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoint() { - return this.clientContext.getReadEndpoint(); - } - /** - * Gets the known write endpoints. Useful for troubleshooting purposes. - * - * The urls may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoints() { - return this.clientContext.getWriteEndpoints(); - } - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoints() { - return this.clientContext.getReadEndpoints(); - } - /** - * Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database. - * - * This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object. - * - * @param id - The id of the database. - * @example Create a new container off of an existing database - * ```typescript - * const container = client.database("").containers.create(""); - * ``` - * - * @example Delete an existing database - * ```typescript - * await client.database("").delete(); - * ``` - */ - database(id) { - return new Database(this, id, this.clientContext); - } - /** - * Used for reading, or updating a existing offer by id. - * @param id - The id of the offer. - */ - offer(id) { - return new Offer(this, id, this.clientContext); - } - /** - * Clears background endpoint refresher. Use client.dispose() when destroying the CosmosClient within another process. - */ - dispose() { - clearTimeout(this.endpointRefresher); - } - async backgroundRefreshEndpointList(globalEndpointManager, refreshRate) { - this.endpointRefresher = setInterval(() => { - try { - globalEndpointManager.refreshEndpointList(); - } - catch (e) { - console.warn("Failed to refresh endpoints", e); - } - }, refreshRate); - if (this.endpointRefresher.unref && typeof this.endpointRefresher.unref === "function") { - this.endpointRefresher.unref(); - } - } -} -//# sourceMappingURL=CosmosClient.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.js.map deleted file mode 100644 index da73490..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CosmosClient.js","sourceRoot":"","sources":["../../src/CosmosClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAmB,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EA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;IACI,QAAQ,CAAC,EAAU;QACxB,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,EAAU;QACrB,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED;;OAEG;IACI,OAAO;QACZ,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IAEO,KAAK,CAAC,6BAA6B,CACzC,qBAA4C,EAC5C,WAAmB;QAEnB,IAAI,CAAC,iBAAiB,GAAG,WAAW,CAAC,GAAG,EAAE;YACxC,IAAI;gBACF,qBAAqB,CAAC,mBAAmB,EAAE,CAAC;aAC7C;YAAC,OAAO,CAAM,EAAE;gBACf,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC;aAChD;QACH,CAAC,EAAE,WAAW,CAAC,CAAC;QAChB,IAAI,IAAI,CAAC,iBAAiB,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,KAAK,UAAU,EAAE;YACtF,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;SAChC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Database, Databases } from \"./client/Database\";\nimport { Offer, Offers } from \"./client/Offer\";\nimport { ClientContext } from \"./ClientContext\";\nimport { parseConnectionString } from \"./common\";\nimport { Constants } from \"./common/constants\";\nimport { getUserAgent } from \"./common/platform\";\nimport { CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { DatabaseAccount, defaultConnectionPolicy } from \"./documents\";\nimport { GlobalEndpointManager } from \"./globalEndpointManager\";\nimport { RequestOptions, ResourceResponse } from \"./request\";\nimport { checkURL } from \"./utils/checkURL\";\n\n/**\n * Provides a client-side logical representation of the Azure Cosmos DB database account.\n * This client is used to configure and execute requests in the Azure Cosmos DB database service.\n * @example Instantiate a client and create a new database\n * ```typescript\n * const client = new CosmosClient({endpoint: \"\", auth: {masterKey: \"\"}});\n * await client.databases.create({id: \"\"});\n * ```\n * @example Instantiate a client with custom Connection Policy\n * ```typescript\n * const connectionPolicy = new ConnectionPolicy();\n * connectionPolicy.RequestTimeout = 10000;\n * const client = new CosmosClient({\n * endpoint: \"\",\n * auth: {masterKey: \"\"},\n * connectionPolicy\n * });\n * ```\n */\nexport class CosmosClient {\n /**\n * Used for creating new databases, or querying/reading all databases.\n *\n * Use `.database(id)` to read, replace, or delete a specific, existing database by id.\n *\n * @example Create a new database\n * ```typescript\n * const {resource: databaseDefinition, database} = await client.databases.create({id: \"\"});\n * ```\n */\n public readonly databases: Databases;\n /**\n * Used for querying & reading all offers.\n *\n * Use `.offer(id)` to read, or replace existing offers.\n */\n public readonly offers: Offers;\n private clientContext: ClientContext;\n private endpointRefresher: NodeJS.Timer;\n /**\n * Creates a new {@link CosmosClient} object from a connection string. Your database connection string can be found in the Azure Portal\n */\n constructor(connectionString: string);\n /**\n * Creates a new {@link CosmosClient} object. See {@link CosmosClientOptions} for more details on what options you can use.\n * @param options - bag of options; require at least endpoint and auth to be configured\n */\n constructor(options: CosmosClientOptions);\n constructor(optionsOrConnectionString: string | CosmosClientOptions) {\n if (typeof optionsOrConnectionString === \"string\") {\n optionsOrConnectionString = parseConnectionString(optionsOrConnectionString);\n }\n\n const endpoint = checkURL(optionsOrConnectionString.endpoint);\n if (!endpoint) {\n throw new Error(\"Invalid endpoint specified\");\n }\n\n optionsOrConnectionString.connectionPolicy = Object.assign(\n {},\n defaultConnectionPolicy,\n optionsOrConnectionString.connectionPolicy\n );\n\n optionsOrConnectionString.defaultHeaders = optionsOrConnectionString.defaultHeaders || {};\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.CacheControl] = \"no-cache\";\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.Version] =\n Constants.CurrentVersion;\n if (optionsOrConnectionString.consistencyLevel !== undefined) {\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.ConsistencyLevel] =\n optionsOrConnectionString.consistencyLevel;\n }\n\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.UserAgent] = getUserAgent(\n optionsOrConnectionString.userAgentSuffix\n );\n\n const globalEndpointManager = new GlobalEndpointManager(\n optionsOrConnectionString,\n async (opts: RequestOptions) => this.getDatabaseAccount(opts)\n );\n this.clientContext = new ClientContext(optionsOrConnectionString, globalEndpointManager);\n if (\n optionsOrConnectionString.connectionPolicy?.enableEndpointDiscovery &&\n optionsOrConnectionString.connectionPolicy?.enableBackgroundEndpointRefreshing\n ) {\n this.backgroundRefreshEndpointList(\n globalEndpointManager,\n optionsOrConnectionString.connectionPolicy.endpointRefreshRateInMs ||\n defaultConnectionPolicy.endpointRefreshRateInMs\n );\n }\n\n this.databases = new Databases(this, this.clientContext);\n this.offers = new Offers(this, this.clientContext);\n }\n\n /**\n * Get information about the current {@link DatabaseAccount} (including which regions are supported, etc.)\n */\n public async getDatabaseAccount(\n options?: RequestOptions\n ): Promise> {\n const response = await this.clientContext.getDatabaseAccount(options);\n return new ResourceResponse(response.result, response.headers, response.code);\n }\n\n /**\n * Gets the currently used write endpoint url. Useful for troubleshooting purposes.\n *\n * The url may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getWriteEndpoint(): Promise {\n return this.clientContext.getWriteEndpoint();\n }\n\n /**\n * Gets the currently used read endpoint. Useful for troubleshooting purposes.\n *\n * The url may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getReadEndpoint(): Promise {\n return this.clientContext.getReadEndpoint();\n }\n\n /**\n * Gets the known write endpoints. Useful for troubleshooting purposes.\n *\n * The urls may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getWriteEndpoints(): Promise {\n return this.clientContext.getWriteEndpoints();\n }\n\n /**\n * Gets the currently used read endpoint. Useful for troubleshooting purposes.\n *\n * The url may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getReadEndpoints(): Promise {\n return this.clientContext.getReadEndpoints();\n }\n\n /**\n * Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database.\n *\n * This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object.\n *\n * @param id - The id of the database.\n * @example Create a new container off of an existing database\n * ```typescript\n * const container = client.database(\"\").containers.create(\"\");\n * ```\n *\n * @example Delete an existing database\n * ```typescript\n * await client.database(\"\").delete();\n * ```\n */\n public database(id: string): Database {\n return new Database(this, id, this.clientContext);\n }\n\n /**\n * Used for reading, or updating a existing offer by id.\n * @param id - The id of the offer.\n */\n public offer(id: string): Offer {\n return new Offer(this, id, this.clientContext);\n }\n\n /**\n * Clears background endpoint refresher. Use client.dispose() when destroying the CosmosClient within another process.\n */\n public dispose(): void {\n clearTimeout(this.endpointRefresher);\n }\n\n private async backgroundRefreshEndpointList(\n globalEndpointManager: GlobalEndpointManager,\n refreshRate: number\n ) {\n this.endpointRefresher = setInterval(() => {\n try {\n globalEndpointManager.refreshEndpointList();\n } catch (e: any) {\n console.warn(\"Failed to refresh endpoints\", e);\n }\n }, refreshRate);\n if (this.endpointRefresher.unref && typeof this.endpointRefresher.unref === \"function\") {\n this.endpointRefresher.unref();\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.d.ts deleted file mode 100644 index 3ce7baa..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { TokenCredential } from "@azure/core-auth"; -import { TokenProvider } from "./auth"; -import { PermissionDefinition } from "./client"; -import { ConnectionPolicy, ConsistencyLevel } from "./documents"; -import { CosmosHeaders } from "./queryExecutionContext/CosmosHeaders"; -export interface Agent { - maxFreeSockets: number; - maxSockets: number; - sockets: any; - requests: any; - destroy(): void; -} -export interface CosmosClientOptions { - /** The service endpoint to use to create the client. */ - endpoint: string; - /** The account master or readonly key */ - key?: string; - /** An object that contains resources tokens. - * Keys for the object are resource Ids and values are the resource tokens. - */ - resourceTokens?: { - [resourcePath: string]: string; - }; - /** A user supplied function for resolving header authorization tokens. - * Allows users to generating their own auth tokens, potentially using a separate service - */ - tokenProvider?: TokenProvider; - /** AAD token from `@azure/identity` - * Obtain a credential object by creating an `@azure/identity` credential object - * We will then use your credential object and a scope URL (your cosmos db endpoint) - * to authenticate requests to Cosmos - */ - aadCredentials?: TokenCredential; - /** An array of {@link Permission} objects. */ - permissionFeed?: PermissionDefinition[]; - /** An instance of {@link ConnectionPolicy} class. - * This parameter is optional and the default connectionPolicy will be used if omitted. - */ - connectionPolicy?: ConnectionPolicy; - /** An optional parameter that represents the consistency level. - * It can take any value from {@link ConsistencyLevel}. - */ - consistencyLevel?: keyof typeof ConsistencyLevel; - defaultHeaders?: CosmosHeaders; - /** An optional custom http(s) Agent to be used in NodeJS enironments - * Use an agent such as https://github.com/TooTallNate/node-proxy-agent if you need to connect to Cosmos via a proxy - */ - agent?: Agent; - /** A custom string to append to the default SDK user agent. */ - userAgentSuffix?: string; -} -//# sourceMappingURL=CosmosClientOptions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.d.ts.map deleted file mode 100644 index cdc8976..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CosmosClientOptions.d.ts","sourceRoot":"","sources":["../../src/CosmosClientOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAGtE,MAAM,WAAW,KAAK;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,8CAA8C;IAC9C,cAAc,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACxC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,OAAO,gBAAgB,CAAC;IACjD,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC;CAG1B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.js deleted file mode 100644 index 91be933..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=CosmosClientOptions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.js.map deleted file mode 100644 index 52510c2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/CosmosClientOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CosmosClientOptions.js","sourceRoot":"","sources":["../../src/CosmosClientOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { TokenProvider } from \"./auth\";\nimport { PermissionDefinition } from \"./client\";\nimport { ConnectionPolicy, ConsistencyLevel } from \"./documents\";\nimport { PluginConfig } from \"./plugins/Plugin\";\nimport { CosmosHeaders } from \"./queryExecutionContext/CosmosHeaders\";\n\n// We expose our own Agent interface to avoid taking a dependency on and leaking node types. This interface should mirror the node Agent interface\nexport interface Agent {\n maxFreeSockets: number;\n maxSockets: number;\n sockets: any;\n requests: any;\n destroy(): void;\n}\n\nexport interface CosmosClientOptions {\n /** The service endpoint to use to create the client. */\n endpoint: string;\n /** The account master or readonly key */\n key?: string;\n /** An object that contains resources tokens.\n * Keys for the object are resource Ids and values are the resource tokens.\n */\n resourceTokens?: { [resourcePath: string]: string };\n /** A user supplied function for resolving header authorization tokens.\n * Allows users to generating their own auth tokens, potentially using a separate service\n */\n tokenProvider?: TokenProvider;\n /** AAD token from `@azure/identity`\n * Obtain a credential object by creating an `@azure/identity` credential object\n * We will then use your credential object and a scope URL (your cosmos db endpoint)\n * to authenticate requests to Cosmos\n */\n aadCredentials?: TokenCredential;\n /** An array of {@link Permission} objects. */\n permissionFeed?: PermissionDefinition[];\n /** An instance of {@link ConnectionPolicy} class.\n * This parameter is optional and the default connectionPolicy will be used if omitted.\n */\n connectionPolicy?: ConnectionPolicy;\n /** An optional parameter that represents the consistency level.\n * It can take any value from {@link ConsistencyLevel}.\n */\n consistencyLevel?: keyof typeof ConsistencyLevel;\n defaultHeaders?: CosmosHeaders;\n /** An optional custom http(s) Agent to be used in NodeJS enironments\n * Use an agent such as https://github.com/TooTallNate/node-proxy-agent if you need to connect to Cosmos via a proxy\n */\n agent?: Agent;\n /** A custom string to append to the default SDK user agent. */\n userAgentSuffix?: string;\n /** @internal */\n plugins?: PluginConfig[];\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.d.ts deleted file mode 100644 index b405d86..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { HTTPMethod, ResourceType } from "./common"; -import { CosmosClientOptions } from "./CosmosClientOptions"; -import { CosmosHeaders } from "./queryExecutionContext"; -/** @hidden */ -export interface RequestInfo { - verb: HTTPMethod; - path: string; - resourceId: string; - resourceType: ResourceType; - headers: CosmosHeaders; -} -export declare type TokenProvider = (requestInfo: RequestInfo) => Promise; -/** - * @hidden - */ -export declare function setAuthorizationHeader(clientOptions: CosmosClientOptions, verb: HTTPMethod, path: string, resourceId: string, resourceType: ResourceType, headers: CosmosHeaders): Promise; -/** - * The default function for setting header token using the masterKey - * @hidden - */ -export declare function setAuthorizationTokenHeaderUsingMasterKey(verb: HTTPMethod, resourceId: string, resourceType: ResourceType, headers: CosmosHeaders, masterKey: string): Promise; -/** - * @hidden - */ -export declare function getAuthorizationTokenUsingResourceTokens(resourceTokens: { - [resourceId: string]: string; -}, path: string, resourceId: string): string; -//# sourceMappingURL=auth.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.d.ts.map deleted file mode 100644 index afb24c8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,UAAU,EACV,YAAY,EAEb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,cAAc;AACd,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,oBAAY,aAAa,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE1E;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,mBAAmB,EAClC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED;;;GAGG;AACH,wBAAsB,yCAAyC,CAC7D,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;GAEG;AAEH,wBAAgB,wCAAwC,CACtD,cAAc,EAAE;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAChD,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,MAAM,CA+CR"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.js deleted file mode 100644 index d0bf4cc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { generateHeaders } from "./utils/headers"; -import { Constants, getResourceIdFromPath, ResourceType, trimSlashFromLeftAndRight, } from "./common"; -/** - * @hidden - */ -export async function setAuthorizationHeader(clientOptions, verb, path, resourceId, resourceType, headers) { - if (clientOptions.permissionFeed) { - clientOptions.resourceTokens = {}; - for (const permission of clientOptions.permissionFeed) { - const id = getResourceIdFromPath(permission.resource); - if (!id) { - throw new Error(`authorization error: ${id} \ - is an invalid resourceId in permissionFeed`); - } - clientOptions.resourceTokens[id] = permission._token; // TODO: any - } - } - if (clientOptions.key) { - await setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, clientOptions.key); - } - else if (clientOptions.resourceTokens) { - headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(getAuthorizationTokenUsingResourceTokens(clientOptions.resourceTokens, path, resourceId)); - } - else if (clientOptions.tokenProvider) { - headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(await clientOptions.tokenProvider({ verb, path, resourceId, resourceType, headers })); - } -} -/** - * The default function for setting header token using the masterKey - * @hidden - */ -export async function setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, masterKey) { - // TODO This should live in cosmos-sign - if (resourceType === ResourceType.offer) { - resourceId = resourceId && resourceId.toLowerCase(); - } - headers = Object.assign(headers, await generateHeaders(masterKey, verb, resourceType, resourceId)); -} -/** - * @hidden - */ -// TODO: Resource tokens -export function getAuthorizationTokenUsingResourceTokens(resourceTokens, path, resourceId) { - if (resourceTokens && Object.keys(resourceTokens).length > 0) { - // For database account access(through getDatabaseAccount API), path and resourceId are "", - // so in this case we return the first token to be used for creating the auth header as the - // service will accept any token in this case - if (!path && !resourceId) { - return resourceTokens[Object.keys(resourceTokens)[0]]; - } - // If we have exact resource token for the path use it - if (resourceId && resourceTokens[resourceId]) { - return resourceTokens[resourceId]; - } - // minimum valid path /dbs - if (!path || path.length < 4) { - // TODO: This should throw an error - return null; - } - path = trimSlashFromLeftAndRight(path); - const pathSegments = (path && path.split("/")) || []; - // Item path - if (pathSegments.length === 6) { - // Look for a container token matching the item path - const containerPath = pathSegments.slice(0, 4).map(decodeURIComponent).join("/"); - if (resourceTokens[containerPath]) { - return resourceTokens[containerPath]; - } - } - // TODO remove in v4: This is legacy behavior that lets someone use a resource token pointing ONLY at an ID - // It was used when _rid was exposed by the SDK, but now that we are using user provided ids it is not needed - // However removing it now would be a breaking change - // if it's an incomplete path like /dbs/db1/colls/, start from the parent resource - let index = pathSegments.length % 2 === 0 ? pathSegments.length - 1 : pathSegments.length - 2; - for (; index > 0; index -= 2) { - const id = decodeURI(pathSegments[index]); - if (resourceTokens[id]) { - return resourceTokens[id]; - } - } - } - // TODO: This should throw an error - return null; -} -//# sourceMappingURL=auth.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.js.map deleted file mode 100644 index d205acc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/auth.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,SAAS,EACT,qBAAqB,EAErB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAelB;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,aAAkC,EAClC,IAAgB,EAChB,IAAY,EACZ,UAAkB,EAClB,YAA0B,EAC1B,OAAsB;IAEtB,IAAI,aAAa,CAAC,cAAc,EAAE;QAChC,aA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,IAAI,KAAK,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9F,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE;YAC5B,MAAM,EAAE,GAAG,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,IAAI,cAAc,CAAC,EAAE,CAAC,EAAE;gBACtB,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC;aAC3B;SACF;KACF;IAED,mCAAmC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { generateHeaders } from \"./utils/headers\";\nimport {\n Constants,\n getResourceIdFromPath,\n HTTPMethod,\n ResourceType,\n trimSlashFromLeftAndRight,\n} from \"./common\";\nimport { CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { CosmosHeaders } from \"./queryExecutionContext\";\n\n/** @hidden */\nexport interface RequestInfo {\n verb: HTTPMethod;\n path: string;\n resourceId: string;\n resourceType: ResourceType;\n headers: CosmosHeaders;\n}\n\nexport type TokenProvider = (requestInfo: RequestInfo) => Promise;\n\n/**\n * @hidden\n */\nexport async function setAuthorizationHeader(\n clientOptions: CosmosClientOptions,\n verb: HTTPMethod,\n path: string,\n resourceId: string,\n resourceType: ResourceType,\n headers: CosmosHeaders\n): Promise {\n if (clientOptions.permissionFeed) {\n clientOptions.resourceTokens = {};\n for (const permission of clientOptions.permissionFeed) {\n const id = getResourceIdFromPath(permission.resource);\n if (!id) {\n throw new Error(`authorization error: ${id} \\\n is an invalid resourceId in permissionFeed`);\n }\n\n clientOptions.resourceTokens[id] = (permission as any)._token; // TODO: any\n }\n }\n\n if (clientOptions.key) {\n await setAuthorizationTokenHeaderUsingMasterKey(\n verb,\n resourceId,\n resourceType,\n headers,\n clientOptions.key\n );\n } else if (clientOptions.resourceTokens) {\n headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(\n getAuthorizationTokenUsingResourceTokens(clientOptions.resourceTokens, path, resourceId)\n );\n } else if (clientOptions.tokenProvider) {\n headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(\n await clientOptions.tokenProvider({ verb, path, resourceId, resourceType, headers })\n );\n }\n}\n\n/**\n * The default function for setting header token using the masterKey\n * @hidden\n */\nexport async function setAuthorizationTokenHeaderUsingMasterKey(\n verb: HTTPMethod,\n resourceId: string,\n resourceType: ResourceType,\n headers: CosmosHeaders,\n masterKey: string\n): Promise {\n // TODO This should live in cosmos-sign\n if (resourceType === ResourceType.offer) {\n resourceId = resourceId && resourceId.toLowerCase();\n }\n headers = Object.assign(\n headers,\n await generateHeaders(masterKey, verb, resourceType, resourceId)\n );\n}\n\n/**\n * @hidden\n */\n// TODO: Resource tokens\nexport function getAuthorizationTokenUsingResourceTokens(\n resourceTokens: { [resourceId: string]: string },\n path: string,\n resourceId: string\n): string {\n if (resourceTokens && Object.keys(resourceTokens).length > 0) {\n // For database account access(through getDatabaseAccount API), path and resourceId are \"\",\n // so in this case we return the first token to be used for creating the auth header as the\n // service will accept any token in this case\n if (!path && !resourceId) {\n return resourceTokens[Object.keys(resourceTokens)[0]];\n }\n\n // If we have exact resource token for the path use it\n if (resourceId && resourceTokens[resourceId]) {\n return resourceTokens[resourceId];\n }\n\n // minimum valid path /dbs\n if (!path || path.length < 4) {\n // TODO: This should throw an error\n return null;\n }\n\n path = trimSlashFromLeftAndRight(path);\n const pathSegments = (path && path.split(\"/\")) || [];\n\n // Item path\n if (pathSegments.length === 6) {\n // Look for a container token matching the item path\n const containerPath = pathSegments.slice(0, 4).map(decodeURIComponent).join(\"/\");\n if (resourceTokens[containerPath]) {\n return resourceTokens[containerPath];\n }\n }\n\n // TODO remove in v4: This is legacy behavior that lets someone use a resource token pointing ONLY at an ID\n // It was used when _rid was exposed by the SDK, but now that we are using user provided ids it is not needed\n // However removing it now would be a breaking change\n // if it's an incomplete path like /dbs/db1/colls/, start from the parent resource\n let index = pathSegments.length % 2 === 0 ? pathSegments.length - 1 : pathSegments.length - 2;\n for (; index > 0; index -= 2) {\n const id = decodeURI(pathSegments[index]);\n if (resourceTokens[id]) {\n return resourceTokens[id];\n }\n }\n }\n\n // TODO: This should throw an error\n return null;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.d.ts deleted file mode 100644 index 3c586c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { RequestOptions } from "../../request"; -import { Container } from "../Container"; -import { ConflictResponse } from "./ConflictResponse"; -import { PartitionKey } from "../../documents"; -/** - * Use to read or delete a given {@link Conflict} by id. - * - * @see {@link Conflicts} to query or read all conflicts. - */ -export declare class Conflict { - readonly container: Container; - readonly id: string; - private readonly clientContext; - private partitionKey?; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Conflict}. - */ - constructor(container: Container, id: string, clientContext: ClientContext, partitionKey?: PartitionKey); - /** - * Read the {@link ConflictDefinition} for the given {@link Conflict}. - */ - read(options?: RequestOptions): Promise; - /** - * Delete the given {@link ConflictDefinition}. - */ - delete(options?: RequestOptions): Promise; -} -//# sourceMappingURL=Conflict.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.d.ts.map deleted file mode 100644 index 54b006b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Conflict.d.ts","sourceRoot":"","sources":["../../../../src/client/Conflict/Conflict.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;GAIG;AACH,qBAAa,QAAQ;aAaD,SAAS,EAAE,SAAS;aACpB,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,YAAY,CAAC;IAfvB;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IACD;;;;OAIG;gBAEe,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,EACT,aAAa,EAAE,aAAa,EACrC,YAAY,CAAC,EAAE,YAAY;IAKrC;;OAEG;IACU,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAatE;;OAEG;IACU,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAkBzE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.js deleted file mode 100644 index 76d5085..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.js +++ /dev/null @@ -1,62 +0,0 @@ -import { Constants, getIdFromLink, getPathFromLink, ResourceType } from "../../common"; -import { ConflictResponse } from "./ConflictResponse"; -import { undefinedPartitionKey } from "../../extractPartitionKey"; -/** - * Use to read or delete a given {@link Conflict} by id. - * - * @see {@link Conflicts} to query or read all conflicts. - */ -export class Conflict { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Conflict}. - */ - constructor(container, id, clientContext, partitionKey) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - this.partitionKey = partitionKey; - this.partitionKey = partitionKey; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return `/${this.container.url}/${Constants.Path.ConflictsPathSegment}/${this.id}`; - } - /** - * Read the {@link ConflictDefinition} for the given {@link Conflict}. - */ - async read(options) { - const path = getPathFromLink(this.url, ResourceType.conflicts); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.user, - resourceId: id, - options, - }); - return new ConflictResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link ConflictDefinition}. - */ - async delete(options) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.conflicts, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ConflictResponse(response.result, response.headers, response.code, this); - } -} -//# sourceMappingURL=Conflict.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.js.map deleted file mode 100644 index 7fe49d3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflict.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Conflict.js","sourceRoot":"","sources":["../../../../src/client/Conflict/Conflict.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIvF,OA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,CAAC,SAAS,CAAC,0BAA0B,EAAE,CAAC;YACpD,IAAI,CAAC,YAAY,GAAG,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;SACnE;QACD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAqB;YACnE,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,SAAS;YACpC,UAAU,EAAE,EAAE;YACd,OAAO;YACP,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;QACH,OAAO,IAAI,gBAAgB,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACtF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { Constants, getIdFromLink, getPathFromLink, ResourceType } from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { ConflictDefinition } from \"./ConflictDefinition\";\nimport { ConflictResponse } from \"./ConflictResponse\";\nimport { undefinedPartitionKey } from \"../../extractPartitionKey\";\nimport { PartitionKey } from \"../../documents\";\n\n/**\n * Use to read or delete a given {@link Conflict} by id.\n *\n * @see {@link Conflicts} to query or read all conflicts.\n */\nexport class Conflict {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return `/${this.container.url}/${Constants.Path.ConflictsPathSegment}/${this.id}`;\n }\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link Conflict}.\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext,\n private partitionKey?: PartitionKey\n ) {\n this.partitionKey = partitionKey;\n }\n\n /**\n * Read the {@link ConflictDefinition} for the given {@link Conflict}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url, ResourceType.conflicts);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new ConflictResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link ConflictDefinition}.\n */\n public async delete(options?: RequestOptions): Promise {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.conflicts,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ConflictResponse(response.result, response.headers, response.code, this);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.d.ts deleted file mode 100644 index 315c7dc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { OperationType, ResourceType } from "../../common"; -export interface ConflictDefinition { - /** The id of the conflict */ - id?: string; - /** Source resource id */ - resourceId?: string; - resourceType?: ResourceType; - operationType?: OperationType; - content?: string; -} -//# sourceMappingURL=ConflictDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.d.ts.map deleted file mode 100644 index 2684fc8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.js deleted file mode 100644 index f5bd308..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=ConflictDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.js.map deleted file mode 100644 index 5fac127..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictDefinition.js","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType, ResourceType } from \"../../common\";\n\nexport interface ConflictDefinition {\n /** The id of the conflict */\n id?: string;\n /** Source resource id */\n resourceId?: string;\n resourceType?: ResourceType;\n operationType?: OperationType;\n content?: string;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.d.ts deleted file mode 100644 index e82d6f9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum ConflictResolutionMode { - Custom = "Custom", - LastWriterWins = "LastWriterWins" -} -//# sourceMappingURL=ConflictResolutionMode.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.d.ts.map deleted file mode 100644 index 5264b9a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictResolutionMode.d.ts","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictResolutionMode.ts"],"names":[],"mappings":"AAEA,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,cAAc,mBAAmB;CAClC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.js deleted file mode 100644 index 7030031..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export var ConflictResolutionMode; -(function (ConflictResolutionMode) { - ConflictResolutionMode["Custom"] = "Custom"; - ConflictResolutionMode["LastWriterWins"] = "LastWriterWins"; -})(ConflictResolutionMode || (ConflictResolutionMode = {})); -//# sourceMappingURL=ConflictResolutionMode.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.js.map deleted file mode 100644 index 75fdcbe..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionMode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictResolutionMode.js","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictResolutionMode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,2DAAiC,CAAA;AACnC,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport enum ConflictResolutionMode {\n Custom = \"Custom\",\n LastWriterWins = \"LastWriterWins\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.d.ts deleted file mode 100644 index 424de83..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ConflictResolutionMode } from "./ConflictResolutionMode"; -/** - * Represents the conflict resolution policy configuration for specifying how to resolve conflicts - * in case writes from different regions result in conflicts on documents in the collection in the Azure Cosmos DB service. - */ -export interface ConflictResolutionPolicy { - /** - * Gets or sets the in the Azure Cosmos DB service. By default it is {@link ConflictResolutionMode.LastWriterWins}. - */ - mode?: keyof typeof ConflictResolutionMode; - /** - * Gets or sets the path which is present in each document in the Azure Cosmos DB service for last writer wins conflict-resolution. - * This path must be present in each document and must be an integer value. - * In case of a conflict occurring on a document, the document with the higher integer value in the specified path will be picked. - * If the path is unspecified, by default the timestamp path will be used. - * - * This value should only be set when using {@link ConflictResolutionMode.LastWriterWins}. - * - * ```typescript - * conflictResolutionPolicy.ConflictResolutionPath = "/name/first"; - * ``` - * - */ - conflictResolutionPath?: string; - /** - * Gets or sets the {@link StoredProcedure} which is used for conflict resolution in the Azure Cosmos DB service. - * This stored procedure may be created after the {@link Container} is created and can be changed as required. - * - * 1. This value should only be set when using {@link ConflictResolutionMode.Custom}. - * 2. In case the stored procedure fails or throws an exception, the conflict resolution will default to registering conflicts in the conflicts feed. - * - * ```typescript - * conflictResolutionPolicy.ConflictResolutionProcedure = "resolveConflict" - * ``` - */ - conflictResolutionProcedure?: string; -} -//# sourceMappingURL=ConflictResolutionPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.d.ts.map deleted file mode 100644 index 681b598..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictResolutionPolicy.d.ts","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictResolutionPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,OAAO,sBAAsB,CAAC;IAC3C;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;;;OAUG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.js deleted file mode 100644 index 33c09c8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=ConflictResolutionPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.js.map deleted file mode 100644 index 117ea2f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResolutionPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictResolutionPolicy.js","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictResolutionPolicy.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ConflictResolutionMode } from \"./ConflictResolutionMode\";\n\n/**\n * Represents the conflict resolution policy configuration for specifying how to resolve conflicts\n * in case writes from different regions result in conflicts on documents in the collection in the Azure Cosmos DB service.\n */\nexport interface ConflictResolutionPolicy {\n /**\n * Gets or sets the in the Azure Cosmos DB service. By default it is {@link ConflictResolutionMode.LastWriterWins}.\n */\n mode?: keyof typeof ConflictResolutionMode;\n /**\n * Gets or sets the path which is present in each document in the Azure Cosmos DB service for last writer wins conflict-resolution.\n * This path must be present in each document and must be an integer value.\n * In case of a conflict occurring on a document, the document with the higher integer value in the specified path will be picked.\n * If the path is unspecified, by default the timestamp path will be used.\n *\n * This value should only be set when using {@link ConflictResolutionMode.LastWriterWins}.\n *\n * ```typescript\n * conflictResolutionPolicy.ConflictResolutionPath = \"/name/first\";\n * ```\n *\n */\n conflictResolutionPath?: string;\n /**\n * Gets or sets the {@link StoredProcedure} which is used for conflict resolution in the Azure Cosmos DB service.\n * This stored procedure may be created after the {@link Container} is created and can be changed as required.\n *\n * 1. This value should only be set when using {@link ConflictResolutionMode.Custom}.\n * 2. In case the stored procedure fails or throws an exception, the conflict resolution will default to registering conflicts in the conflicts feed.\n *\n * ```typescript\n * conflictResolutionPolicy.ConflictResolutionProcedure = \"resolveConflict\"\n * ```\n */\n conflictResolutionProcedure?: string;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.d.ts deleted file mode 100644 index f3bb774..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request"; -import { Resource } from "../Resource"; -import { Conflict } from "./Conflict"; -import { ConflictDefinition } from "./ConflictDefinition"; -export declare class ConflictResponse extends ResourceResponse { - constructor(resource: ConflictDefinition & Resource, headers: CosmosHeaders, statusCode: number, conflict: Conflict); - /** A reference to the {@link Conflict} corresponding to the returned {@link ConflictDefinition}. */ - readonly conflict: Conflict; -} -//# sourceMappingURL=ConflictResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.d.ts.map deleted file mode 100644 index b2585a3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,kBAAkB,GAAG,QAAQ,CAAC;gBAEjF,QAAQ,EAAE,kBAAkB,GAAG,QAAQ,EACvC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,QAAQ;IAKpB,oGAAoG;IACpG,SAAgB,QAAQ,EAAE,QAAQ,CAAC;CACpC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.js deleted file mode 100644 index 5627731..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.js +++ /dev/null @@ -1,8 +0,0 @@ -import { ResourceResponse } from "../../request"; -export class ConflictResponse extends ResourceResponse { - constructor(resource, headers, statusCode, conflict) { - super(resource, headers, statusCode); - this.conflict = conflict; - } -} -//# sourceMappingURL=ConflictResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.js.map deleted file mode 100644 index 7724b83..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/ConflictResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConflictResponse.js","sourceRoot":"","sources":["../../../../src/client/Conflict/ConflictResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,OAAO,gBAAiB,SAAQ,gBAA+C;IACnF,YACE,QAAuC,EACvC,OAAsB,EACtB,UAAkB,EAClB,QAAkB;QAElB,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Conflict } from \"./Conflict\";\nimport { ConflictDefinition } from \"./ConflictDefinition\";\n\nexport class ConflictResponse extends ResourceResponse {\n constructor(\n resource: ConflictDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n conflict: Conflict\n ) {\n super(resource, headers, statusCode);\n this.conflict = conflict;\n }\n /** A reference to the {@link Conflict} corresponding to the returned {@link ConflictDefinition}. */\n public readonly conflict: Conflict;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.d.ts deleted file mode 100644 index 8206098..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions } from "../../request"; -import { Container } from "../Container"; -import { Resource } from "../Resource"; -import { ConflictDefinition } from "./ConflictDefinition"; -/** - * Use to query or read all conflicts. - * - * @see {@link Conflict} to read or delete a given {@link Conflict} by id. - */ -export declare class Conflicts { - readonly container: Container; - private readonly clientContext; - constructor(container: Container, clientContext: ClientContext); - /** - * Queries all conflicts. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time. - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all conflicts. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time. - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Reads all conflicts - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - readAll(options?: FeedOptions): QueryIterator; -} -//# sourceMappingURL=Conflicts.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.d.ts.map deleted file mode 100644 index 4ded92e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Conflicts.d.ts","sourceRoot":"","sources":["../../../../src/client/Conflict/Conflicts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,qBAAa,SAAS;aAEF,SAAS,EAAE,SAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADd,SAAS,EAAE,SAAS,EACnB,aAAa,EAAE,aAAa;IAG/C;;;;;OAKG;IACI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IACrF;;;;;OAKG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAiBtF;;;OAGG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,kBAAkB,GAAG,QAAQ,CAAC;CAGpF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.js deleted file mode 100644 index 03bdcce..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.js +++ /dev/null @@ -1,35 +0,0 @@ -import { getIdFromLink, getPathFromLink, ResourceType } from "../../common"; -import { QueryIterator } from "../../queryIterator"; -/** - * Use to query or read all conflicts. - * - * @see {@link Conflict} to read or delete a given {@link Conflict} by id. - */ -export class Conflicts { - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, ResourceType.conflicts); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.conflicts, - resourceId: id, - resultFn: (result) => result.Conflicts, - query, - options: innerOptions, - }); - }); - } - /** - * Reads all conflicts - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - readAll(options) { - return this.query(undefined, options); - } -} -//# sourceMappingURL=Conflicts.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.js.map deleted file mode 100644 index 1366614..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/Conflicts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Conflicts.js","sourceRoot":"","sources":["../../../../src/client/Conflict/Conflicts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMpD;;;;GAIG;AACH,MAAM,OAAO,SAAS;IACpB,YACkB,SAAoB,EACnB,aAA4B;QAD7B,cAAS,GAAT,SAAS,CAAW;QACnB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAgBG,KAAK,CAAI,KAA4B,EAAE,OAAqB;QACjE,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;QACzE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE7C,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;gBAClC,IAAI;gBACJ,YAAY,EAAE,YAAY,CAAC,SAAS;gBACpC,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS;gBACtC,KAAK;gBACL,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,OAAO,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAgC,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { ConflictDefinition } from \"./ConflictDefinition\";\n\n/**\n * Use to query or read all conflicts.\n *\n * @see {@link Conflict} to read or delete a given {@link Conflict} by id.\n */\nexport class Conflicts {\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Queries all conflicts.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time.\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all conflicts.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time.\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.conflicts);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.conflicts,\n resourceId: id,\n resultFn: (result) => result.Conflicts,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Reads all conflicts\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.d.ts deleted file mode 100644 index 803d790..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Conflict } from "./Conflict"; -export { Conflicts } from "./Conflicts"; -export { ConflictDefinition } from "./ConflictDefinition"; -export { ConflictResponse } from "./ConflictResponse"; -export { ConflictResolutionPolicy } from "./ConflictResolutionPolicy"; -export { ConflictResolutionMode } from "./ConflictResolutionMode"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.d.ts.map deleted file mode 100644 index 8a6fe3b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/Conflict/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.js deleted file mode 100644 index ae59ea1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { Conflict } from "./Conflict"; -export { Conflicts } from "./Conflicts"; -export { ConflictResponse } from "./ConflictResponse"; -export { ConflictResolutionMode } from "./ConflictResolutionMode"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.js.map deleted file mode 100644 index a225fde..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Conflict/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/Conflict/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { Conflict } from \"./Conflict\";\nexport { Conflicts } from \"./Conflicts\";\nexport { ConflictDefinition } from \"./ConflictDefinition\";\nexport { ConflictResponse } from \"./ConflictResponse\";\nexport { ConflictResolutionPolicy } from \"./ConflictResolutionPolicy\";\nexport { ConflictResolutionMode } from \"./ConflictResolutionMode\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.d.ts deleted file mode 100644 index 47960a2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { PartitionKey, PartitionKeyDefinition } from "../../documents"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions, ResourceResponse, Response } from "../../request"; -import { PartitionedQueryExecutionInfo } from "../../request/ErrorResponse"; -import { Conflict, Conflicts } from "../Conflict"; -import { Database } from "../Database"; -import { Item, Items } from "../Item"; -import { Scripts } from "../Script/Scripts"; -import { ContainerDefinition } from "./ContainerDefinition"; -import { ContainerResponse } from "./ContainerResponse"; -import { PartitionKeyRange } from "./PartitionKeyRange"; -import { OfferResponse } from "../Offer/OfferResponse"; -/** - * Operations for reading, replacing, or deleting a specific, existing container by id. - * - * @see {@link Containers} for creating new containers, and reading/querying all containers; use `.containers`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `container(id).read()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -export declare class Container { - readonly database: Database; - readonly id: string; - private readonly clientContext; - private $items; - /** - * Operations for creating new items, and reading/querying all items - * - * For reading, replacing, or deleting an existing item, use `.item(id)`. - * - * @example Create a new item - * ```typescript - * const {body: createdItem} = await container.items.create({id: "", properties: {}}); - * ``` - */ - get items(): Items; - private $scripts; - /** - * All operations for Stored Procedures, Triggers, and User Defined Functions - */ - get scripts(): Scripts; - private $conflicts; - /** - * Operations for reading and querying conflicts for the given container. - * - * For reading or deleting a specific conflict, use `.conflict(id)`. - */ - get conflicts(): Conflicts; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * Returns a container instance. Note: You should get this from `database.container(id)`, rather than creating your own object. - * @param database - The parent {@link Database}. - * @param id - The id of the given container. - * @hidden - */ - constructor(database: Database, id: string, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link Item} by id. - * - * Use `.items` for creating new items, or querying/reading all items. - * - * @param id - The id of the {@link Item}. - * @param partitionKeyValue - The value of the {@link Item} partition key - * @example Replace an item - * `const {body: replacedItem} = await container.item("", "").replace({id: "", title: "Updated post", authorID: 5});` - */ - item(id: string, partitionKeyValue?: PartitionKey): Item; - /** - * Used to read, replace, or delete a specific, existing {@link Conflict} by id. - * - * Use `.conflicts` for creating new conflicts, or querying/reading all conflicts. - * @param id - The id of the {@link Conflict}. - */ - conflict(id: string, partitionKey?: PartitionKey): Conflict; - /** Read the container's definition */ - read(options?: RequestOptions): Promise; - /** Replace the container's definition */ - replace(body: ContainerDefinition, options?: RequestOptions): Promise; - /** Delete the container */ - delete(options?: RequestOptions): Promise; - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @deprecated This method has been renamed to readPartitionKeyDefinition. - */ - getPartitionKeyDefinition(): Promise>; - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @hidden - */ - readPartitionKeyDefinition(): Promise>; - /** - * Gets offer on container. If none exists, returns an OfferResponse with undefined. - */ - readOffer(options?: RequestOptions): Promise; - getQueryPlan(query: string | SqlQuerySpec): Promise>; - readPartitionKeyRanges(feedOptions?: FeedOptions): QueryIterator; - /** - * Delete all documents belong to the container for the provided partition key value - * @param partitionKey - The partition key value of the items to be deleted - */ - deleteAllItemsForPartitionKey(partitionKey: PartitionKey, options?: RequestOptions): Promise; -} -//# sourceMappingURL=Container.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.d.ts.map deleted file mode 100644 index 66cb22c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/Container.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASpD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MA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;IACI,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,QAAQ;IAIlE,sCAAsC;IACzB,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAcvE,yCAAyC;IAC5B,OAAO,CAClB,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,iBAAiB,CAAC;IAmB7B,2BAA2B;IACd,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAazE;;;OAGG;IACU,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IAI3F;;;OAGG;IACU,0BAA0B,IAAI,OAAO,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;IAmB5F;;OAEG;IACU,SAAS,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IAkB/D,YAAY,CACvB,KAAK,EAAE,MAAM,GAAG,YAAY,GAC3B,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;IAU5C,sBAAsB,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,iBAAiB,CAAC;IAK1F;;;OAGG;IACU,6BAA6B,CACxC,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,iBAAiB,CAAC;CAc9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.js deleted file mode 100644 index dcfe30b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.js +++ /dev/null @@ -1,204 +0,0 @@ -import { createDocumentCollectionUri, getIdFromLink, getPathFromLink, HTTPMethod, isResourceValid, ResourceType, } from "../../common"; -import { ResourceResponse } from "../../request"; -import { Conflict, Conflicts } from "../Conflict"; -import { Item, Items } from "../Item"; -import { Scripts } from "../Script/Scripts"; -import { ContainerResponse } from "./ContainerResponse"; -import { Offer } from "../Offer"; -import { OfferResponse } from "../Offer/OfferResponse"; -/** - * Operations for reading, replacing, or deleting a specific, existing container by id. - * - * @see {@link Containers} for creating new containers, and reading/querying all containers; use `.containers`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `container(id).read()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -export class Container { - /** - * Returns a container instance. Note: You should get this from `database.container(id)`, rather than creating your own object. - * @param database - The parent {@link Database}. - * @param id - The id of the given container. - * @hidden - */ - constructor(database, id, clientContext) { - this.database = database; - this.id = id; - this.clientContext = clientContext; - } - /** - * Operations for creating new items, and reading/querying all items - * - * For reading, replacing, or deleting an existing item, use `.item(id)`. - * - * @example Create a new item - * ```typescript - * const {body: createdItem} = await container.items.create({id: "", properties: {}}); - * ``` - */ - get items() { - if (!this.$items) { - this.$items = new Items(this, this.clientContext); - } - return this.$items; - } - /** - * All operations for Stored Procedures, Triggers, and User Defined Functions - */ - get scripts() { - if (!this.$scripts) { - this.$scripts = new Scripts(this, this.clientContext); - } - return this.$scripts; - } - /** - * Operations for reading and querying conflicts for the given container. - * - * For reading or deleting a specific conflict, use `.conflict(id)`. - */ - get conflicts() { - if (!this.$conflicts) { - this.$conflicts = new Conflicts(this, this.clientContext); - } - return this.$conflicts; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createDocumentCollectionUri(this.database.id, this.id); - } - /** - * Used to read, replace, or delete a specific, existing {@link Item} by id. - * - * Use `.items` for creating new items, or querying/reading all items. - * - * @param id - The id of the {@link Item}. - * @param partitionKeyValue - The value of the {@link Item} partition key - * @example Replace an item - * `const {body: replacedItem} = await container.item("", "").replace({id: "", title: "Updated post", authorID: 5});` - */ - item(id, partitionKeyValue) { - return new Item(this, id, partitionKeyValue, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link Conflict} by id. - * - * Use `.conflicts` for creating new conflicts, or querying/reading all conflicts. - * @param id - The id of the {@link Conflict}. - */ - conflict(id, partitionKey) { - return new Conflict(this, id, this.clientContext, partitionKey); - } - /** Read the container's definition */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.container, - resourceId: id, - options, - }); - this.clientContext.partitionKeyDefinitionCache[this.url] = response.result.partitionKey; - return new ContainerResponse(response.result, response.headers, response.code, this); - } - /** Replace the container's definition */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: ResourceType.container, - resourceId: id, - options, - }); - return new ContainerResponse(response.result, response.headers, response.code, this); - } - /** Delete the container */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.container, - resourceId: id, - options, - }); - return new ContainerResponse(response.result, response.headers, response.code, this); - } - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @deprecated This method has been renamed to readPartitionKeyDefinition. - */ - async getPartitionKeyDefinition() { - return this.readPartitionKeyDefinition(); - } - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @hidden - */ - async readPartitionKeyDefinition() { - // $ISSUE-felixfan-2016-03-17: Make name based path and link based path use the same key - // $ISSUE-felixfan-2016-03-17: Refresh partitionKeyDefinitionCache when necessary - if (this.url in this.clientContext.partitionKeyDefinitionCache) { - return new ResourceResponse(this.clientContext.partitionKeyDefinitionCache[this.url], {}, 0); - } - const { headers, statusCode } = await this.read(); - return new ResourceResponse(this.clientContext.partitionKeyDefinitionCache[this.url], headers, statusCode); - } - /** - * Gets offer on container. If none exists, returns an OfferResponse with undefined. - */ - async readOffer(options = {}) { - const { resource: container } = await this.read(); - const path = "/offers"; - const url = container._self; - const response = await this.clientContext.queryFeed({ - path, - resourceId: "", - resourceType: ResourceType.offer, - query: `SELECT * from root where root.resource = "${url}"`, - resultFn: (result) => result.Offers, - options, - }); - const offer = response.result[0] - ? new Offer(this.database.client, response.result[0].id, this.clientContext) - : undefined; - return new OfferResponse(response.result[0], response.headers, response.code, offer); - } - async getQueryPlan(query) { - const path = getPathFromLink(this.url); - return this.clientContext.getQueryPlan(path + "/docs", ResourceType.item, getIdFromLink(this.url), query); - } - readPartitionKeyRanges(feedOptions) { - feedOptions = feedOptions || {}; - return this.clientContext.queryPartitionKeyRanges(this.url, undefined, feedOptions); - } - /** - * Delete all documents belong to the container for the provided partition key value - * @param partitionKey - The partition key value of the items to be deleted - */ - async deleteAllItemsForPartitionKey(partitionKey, options) { - let path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - path = path + "/operations/partitionkeydelete"; - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.container, - resourceId: id, - options, - partitionKey: partitionKey, - method: HTTPMethod.post, - }); - return new ContainerResponse(response.result, response.headers, response.code, this); - } -} -//# sourceMappingURL=Container.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.js.map deleted file mode 100644 index 01ec46d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Container.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/client/Container/Container.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,2BAA2B,EAC3B,aAAa,EACb,eAAe,EACf,UAAU,EACV,eAAe,EACf,YAAY,GACb,MAAM,cAAc,CAAC;AAItB,OAAO,EAA+B,gBAAgB,EAAY,MAAM,eAAe,CAAC;AAExF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA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C,CAAC;QACvC,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CACpC,IAAI,GAAG,OAAO,EACd,YAAY,CAAC,IAAI,EACjB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EACvB,KAAK,CACN,CAAC;IACJ,CAAC;IAEM,sBAAsB,CAAC,WAAyB;QACrD,WAAW,GAAG,WAAW,IAAI,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IACtF,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,6BAA6B,CACxC,YAA0B,EAC1B,OAAwB;QAExB,IAAI,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,GAAG,IAAI,GAAG,gCAAgC,CAAC;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAsB;YACpE,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,SAAS;YACpC,UAAU,EAAE,EAAE;YACd,OAAO;YACP,YAAY,EAAE,YAAY;YAC1B,MAAM,EAAE,UAAU,CAAC,IAAI;SACxB,CAAC,CAAC;QACH,OAAO,IAAI,iBAAiB,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createDocumentCollectionUri,\n getIdFromLink,\n getPathFromLink,\n HTTPMethod,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { PartitionKey, PartitionKeyDefinition } from \"../../documents\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions, ResourceResponse, Response } from \"../../request\";\nimport { PartitionedQueryExecutionInfo } from \"../../request/ErrorResponse\";\nimport { Conflict, Conflicts } from \"../Conflict\";\nimport { Database } from \"../Database\";\nimport { Item, Items } from \"../Item\";\nimport { Scripts } from \"../Script/Scripts\";\nimport { ContainerDefinition } from \"./ContainerDefinition\";\nimport { ContainerResponse } from \"./ContainerResponse\";\nimport { PartitionKeyRange } from \"./PartitionKeyRange\";\nimport { Offer, OfferDefinition } from \"../Offer\";\nimport { OfferResponse } from \"../Offer/OfferResponse\";\nimport { Resource } from \"../Resource\";\n\n/**\n * Operations for reading, replacing, or deleting a specific, existing container by id.\n *\n * @see {@link Containers} for creating new containers, and reading/querying all containers; use `.containers`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `container(id).read()` before every single `item.read()` call, to ensure the container exists;\n * do this once on application start up.\n */\nexport class Container {\n private $items: Items;\n /**\n * Operations for creating new items, and reading/querying all items\n *\n * For reading, replacing, or deleting an existing item, use `.item(id)`.\n *\n * @example Create a new item\n * ```typescript\n * const {body: createdItem} = await container.items.create({id: \"\", properties: {}});\n * ```\n */\n public get items(): Items {\n if (!this.$items) {\n this.$items = new Items(this, this.clientContext);\n }\n return this.$items;\n }\n\n private $scripts: Scripts;\n /**\n * All operations for Stored Procedures, Triggers, and User Defined Functions\n */\n public get scripts(): Scripts {\n if (!this.$scripts) {\n this.$scripts = new Scripts(this, this.clientContext);\n }\n return this.$scripts;\n }\n\n private $conflicts: Conflicts;\n /**\n * Operations for reading and querying conflicts for the given container.\n *\n * For reading or deleting a specific conflict, use `.conflict(id)`.\n */\n public get conflicts(): Conflicts {\n if (!this.$conflicts) {\n this.$conflicts = new Conflicts(this, this.clientContext);\n }\n return this.$conflicts;\n }\n\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createDocumentCollectionUri(this.database.id, this.id);\n }\n\n /**\n * Returns a container instance. Note: You should get this from `database.container(id)`, rather than creating your own object.\n * @param database - The parent {@link Database}.\n * @param id - The id of the given container.\n * @hidden\n */\n constructor(\n public readonly database: Database,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Item} by id.\n *\n * Use `.items` for creating new items, or querying/reading all items.\n *\n * @param id - The id of the {@link Item}.\n * @param partitionKeyValue - The value of the {@link Item} partition key\n * @example Replace an item\n * `const {body: replacedItem} = await container.item(\"\", \"\").replace({id: \"\", title: \"Updated post\", authorID: 5});`\n */\n public item(id: string, partitionKeyValue?: PartitionKey): Item {\n return new Item(this, id, partitionKeyValue, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Conflict} by id.\n *\n * Use `.conflicts` for creating new conflicts, or querying/reading all conflicts.\n * @param id - The id of the {@link Conflict}.\n */\n public conflict(id: string, partitionKey?: PartitionKey): Conflict {\n return new Conflict(this, id, this.clientContext, partitionKey);\n }\n\n /** Read the container's definition */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n this.clientContext.partitionKeyDefinitionCache[this.url] = response.result.partitionKey;\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n\n /** Replace the container's definition */\n public async replace(\n body: ContainerDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n\n /** Delete the container */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Gets the partition key definition first by looking into the cache otherwise by reading the collection.\n * @deprecated This method has been renamed to readPartitionKeyDefinition.\n */\n public async getPartitionKeyDefinition(): Promise> {\n return this.readPartitionKeyDefinition();\n }\n\n /**\n * Gets the partition key definition first by looking into the cache otherwise by reading the collection.\n * @hidden\n */\n public async readPartitionKeyDefinition(): Promise> {\n // $ISSUE-felixfan-2016-03-17: Make name based path and link based path use the same key\n // $ISSUE-felixfan-2016-03-17: Refresh partitionKeyDefinitionCache when necessary\n if (this.url in this.clientContext.partitionKeyDefinitionCache) {\n return new ResourceResponse(\n this.clientContext.partitionKeyDefinitionCache[this.url],\n {},\n 0\n );\n }\n\n const { headers, statusCode } = await this.read();\n return new ResourceResponse(\n this.clientContext.partitionKeyDefinitionCache[this.url],\n headers,\n statusCode\n );\n }\n\n /**\n * Gets offer on container. If none exists, returns an OfferResponse with undefined.\n */\n public async readOffer(options: RequestOptions = {}): Promise {\n const { resource: container } = await this.read();\n const path = \"/offers\";\n const url = container._self;\n const response = await this.clientContext.queryFeed({\n path,\n resourceId: \"\",\n resourceType: ResourceType.offer,\n query: `SELECT * from root where root.resource = \"${url}\"`,\n resultFn: (result) => result.Offers,\n options,\n });\n const offer = response.result[0]\n ? new Offer(this.database.client, response.result[0].id, this.clientContext)\n : undefined;\n return new OfferResponse(response.result[0], response.headers, response.code, offer);\n }\n\n public async getQueryPlan(\n query: string | SqlQuerySpec\n ): Promise> {\n const path = getPathFromLink(this.url);\n return this.clientContext.getQueryPlan(\n path + \"/docs\",\n ResourceType.item,\n getIdFromLink(this.url),\n query\n );\n }\n\n public readPartitionKeyRanges(feedOptions?: FeedOptions): QueryIterator {\n feedOptions = feedOptions || {};\n return this.clientContext.queryPartitionKeyRanges(this.url, undefined, feedOptions);\n }\n\n /**\n * Delete all documents belong to the container for the provided partition key value\n * @param partitionKey - The partition key value of the items to be deleted\n */\n public async deleteAllItemsForPartitionKey(\n partitionKey: PartitionKey,\n options?: RequestOptions\n ): Promise {\n let path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n path = path + \"/operations/partitionkeydelete\";\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n partitionKey: partitionKey,\n method: HTTPMethod.post,\n });\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.d.ts deleted file mode 100644 index da8a587..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IndexingPolicy, PartitionKeyDefinition } from "../../documents"; -import { ConflictResolutionPolicy } from "../Conflict/ConflictResolutionPolicy"; -import { UniqueKeyPolicy } from "./UniqueKeyPolicy"; -import { GeospatialType } from "../../documents/GeospatialType"; -export interface ContainerDefinition { - /** The id of the container. */ - id?: string; - /** The partition key for the container. */ - partitionKey?: PartitionKeyDefinition; - /** The indexing policy associated with the container. */ - indexingPolicy?: IndexingPolicy; - /** The default time to live in seconds for items in a container. */ - defaultTtl?: number; - /** The conflict resolution policy used to resolve conflicts in a container. */ - conflictResolutionPolicy?: ConflictResolutionPolicy; - /** Policy for additional keys that must be unique per partition key */ - uniqueKeyPolicy?: UniqueKeyPolicy; - /** Geospatial configuration for a collection. Type is set to Geography by default */ - geospatialConfig?: { - type: GeospatialType; - }; -} -//# sourceMappingURL=ContainerDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.d.ts.map deleted file mode 100644 index d3c7744..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContainerDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/ContainerDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,yDAAyD;IACzD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,uEAAuE;IACvE,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,qFAAqF;IACrF,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,cAAc,CAAC;KACtB,CAAC;CACH"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.js deleted file mode 100644 index 678a5cc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=ContainerDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.js.map deleted file mode 100644 index 7ef554a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContainerDefinition.js","sourceRoot":"","sources":["../../../../src/client/Container/ContainerDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { IndexingPolicy, PartitionKeyDefinition } from \"../../documents\";\nimport { ConflictResolutionPolicy } from \"../Conflict/ConflictResolutionPolicy\";\nimport { UniqueKeyPolicy } from \"./UniqueKeyPolicy\";\nimport { GeospatialType } from \"../../documents/GeospatialType\";\n\nexport interface ContainerDefinition {\n /** The id of the container. */\n id?: string;\n /** The partition key for the container. */\n partitionKey?: PartitionKeyDefinition;\n /** The indexing policy associated with the container. */\n indexingPolicy?: IndexingPolicy;\n /** The default time to live in seconds for items in a container. */\n defaultTtl?: number;\n /** The conflict resolution policy used to resolve conflicts in a container. */\n conflictResolutionPolicy?: ConflictResolutionPolicy;\n /** Policy for additional keys that must be unique per partition key */\n uniqueKeyPolicy?: UniqueKeyPolicy;\n /** Geospatial configuration for a collection. Type is set to Geography by default */\n geospatialConfig?: {\n type: GeospatialType;\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.d.ts deleted file mode 100644 index 02738af..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ContainerDefinition } from "./ContainerDefinition"; -import { PartitionKeyDefinition } from "../../documents"; -import { VerboseOmit } from "../../utils/types"; -export interface ContainerRequest extends VerboseOmit { - throughput?: number; - maxThroughput?: number; - autoUpgradePolicy?: { - throughputPolicy: { - incrementPercent: number; - }; - }; - partitionKey?: string | PartitionKeyDefinition; -} -//# sourceMappingURL=ContainerRequest.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.d.ts.map deleted file mode 100644 index dd26a84..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContainerRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/ContainerRequest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,WAAW,CAAC,mBAAmB,EAAE,cAAc,CAAC;IAExF,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,iBAAiB,CAAC,EAAE;QAClB,gBAAgB,EAAE;YAChB,gBAAgB,EAAE,MAAM,CAAC;SAC1B,CAAC;KACH,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAChD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.js deleted file mode 100644 index 1a7d3dc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=ContainerRequest.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.js.map deleted file mode 100644 index 8ca1de8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContainerRequest.js","sourceRoot":"","sources":["../../../../src/client/Container/ContainerRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ContainerDefinition } from \"./ContainerDefinition\";\nimport { PartitionKeyDefinition } from \"../../documents\";\nimport { VerboseOmit } from \"../../utils/types\";\n\nexport interface ContainerRequest extends VerboseOmit {\n /* Throughput for this container. Cannot use with maxThroughput */\n throughput?: number;\n /* Max throughput for this container. Specify to use Autoscale*/\n maxThroughput?: number;\n /* Autoscale scaling defined by throughput increment percent */\n autoUpgradePolicy?: {\n throughputPolicy: {\n incrementPercent: number;\n };\n };\n partitionKey?: string | PartitionKeyDefinition;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.d.ts deleted file mode 100644 index c7f69fd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request/ResourceResponse"; -import { Resource } from "../Resource"; -import { ContainerDefinition } from "./ContainerDefinition"; -import { Container } from "./index"; -/** Response object for Container operations */ -export declare class ContainerResponse extends ResourceResponse { - constructor(resource: ContainerDefinition & Resource, headers: CosmosHeaders, statusCode: number, container: Container); - /** A reference to the {@link Container} that the returned {@link ContainerDefinition} corresponds to. */ - readonly container: Container; -} -//# sourceMappingURL=ContainerResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.d.ts.map deleted file mode 100644 index ea92285..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContainerResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/ContainerResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,+CAA+C;AAC/C,qBAAa,iBAAkB,SAAQ,gBAAgB,CAAC,mBAAmB,GAAG,QAAQ,CAAC;gBAEnF,QAAQ,EAAE,mBAAmB,GAAG,QAAQ,EACxC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,SAAS;IAKtB,yGAAyG;IACzG,SAAgB,SAAS,EAAE,SAAS,CAAC;CACtC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.js deleted file mode 100644 index 410524d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.js +++ /dev/null @@ -1,9 +0,0 @@ -import { ResourceResponse } from "../../request/ResourceResponse"; -/** Response object for Container operations */ -export class ContainerResponse extends ResourceResponse { - constructor(resource, headers, statusCode, container) { - super(resource, headers, statusCode); - this.container = container; - } -} -//# sourceMappingURL=ContainerResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.js.map deleted file mode 100644 index 9588adf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/ContainerResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContainerResponse.js","sourceRoot":"","sources":["../../../../src/client/Container/ContainerResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAKlE,+CAA+C;AAC/C,MAAM,OAAO,iBAAkB,SAAQ,gBAAgD;IACrF,YACE,QAAwC,EACxC,OAAsB,EACtB,UAAkB,EAClB,SAAoB;QAEpB,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request/ResourceResponse\";\nimport { Resource } from \"../Resource\";\nimport { ContainerDefinition } from \"./ContainerDefinition\";\nimport { Container } from \"./index\";\n\n/** Response object for Container operations */\nexport class ContainerResponse extends ResourceResponse {\n constructor(\n resource: ContainerDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n container: Container\n ) {\n super(resource, headers, statusCode);\n this.container = container;\n }\n /** A reference to the {@link Container} that the returned {@link ContainerDefinition} corresponds to. */\n public readonly container: Container;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.d.ts deleted file mode 100644 index c36914d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions } from "../../request"; -import { Database } from "../Database"; -import { Resource } from "../Resource"; -import { ContainerDefinition } from "./ContainerDefinition"; -import { ContainerRequest } from "./ContainerRequest"; -import { ContainerResponse } from "./ContainerResponse"; -/** - * Operations for creating new containers, and reading/querying all containers - * - * @see {@link Container} for reading, replacing, or deleting an existing container; use `.container(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `containers.readAll()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -export declare class Containers { - readonly database: Database; - private readonly clientContext; - constructor(database: Database, clientContext: ClientContext); - /** - * Queries all containers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @container", - * parameters: [ - * {name: "@container", value: "Todo"} - * ] - * }; - * const {body: containerList} = await client.database("").containers.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all containers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @container", - * parameters: [ - * {name: "@container", value: "Todo"} - * ] - * }; - * const {body: containerList} = await client.database("").containers.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Creates a container. - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - create(body: ContainerRequest, options?: RequestOptions): Promise; - /** - * Checks if a Container exists, and, if it doesn't, creates it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * You should confirm that the output matches the body you passed in for non-default properties (i.e. indexing policy/etc.) - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - createIfNotExists(body: ContainerRequest, options?: RequestOptions): Promise; - /** - * Read all containers. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const {body: containerList} = await client.database("").containers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; -} -//# sourceMappingURL=Containers.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.d.ts.map deleted file mode 100644 index 1c3a7ad..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Containers.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/Containers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUpD,OAAO,EAAgB,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;;;;;GASG;AACH,qBAAa,UAAU;aACO,QAAQ,EAAE,QAAQ;IAAE,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAlD,QAAQ,EAAE,QAAQ,EAAmB,aAAa,EAAE,aAAa;IAE7F;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IAC5E;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAiB7E;;;;;;;;;;;;;;;;OAgBG;IACU,MAAM,CACjB,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,iBAAiB,CAAC;IAkE7B;;;;;;;;;;;;;;;;;;OAkBG;IACU,iBAAiB,CAC5B,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,iBAAiB,CAAC;IAuB7B;;;;;;;;OAQG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,mBAAmB,GAAG,QAAQ,CAAC;CAGrF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.js deleted file mode 100644 index 2510c3b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.js +++ /dev/null @@ -1,162 +0,0 @@ -import { Constants, getIdFromLink, getPathFromLink, isResourceValid, ResourceType, StatusCodes, } from "../../common"; -import { DEFAULT_PARTITION_KEY_PATH } from "../../common/partitionKeys"; -import { mergeHeaders } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { Container } from "./Container"; -import { ContainerResponse } from "./ContainerResponse"; -import { validateOffer } from "../../utils/offers"; -/** - * Operations for creating new containers, and reading/querying all containers - * - * @see {@link Container} for reading, replacing, or deleting an existing container; use `.container(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `containers.readAll()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -export class Containers { - constructor(database, clientContext) { - this.database = database; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.database.url, ResourceType.container); - const id = getIdFromLink(this.database.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.container, - resourceId: id, - resultFn: (result) => result.DocumentCollections, - query, - options: innerOptions, - }); - }); - } - /** - * Creates a container. - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - async create(body, options = {}) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.database.url, ResourceType.container); - const id = getIdFromLink(this.database.url); - validateOffer(body); - if (body.maxThroughput) { - const autoscaleParams = { - maxThroughput: body.maxThroughput, - }; - if (body.autoUpgradePolicy) { - autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy; - } - const autoscaleHeader = JSON.stringify(autoscaleParams); - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeader, - }); - delete body.maxThroughput; - delete body.autoUpgradePolicy; - } - if (body.throughput) { - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.OfferThroughput]: body.throughput, - }); - delete body.throughput; - } - if (typeof body.partitionKey === "string") { - if (!body.partitionKey.startsWith("/")) { - throw new Error("Partition key must start with '/'"); - } - body.partitionKey = { - paths: [body.partitionKey], - }; - } - // If they don't specify a partition key, use the default path - if (!body.partitionKey || !body.partitionKey.paths) { - body.partitionKey = { - paths: [DEFAULT_PARTITION_KEY_PATH], - }; - } - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.container, - resourceId: id, - options, - }); - const ref = new Container(this.database, response.result.id, this.clientContext); - return new ContainerResponse(response.result, response.headers, response.code, ref); - } - /** - * Checks if a Container exists, and, if it doesn't, creates it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * You should confirm that the output matches the body you passed in for non-default properties (i.e. indexing policy/etc.) - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - async createIfNotExists(body, options) { - if (!body || body.id === null || body.id === undefined) { - throw new Error("body parameter must be an object with an id property"); - } - /* - 1. Attempt to read the Container (based on an assumption that most containers will already exist, so its faster) - 2. If it fails with NotFound error, attempt to create the container. Else, return the read results. - */ - try { - const readResponse = await this.database.container(body.id).read(options); - return readResponse; - } - catch (err) { - if (err.code === StatusCodes.NotFound) { - const createResponse = await this.create(body, options); - // Must merge the headers to capture RU costskaty - mergeHeaders(createResponse.headers, err.headers); - return createResponse; - } - else { - throw err; - } - } - } - /** - * Read all containers. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const {body: containerList} = await client.database("").containers.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } -} -//# sourceMappingURL=Containers.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.js.map deleted file mode 100644 index 17e5f20..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/Containers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Containers.js","sourceRoot":"","sources":["../../../../src/client/Container/Containers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAgB,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,OAAO,UAAU;IACrB,YAA4B,QAAkB,EAAmB,aAA4B;QAAjE,aAAQ,GAAR,QAAQ,CAAU;QAAmB,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAoC1F,KAAK,CAAI,KAAmB,EAAE,OAAqB;QACxD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;QACxE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAE5C,OAAO,IAAI,aAAa,CAAC,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AAE,GAAG,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACI,KAAK,CAAC,iBAAiB,CAC5B,IAAsB,EACtB,OAAwB;QAExB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,EAAE;YACtD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACzE;QACD;;;UAGE;QACF,IAAI;YACF,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC1E,OAAO,YAAY,CAAC;SACrB;QAAC,OAAO,GAAQ,EAAE;YACjB,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC,QAAQ,EAAE;gBACrC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACxD,iDAAiD;gBACjD,YAAY,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;gBAClD,OAAO,cAAc,CAAC;aACvB;iBAAM;gBACL,MAAM,GAAG,CAAC;aACX;SACF;IACH,CAAC;IAED;;;;;;;;OAQG;IACI,OAAO,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n Constants,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n StatusCodes,\n} from \"../../common\";\nimport { DEFAULT_PARTITION_KEY_PATH } from \"../../common/partitionKeys\";\nimport { mergeHeaders, SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Database } from \"../Database\";\nimport { Resource } from \"../Resource\";\nimport { Container } from \"./Container\";\nimport { ContainerDefinition } from \"./ContainerDefinition\";\nimport { ContainerRequest } from \"./ContainerRequest\";\nimport { ContainerResponse } from \"./ContainerResponse\";\nimport { validateOffer } from \"../../utils/offers\";\n\n/**\n * Operations for creating new containers, and reading/querying all containers\n *\n * @see {@link Container} for reading, replacing, or deleting an existing container; use `.container(id)`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `containers.readAll()` before every single `item.read()` call, to ensure the container exists;\n * do this once on application start up.\n */\nexport class Containers {\n constructor(public readonly database: Database, private readonly clientContext: ClientContext) {}\n\n /**\n * Queries all containers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time.\n * @example Read all containers to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @container\",\n * parameters: [\n * {name: \"@container\", value: \"Todo\"}\n * ]\n * };\n * const {body: containerList} = await client.database(\"\").containers.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all containers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time.\n * @example Read all containers to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @container\",\n * parameters: [\n * {name: \"@container\", value: \"Todo\"}\n * ]\n * };\n * const {body: containerList} = await client.database(\"\").containers.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.database.url, ResourceType.container);\n const id = getIdFromLink(this.database.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n resultFn: (result) => result.DocumentCollections,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Creates a container.\n *\n * A container is a named logical container for items.\n *\n * A database may contain zero or more named containers and each container consists of\n * zero or more JSON items.\n *\n * Being schema-free, the items in a container do not need to share the same structure or fields.\n *\n *\n * Since containers are application resources, they can be authorized using either the\n * master key or resource keys.\n *\n * @param body - Represents the body of the container.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public async create(\n body: ContainerRequest,\n options: RequestOptions = {}\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n const path = getPathFromLink(this.database.url, ResourceType.container);\n const id = getIdFromLink(this.database.url);\n\n validateOffer(body);\n\n if (body.maxThroughput) {\n const autoscaleParams: {\n maxThroughput: number;\n autoUpgradePolicy?: {\n throughputPolicy: {\n incrementPercent: number;\n };\n };\n } = {\n maxThroughput: body.maxThroughput,\n };\n if (body.autoUpgradePolicy) {\n autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy;\n }\n const autoscaleHeader = JSON.stringify(autoscaleParams);\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeader,\n });\n delete body.maxThroughput;\n delete body.autoUpgradePolicy;\n }\n\n if (body.throughput) {\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.OfferThroughput]: body.throughput,\n });\n delete body.throughput;\n }\n\n if (typeof body.partitionKey === \"string\") {\n if (!body.partitionKey.startsWith(\"/\")) {\n throw new Error(\"Partition key must start with '/'\");\n }\n body.partitionKey = {\n paths: [body.partitionKey],\n };\n }\n\n // If they don't specify a partition key, use the default path\n if (!body.partitionKey || !body.partitionKey.paths) {\n body.partitionKey = {\n paths: [DEFAULT_PARTITION_KEY_PATH],\n };\n }\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n const ref = new Container(this.database, response.result.id, this.clientContext);\n return new ContainerResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Checks if a Container exists, and, if it doesn't, creates it.\n * This will make a read operation based on the id in the `body`, then if it is not found, a create operation.\n * You should confirm that the output matches the body you passed in for non-default properties (i.e. indexing policy/etc.)\n *\n * A container is a named logical container for items.\n *\n * A database may contain zero or more named containers and each container consists of\n * zero or more JSON items.\n *\n * Being schema-free, the items in a container do not need to share the same structure or fields.\n *\n *\n * Since containers are application resources, they can be authorized using either the\n * master key or resource keys.\n *\n * @param body - Represents the body of the container.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public async createIfNotExists(\n body: ContainerRequest,\n options?: RequestOptions\n ): Promise {\n if (!body || body.id === null || body.id === undefined) {\n throw new Error(\"body parameter must be an object with an id property\");\n }\n /*\n 1. Attempt to read the Container (based on an assumption that most containers will already exist, so its faster)\n 2. If it fails with NotFound error, attempt to create the container. Else, return the read results.\n */\n try {\n const readResponse = await this.database.container(body.id).read(options);\n return readResponse;\n } catch (err: any) {\n if (err.code === StatusCodes.NotFound) {\n const createResponse = await this.create(body, options);\n // Must merge the headers to capture RU costskaty\n mergeHeaders(createResponse.headers, err.headers);\n return createResponse;\n } else {\n throw err;\n }\n }\n }\n\n /**\n * Read all containers.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all containers in an array or iterate over them one at a time.\n * @example Read all containers to array.\n * ```typescript\n * const {body: containerList} = await client.database(\"\").containers.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.d.ts deleted file mode 100644 index 3fe8fc4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @hidden - */ -export interface PartitionKeyRange { - id: string; - minInclusive: string; - maxExclusive: string; - ridPrefix: number; - throughputFraction: number; - status: string; - parents: string[]; -} -//# sourceMappingURL=PartitionKeyRange.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.d.ts.map deleted file mode 100644 index f43b507..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PartitionKeyRange.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/PartitionKeyRange.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.js deleted file mode 100644 index a70003b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=PartitionKeyRange.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.js.map deleted file mode 100644 index d5acf23..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/PartitionKeyRange.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PartitionKeyRange.js","sourceRoot":"","sources":["../../../../src/client/Container/PartitionKeyRange.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * @hidden\n */\nexport interface PartitionKeyRange {\n id: string;\n minInclusive: string;\n maxExclusive: string;\n ridPrefix: number;\n throughputFraction: number;\n status: string;\n parents: string[];\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.d.ts deleted file mode 100644 index 397690f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** Interface for setting unique keys on container creation */ -export interface UniqueKeyPolicy { - uniqueKeys: UniqueKey[]; -} -/** Interface for a single unique key passed as part of UniqueKeyPolicy */ -export interface UniqueKey { - paths: string[]; -} -//# sourceMappingURL=UniqueKeyPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.d.ts.map deleted file mode 100644 index 1f9268a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UniqueKeyPolicy.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/UniqueKeyPolicy.ts"],"names":[],"mappings":"AAEA,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.js deleted file mode 100644 index 7f2935d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=UniqueKeyPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.js.map deleted file mode 100644 index 19ceea3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/UniqueKeyPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UniqueKeyPolicy.js","sourceRoot":"","sources":["../../../../src/client/Container/UniqueKeyPolicy.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** Interface for setting unique keys on container creation */\nexport interface UniqueKeyPolicy {\n uniqueKeys: UniqueKey[];\n}\n\n/** Interface for a single unique key passed as part of UniqueKeyPolicy */\nexport interface UniqueKey {\n paths: string[];\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.d.ts deleted file mode 100644 index 3787c18..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { Container } from "./Container"; -export { Containers } from "./Containers"; -export { ContainerDefinition } from "./ContainerDefinition"; -export { ContainerResponse } from "./ContainerResponse"; -export { PartitionKeyRange } from "./PartitionKeyRange"; -export { UniqueKeyPolicy, UniqueKey } from "./UniqueKeyPolicy"; -export { ContainerRequest } from "./ContainerRequest"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.d.ts.map deleted file mode 100644 index d2c017e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/Container/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.js deleted file mode 100644 index 7165c7f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { Container } from "./Container"; -export { Containers } from "./Containers"; -export { ContainerResponse } from "./ContainerResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.js.map deleted file mode 100644 index 83d740c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Container/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/Container/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { Container } from \"./Container\";\nexport { Containers } from \"./Containers\";\nexport { ContainerDefinition } from \"./ContainerDefinition\";\nexport { ContainerResponse } from \"./ContainerResponse\";\nexport { PartitionKeyRange } from \"./PartitionKeyRange\";\nexport { UniqueKeyPolicy, UniqueKey } from \"./UniqueKeyPolicy\";\nexport { ContainerRequest } from \"./ContainerRequest\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.d.ts deleted file mode 100644 index 35dd791..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { CosmosClient } from "../../CosmosClient"; -import { RequestOptions } from "../../request"; -import { Container, Containers } from "../Container"; -import { User, Users } from "../User"; -import { DatabaseResponse } from "./DatabaseResponse"; -import { OfferResponse } from "../Offer"; -/** - * Operations for reading or deleting an existing database. - * - * @see {@link Databases} for creating new databases, and reading/querying all databases; use `client.databases`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `database.read()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -export declare class Database { - readonly client: CosmosClient; - readonly id: string; - private clientContext; - /** - * Used for creating new containers, or querying/reading all containers. - * - * Use `.database(id)` to read, replace, or delete a specific, existing {@link Database} by id. - * - * @example Create a new container - * ```typescript - * const {body: containerDefinition, container} = await client.database("").containers.create({id: ""}); - * ``` - */ - readonly containers: Containers; - /** - * Used for creating new users, or querying/reading all users. - * - * Use `.user(id)` to read, replace, or delete a specific, existing {@link User} by id. - */ - readonly users: Users; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** Returns a new {@link Database} instance. - * - * Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself. - */ - constructor(client: CosmosClient, id: string, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link Database} by id. - * - * Use `.containers` creating new containers, or querying/reading all containers. - * - * @example Delete a container - * ```typescript - * await client.database("").container("").delete(); - * ``` - */ - container(id: string): Container; - /** - * Used to read, replace, or delete a specific, existing {@link User} by id. - * - * Use `.users` for creating new users, or querying/reading all users. - */ - user(id: string): User; - /** Read the definition of the given Database. */ - read(options?: RequestOptions): Promise; - /** Delete the given Database. */ - delete(options?: RequestOptions): Promise; - /** - * Gets offer on database. If none exists, returns an OfferResponse with undefined. - */ - readOffer(options?: RequestOptions): Promise; -} -//# sourceMappingURL=Database.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.d.ts.map deleted file mode 100644 index 34e31fc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Database.d.ts","sourceRoot":"","sources":["../../../../src/client/Database/Database.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAA0B,MAAM,UAAU,CAAC;AAGjE;;;;;;;;;GASG;AACH,qBAAa,QAAQ;aA+BD,MAAM,EAAE,YAAY;aACpB,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,aAAa;IAhCvB;;;;;;;;;OASG;IACH,SAAgB,UAAU,EAAE,UAAU,CAAC;IACvC;;;;OAIG;IACH,SAAgB,KAAK,EAAE,KAAK,CAAC;IAE7B;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED;;;OAGG;gBAEe,MAAM,EAAE,YAAY,EACpB,EAAE,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa;IAMtC;;;;;;;;;OASG;IACI,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS;IAIvC;;;;OAIG;IACI,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI7B,iDAAiD;IACpC,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAYtE,iCAAiC;IACpB,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAYxE;;OAEG;IACU,SAAS,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;CAiB7E"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.js deleted file mode 100644 index cee2201..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.js +++ /dev/null @@ -1,100 +0,0 @@ -import { createDatabaseUri, getIdFromLink, getPathFromLink, ResourceType } from "../../common"; -import { Container, Containers } from "../Container"; -import { User, Users } from "../User"; -import { DatabaseResponse } from "./DatabaseResponse"; -import { OfferResponse, Offer } from "../Offer"; -/** - * Operations for reading or deleting an existing database. - * - * @see {@link Databases} for creating new databases, and reading/querying all databases; use `client.databases`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `database.read()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -export class Database { - /** Returns a new {@link Database} instance. - * - * Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself. - */ - constructor(client, id, clientContext) { - this.client = client; - this.id = id; - this.clientContext = clientContext; - this.containers = new Containers(this, this.clientContext); - this.users = new Users(this, this.clientContext); - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createDatabaseUri(this.id); - } - /** - * Used to read, replace, or delete a specific, existing {@link Database} by id. - * - * Use `.containers` creating new containers, or querying/reading all containers. - * - * @example Delete a container - * ```typescript - * await client.database("").container("").delete(); - * ``` - */ - container(id) { - return new Container(this, id, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link User} by id. - * - * Use `.users` for creating new users, or querying/reading all users. - */ - user(id) { - return new User(this, id, this.clientContext); - } - /** Read the definition of the given Database. */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.database, - resourceId: id, - options, - }); - return new DatabaseResponse(response.result, response.headers, response.code, this); - } - /** Delete the given Database. */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.database, - resourceId: id, - options, - }); - return new DatabaseResponse(response.result, response.headers, response.code, this); - } - /** - * Gets offer on database. If none exists, returns an OfferResponse with undefined. - */ - async readOffer(options = {}) { - const { resource: record } = await this.read(); - const path = "/offers"; - const url = record._self; - const response = await this.clientContext.queryFeed({ - path, - resourceId: "", - resourceType: ResourceType.offer, - query: `SELECT * from root where root.resource = "${url}"`, - resultFn: (result) => result.Offers, - options, - }); - const offer = response.result[0] - ? new Offer(this.client, response.result[0].id, this.clientContext) - : undefined; - return new OfferResponse(response.result[0], response.headers, response.code, offer); - } -} -//# sourceMappingURL=Database.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.js.map deleted file mode 100644 index 22a9701..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Database.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Database.js","sourceRoot":"","sources":["../../../../src/client/Database/Database.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG/F,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAmB,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjE;;;;;;;;;GASG;AACH,MAAM,OAAO,QAAQ;IA0BnB;;;OAGG;IACH,YACkB,MAAoB,EACpB,EAAU,EAClB,aAA4B;QAFpB,WAAM,GAAN,MAAM,CAAc;QACpB,OAAE,GAAF,EAAE,CAAQ;QAClB,kBAAa,GAAb,aAAa,CAAe;QAEpC,IAAI,CAAC,UAAU,GAAG,IAAI,UAA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../../ClientContext\";\nimport { createDatabaseUri, getIdFromLink, getPathFromLink, ResourceType } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { RequestOptions } from \"../../request\";\nimport { Container, Containers } from \"../Container\";\nimport { User, Users } from \"../User\";\nimport { DatabaseDefinition } from \"./DatabaseDefinition\";\nimport { DatabaseResponse } from \"./DatabaseResponse\";\nimport { OfferResponse, OfferDefinition, Offer } from \"../Offer\";\nimport { Resource } from \"../Resource\";\n\n/**\n * Operations for reading or deleting an existing database.\n *\n * @see {@link Databases} for creating new databases, and reading/querying all databases; use `client.databases`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `database.read()` before every single `item.read()` call, to ensure the database exists;\n * do this once on application start up.\n */\nexport class Database {\n /**\n * Used for creating new containers, or querying/reading all containers.\n *\n * Use `.database(id)` to read, replace, or delete a specific, existing {@link Database} by id.\n *\n * @example Create a new container\n * ```typescript\n * const {body: containerDefinition, container} = await client.database(\"\").containers.create({id: \"\"});\n * ```\n */\n public readonly containers: Containers;\n /**\n * Used for creating new users, or querying/reading all users.\n *\n * Use `.user(id)` to read, replace, or delete a specific, existing {@link User} by id.\n */\n public readonly users: Users;\n\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createDatabaseUri(this.id);\n }\n\n /** Returns a new {@link Database} instance.\n *\n * Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself.\n */\n constructor(\n public readonly client: CosmosClient,\n public readonly id: string,\n private clientContext: ClientContext\n ) {\n this.containers = new Containers(this, this.clientContext);\n this.users = new Users(this, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Database} by id.\n *\n * Use `.containers` creating new containers, or querying/reading all containers.\n *\n * @example Delete a container\n * ```typescript\n * await client.database(\"\").container(\"\").delete();\n * ```\n */\n public container(id: string): Container {\n return new Container(this, id, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link User} by id.\n *\n * Use `.users` for creating new users, or querying/reading all users.\n */\n public user(id: string): User {\n return new User(this, id, this.clientContext);\n }\n\n /** Read the definition of the given Database. */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.database,\n resourceId: id,\n options,\n });\n return new DatabaseResponse(response.result, response.headers, response.code, this);\n }\n\n /** Delete the given Database. */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.database,\n resourceId: id,\n options,\n });\n return new DatabaseResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Gets offer on database. If none exists, returns an OfferResponse with undefined.\n */\n public async readOffer(options: RequestOptions = {}): Promise {\n const { resource: record } = await this.read();\n const path = \"/offers\";\n const url = record._self;\n const response = await this.clientContext.queryFeed({\n path,\n resourceId: \"\",\n resourceType: ResourceType.offer,\n query: `SELECT * from root where root.resource = \"${url}\"`,\n resultFn: (result) => result.Offers,\n options,\n });\n const offer = response.result[0]\n ? new Offer(this.client, response.result[0].id, this.clientContext)\n : undefined;\n return new OfferResponse(response.result[0], response.headers, response.code, offer);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.d.ts deleted file mode 100644 index 426d19a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface DatabaseDefinition { - /** The id of the database. */ - id?: string; -} -//# sourceMappingURL=DatabaseDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.d.ts.map deleted file mode 100644 index 3c6d825..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/Database/DatabaseDefinition.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.js deleted file mode 100644 index 16bf22f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=DatabaseDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.js.map deleted file mode 100644 index 9a3e9dc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseDefinition.js","sourceRoot":"","sources":["../../../../src/client/Database/DatabaseDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface DatabaseDefinition {\n /** The id of the database. */\n id?: string;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.d.ts deleted file mode 100644 index f2589bd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { DatabaseDefinition } from "./DatabaseDefinition"; -export interface DatabaseRequest extends DatabaseDefinition { - /** Throughput for this database. */ - throughput?: number; - maxThroughput?: number; - autoUpgradePolicy?: { - throughputPolicy: { - incrementPercent: number; - }; - }; -} -//# sourceMappingURL=DatabaseRequest.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.d.ts.map deleted file mode 100644 index ccf75b0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/Database/DatabaseRequest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE;QAClB,gBAAgB,EAAE;YAChB,gBAAgB,EAAE,MAAM,CAAC;SAC1B,CAAC;KACH,CAAC;CACH"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.js deleted file mode 100644 index c69f19c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=DatabaseRequest.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.js.map deleted file mode 100644 index 3be5917..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseRequest.js","sourceRoot":"","sources":["../../../../src/client/Database/DatabaseRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { DatabaseDefinition } from \"./DatabaseDefinition\";\n\nexport interface DatabaseRequest extends DatabaseDefinition {\n /** Throughput for this database. */\n throughput?: number;\n maxThroughput?: number;\n autoUpgradePolicy?: {\n throughputPolicy: {\n incrementPercent: number;\n };\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.d.ts deleted file mode 100644 index 555ca02..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request/ResourceResponse"; -import { Resource } from "../Resource"; -import { Database } from "./Database"; -import { DatabaseDefinition } from "./DatabaseDefinition"; -/** Response object for Database operations */ -export declare class DatabaseResponse extends ResourceResponse { - constructor(resource: DatabaseDefinition & Resource, headers: CosmosHeaders, statusCode: number, database: Database); - /** A reference to the {@link Database} that the returned {@link DatabaseDefinition} corresponds to. */ - readonly database: Database; -} -//# sourceMappingURL=DatabaseResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.d.ts.map deleted file mode 100644 index b956912..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/Database/DatabaseResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,8CAA8C;AAC9C,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,kBAAkB,GAAG,QAAQ,CAAC;gBAEjF,QAAQ,EAAE,kBAAkB,GAAG,QAAQ,EACvC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,QAAQ;IAKpB,uGAAuG;IACvG,SAAgB,QAAQ,EAAE,QAAQ,CAAC;CACpC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.js deleted file mode 100644 index 274fceb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.js +++ /dev/null @@ -1,9 +0,0 @@ -import { ResourceResponse } from "../../request/ResourceResponse"; -/** Response object for Database operations */ -export class DatabaseResponse extends ResourceResponse { - constructor(resource, headers, statusCode, database) { - super(resource, headers, statusCode); - this.database = database; - } -} -//# sourceMappingURL=DatabaseResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.js.map deleted file mode 100644 index 049f9f8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/DatabaseResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseResponse.js","sourceRoot":"","sources":["../../../../src/client/Database/DatabaseResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAKlE,8CAA8C;AAC9C,MAAM,OAAO,gBAAiB,SAAQ,gBAA+C;IACnF,YACE,QAAuC,EACvC,OAAsB,EACtB,UAAkB,EAClB,QAAkB;QAElB,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request/ResourceResponse\";\nimport { Resource } from \"../Resource\";\nimport { Database } from \"./Database\";\nimport { DatabaseDefinition } from \"./DatabaseDefinition\";\n\n/** Response object for Database operations */\nexport class DatabaseResponse extends ResourceResponse {\n constructor(\n resource: DatabaseDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n database: Database\n ) {\n super(resource, headers, statusCode);\n this.database = database;\n }\n /** A reference to the {@link Database} that the returned {@link DatabaseDefinition} corresponds to. */\n public readonly database: Database;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.d.ts deleted file mode 100644 index f8661ff..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { CosmosClient } from "../../CosmosClient"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions } from "../../request"; -import { Resource } from "../Resource"; -import { DatabaseDefinition } from "./DatabaseDefinition"; -import { DatabaseRequest } from "./DatabaseRequest"; -import { DatabaseResponse } from "./DatabaseResponse"; -/** - * Operations for creating new databases, and reading/querying all databases - * - * @see {@link Database} for reading or deleting an existing database; use `client.database(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `databases.readAll()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -export declare class Databases { - readonly client: CosmosClient; - private readonly clientContext; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database. - */ - constructor(client: CosmosClient, clientContext: ClientContext); - /** - * Queries all databases. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @db", - * parameters: [ - * {name: "@db", value: "Todo"} - * ] - * }; - * const {body: databaseList} = await client.databases.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all databases. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @db", - * parameters: [ - * {name: "@db", value: "Todo"} - * ] - * }; - * const {body: databaseList} = await client.databases.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Send a request for creating a database. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - create(body: DatabaseRequest, options?: RequestOptions): Promise; - /** - * Check if a database exists, and if it doesn't, create it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Additional options for the request - */ - createIfNotExists(body: DatabaseRequest, options?: RequestOptions): Promise; - /** - * Reads all databases. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const {body: databaseList} = await client.databases.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; -} -//# sourceMappingURL=Databases.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.d.ts.map deleted file mode 100644 index 0920c09..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Databases.d.ts","sourceRoot":"","sources":["../../../../src/client/Database/Databases.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAuC,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD;;;;;;;;;GASG;AACH,qBAAa,SAAS;aAMF,MAAM,EAAE,YAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC;;;OAGG;gBAEe,MAAM,EAAE,YAAY,EACnB,aAAa,EAAE,aAAa;IAG/C;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IACrF;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAetF;;;;;;;;;;;;;OAaG;IACU,MAAM,CACjB,IAAI,EAAE,eAAe,EACrB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC;IAiD5B;;;;;;;;;;;;;;OAcG;IACU,iBAAiB,CAC5B,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,gBAAgB,CAAC;IAwB5B;;;;;;;;OAQG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,kBAAkB,GAAG,QAAQ,CAAC;CAGpF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.js deleted file mode 100644 index c7cbf6f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.js +++ /dev/null @@ -1,143 +0,0 @@ -import { Constants, isResourceValid, ResourceType, StatusCodes } from "../../common"; -import { mergeHeaders } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { Database } from "./Database"; -import { DatabaseResponse } from "./DatabaseResponse"; -import { validateOffer } from "../../utils/offers"; -/** - * Operations for creating new databases, and reading/querying all databases - * - * @see {@link Database} for reading or deleting an existing database; use `client.database(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `databases.readAll()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -export class Databases { - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database. - */ - constructor(client, clientContext) { - this.client = client; - this.clientContext = clientContext; - } - query(query, options) { - const cb = (innerOptions) => { - return this.clientContext.queryFeed({ - path: "/dbs", - resourceType: ResourceType.database, - resourceId: "", - resultFn: (result) => result.Databases, - query, - options: innerOptions, - }); - }; - return new QueryIterator(this.clientContext, query, options, cb); - } - /** - * Send a request for creating a database. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - async create(body, options = {}) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - validateOffer(body); - if (body.maxThroughput) { - const autoscaleParams = { - maxThroughput: body.maxThroughput, - }; - if (body.autoUpgradePolicy) { - autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy; - } - const autoscaleHeaders = JSON.stringify(autoscaleParams); - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeaders, - }); - delete body.maxThroughput; - delete body.autoUpgradePolicy; - } - if (body.throughput) { - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.OfferThroughput]: body.throughput, - }); - delete body.throughput; - } - const path = "/dbs"; // TODO: constant - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.database, - resourceId: undefined, - options, - }); - const ref = new Database(this.client, body.id, this.clientContext); - return new DatabaseResponse(response.result, response.headers, response.code, ref); - } - /** - * Check if a database exists, and if it doesn't, create it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Additional options for the request - */ - async createIfNotExists(body, options) { - if (!body || body.id === null || body.id === undefined) { - throw new Error("body parameter must be an object with an id property"); - } - /* - 1. Attempt to read the Database (based on an assumption that most databases will already exist, so its faster) - 2. If it fails with NotFound error, attempt to create the db. Else, return the read results. - */ - try { - const readResponse = await this.client.database(body.id).read(options); - return readResponse; - } - catch (err) { - if (err.code === StatusCodes.NotFound) { - const createResponse = await this.create(body, options); - // Must merge the headers to capture RU costskaty - mergeHeaders(createResponse.headers, err.headers); - return createResponse; - } - else { - throw err; - } - } - } - // TODO: DatabaseResponse for QueryIterator? - /** - * Reads all databases. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const {body: databaseList} = await client.databases.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } -} -//# sourceMappingURL=Databases.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.js.map deleted file mode 100644 index f0a42a2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/Databases.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Databases.js","sourceRoot":"","sources":["../../../../src/client/Database/Databases.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAErF,OAAO,EAAyB,YAAY,EAAgB,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,OAAO,SAAS;IACpB;;;OAGG;IACH,YACkB,MAAoB,EACnB,aAA4B;QAD7B,WAAM,GAAN,MAAM,CAAc;QACnB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAoCG,KAAK,CAAI,KAA4B,EAAE,OAAqB;QACjE,MAAM,EAAE,GAA0B,CAAC,YAAY,EAAE,EAAE;YACjD,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;gBAClC,IAAI,EAAE,MAAM;gBACZ,YAAY,EAAE,YAAY,CAAC,QAAQ;gBACnC,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS;gBACtC,KAAK;gBACL,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;QACL,CAAC,CAAC;QACF,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,E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AC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { Constants, isResourceValid, ResourceType, StatusCodes } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { FetchFunctionCallback, mergeHeaders, SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Database } from \"./Database\";\nimport { DatabaseDefinition } from \"./DatabaseDefinition\";\nimport { DatabaseRequest } from \"./DatabaseRequest\";\nimport { DatabaseResponse } from \"./DatabaseResponse\";\nimport { validateOffer } from \"../../utils/offers\";\n\n/**\n * Operations for creating new databases, and reading/querying all databases\n *\n * @see {@link Database} for reading or deleting an existing database; use `client.database(id)`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `databases.readAll()` before every single `item.read()` call, to ensure the database exists;\n * do this once on application start up.\n */\nexport class Databases {\n /**\n * @hidden\n * @param client - The parent {@link CosmosClient} for the Database.\n */\n constructor(\n public readonly client: CosmosClient,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Queries all databases.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time.\n * @example Read all databases to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @db\",\n * parameters: [\n * {name: \"@db\", value: \"Todo\"}\n * ]\n * };\n * const {body: databaseList} = await client.databases.query(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all databases.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time.\n * @example Read all databases to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @db\",\n * parameters: [\n * {name: \"@db\", value: \"Todo\"}\n * ]\n * };\n * const {body: databaseList} = await client.databases.query(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const cb: FetchFunctionCallback = (innerOptions) => {\n return this.clientContext.queryFeed({\n path: \"/dbs\",\n resourceType: ResourceType.database,\n resourceId: \"\",\n resultFn: (result) => result.Databases,\n query,\n options: innerOptions,\n });\n };\n return new QueryIterator(this.clientContext, query, options, cb);\n }\n\n /**\n * Send a request for creating a database.\n *\n * A database manages users, permissions and a set of containers.\n * Each Azure Cosmos DB Database Account is able to support multiple independent named databases,\n * with the database being the logical container for data.\n *\n * Each Database consists of one or more containers, each of which in turn contain one or more\n * documents. Since databases are an administrative resource, the Service Master Key will be\n * required in order to access and successfully complete any action using the User APIs.\n *\n * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public async create(\n body: DatabaseRequest,\n options: RequestOptions = {}\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n validateOffer(body);\n\n if (body.maxThroughput) {\n const autoscaleParams: {\n maxThroughput: number;\n autoUpgradePolicy?: {\n throughputPolicy: {\n incrementPercent: number;\n };\n };\n } = {\n maxThroughput: body.maxThroughput,\n };\n if (body.autoUpgradePolicy) {\n autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy;\n }\n const autoscaleHeaders = JSON.stringify(autoscaleParams);\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeaders,\n });\n delete body.maxThroughput;\n delete body.autoUpgradePolicy;\n }\n\n if (body.throughput) {\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.OfferThroughput]: body.throughput,\n });\n delete body.throughput;\n }\n\n const path = \"/dbs\"; // TODO: constant\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.database,\n resourceId: undefined,\n options,\n });\n const ref = new Database(this.client, body.id, this.clientContext);\n return new DatabaseResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Check if a database exists, and if it doesn't, create it.\n * This will make a read operation based on the id in the `body`, then if it is not found, a create operation.\n *\n * A database manages users, permissions and a set of containers.\n * Each Azure Cosmos DB Database Account is able to support multiple independent named databases,\n * with the database being the logical container for data.\n *\n * Each Database consists of one or more containers, each of which in turn contain one or more\n * documents. Since databases are an an administrative resource, the Service Master Key will be\n * required in order to access and successfully complete any action using the User APIs.\n *\n * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created.\n * @param options - Additional options for the request\n */\n public async createIfNotExists(\n body: DatabaseRequest,\n options?: RequestOptions\n ): Promise {\n if (!body || body.id === null || body.id === undefined) {\n throw new Error(\"body parameter must be an object with an id property\");\n }\n /*\n 1. Attempt to read the Database (based on an assumption that most databases will already exist, so its faster)\n 2. If it fails with NotFound error, attempt to create the db. Else, return the read results.\n */\n try {\n const readResponse = await this.client.database(body.id).read(options);\n return readResponse;\n } catch (err: any) {\n if (err.code === StatusCodes.NotFound) {\n const createResponse = await this.create(body, options);\n // Must merge the headers to capture RU costskaty\n mergeHeaders(createResponse.headers, err.headers);\n return createResponse;\n } else {\n throw err;\n }\n }\n }\n\n // TODO: DatabaseResponse for QueryIterator?\n /**\n * Reads all databases.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time.\n * @example Read all databases to array.\n * ```typescript\n * const {body: databaseList} = await client.databases.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.d.ts deleted file mode 100644 index 7ea6bf4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { Database } from "./Database"; -export { Databases } from "./Databases"; -export { DatabaseDefinition } from "./DatabaseDefinition"; -export { DatabaseResponse } from "./DatabaseResponse"; -export { DatabaseRequest } from "./DatabaseRequest"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.d.ts.map deleted file mode 100644 index ded9cc2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/Database/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.js deleted file mode 100644 index ceb8c7d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { Database } from "./Database"; -export { Databases } from "./Databases"; -export { DatabaseResponse } from "./DatabaseResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.js.map deleted file mode 100644 index 5a8db64..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Database/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/Database/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { Database } from \"./Database\";\nexport { Databases } from \"./Databases\";\nexport { DatabaseDefinition } from \"./DatabaseDefinition\";\nexport { DatabaseResponse } from \"./DatabaseResponse\";\nexport { DatabaseRequest } from \"./DatabaseRequest\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.d.ts deleted file mode 100644 index 13cbbc8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { PartitionKey } from "../../documents"; -import { RequestOptions } from "../../request"; -import { PatchRequestBody } from "../../utils/patch"; -import { Container } from "../Container"; -import { ItemDefinition } from "./ItemDefinition"; -import { ItemResponse } from "./ItemResponse"; -/** - * Used to perform operations on a specific item. - * - * @see {@link Items} for operations on all items; see `container.items`. - */ -export declare class Item { - readonly container: Container; - readonly id: string; - private readonly clientContext; - private partitionKey; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Item}. - * @param partitionKey - The primary key of the given {@link Item} (only for partitioned containers). - */ - constructor(container: Container, id: string, partitionKey: PartitionKey, clientContext: ClientContext); - /** - * Read the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * If the type, T, is a class, it won't pass `typeof` comparisons, because it won't have a match prototype. - * It's recommended to only use interfaces. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Additional options for the request - * - * @example Using custom type for response - * ```typescript - * interface TodoItem { - * title: string; - * done: bool; - * id: string; - * } - * - * let item: TodoItem; - * ({body: item} = await item.read()); - * ``` - */ - read(options?: RequestOptions): Promise>; - /** - * Replace the item's definition. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - The definition to replace the existing {@link Item}'s definition with. - * @param options - Additional options for the request - */ - replace(body: ItemDefinition, options?: RequestOptions): Promise>; - /** - * Replace the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - The definition to replace the existing {@link Item}'s definition with. - * @param options - Additional options for the request - */ - replace(body: T, options?: RequestOptions): Promise>; - /** - * Delete the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - delete(options?: RequestOptions): Promise>; - /** - * Perform a JSONPatch on the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - patch(body: PatchRequestBody, options?: RequestOptions): Promise>; -} -//# sourceMappingURL=Item.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.d.ts.map deleted file mode 100644 index 061108f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../src/client/Item/Item.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAY,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,qBAAa,IAAI;aAgBG,SAAS,EAAE,SAAS;aACpB,EAAE,EAAE,MAAM;IAE1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAlBhC,OAAO,CAAC,YAAY,CAAe;IACnC;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED;;;;;OAKG;gBAEe,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,EAC1B,YAAY,EAAE,YAAY,EACT,aAAa,EAAE,aAAa;IAK/C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACU,IAAI,CAAC,CAAC,SAAS,cAAc,GAAG,GAAG,EAC9C,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAkC3B;;;;;;;OAOG;IACI,OAAO,CACZ,IAAI,EAAE,cAAc,EACpB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACxC;;;;;;;;;;OAUG;IACI,OAAO,CAAC,CAAC,SAAS,cAAc,EACrC,IAAI,EAAE,CAAC,EACP,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAoC3B;;;;;;;OAOG;IACU,MAAM,CAAC,CAAC,SAAS,cAAc,GAAG,GAAG,EAChD,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IA0B3B;;;;;;;OAOG;IACU,KAAK,CAAC,CAAC,SAAS,cAAc,GAAG,GAAG,EAC/C,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CA0B5B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.js deleted file mode 100644 index 4ab48dd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.js +++ /dev/null @@ -1,148 +0,0 @@ -import { createDocumentUri, getIdFromLink, getPathFromLink, isItemResourceValid, ResourceType, StatusCodes, } from "../../common"; -import { extractPartitionKey, undefinedPartitionKey } from "../../extractPartitionKey"; -import { ItemResponse } from "./ItemResponse"; -/** - * Used to perform operations on a specific item. - * - * @see {@link Items} for operations on all items; see `container.items`. - */ -export class Item { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Item}. - * @param partitionKey - The primary key of the given {@link Item} (only for partitioned containers). - */ - constructor(container, id, partitionKey, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - this.partitionKey = partitionKey; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createDocumentUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * If the type, T, is a class, it won't pass `typeof` comparisons, because it won't have a match prototype. - * It's recommended to only use interfaces. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Additional options for the request - * - * @example Using custom type for response - * ```typescript - * interface TodoItem { - * title: string; - * done: bool; - * id: string; - * } - * - * let item: TodoItem; - * ({body: item} = await item.read()); - * ``` - */ - async read(options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - let response; - try { - response = await this.clientContext.read({ - path, - resourceType: ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - } - catch (error) { - if (error.code !== StatusCodes.NotFound) { - throw error; - } - response = error; - } - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } - async replace(body, options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = extractPartitionKey(body, partitionKeyDefinition); - } - const err = {}; - if (!isItemResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } - /** - * Delete the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - async delete(options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } - /** - * Perform a JSONPatch on the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - async patch(body, options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = extractPartitionKey(body, partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.patch({ - body, - path, - resourceType: ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } -} -//# sourceMappingURL=Item.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.js.map deleted file mode 100644 index 36c7a2f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Item.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/client/Item/Item.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAMvF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,OAAO,IAAI;IASf;;;;;OAKG;IACH,YACkB,SAAoB,EACpB,EAAU,EAC1B,YAA0B,EACT,aAA4B;QAH7B,cAAS,GAAT,SAAS,CAAW;QACpB,OAAE,GAAF,EAAE,CAAQ;QAET,kBAAa,GAAb,aAAa,CAAe;QAE7C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IApBD;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,C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;YAClD,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,IAAI;YAC/B,UAAU,EAAE,EAAE;YACd,OAAO;YACP,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CACrB,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,OAAO,EAChB,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,SAAS,EAClB,IAAI,CACL,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,KAAK,CAChB,IAAsB,EACtB,UAA0B,EAAE;QAE5B,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACnC,MAAM,EAAE,QAAQ,EAAE,sBAAsB,EAAE,GACxC,MAAM,IAAI,CAAC,SAAS,CAAC,0BAA0B,EAAE,CAAC;YACpD,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;SACvE;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAI;YACjD,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,IAAI;YAC/B,UAAU,EAAE,EAAE;YACd,OAAO;YACP,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CACrB,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,OAAO,EAChB,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,SAAS,EAClB,IAAI,CACL,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createDocumentUri,\n getIdFromLink,\n getPathFromLink,\n isItemResourceValid,\n ResourceType,\n StatusCodes,\n} from \"../../common\";\nimport { PartitionKey } from \"../../documents\";\nimport { extractPartitionKey, undefinedPartitionKey } from \"../../extractPartitionKey\";\nimport { RequestOptions, Response } from \"../../request\";\nimport { PatchRequestBody } from \"../../utils/patch\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { ItemDefinition } from \"./ItemDefinition\";\nimport { ItemResponse } from \"./ItemResponse\";\n\n/**\n * Used to perform operations on a specific item.\n *\n * @see {@link Items} for operations on all items; see `container.items`.\n */\nexport class Item {\n private partitionKey: PartitionKey;\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createDocumentUri(this.container.database.id, this.container.id, this.id);\n }\n\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link Item}.\n * @param partitionKey - The primary key of the given {@link Item} (only for partitioned containers).\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n partitionKey: PartitionKey,\n private readonly clientContext: ClientContext\n ) {\n this.partitionKey = partitionKey;\n }\n\n /**\n * Read the item's definition.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n * If the type, T, is a class, it won't pass `typeof` comparisons, because it won't have a match prototype.\n * It's recommended to only use interfaces.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param options - Additional options for the request\n *\n * @example Using custom type for response\n * ```typescript\n * interface TodoItem {\n * title: string;\n * done: bool;\n * id: string;\n * }\n *\n * let item: TodoItem;\n * ({body: item} = await item.read());\n * ```\n */\n public async read(\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n let response: Response;\n try {\n response = await this.clientContext.read({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n } catch (error: any) {\n if (error.code !== StatusCodes.NotFound) {\n throw error;\n }\n response = error;\n }\n\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n\n /**\n * Replace the item's definition.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - The definition to replace the existing {@link Item}'s definition with.\n * @param options - Additional options for the request\n */\n public replace(\n body: ItemDefinition,\n options?: RequestOptions\n ): Promise>;\n /**\n * Replace the item's definition.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - The definition to replace the existing {@link Item}'s definition with.\n * @param options - Additional options for the request\n */\n public replace(\n body: T,\n options?: RequestOptions\n ): Promise>;\n public async replace(\n body: T,\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n }\n\n const err = {};\n if (!isItemResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n\n /**\n * Delete the item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * @param options - Additional options for the request\n */\n public async delete(\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n\n /**\n * Perform a JSONPatch on the item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * @param options - Additional options for the request\n */\n public async patch(\n body: PatchRequestBody,\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.patch({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.d.ts deleted file mode 100644 index 4517c24..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Items in Cosmos DB are simply JSON objects. - * Most of the Item operations allow for your to provide your own type - * that extends the very simple ItemDefinition. - * - * You cannot use any reserved keys. You can see the reserved key list - * in {@link ItemBody} - */ -export interface ItemDefinition { - /** The id of the item. User settable property. Uniquely identifies the item along with the partition key */ - id?: string; - /** Time to live in seconds for collections with TTL enabled */ - ttl?: number; - [key: string]: any; -} -//# sourceMappingURL=ItemDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.d.ts.map deleted file mode 100644 index 376e456..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ItemDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/Item/ItemDefinition.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAGH,MAAM,WAAW,cAAc;IAC7B,4GAA4G;IAC5G,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.js deleted file mode 100644 index 8231dd2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export {}; -//# sourceMappingURL=ItemDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.js.map deleted file mode 100644 index 88dd20f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ItemDefinition.js","sourceRoot":"","sources":["../../../../src/client/Item/ItemDefinition.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Items in Cosmos DB are simply JSON objects.\n * Most of the Item operations allow for your to provide your own type\n * that extends the very simple ItemDefinition.\n *\n * You cannot use any reserved keys. You can see the reserved key list\n * in {@link ItemBody}\n */\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface ItemDefinition {\n /** The id of the item. User settable property. Uniquely identifies the item along with the partition key */\n id?: string;\n /** Time to live in seconds for collections with TTL enabled */\n ttl?: number;\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.d.ts deleted file mode 100644 index 1d06986..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request/ResourceResponse"; -import { Resource } from "../Resource"; -import { Item } from "./Item"; -import { ItemDefinition } from "./ItemDefinition"; -export declare class ItemResponse extends ResourceResponse { - constructor(resource: T & Resource, headers: CosmosHeaders, statusCode: number, subsstatusCode: number, item: Item); - /** Reference to the {@link Item} the response corresponds to. */ - readonly item: Item; -} -//# sourceMappingURL=ItemResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.d.ts.map deleted file mode 100644 index f87f7cc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ItemResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/Item/ItemResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,YAAY,CAAC,CAAC,SAAS,cAAc,CAAE,SAAQ,gBAAgB,CAAC,CAAC,GAAG,QAAQ,CAAC;gBAEtF,QAAQ,EAAE,CAAC,GAAG,QAAQ,EACtB,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,IAAI;IAKZ,iEAAiE;IACjE,SAAgB,IAAI,EAAE,IAAI,CAAC;CAC5B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.js deleted file mode 100644 index cc41cdf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.js +++ /dev/null @@ -1,8 +0,0 @@ -import { ResourceResponse } from "../../request/ResourceResponse"; -export class ItemResponse extends ResourceResponse { - constructor(resource, headers, statusCode, subsstatusCode, item) { - super(resource, headers, statusCode, subsstatusCode); - this.item = item; - } -} -//# sourceMappingURL=ItemResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.js.map deleted file mode 100644 index 0def5b5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/ItemResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ItemResponse.js","sourceRoot":"","sources":["../../../../src/client/Item/ItemResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAKlE,MAAM,OAAO,YAAuC,SAAQ,gBAA8B;IACxF,YACE,QAAsB,EACtB,OAAsB,EACtB,UAAkB,EAClB,cAAsB,EACtB,IAAU;QAEV,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;QACrD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request/ResourceResponse\";\nimport { Resource } from \"../Resource\";\nimport { Item } from \"./Item\";\nimport { ItemDefinition } from \"./ItemDefinition\";\n\nexport class ItemResponse extends ResourceResponse {\n constructor(\n resource: T & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n subsstatusCode: number,\n item: Item\n ) {\n super(resource, headers, statusCode, subsstatusCode);\n this.item = item;\n }\n /** Reference to the {@link Item} the response corresponds to. */\n public readonly item: Item;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.d.ts deleted file mode 100644 index 9f3a261..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.d.ts +++ /dev/null @@ -1,229 +0,0 @@ -import { ChangeFeedIterator } from "../../ChangeFeedIterator"; -import { ChangeFeedOptions } from "../../ChangeFeedOptions"; -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions, Response } from "../../request"; -import { Container } from "../Container"; -import { ItemDefinition } from "./ItemDefinition"; -import { ItemResponse } from "./ItemResponse"; -import { OperationResponse, OperationInput, BulkOptions } from "../../utils/batch"; -/** - * Operations for creating new items, and reading/querying all items - * - * @see {@link Item} for reading, replacing, or deleting an existing container; use `.item(id)`. - */ -export declare class Items { - readonly container: Container; - private readonly clientContext; - /** - * Create an instance of {@link Items} linked to the parent {@link Container}. - * @param container - The parent container. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Queries all items. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM Families f WHERE f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Hendricks"} - * ] - * }; - * const {result: items} = await items.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all items. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT firstname FROM Families f WHERE f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Hendricks"} - * ] - * }; - * const {result: items} = await items.query<{firstName: string}>(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * - * @deprecated Use `changeFeed` instead. - * - * @example Read from the beginning of the change feed. - * ```javascript - * const iterator = items.readChangeFeed({ startFromBeginning: true }); - * const firstPage = await iterator.fetchNext(); - * const firstPageResults = firstPage.result - * const secondPage = await iterator.fetchNext(); - * ``` - */ - readChangeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - * - */ - readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - */ - readChangeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - */ - readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * - * @example Read from the beginning of the change feed. - * ```javascript - * const iterator = items.readChangeFeed({ startFromBeginning: true }); - * const firstPage = await iterator.fetchNext(); - * const firstPageResults = firstPage.result - * const secondPage = await iterator.fetchNext(); - * ``` - */ - changeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Read all items. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const {body: containerList} = await items.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Read all items. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const {body: containerList} = await items.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - create(body: T, options?: RequestOptions): Promise>; - /** - * Upsert an item. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - upsert(body: unknown, options?: RequestOptions): Promise>; - /** - * Upsert an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - upsert(body: T, options?: RequestOptions): Promise>; - /** - * Execute bulk operations on items. - * - * Bulk takes an array of Operations which are typed based on what the operation does. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is optional at the top level if present in the resourceBody - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.bulk(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param bulkOptions - Optional options object to modify bulk behavior. Pass \{ continueOnError: true \} to continue executing operations when one fails. (Defaults to false) ** NOTE: THIS WILL DEFAULT TO TRUE IN THE 4.0 RELEASE - * @param options - Used for modifying the request. - */ - bulk(operations: OperationInput[], bulkOptions?: BulkOptions, options?: RequestOptions): Promise; - /** - * Execute transactional batch operations on items. - * - * Batch takes an array of Operations which are typed based on what the operation does. Batch is transactional and will rollback all operations if one fails. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is required as a second argument to batch, but defaults to the default partition key - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.batch(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param options - Used for modifying the request - */ - batch(operations: OperationInput[], partitionKey?: string, options?: RequestOptions): Promise>; -} -//# sourceMappingURL=Items.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.d.ts.map deleted file mode 100644 index 0b14427..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Items.d.ts","sourceRoot":"","sources":["../../../../src/client/Item/Items.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAyB,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,SAAS,EAAqB,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAML,iBAAiB,EACjB,cAAc,EACd,WAAW,EAGZ,MAAM,mBAAmB,CAAC;AAc3B;;;;GAIG;AACH,qBAAa,KAAK;aAOE,SAAS,EAAE,SAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC;;;;OAIG;gBAEe,SAAS,EAAE,SAAS,EACnB,aAAa,EAAE,aAAa;IAG/C;;;;;;;;;;;;;;OAcG;IACI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IACrF;;;;;;;;;;;;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;;;;;;;;;;;;;OAaG;IACI,OAAO,CAAC,CAAC,SAAS,cAAc,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAKjF;;;;;;;;;;OAUG;IACU,MAAM,CAAC,CAAC,SAAS,cAAc,GAAG,GAAG,EAChD,IAAI,EAAE,CAAC,EACP,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IA0C3B;;;;;;;OAOG;IACU,MAAM,CACjB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACxC;;;;;;;;;;OAUG;IACU,MAAM,CAAC,CAAC,SAAS,cAAc,EAC1C,IAAI,EAAE,CAAC,EACP,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IA8C3B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACU,IAAI,CACf,UAAU,EAAE,cAAc,EAAE,EAC5B,WAAW,CAAC,EAAE,WAAW,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAmE/B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACU,KAAK,CAChB,UAAU,EAAE,cAAc,EAAE,EAC5B,YAAY,GAAE,MAAe,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;CAqB1C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.js deleted file mode 100644 index 5bbc1da..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.js +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { v4 } from "uuid"; -const uuid = v4; -import { ChangeFeedIterator } from "../../ChangeFeedIterator"; -import { getIdFromLink, getPathFromLink, isItemResourceValid, ResourceType } from "../../common"; -import { extractPartitionKey } from "../../extractPartitionKey"; -import { QueryIterator } from "../../queryIterator"; -import { Item } from "./Item"; -import { ItemResponse } from "./ItemResponse"; -import { isKeyInRange, getPartitionKeyToHash, decorateOperation, decorateBatchOperation, splitBatchBasedOnBodySize, } from "../../utils/batch"; -import { hashV1PartitionKey } from "../../utils/hashing/v1"; -import { hashV2PartitionKey } from "../../utils/hashing/v2"; -/** - * @hidden - */ -function isChangeFeedOptions(options) { - const optionsType = typeof options; - return (options && !(optionsType === "string" || optionsType === "boolean" || optionsType === "number")); -} -/** - * Operations for creating new items, and reading/querying all items - * - * @see {@link Item} for reading, replacing, or deleting an existing container; use `.item(id)`. - */ -export class Items { - /** - * Create an instance of {@link Items} linked to the parent {@link Container}. - * @param container - The parent container. - * @hidden - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options = {}) { - const path = getPathFromLink(this.container.url, ResourceType.item); - const id = getIdFromLink(this.container.url); - const fetchFunction = (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.item, - resourceId: id, - resultFn: (result) => (result ? result.Documents : []), - query, - options: innerOptions, - partitionKey: options.partitionKey, - }); - }; - return new QueryIterator(this.clientContext, query, options, fetchFunction, this.container.url, ResourceType.item); - } - readChangeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions) { - if (isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) { - return this.changeFeed(partitionKeyOrChangeFeedOptions); - } - else { - return this.changeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions); - } - } - changeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions) { - let partitionKey; - if (!changeFeedOptions && isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) { - partitionKey = undefined; - changeFeedOptions = partitionKeyOrChangeFeedOptions; - } - else if (partitionKeyOrChangeFeedOptions !== undefined && - !isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) { - partitionKey = partitionKeyOrChangeFeedOptions; - } - if (!changeFeedOptions) { - changeFeedOptions = {}; - } - const path = getPathFromLink(this.container.url, ResourceType.item); - const id = getIdFromLink(this.container.url); - return new ChangeFeedIterator(this.clientContext, id, path, partitionKey, changeFeedOptions); - } - readAll(options) { - return this.query("SELECT * from c", options); - } - /** - * Create an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - async create(body, options = {}) { - // Generate random document id if the id is missing in the payload and - // options.disableAutomaticIdGeneration != true - if ((body.id === undefined || body.id === "") && !options.disableAutomaticIdGeneration) { - body.id = uuid(); - } - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - const partitionKey = extractPartitionKey(body, partitionKeyDefinition); - const err = {}; - if (!isItemResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, ResourceType.item); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.item, - resourceId: id, - options, - partitionKey, - }); - const ref = new Item(this.container, response.result.id, partitionKey, this.clientContext); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, ref); - } - async upsert(body, options = {}) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - const partitionKey = extractPartitionKey(body, partitionKeyDefinition); - // Generate random document id if the id is missing in the payload and - // options.disableAutomaticIdGeneration != true - if ((body.id === undefined || body.id === "") && !options.disableAutomaticIdGeneration) { - body.id = uuid(); - } - const err = {}; - if (!isItemResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, ResourceType.item); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.upsert({ - body, - path, - resourceType: ResourceType.item, - resourceId: id, - options, - partitionKey, - }); - const ref = new Item(this.container, response.result.id, partitionKey, this.clientContext); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, ref); - } - /** - * Execute bulk operations on items. - * - * Bulk takes an array of Operations which are typed based on what the operation does. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is optional at the top level if present in the resourceBody - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.bulk(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param bulkOptions - Optional options object to modify bulk behavior. Pass \{ continueOnError: true \} to continue executing operations when one fails. (Defaults to false) ** NOTE: THIS WILL DEFAULT TO TRUE IN THE 4.0 RELEASE - * @param options - Used for modifying the request. - */ - async bulk(operations, bulkOptions, options) { - const { resources: partitionKeyRanges } = await this.container - .readPartitionKeyRanges() - .fetchAll(); - const { resource: definition } = await this.container.getPartitionKeyDefinition(); - const batches = partitionKeyRanges.map((keyRange) => { - return { - min: keyRange.minInclusive, - max: keyRange.maxExclusive, - rangeId: keyRange.id, - indexes: [], - operations: [], - }; - }); - operations - .map((operation) => decorateOperation(operation, definition, options)) - .forEach((operation, index) => { - const partitionProp = definition.paths[0].replace("/", ""); - const isV2 = definition.version && definition.version === 2; - const toHashKey = getPartitionKeyToHash(operation, partitionProp); - const hashed = isV2 ? hashV2PartitionKey(toHashKey) : hashV1PartitionKey(toHashKey); - const batchForKey = batches.find((batch) => { - return isKeyInRange(batch.min, batch.max, hashed); - }); - batchForKey.operations.push(operation); - batchForKey.indexes.push(index); - }); - const path = getPathFromLink(this.container.url, ResourceType.item); - const orderedResponses = []; - await Promise.all(batches - .filter((batch) => batch.operations.length) - .flatMap((batch) => splitBatchBasedOnBodySize(batch)) - .map(async (batch) => { - if (batch.operations.length > 100) { - throw new Error("Cannot run bulk request with more than 100 operations per partition"); - } - try { - const response = await this.clientContext.bulk({ - body: batch.operations, - partitionKeyRangeId: batch.rangeId, - path, - resourceId: this.container.url, - bulkOptions, - options, - }); - response.result.forEach((operationResponse, index) => { - orderedResponses[batch.indexes[index]] = operationResponse; - }); - } - catch (err) { - // In the case of 410 errors, we need to recompute the partition key ranges - // and redo the batch request, however, 410 errors occur for unsupported - // partition key types as well since we don't support them, so for now we throw - if (err.code === 410) { - throw new Error("Partition key error. Either the partitions have split or an operation has an unsupported partitionKey type"); - } - throw new Error(`Bulk request errored with: ${err.message}`); - } - })); - return orderedResponses; - } - /** - * Execute transactional batch operations on items. - * - * Batch takes an array of Operations which are typed based on what the operation does. Batch is transactional and will rollback all operations if one fails. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is required as a second argument to batch, but defaults to the default partition key - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.batch(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param options - Used for modifying the request - */ - async batch(operations, partitionKey = "[{}]", options) { - operations.map((operation) => decorateBatchOperation(operation, options)); - const path = getPathFromLink(this.container.url, ResourceType.item); - if (operations.length > 100) { - throw new Error("Cannot run batch request with more than 100 operations per partition"); - } - try { - const response = await this.clientContext.batch({ - body: operations, - partitionKey, - path, - resourceId: this.container.url, - options, - }); - return response; - } - catch (err) { - throw new Error(`Batch request error: ${err.message}`); - } - } -} -//# sourceMappingURL=Items.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/Items.js.map deleted file mode 100644 index d9a8ae8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/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AAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QAEpE,IAAI,UAAU,CAAC,MAAM,GAAG,GAAG,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;SACzF;QACD,IAAI;YACF,MAAM,QAAQ,GAAkC,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBAC7E,IAAI,EAAE,UAAU;gBAChB,YAAY;gBACZ,IAAI;gBACJ,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG;gBAC9B,OAAO;aACR,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;SACjB;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;SACxD;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { v4 } from \"uuid\";\nconst uuid = v4;\nimport { ChangeFeedIterator } from \"../../ChangeFeedIterator\";\nimport { ChangeFeedOptions } from \"../../ChangeFeedOptions\";\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isItemResourceValid, ResourceType } from \"../../common\";\nimport { extractPartitionKey } from \"../../extractPartitionKey\";\nimport { FetchFunctionCallback, SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions, Response } from \"../../request\";\nimport { Container, PartitionKeyRange } from \"../Container\";\nimport { Item } from \"./Item\";\nimport { ItemDefinition } from \"./ItemDefinition\";\nimport { ItemResponse } from \"./ItemResponse\";\nimport {\n Batch,\n isKeyInRange,\n Operation,\n getPartitionKeyToHash,\n decorateOperation,\n OperationResponse,\n OperationInput,\n BulkOptions,\n decorateBatchOperation,\n splitBatchBasedOnBodySize,\n} from \"../../utils/batch\";\nimport { hashV1PartitionKey } from \"../../utils/hashing/v1\";\nimport { hashV2PartitionKey } from \"../../utils/hashing/v2\";\n\n/**\n * @hidden\n */\nfunction isChangeFeedOptions(options: unknown): options is ChangeFeedOptions {\n const optionsType = typeof options;\n return (\n options && !(optionsType === \"string\" || optionsType === \"boolean\" || optionsType === \"number\")\n );\n}\n\n/**\n * Operations for creating new items, and reading/querying all items\n *\n * @see {@link Item} for reading, replacing, or deleting an existing container; use `.item(id)`.\n */\nexport class Items {\n /**\n * Create an instance of {@link Items} linked to the parent {@link Container}.\n * @param container - The parent container.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Queries all items.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM Families f WHERE f.lastName = @lastName\",\n * parameters: [\n * {name: \"@lastName\", value: \"Hendricks\"}\n * ]\n * };\n * const {result: items} = await items.query(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all items.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT firstname FROM Families f WHERE f.lastName = @lastName\",\n * parameters: [\n * {name: \"@lastName\", value: \"Hendricks\"}\n * ]\n * };\n * const {result: items} = await items.query<{firstName: string}>(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: string | SqlQuerySpec, options: FeedOptions = {}): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n\n const fetchFunction: FetchFunctionCallback = (innerOptions: FeedOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n resultFn: (result) => (result ? result.Documents : []),\n query,\n options: innerOptions,\n partitionKey: options.partitionKey,\n });\n };\n\n return new QueryIterator(\n this.clientContext,\n query,\n options,\n fetchFunction,\n this.container.url,\n ResourceType.item\n );\n }\n\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n *\n * @deprecated Use `changeFeed` instead.\n *\n * @example Read from the beginning of the change feed.\n * ```javascript\n * const iterator = items.readChangeFeed({ startFromBeginning: true });\n * const firstPage = await iterator.fetchNext();\n * const firstPageResults = firstPage.result\n * const secondPage = await iterator.fetchNext();\n * ```\n */\n public readChangeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n * @deprecated Use `changeFeed` instead.\n *\n */\n public readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n * @deprecated Use `changeFeed` instead.\n */\n public readChangeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n * @deprecated Use `changeFeed` instead.\n */\n public readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n public readChangeFeed(\n partitionKeyOrChangeFeedOptions?: string | number | boolean | ChangeFeedOptions,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator {\n if (isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) {\n return this.changeFeed(partitionKeyOrChangeFeedOptions);\n } else {\n return this.changeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions);\n }\n }\n\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n *\n * @example Read from the beginning of the change feed.\n * ```javascript\n * const iterator = items.readChangeFeed({ startFromBeginning: true });\n * const firstPage = await iterator.fetchNext();\n * const firstPageResults = firstPage.result\n * const secondPage = await iterator.fetchNext();\n * ```\n */\n public changeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n */\n public changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n */\n public changeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n */\n public changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n public changeFeed(\n partitionKeyOrChangeFeedOptions?: string | number | boolean | ChangeFeedOptions,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator {\n let partitionKey: string | number | boolean;\n if (!changeFeedOptions && isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) {\n partitionKey = undefined;\n changeFeedOptions = partitionKeyOrChangeFeedOptions;\n } else if (\n partitionKeyOrChangeFeedOptions !== undefined &&\n !isChangeFeedOptions(partitionKeyOrChangeFeedOptions)\n ) {\n partitionKey = partitionKeyOrChangeFeedOptions;\n }\n\n if (!changeFeedOptions) {\n changeFeedOptions = {};\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n return new ChangeFeedIterator(this.clientContext, id, path, partitionKey, changeFeedOptions);\n }\n\n /**\n * Read all items.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const {body: containerList} = await items.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator;\n /**\n * Read all items.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const {body: containerList} = await items.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator;\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(\"SELECT * from c\", options);\n }\n\n /**\n * Create an item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - Represents the body of the item. Can contain any number of user defined properties.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n */\n public async create(\n body: T,\n options: RequestOptions = {}\n ): Promise> {\n // Generate random document id if the id is missing in the payload and\n // options.disableAutomaticIdGeneration != true\n if ((body.id === undefined || body.id === \"\") && !options.disableAutomaticIdGeneration) {\n body.id = uuid();\n }\n\n const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition();\n const partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n\n const err = {};\n if (!isItemResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey,\n });\n\n const ref = new Item(\n this.container,\n (response.result as any).id,\n partitionKey,\n this.clientContext\n );\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n ref\n );\n }\n\n /**\n * Upsert an item.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - Represents the body of the item. Can contain any number of user defined properties.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n */\n public async upsert(\n body: unknown,\n options?: RequestOptions\n ): Promise>;\n /**\n * Upsert an item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - Represents the body of the item. Can contain any number of user defined properties.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n */\n public async upsert(\n body: T,\n options?: RequestOptions\n ): Promise>;\n public async upsert(\n body: T,\n options: RequestOptions = {}\n ): Promise> {\n const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition();\n const partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n\n // Generate random document id if the id is missing in the payload and\n // options.disableAutomaticIdGeneration != true\n if ((body.id === undefined || body.id === \"\") && !options.disableAutomaticIdGeneration) {\n body.id = uuid();\n }\n\n const err = {};\n if (!isItemResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.upsert({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey,\n });\n\n const ref = new Item(\n this.container,\n (response.result as any).id,\n partitionKey,\n this.clientContext\n );\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n ref\n );\n }\n\n /**\n * Execute bulk operations on items.\n *\n * Bulk takes an array of Operations which are typed based on what the operation does.\n * The choices are: Create, Upsert, Read, Replace, and Delete\n *\n * Usage example:\n * ```typescript\n * // partitionKey is optional at the top level if present in the resourceBody\n * const operations: OperationInput[] = [\n * {\n * operationType: \"Create\",\n * resourceBody: { id: \"doc1\", name: \"sample\", key: \"A\" }\n * },\n * {\n * operationType: \"Upsert\",\n * partitionKey: 'A',\n * resourceBody: { id: \"doc2\", name: \"other\", key: \"A\" }\n * }\n * ]\n *\n * await database.container.items.bulk(operations)\n * ```\n *\n * @param operations - List of operations. Limit 100\n * @param bulkOptions - Optional options object to modify bulk behavior. Pass \\{ continueOnError: true \\} to continue executing operations when one fails. (Defaults to false) ** NOTE: THIS WILL DEFAULT TO TRUE IN THE 4.0 RELEASE\n * @param options - Used for modifying the request.\n */\n public async bulk(\n operations: OperationInput[],\n bulkOptions?: BulkOptions,\n options?: RequestOptions\n ): Promise {\n const { resources: partitionKeyRanges } = await this.container\n .readPartitionKeyRanges()\n .fetchAll();\n const { resource: definition } = await this.container.getPartitionKeyDefinition();\n const batches: Batch[] = partitionKeyRanges.map((keyRange: PartitionKeyRange) => {\n return {\n min: keyRange.minInclusive,\n max: keyRange.maxExclusive,\n rangeId: keyRange.id,\n indexes: [],\n operations: [],\n };\n });\n operations\n .map((operation) => decorateOperation(operation, definition, options))\n .forEach((operation: Operation, index: number) => {\n const partitionProp = definition.paths[0].replace(\"/\", \"\");\n const isV2 = definition.version && definition.version === 2;\n const toHashKey = getPartitionKeyToHash(operation, partitionProp);\n const hashed = isV2 ? hashV2PartitionKey(toHashKey) : hashV1PartitionKey(toHashKey);\n const batchForKey = batches.find((batch: Batch) => {\n return isKeyInRange(batch.min, batch.max, hashed);\n });\n batchForKey.operations.push(operation);\n batchForKey.indexes.push(index);\n });\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n\n const orderedResponses: OperationResponse[] = [];\n await Promise.all(\n batches\n .filter((batch: Batch) => batch.operations.length)\n .flatMap((batch: Batch) => splitBatchBasedOnBodySize(batch))\n .map(async (batch: Batch) => {\n if (batch.operations.length > 100) {\n throw new Error(\"Cannot run bulk request with more than 100 operations per partition\");\n }\n try {\n const response = await this.clientContext.bulk({\n body: batch.operations,\n partitionKeyRangeId: batch.rangeId,\n path,\n resourceId: this.container.url,\n bulkOptions,\n options,\n });\n response.result.forEach((operationResponse: OperationResponse, index: number) => {\n orderedResponses[batch.indexes[index]] = operationResponse;\n });\n } catch (err: any) {\n // In the case of 410 errors, we need to recompute the partition key ranges\n // and redo the batch request, however, 410 errors occur for unsupported\n // partition key types as well since we don't support them, so for now we throw\n if (err.code === 410) {\n throw new Error(\n \"Partition key error. Either the partitions have split or an operation has an unsupported partitionKey type\"\n );\n }\n throw new Error(`Bulk request errored with: ${err.message}`);\n }\n })\n );\n return orderedResponses;\n }\n\n /**\n * Execute transactional batch operations on items.\n *\n * Batch takes an array of Operations which are typed based on what the operation does. Batch is transactional and will rollback all operations if one fails.\n * The choices are: Create, Upsert, Read, Replace, and Delete\n *\n * Usage example:\n * ```typescript\n * // partitionKey is required as a second argument to batch, but defaults to the default partition key\n * const operations: OperationInput[] = [\n * {\n * operationType: \"Create\",\n * resourceBody: { id: \"doc1\", name: \"sample\", key: \"A\" }\n * },\n * {\n * operationType: \"Upsert\",\n * partitionKey: 'A',\n * resourceBody: { id: \"doc2\", name: \"other\", key: \"A\" }\n * }\n * ]\n *\n * await database.container.items.batch(operations)\n * ```\n *\n * @param operations - List of operations. Limit 100\n * @param options - Used for modifying the request\n */\n public async batch(\n operations: OperationInput[],\n partitionKey: string = \"[{}]\",\n options?: RequestOptions\n ): Promise> {\n operations.map((operation) => decorateBatchOperation(operation, options));\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n\n if (operations.length > 100) {\n throw new Error(\"Cannot run batch request with more than 100 operations per partition\");\n }\n try {\n const response: Response = await this.clientContext.batch({\n body: operations,\n partitionKey,\n path,\n resourceId: this.container.url,\n options,\n });\n return response;\n } catch (err: any) {\n throw new Error(`Batch request error: ${err.message}`);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.d.ts deleted file mode 100644 index e077d76..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { Item } from "./Item"; -export { Items } from "./Items"; -export { ItemResponse } from "./ItemResponse"; -export { ItemDefinition } from "./ItemDefinition"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.d.ts.map deleted file mode 100644 index bac4ca0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/Item/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.js deleted file mode 100644 index 4c05a20..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { Item } from "./Item"; -export { Items } from "./Items"; -export { ItemResponse } from "./ItemResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.js.map deleted file mode 100644 index 037472d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Item/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/Item/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { Item } from \"./Item\";\nexport { Items } from \"./Items\";\nexport { ItemResponse } from \"./ItemResponse\";\nexport { ItemDefinition } from \"./ItemDefinition\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.d.ts deleted file mode 100644 index 390d93b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { CosmosClient } from "../../CosmosClient"; -import { RequestOptions } from "../../request"; -import { OfferDefinition } from "./OfferDefinition"; -import { OfferResponse } from "./OfferResponse"; -/** - * Use to read or replace an existing {@link Offer} by id. - * - * @see {@link Offers} to query or read all offers. - */ -export declare class Offer { - readonly client: CosmosClient; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database Account. - * @param id - The id of the given {@link Offer}. - */ - constructor(client: CosmosClient, id: string, clientContext: ClientContext); - /** - * Read the {@link OfferDefinition} for the given {@link Offer}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Offer} with the specified {@link OfferDefinition}. - * @param body - The specified {@link OfferDefinition} - */ - replace(body: OfferDefinition, options?: RequestOptions): Promise; -} -//# sourceMappingURL=Offer.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.d.ts.map deleted file mode 100644 index 606609d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Offer.d.ts","sourceRoot":"","sources":["../../../../src/client/Offer/Offer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;GAIG;AACH,qBAAa,KAAK;aAaE,MAAM,EAAE,YAAY;aACpB,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAdhC;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IACD;;;;OAIG;gBAEe,MAAM,EAAE,YAAY,EACpB,EAAE,EAAE,MAAM,EACT,aAAa,EAAE,aAAa;IAG/C;;OAEG;IACU,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAUnE;;;OAGG;IACU,OAAO,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAc9F"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.js deleted file mode 100644 index 2d1960a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.js +++ /dev/null @@ -1,56 +0,0 @@ -import { Constants, isResourceValid, ResourceType } from "../../common"; -import { OfferResponse } from "./OfferResponse"; -/** - * Use to read or replace an existing {@link Offer} by id. - * - * @see {@link Offers} to query or read all offers. - */ -export class Offer { - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database Account. - * @param id - The id of the given {@link Offer}. - */ - constructor(client, id, clientContext) { - this.client = client; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return `/${Constants.Path.OffersPathSegment}/${this.id}`; - } - /** - * Read the {@link OfferDefinition} for the given {@link Offer}. - */ - async read(options) { - const response = await this.clientContext.read({ - path: this.url, - resourceType: ResourceType.offer, - resourceId: this.id, - options, - }); - return new OfferResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link Offer} with the specified {@link OfferDefinition}. - * @param body - The specified {@link OfferDefinition} - */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const response = await this.clientContext.replace({ - body, - path: this.url, - resourceType: ResourceType.offer, - resourceId: this.id, - options, - }); - return new OfferResponse(response.result, response.headers, response.code, this); - } -} -//# sourceMappingURL=Offer.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.js.map deleted file mode 100644 index b607525..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Offer.js","sourceRoot":"","sources":["../../../../src/client/Offer/Offer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,OAAO,KAAK;IAOhB;;;;OAIG;IACH,YACkB,MAAoB,EACpB,EAAU,EACT,aAA4B;QAF7B,WAAM,GAAN,MAAM,CAAc;QACpB,OAAE,GAAF,EAAE,CAAQ;QACT,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAfJ;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;IAC3D,CAAC;IAYD;;OAEG;IACI,KAAK,CAAC,IAAI,CAAC,OAAwB;QACxC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAkB;YAC9D,IAAI,EAAE,IAAI,CAAC,GAAG;YACd,YAAY,EAAE,YAAY,CAAC,KAAK;YAChC,UAAU,EAAE,IAAI,CAAC,EAAE;YACnB,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnF,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,OAAwB;QAClE,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,CAAC;SACX;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAkB;YACjE,IAAI;YACJ,IAAI,EAAE,IAAI,CAAC,GAAG;YACd,YAAY,EAAE,YAAY,CAAC,KAAK;YAChC,UAAU,EAAE,IAAI,CAAC,EAAE;YACnB,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { Constants, isResourceValid, ResourceType } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { RequestOptions } from \"../../request\";\nimport { OfferDefinition } from \"./OfferDefinition\";\nimport { OfferResponse } from \"./OfferResponse\";\n\n/**\n * Use to read or replace an existing {@link Offer} by id.\n *\n * @see {@link Offers} to query or read all offers.\n */\nexport class Offer {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return `/${Constants.Path.OffersPathSegment}/${this.id}`;\n }\n /**\n * @hidden\n * @param client - The parent {@link CosmosClient} for the Database Account.\n * @param id - The id of the given {@link Offer}.\n */\n constructor(\n public readonly client: CosmosClient,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link OfferDefinition} for the given {@link Offer}.\n */\n public async read(options?: RequestOptions): Promise {\n const response = await this.clientContext.read({\n path: this.url,\n resourceType: ResourceType.offer,\n resourceId: this.id,\n options,\n });\n return new OfferResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link Offer} with the specified {@link OfferDefinition}.\n * @param body - The specified {@link OfferDefinition}\n */\n public async replace(body: OfferDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n const response = await this.clientContext.replace({\n body,\n path: this.url,\n resourceType: ResourceType.offer,\n resourceId: this.id,\n options,\n });\n return new OfferResponse(response.result, response.headers, response.code, this);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.d.ts deleted file mode 100644 index 09ff114..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export interface OfferDefinition { - id?: string; - offerType?: string; - offerVersion?: string; - resource?: string; - offerResourceId?: string; - content?: { - offerThroughput: number; - offerIsRUPerMinuteThroughputEnabled: boolean; - offerMinimumThroughputParameters?: { - maxThroughputEverProvisioned: number; - maxConsumedStorageEverInKB: number; - }; - offerAutopilotSettings?: { - tier: number; - maximumTierThroughput: number; - autoUpgrade: boolean; - maxThroughput: number; - }; - }; -} -//# sourceMappingURL=OfferDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.d.ts.map deleted file mode 100644 index 70b15bf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OfferDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/Offer/OfferDefinition.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE;QACR,eAAe,EAAE,MAAM,CAAC;QACxB,mCAAmC,EAAE,OAAO,CAAC;QAC7C,gCAAgC,CAAC,EAAE;YACjC,4BAA4B,EAAE,MAAM,CAAC;YACrC,0BAA0B,EAAE,MAAM,CAAC;SACpC,CAAC;QACF,sBAAsB,CAAC,EAAE;YACvB,IAAI,EAAE,MAAM,CAAC;YACb,qBAAqB,EAAE,MAAM,CAAC;YAC9B,WAAW,EAAE,OAAO,CAAC;YACrB,aAAa,EAAE,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;CACH"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.js deleted file mode 100644 index f71ebb9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=OfferDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.js.map deleted file mode 100644 index bdbf533..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OfferDefinition.js","sourceRoot":"","sources":["../../../../src/client/Offer/OfferDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface OfferDefinition {\n id?: string;\n offerType?: string; // TODO: enum?\n offerVersion?: string; // TODO: enum?\n resource?: string;\n offerResourceId?: string;\n content?: {\n offerThroughput: number;\n offerIsRUPerMinuteThroughputEnabled: boolean;\n offerMinimumThroughputParameters?: {\n maxThroughputEverProvisioned: number;\n maxConsumedStorageEverInKB: number;\n };\n offerAutopilotSettings?: {\n tier: number;\n maximumTierThroughput: number;\n autoUpgrade: boolean;\n maxThroughput: number;\n };\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.d.ts deleted file mode 100644 index ec3fe53..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request"; -import { Resource } from "../Resource"; -import { Offer } from "./Offer"; -import { OfferDefinition } from "./OfferDefinition"; -export declare class OfferResponse extends ResourceResponse { - constructor(resource: OfferDefinition & Resource, headers: CosmosHeaders, statusCode: number, offer?: Offer); - /** A reference to the {@link Offer} corresponding to the returned {@link OfferDefinition}. */ - readonly offer: Offer; -} -//# sourceMappingURL=OfferResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.d.ts.map deleted file mode 100644 index 58657e5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OfferResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/Offer/OfferResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,aAAc,SAAQ,gBAAgB,CAAC,eAAe,GAAG,QAAQ,CAAC;gBAE3E,QAAQ,EAAE,eAAe,GAAG,QAAQ,EACpC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,KAAK;IAKf,8FAA8F;IAC9F,SAAgB,KAAK,EAAE,KAAK,CAAC;CAC9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.js deleted file mode 100644 index a716390..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.js +++ /dev/null @@ -1,8 +0,0 @@ -import { ResourceResponse } from "../../request"; -export class OfferResponse extends ResourceResponse { - constructor(resource, headers, statusCode, offer) { - super(resource, headers, statusCode); - this.offer = offer; - } -} -//# sourceMappingURL=OfferResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.js.map deleted file mode 100644 index 20a76ef..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/OfferResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OfferResponse.js","sourceRoot":"","sources":["../../../../src/client/Offer/OfferResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,OAAO,aAAc,SAAQ,gBAA4C;IAC7E,YACE,QAAoC,EACpC,OAAsB,EACtB,UAAkB,EAClB,KAAa;QAEb,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Offer } from \"./Offer\";\nimport { OfferDefinition } from \"./OfferDefinition\";\n\nexport class OfferResponse extends ResourceResponse {\n constructor(\n resource: OfferDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n offer?: Offer\n ) {\n super(resource, headers, statusCode);\n this.offer = offer;\n }\n /** A reference to the {@link Offer} corresponding to the returned {@link OfferDefinition}. */\n public readonly offer: Offer;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.d.ts deleted file mode 100644 index 3c3a7ea..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { CosmosClient } from "../../CosmosClient"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions } from "../../request"; -import { Resource } from "../Resource"; -import { OfferDefinition } from "./OfferDefinition"; -/** - * Use to query or read all Offers. - * - * @see {@link Offer} to read or replace an existing {@link Offer} by id. - */ -export declare class Offers { - readonly client: CosmosClient; - private readonly clientContext; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the offers. - */ - constructor(client: CosmosClient, clientContext: ClientContext); - /** - * Query all offers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all offers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all offers. - * @example Read all offers to array. - * ```typescript - * const {body: offerList} = await client.offers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; -} -//# sourceMappingURL=Offers.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.d.ts.map deleted file mode 100644 index 734e109..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Offers.d.ts","sourceRoot":"","sources":["../../../../src/client/Offer/Offers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;GAIG;AACH,qBAAa,MAAM;aAMC,MAAM,EAAE,YAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC;;;OAGG;gBAEe,MAAM,EAAE,YAAY,EACnB,aAAa,EAAE,aAAa;IAG/C;;;OAGG;IACI,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IAC5E;;;OAGG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAc7E;;;;;;OAMG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,eAAe,GAAG,QAAQ,CAAC;CAGjF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.js deleted file mode 100644 index f34ed42..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.js +++ /dev/null @@ -1,40 +0,0 @@ -import { ResourceType } from "../../common"; -import { QueryIterator } from "../../queryIterator"; -/** - * Use to query or read all Offers. - * - * @see {@link Offer} to read or replace an existing {@link Offer} by id. - */ -export class Offers { - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the offers. - */ - constructor(client, clientContext) { - this.client = client; - this.clientContext = clientContext; - } - query(query, options) { - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path: "/offers", - resourceType: ResourceType.offer, - resourceId: "", - resultFn: (result) => result.Offers, - query, - options: innerOptions, - }); - }); - } - /** - * Read all offers. - * @example Read all offers to array. - * ```typescript - * const {body: offerList} = await client.offers.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } -} -//# sourceMappingURL=Offers.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.js.map deleted file mode 100644 index fc69b23..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/Offers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Offers.js","sourceRoot":"","sources":["../../../../src/client/Offer/Offers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpD;;;;GAIG;AACH,MAAM,OAAO,MAAM;IACjB;;;OAGG;IACH,YACkB,MAAoB,EACnB,aAA4B;QAD7B,WAAM,GAAN,MAAM,CAAc;QACnB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAYG,KAAK,CAAI,KAAmB,EAAE,OAAqB;QACxD,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAI;gBACrC,IAAI,EAAE,SAAS;gBACf,YAAY,EAAE,YAAY,CAAC,KAAK;gBAChC,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM;gBACnC,KAAK;gBACL,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC,KAAK,CAA6B,SAAS,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { ResourceType } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { OfferDefinition } from \"./OfferDefinition\";\n\n/**\n * Use to query or read all Offers.\n *\n * @see {@link Offer} to read or replace an existing {@link Offer} by id.\n */\nexport class Offers {\n /**\n * @hidden\n * @param client - The parent {@link CosmosClient} for the offers.\n */\n constructor(\n public readonly client: CosmosClient,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all offers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all offers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path: \"/offers\",\n resourceType: ResourceType.offer,\n resourceId: \"\",\n resultFn: (result) => result.Offers,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all offers.\n * @example Read all offers to array.\n * ```typescript\n * const {body: offerList} = await client.offers.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.d.ts deleted file mode 100644 index 803aff9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { Offer } from "./Offer"; -export { Offers } from "./Offers"; -export { OfferDefinition } from "./OfferDefinition"; -export { OfferResponse } from "./OfferResponse"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.d.ts.map deleted file mode 100644 index f09ec66..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/Offer/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.js deleted file mode 100644 index 7264ea2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { Offer } from "./Offer"; -export { Offers } from "./Offers"; -export { OfferResponse } from "./OfferResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.js.map deleted file mode 100644 index 4a93358..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Offer/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/Offer/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { Offer } from \"./Offer\";\nexport { Offers } from \"./Offers\";\nexport { OfferDefinition } from \"./OfferDefinition\";\nexport { OfferResponse } from \"./OfferResponse\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.d.ts deleted file mode 100644 index 223a58d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { RequestOptions } from "../../request/RequestOptions"; -import { User } from "../User"; -import { PermissionDefinition } from "./PermissionDefinition"; -import { PermissionResponse } from "./PermissionResponse"; -/** - * Use to read, replace, or delete a given {@link Permission} by id. - * - * @see {@link Permissions} to create, upsert, query, or read all Permissions. - */ -export declare class Permission { - readonly user: User; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param user - The parent {@link User}. - * @param id - The id of the given {@link Permission}. - */ - constructor(user: User, id: string, clientContext: ClientContext); - /** - * Read the {@link PermissionDefinition} of the given {@link Permission}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Permission} with the specified {@link PermissionDefinition}. - * @param body - The specified {@link PermissionDefinition}. - */ - replace(body: PermissionDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link Permission}. - */ - delete(options?: RequestOptions): Promise; -} -//# sourceMappingURL=Permission.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.d.ts.map deleted file mode 100644 index 559364a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Permission.d.ts","sourceRoot":"","sources":["../../../../src/client/Permission/Permission.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,qBAAa,UAAU;aAaH,IAAI,EAAE,IAAI;aACV,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAdhC;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IACD;;;;OAIG;gBAEe,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,MAAM,EACT,aAAa,EAAE,aAAa;IAG/C;;OAEG;IACU,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAaxE;;;OAGG;IACU,OAAO,CAClB,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC;IAmB9B;;OAEG;IACU,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAY3E"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.js deleted file mode 100644 index d883871..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.js +++ /dev/null @@ -1,74 +0,0 @@ -import { createPermissionUri, getIdFromLink, getPathFromLink, isResourceValid, ResourceType, } from "../../common"; -import { PermissionResponse } from "./PermissionResponse"; -/** - * Use to read, replace, or delete a given {@link Permission} by id. - * - * @see {@link Permissions} to create, upsert, query, or read all Permissions. - */ -export class Permission { - /** - * @hidden - * @param user - The parent {@link User}. - * @param id - The id of the given {@link Permission}. - */ - constructor(user, id, clientContext) { - this.user = user; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createPermissionUri(this.user.database.id, this.user.id, this.id); - } - /** - * Read the {@link PermissionDefinition} of the given {@link Permission}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.permission, - resourceId: id, - options, - }); - return new PermissionResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link Permission} with the specified {@link PermissionDefinition}. - * @param body - The specified {@link PermissionDefinition}. - */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: ResourceType.permission, - resourceId: id, - options, - }); - return new PermissionResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link Permission}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.permission, - resourceId: id, - options, - }); - return new PermissionResponse(response.result, response.headers, response.code, this); - } -} -//# sourceMappingURL=Permission.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.js.map deleted file mode 100644 index b1348e6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permission.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Permission.js","sourceRoot":"","sources":["../../../../src/client/Permission/Permission.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,cAAc,CAAC;AAKt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G,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAwC;YACvF,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,UAAU;YACrC,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,kBAAkB,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAAC,OAAwB;QAC1C,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAwC;YACtF,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,UAAU;YACrC,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,kBAAkB,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createPermissionUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request/RequestOptions\";\nimport { User } from \"../User\";\nimport { PermissionBody } from \"./PermissionBody\";\nimport { PermissionDefinition } from \"./PermissionDefinition\";\nimport { PermissionResponse } from \"./PermissionResponse\";\n\n/**\n * Use to read, replace, or delete a given {@link Permission} by id.\n *\n * @see {@link Permissions} to create, upsert, query, or read all Permissions.\n */\nexport class Permission {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createPermissionUri(this.user.database.id, this.user.id, this.id);\n }\n /**\n * @hidden\n * @param user - The parent {@link User}.\n * @param id - The id of the given {@link Permission}.\n */\n constructor(\n public readonly user: User,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link PermissionDefinition} of the given {@link Permission}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n return new PermissionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link Permission} with the specified {@link PermissionDefinition}.\n * @param body - The specified {@link PermissionDefinition}.\n */\n public async replace(\n body: PermissionDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n return new PermissionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link Permission}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n return new PermissionResponse(response.result, response.headers, response.code, this);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.d.ts deleted file mode 100644 index 4c25f50..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface PermissionBody { - /** System generated resource token for the particular resource and user */ - _token: string; -} -//# sourceMappingURL=PermissionBody.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.d.ts.map deleted file mode 100644 index 8bc2e95..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionBody.d.ts","sourceRoot":"","sources":["../../../../src/client/Permission/PermissionBody.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;CAChB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.js deleted file mode 100644 index 909656c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=PermissionBody.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.js.map deleted file mode 100644 index 1666a52..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionBody.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionBody.js","sourceRoot":"","sources":["../../../../src/client/Permission/PermissionBody.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface PermissionBody {\n /** System generated resource token for the particular resource and user */\n _token: string;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.d.ts deleted file mode 100644 index 8390e6c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PermissionMode } from "../../documents"; -export interface PermissionDefinition { - /** The id of the permission */ - id: string; - /** The mode of the permission, must be a value of {@link PermissionMode} */ - permissionMode: PermissionMode; - /** The link of the resource that the permission will be applied to. */ - resource: string; - resourcePartitionKey?: string | any[]; -} -//# sourceMappingURL=PermissionDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.d.ts.map deleted file mode 100644 index 41427a3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/Permission/PermissionDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,4EAA4E;IAC5E,cAAc,EAAE,cAAc,CAAC;IAC/B,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;CACvC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.js deleted file mode 100644 index f218b81..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=PermissionDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.js.map deleted file mode 100644 index 45d6252..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionDefinition.js","sourceRoot":"","sources":["../../../../src/client/Permission/PermissionDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PermissionMode } from \"../../documents\";\n\nexport interface PermissionDefinition {\n /** The id of the permission */\n id: string;\n /** The mode of the permission, must be a value of {@link PermissionMode} */\n permissionMode: PermissionMode;\n /** The link of the resource that the permission will be applied to. */\n resource: string;\n resourcePartitionKey?: string | any[]; // TODO: what's allowed here?\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.d.ts deleted file mode 100644 index 1e556a3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request"; -import { Resource } from "../Resource"; -import { Permission } from "./Permission"; -import { PermissionBody } from "./PermissionBody"; -import { PermissionDefinition } from "./PermissionDefinition"; -export declare class PermissionResponse extends ResourceResponse { - constructor(resource: PermissionDefinition & PermissionBody & Resource, headers: CosmosHeaders, statusCode: number, permission: Permission); - /** A reference to the {@link Permission} corresponding to the returned {@link PermissionDefinition}. */ - readonly permission: Permission; -} -//# sourceMappingURL=PermissionResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.d.ts.map deleted file mode 100644 index 096d670..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/Permission/PermissionResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,qBAAa,kBAAmB,SAAQ,gBAAgB,CACtD,oBAAoB,GAAG,cAAc,GAAG,QAAQ,CACjD;gBAEG,QAAQ,EAAE,oBAAoB,GAAG,cAAc,GAAG,QAAQ,EAC1D,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,UAAU;IAKxB,wGAAwG;IACxG,SAAgB,UAAU,EAAE,UAAU,CAAC;CACxC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.js deleted file mode 100644 index e3d1d09..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.js +++ /dev/null @@ -1,8 +0,0 @@ -import { ResourceResponse } from "../../request"; -export class PermissionResponse extends ResourceResponse { - constructor(resource, headers, statusCode, permission) { - super(resource, headers, statusCode); - this.permission = permission; - } -} -//# sourceMappingURL=PermissionResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.js.map deleted file mode 100644 index 5579e90..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/PermissionResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionResponse.js","sourceRoot":"","sources":["../../../../src/client/Permission/PermissionResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMjD,MAAM,OAAO,kBAAmB,SAAQ,gBAEvC;IACC,YACE,QAA0D,EAC1D,OAAsB,EACtB,UAAkB,EAClB,UAAsB;QAEtB,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Permission } from \"./Permission\";\nimport { PermissionBody } from \"./PermissionBody\";\nimport { PermissionDefinition } from \"./PermissionDefinition\";\n\nexport class PermissionResponse extends ResourceResponse<\n PermissionDefinition & PermissionBody & Resource\n> {\n constructor(\n resource: PermissionDefinition & PermissionBody & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n permission: Permission\n ) {\n super(resource, headers, statusCode);\n this.permission = permission;\n }\n /** A reference to the {@link Permission} corresponding to the returned {@link PermissionDefinition}. */\n public readonly permission: Permission;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.d.ts deleted file mode 100644 index 1e6b9f2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions } from "../../request"; -import { Resource } from "../Resource"; -import { User } from "../User"; -import { PermissionDefinition } from "./PermissionDefinition"; -import { PermissionResponse } from "./PermissionResponse"; -/** - * Use to create, replace, query, and read all Permissions. - * - * @see {@link Permission} to read, replace, or delete a specific permission by id. - */ -export declare class Permissions { - readonly user: User; - private readonly clientContext; - /** - * @hidden - * @param user - The parent {@link User}. - */ - constructor(user: User, clientContext: ClientContext); - /** - * Query all permissions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all permissions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all permissions. - * @example Read all permissions to array. - * ```typescript - * const {body: permissionList} = await user.permissions.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a permission. - * - * A permission represents a per-User Permission to access a specific resource - * e.g. Item or Container. - * @param body - Represents the body of the permission. - */ - create(body: PermissionDefinition, options?: RequestOptions): Promise; - /** - * Upsert a permission. - * - * A permission represents a per-User Permission to access a - * specific resource e.g. Item or Container. - */ - upsert(body: PermissionDefinition, options?: RequestOptions): Promise; -} -//# sourceMappingURL=Permissions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.d.ts.map deleted file mode 100644 index 751d7dd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Perm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AC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC;CAmB/B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.js deleted file mode 100644 index 112afda..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.js +++ /dev/null @@ -1,91 +0,0 @@ -import { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from "../../common"; -import { QueryIterator } from "../../queryIterator"; -import { Permission } from "./Permission"; -import { PermissionResponse } from "./PermissionResponse"; -/** - * Use to create, replace, query, and read all Permissions. - * - * @see {@link Permission} to read, replace, or delete a specific permission by id. - */ -export class Permissions { - /** - * @hidden - * @param user - The parent {@link User}. - */ - constructor(user, clientContext) { - this.user = user; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.user.url, ResourceType.permission); - const id = getIdFromLink(this.user.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.permission, - resourceId: id, - resultFn: (result) => result.Permissions, - query, - options: innerOptions, - }); - }); - } - /** - * Read all permissions. - * @example Read all permissions to array. - * ```typescript - * const {body: permissionList} = await user.permissions.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a permission. - * - * A permission represents a per-User Permission to access a specific resource - * e.g. Item or Container. - * @param body - Represents the body of the permission. - */ - async create(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.user.url, ResourceType.permission); - const id = getIdFromLink(this.user.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.permission, - resourceId: id, - options, - }); - const ref = new Permission(this.user, response.result.id, this.clientContext); - return new PermissionResponse(response.result, response.headers, response.code, ref); - } - /** - * Upsert a permission. - * - * A permission represents a per-User Permission to access a - * specific resource e.g. Item or Container. - */ - async upsert(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.user.url, ResourceType.permission); - const id = getIdFromLink(this.user.url); - const response = await this.clientContext.upsert({ - body, - path, - resourceType: ResourceType.permission, - resourceId: id, - options, - }); - const ref = new Permission(this.user, response.result.id, this.clientContext); - return new PermissionResponse(response.result, response.headers, response.code, ref); - } -} -//# sourceMappingURL=Permissions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.js.map deleted file mode 100644 index 763921e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/Permissions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Permissions.js","sourceRoot":"","sources":["../../../../src/client/Permission/Permissions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,OAAO,WAAW;IACtB;;;OAGG;IACH,YAA4B,IAAU,EAAmB,aAA4B;QAAzD,SAAI,GAAJ,IAAI,CAAM;QAAmB,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAYlF,KAAK,CAAI,KAAmB,EAAE,OAAqB;QACxD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAExC,OAAO,IAAI,aAAa,CAAC,IAAI,C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E,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CACjB,IAA0B,EAC1B,OAAwB;QAExB,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,CAAC;SACX;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAExC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAuC;YACrF,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,UAAU;YACrC,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC9E,OAAO,IAAI,kBAAkB,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { User } from \"../User\";\nimport { Permission } from \"./Permission\";\nimport { PermissionBody } from \"./PermissionBody\";\nimport { PermissionDefinition } from \"./PermissionDefinition\";\nimport { PermissionResponse } from \"./PermissionResponse\";\n\n/**\n * Use to create, replace, query, and read all Permissions.\n *\n * @see {@link Permission} to read, replace, or delete a specific permission by id.\n */\nexport class Permissions {\n /**\n * @hidden\n * @param user - The parent {@link User}.\n */\n constructor(public readonly user: User, private readonly clientContext: ClientContext) {}\n\n /**\n * Query all permissions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all permissions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.user.url, ResourceType.permission);\n const id = getIdFromLink(this.user.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n resultFn: (result) => result.Permissions,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all permissions.\n * @example Read all permissions to array.\n * ```typescript\n * const {body: permissionList} = await user.permissions.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a permission.\n *\n * A permission represents a per-User Permission to access a specific resource\n * e.g. Item or Container.\n * @param body - Represents the body of the permission.\n */\n public async create(\n body: PermissionDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.user.url, ResourceType.permission);\n const id = getIdFromLink(this.user.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n const ref = new Permission(this.user, response.result.id, this.clientContext);\n return new PermissionResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Upsert a permission.\n *\n * A permission represents a per-User Permission to access a\n * specific resource e.g. Item or Container.\n */\n public async upsert(\n body: PermissionDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.user.url, ResourceType.permission);\n const id = getIdFromLink(this.user.url);\n\n const response = await this.clientContext.upsert({\n body,\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n const ref = new Permission(this.user, response.result.id, this.clientContext);\n return new PermissionResponse(response.result, response.headers, response.code, ref);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.d.ts deleted file mode 100644 index fd181ee..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { Permission } from "./Permission"; -export { Permissions } from "./Permissions"; -export { PermissionDefinition } from "./PermissionDefinition"; -export { PermissionResponse } from "./PermissionResponse"; -export { PermissionBody } from "./PermissionBody"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.d.ts.map deleted file mode 100644 index 4b64504..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/Permission/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.js deleted file mode 100644 index f98f29d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { Permission } from "./Permission"; -export { Permissions } from "./Permissions"; -export { PermissionResponse } from "./PermissionResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.js.map deleted file mode 100644 index 9cb225b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Permission/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/Permission/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { Permission } from \"./Permission\";\nexport { Permissions } from \"./Permissions\";\nexport { PermissionDefinition } from \"./PermissionDefinition\";\nexport { PermissionResponse } from \"./PermissionResponse\";\nexport { PermissionBody } from \"./PermissionBody\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.d.ts deleted file mode 100644 index d355240..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface Resource { - /** Required. User settable property. Unique name that identifies the item, that is, no two items share the same ID within a database. The id must not exceed 255 characters. */ - id: string; - /** System generated property. The resource ID (_rid) is a unique identifier that is also hierarchical per the resource stack on the resource model. It is used internally for placement and navigation of the item resource. */ - _rid: string; - /** System generated property. Specifies the last updated timestamp of the resource. The value is a timestamp. */ - _ts: number; - /** System generated property. The unique addressable URI for the resource. */ - _self: string; - /** System generated property. Represents the resource etag required for optimistic concurrency control. */ - _etag: string; -} -//# sourceMappingURL=Resource.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.d.ts.map deleted file mode 100644 index 1f099a7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Resource.d.ts","sourceRoot":"","sources":["../../../src/client/Resource.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,QAAQ;IACvB,gLAAgL;IAChL,EAAE,EAAE,MAAM,CAAC;IACX,gOAAgO;IAChO,IAAI,EAAE,MAAM,CAAC;IACb,iHAAiH;IACjH,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,2GAA2G;IAC3G,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.js deleted file mode 100644 index 3dcffe9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Resource.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.js.map deleted file mode 100644 index 0e545a5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Resource.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Resource.js","sourceRoot":"","sources":["../../../src/client/Resource.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface Resource {\n /** Required. User settable property. Unique name that identifies the item, that is, no two items share the same ID within a database. The id must not exceed 255 characters. */\n id: string;\n /** System generated property. The resource ID (_rid) is a unique identifier that is also hierarchical per the resource stack on the resource model. It is used internally for placement and navigation of the item resource. */\n _rid: string;\n /** System generated property. Specifies the last updated timestamp of the resource. The value is a timestamp. */\n _ts: number;\n /** System generated property. The unique addressable URI for the resource. */\n _self: string;\n /** System generated property. Represents the resource etag required for optimistic concurrency control. */\n _etag: string;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.d.ts deleted file mode 100644 index cd3fc75..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Represents permission Scope Values. - */ -export declare enum PermissionScopeValues { - /** - * Values which set permission Scope applicable to control plane related operations. - */ - ScopeAccountReadValue = 1, - ScopeAccountListDatabasesValue = 2, - ScopeDatabaseReadValue = 4, - ScopeDatabaseReadOfferValue = 8, - ScopeDatabaseListContainerValue = 16, - ScopeContainerReadValue = 32, - ScopeContainerReadOfferValue = 64, - ScopeAccountCreateDatabasesValue = 1, - ScopeAccountDeleteDatabasesValue = 2, - ScopeDatabaseDeleteValue = 4, - ScopeDatabaseReplaceOfferValue = 8, - ScopeDatabaseCreateContainerValue = 16, - ScopeDatabaseDeleteContainerValue = 32, - ScopeContainerReplaceValue = 64, - ScopeContainerDeleteValue = 128, - ScopeContainerReplaceOfferValue = 256, - ScopeAccountReadAllAccessValue = 65535, - ScopeDatabaseReadAllAccessValue = 124, - ScopeContainersReadAllAccessValue = 96, - ScopeAccountWriteAllAccessValue = 65535, - ScopeDatabaseWriteAllAccessValue = 508, - ScopeContainersWriteAllAccessValue = 448, - /** - * Values which set permission Scope applicable to data plane related operations. - */ - ScopeContainerExecuteQueriesValue = 1, - ScopeContainerReadFeedsValue = 2, - ScopeContainerReadStoredProceduresValue = 4, - ScopeContainerReadUserDefinedFunctionsValue = 8, - ScopeContainerReadTriggersValue = 16, - ScopeContainerReadConflictsValue = 32, - ScopeItemReadValue = 64, - ScopeStoredProcedureReadValue = 128, - ScopeUserDefinedFunctionReadValue = 256, - ScopeTriggerReadValue = 512, - ScopeContainerCreateItemsValue = 1, - ScopeContainerReplaceItemsValue = 2, - ScopeContainerUpsertItemsValue = 4, - ScopeContainerDeleteItemsValue = 8, - ScopeContainerCreateStoredProceduresValue = 16, - ScopeContainerReplaceStoredProceduresValue = 32, - ScopeContainerDeleteStoredProceduresValue = 64, - ScopeContainerExecuteStoredProceduresValue = 128, - ScopeContainerCreateTriggersValue = 256, - ScopeContainerReplaceTriggersValue = 512, - ScopeContainerDeleteTriggersValue = 1024, - ScopeContainerCreateUserDefinedFunctionsValue = 2048, - ScopeContainerReplaceUserDefinedFunctionsValue = 4096, - ScopeContainerDeleteUserDefinedFunctionSValue = 8192, - ScopeContainerDeleteCONFLICTSValue = 16384, - ScopeItemReplaceValue = 65536, - ScopeItemUpsertValue = 131072, - ScopeItemDeleteValue = 262144, - ScopeStoredProcedureReplaceValue = 1048576, - ScopeStoredProcedureDeleteValue = 2097152, - ScopeStoredProcedureExecuteValue = 4194304, - ScopeUserDefinedFunctionReplaceValue = 8388608, - ScopeUserDefinedFunctionDeleteValue = 16777216, - ScopeTriggerReplaceValue = 33554432, - ScopeTriggerDeleteValue = 67108864, - ScopeContainerReadAllAccessValue = 4294967295, - ScopeItemReadAllAccessValue = 65, - ScopeContainerWriteAllAccessValue = 4294967295, - ScopeItemWriteAllAccessValue = 458767, - NoneValue = 0 -} -//# sourceMappingURL=PermissionScopeValues.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.d.ts.map deleted file mode 100644 index ae03e49..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionScopeValues.d.ts","sourceRoot":"","sources":["../../../../src/client/SasToken/PermissionScopeValues.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B;;OAEG;IACH,qBAAqB,IAAS;IAC9B,8BAA8B,IAAS;IACvC,sBAAsB,IAAS;IAC/B,2BAA2B,IAAS;IACpC,+BAA+B,KAAS;IACxC,uBAAuB,KAAS;IAChC,4BAA4B,KAAS;IAErC,gCAAgC,IAAS;IACzC,gCAAgC,IAAS;IACzC,wBAAwB,IAAS;IACjC,8BAA8B,IAAS;IACvC,iCAAiC,KAAS;IAC1C,iCAAiC,KAAS;IAC1C,0BAA0B,KAAS;IACnC,yBAAyB,MAAS;IAClC,+BAA+B,MAAS;IAExC,8BAA8B,QAAS;IACvC,+BAA+B,MAIqB;IAEpD,iCAAiC,KACmB;IAEpD,+BAA+B,QAAS;IACxC,gCAAgC,MAMuB;IAEvD,kCAAkC,MAEqB;IAEvD;;OAEG;IACH,iCAAiC,IAAa;IAC9C,4BAA4B,IAAa;IACzC,uCAAuC,IAAa;IACpD,2CAA2C,IAAa;IACxD,+BAA+B,KAAa;IAC5C,gCAAgC,KAAa;IAC7C,kBAAkB,KAAa;IAC/B,6BAA6B,MAAa;IAC1C,iCAAiC,MAAa;IAC9C,qBAAqB,MAAa;IAElC,8BAA8B,IAAa;IAC3C,+BAA+B,IAAa;IAC5C,8BAA8B,IAAa;IAC3C,8BAA8B,IAAa;IAC3C,yCAAyC,KAAa;IACtD,0CAA0C,KAAa;IACvD,yCAAyC,KAAa;IACtD,0CAA0C,MAAa;IACvD,iCAAiC,MAAa;IAC9C,kCAAkC,MAAa;IAC/C,iCAAiC,OAAa;IAC9C,6CAA6C,OAAa;IAC1D,8CAA8C,OAAa;IAC3D,6CAA6C,OAAa;IAC1D,kCAAkC,QAAa;IAC/C,qBAAqB,QAAa;IAClC,oBAAoB,SAAa;IACjC,oBAAoB,SAAa;IACjC,gCAAgC,UAAa;IAC7C,+BAA+B,UAAa;IAC5C,gCAAgC,UAAa;IAC7C,oCAAoC,UAAa;IACjD,mCAAmC,WAAa;IAChD,wBAAwB,WAAa;IACrC,uBAAuB,WAAa;IAEpC,gCAAgC,aAAa;IAC7C,2BAA2B,KACe;IAC1C,iCAAiC,aAAa;IAC9C,4BAA4B,SAMgB;IAE5C,SAAS,IAAI;CACd"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.js deleted file mode 100644 index e291730..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Represents permission Scope Values. - */ -export var PermissionScopeValues; -(function (PermissionScopeValues) { - /** - * Values which set permission Scope applicable to control plane related operations. - */ - PermissionScopeValues[PermissionScopeValues["ScopeAccountReadValue"] = 1] = "ScopeAccountReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountListDatabasesValue"] = 2] = "ScopeAccountListDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadValue"] = 4] = "ScopeDatabaseReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadOfferValue"] = 8] = "ScopeDatabaseReadOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseListContainerValue"] = 16] = "ScopeDatabaseListContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadValue"] = 32] = "ScopeContainerReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadOfferValue"] = 64] = "ScopeContainerReadOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountCreateDatabasesValue"] = 1] = "ScopeAccountCreateDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountDeleteDatabasesValue"] = 2] = "ScopeAccountDeleteDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseDeleteValue"] = 4] = "ScopeDatabaseDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReplaceOfferValue"] = 8] = "ScopeDatabaseReplaceOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseCreateContainerValue"] = 16] = "ScopeDatabaseCreateContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseDeleteContainerValue"] = 32] = "ScopeDatabaseDeleteContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceValue"] = 64] = "ScopeContainerReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteValue"] = 128] = "ScopeContainerDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceOfferValue"] = 256] = "ScopeContainerReplaceOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountReadAllAccessValue"] = 65535] = "ScopeAccountReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadAllAccessValue"] = 124] = "ScopeDatabaseReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainersReadAllAccessValue"] = 96] = "ScopeContainersReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountWriteAllAccessValue"] = 65535] = "ScopeAccountWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseWriteAllAccessValue"] = 508] = "ScopeDatabaseWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainersWriteAllAccessValue"] = 448] = "ScopeContainersWriteAllAccessValue"; - /** - * Values which set permission Scope applicable to data plane related operations. - */ - PermissionScopeValues[PermissionScopeValues["ScopeContainerExecuteQueriesValue"] = 1] = "ScopeContainerExecuteQueriesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadFeedsValue"] = 2] = "ScopeContainerReadFeedsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadStoredProceduresValue"] = 4] = "ScopeContainerReadStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadUserDefinedFunctionsValue"] = 8] = "ScopeContainerReadUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadTriggersValue"] = 16] = "ScopeContainerReadTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadConflictsValue"] = 32] = "ScopeContainerReadConflictsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReadValue"] = 64] = "ScopeItemReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureReadValue"] = 128] = "ScopeStoredProcedureReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionReadValue"] = 256] = "ScopeUserDefinedFunctionReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerReadValue"] = 512] = "ScopeTriggerReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateItemsValue"] = 1] = "ScopeContainerCreateItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceItemsValue"] = 2] = "ScopeContainerReplaceItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerUpsertItemsValue"] = 4] = "ScopeContainerUpsertItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteItemsValue"] = 8] = "ScopeContainerDeleteItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateStoredProceduresValue"] = 16] = "ScopeContainerCreateStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceStoredProceduresValue"] = 32] = "ScopeContainerReplaceStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteStoredProceduresValue"] = 64] = "ScopeContainerDeleteStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerExecuteStoredProceduresValue"] = 128] = "ScopeContainerExecuteStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateTriggersValue"] = 256] = "ScopeContainerCreateTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceTriggersValue"] = 512] = "ScopeContainerReplaceTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteTriggersValue"] = 1024] = "ScopeContainerDeleteTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateUserDefinedFunctionsValue"] = 2048] = "ScopeContainerCreateUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceUserDefinedFunctionsValue"] = 4096] = "ScopeContainerReplaceUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteUserDefinedFunctionSValue"] = 8192] = "ScopeContainerDeleteUserDefinedFunctionSValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteCONFLICTSValue"] = 16384] = "ScopeContainerDeleteCONFLICTSValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReplaceValue"] = 65536] = "ScopeItemReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemUpsertValue"] = 131072] = "ScopeItemUpsertValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemDeleteValue"] = 262144] = "ScopeItemDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureReplaceValue"] = 1048576] = "ScopeStoredProcedureReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureDeleteValue"] = 2097152] = "ScopeStoredProcedureDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureExecuteValue"] = 4194304] = "ScopeStoredProcedureExecuteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionReplaceValue"] = 8388608] = "ScopeUserDefinedFunctionReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionDeleteValue"] = 16777216] = "ScopeUserDefinedFunctionDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerReplaceValue"] = 33554432] = "ScopeTriggerReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerDeleteValue"] = 67108864] = "ScopeTriggerDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadAllAccessValue"] = 4294967295] = "ScopeContainerReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReadAllAccessValue"] = 65] = "ScopeItemReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerWriteAllAccessValue"] = 4294967295] = "ScopeContainerWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemWriteAllAccessValue"] = 458767] = "ScopeItemWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["NoneValue"] = 0] = "NoneValue"; -})(PermissionScopeValues || (PermissionScopeValues = {})); -//# sourceMappingURL=PermissionScopeValues.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.js.map deleted file mode 100644 index 0bb9281..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/PermissionScopeValues.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionSc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iC,CAAA;IACjC,+HAA6C,CAAA;IAC7C,6HAA4C,CAAA;IAC5C,+HAA6C,CAAA;IAC7C,uIAAiD,CAAA;IACjD,sIAAgD,CAAA;IAChD,gHAAqC,CAAA;IACrC,8GAAoC,CAAA;IAEpC,kIAA6C,CAAA;IAC7C,gHAC0C,CAAA;IAC1C,oIAA8C,CAAA;IAC9C,sHAM4C,CAAA;IAE5C,2EAAa,CAAA;AACf,CAAC,EAlGW,qBAAqB,KAArB,qBAAqB,QAkGhC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents permission Scope Values.\n */\nexport enum PermissionScopeValues {\n /**\n * Values which set permission Scope applicable to control plane related operations.\n */\n ScopeAccountReadValue = 0x0001,\n ScopeAccountListDatabasesValue = 0x0002,\n ScopeDatabaseReadValue = 0x0004,\n ScopeDatabaseReadOfferValue = 0x0008,\n ScopeDatabaseListContainerValue = 0x0010,\n ScopeContainerReadValue = 0x0020,\n ScopeContainerReadOfferValue = 0x0040,\n\n ScopeAccountCreateDatabasesValue = 0x0001,\n ScopeAccountDeleteDatabasesValue = 0x0002,\n ScopeDatabaseDeleteValue = 0x0004,\n ScopeDatabaseReplaceOfferValue = 0x0008,\n ScopeDatabaseCreateContainerValue = 0x0010,\n ScopeDatabaseDeleteContainerValue = 0x0020,\n ScopeContainerReplaceValue = 0x0040,\n ScopeContainerDeleteValue = 0x0080,\n ScopeContainerReplaceOfferValue = 0x0100,\n\n ScopeAccountReadAllAccessValue = 0xffff,\n ScopeDatabaseReadAllAccessValue = PermissionScopeValues.ScopeDatabaseReadValue |\n PermissionScopeValues.ScopeDatabaseReadOfferValue |\n PermissionScopeValues.ScopeDatabaseListContainerValue |\n PermissionScopeValues.ScopeContainerReadValue |\n PermissionScopeValues.ScopeContainerReadOfferValue,\n\n ScopeContainersReadAllAccessValue = PermissionScopeValues.ScopeContainerReadValue |\n PermissionScopeValues.ScopeContainerReadOfferValue,\n\n ScopeAccountWriteAllAccessValue = 0xffff,\n ScopeDatabaseWriteAllAccessValue = PermissionScopeValues.ScopeDatabaseDeleteValue |\n PermissionScopeValues.ScopeDatabaseReplaceOfferValue |\n PermissionScopeValues.ScopeDatabaseCreateContainerValue |\n PermissionScopeValues.ScopeDatabaseDeleteContainerValue |\n PermissionScopeValues.ScopeContainerReplaceValue |\n PermissionScopeValues.ScopeContainerDeleteValue |\n PermissionScopeValues.ScopeContainerReplaceOfferValue,\n\n ScopeContainersWriteAllAccessValue = PermissionScopeValues.ScopeContainerReplaceValue |\n PermissionScopeValues.ScopeContainerDeleteValue |\n PermissionScopeValues.ScopeContainerReplaceOfferValue,\n\n /**\n * Values which set permission Scope applicable to data plane related operations.\n */\n ScopeContainerExecuteQueriesValue = 0x00000001,\n ScopeContainerReadFeedsValue = 0x00000002,\n ScopeContainerReadStoredProceduresValue = 0x00000004,\n ScopeContainerReadUserDefinedFunctionsValue = 0x00000008,\n ScopeContainerReadTriggersValue = 0x00000010,\n ScopeContainerReadConflictsValue = 0x00000020,\n ScopeItemReadValue = 0x00000040,\n ScopeStoredProcedureReadValue = 0x00000080,\n ScopeUserDefinedFunctionReadValue = 0x00000100,\n ScopeTriggerReadValue = 0x00000200,\n\n ScopeContainerCreateItemsValue = 0x00000001,\n ScopeContainerReplaceItemsValue = 0x00000002,\n ScopeContainerUpsertItemsValue = 0x00000004,\n ScopeContainerDeleteItemsValue = 0x00000008,\n ScopeContainerCreateStoredProceduresValue = 0x00000010,\n ScopeContainerReplaceStoredProceduresValue = 0x00000020,\n ScopeContainerDeleteStoredProceduresValue = 0x00000040,\n ScopeContainerExecuteStoredProceduresValue = 0x00000080,\n ScopeContainerCreateTriggersValue = 0x00000100,\n ScopeContainerReplaceTriggersValue = 0x00000200,\n ScopeContainerDeleteTriggersValue = 0x00000400,\n ScopeContainerCreateUserDefinedFunctionsValue = 0x00000800,\n ScopeContainerReplaceUserDefinedFunctionsValue = 0x00001000,\n ScopeContainerDeleteUserDefinedFunctionSValue = 0x00002000,\n ScopeContainerDeleteCONFLICTSValue = 0x00004000,\n ScopeItemReplaceValue = 0x00010000,\n ScopeItemUpsertValue = 0x00020000,\n ScopeItemDeleteValue = 0x00040000,\n ScopeStoredProcedureReplaceValue = 0x00100000,\n ScopeStoredProcedureDeleteValue = 0x00200000,\n ScopeStoredProcedureExecuteValue = 0x00400000,\n ScopeUserDefinedFunctionReplaceValue = 0x00800000,\n ScopeUserDefinedFunctionDeleteValue = 0x01000000,\n ScopeTriggerReplaceValue = 0x02000000,\n ScopeTriggerDeleteValue = 0x04000000,\n\n ScopeContainerReadAllAccessValue = 0xffffffff,\n ScopeItemReadAllAccessValue = PermissionScopeValues.ScopeContainerExecuteQueriesValue |\n PermissionScopeValues.ScopeItemReadValue,\n ScopeContainerWriteAllAccessValue = 0xffffffff,\n ScopeItemWriteAllAccessValue = PermissionScopeValues.ScopeContainerCreateItemsValue |\n PermissionScopeValues.ScopeContainerReplaceItemsValue |\n PermissionScopeValues.ScopeContainerUpsertItemsValue |\n PermissionScopeValues.ScopeContainerDeleteItemsValue |\n PermissionScopeValues.ScopeItemReplaceValue |\n PermissionScopeValues.ScopeItemUpsertValue |\n PermissionScopeValues.ScopeItemDeleteValue,\n\n NoneValue = 0,\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.d.ts deleted file mode 100644 index 1bd0b56..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CosmosContainerChildResourceKind } from "../../common/constants"; -import { CosmosKeyType } from "../../common/constants"; -export declare class SasTokenProperties { - user: string; - userTag: string; - databaseName: string; - containerName: string; - resourceName: string; - resourcePath: string; - resourceKind: CosmosContainerChildResourceKind; - partitionKeyValueRanges: string[]; - startTime: Date; - expiryTime: Date; - keyType: CosmosKeyType | number; - controlPlaneReaderScope: number; - controlPlaneWriterScope: number; - dataPlaneReaderScope: number; - dataPlaneWriterScope: number; - cosmosContainerChildResourceKind: CosmosContainerChildResourceKind; - cosmosKeyType: CosmosKeyType; -} -//# sourceMappingURL=SasTokenProperties.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.d.ts.map deleted file mode 100644 index 29cc995..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SasTokenProperties.d.ts","sourceRoot":"","sources":["../../../../src/client/SasToken/SasTokenProperties.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,qBAAa,kBAAkB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,gCAAgC,CAAC;IAC/C,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;IACjB,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gCAAgC,EAAE,gCAAgC,CAAC;IACnE,aAAa,EAAE,aAAa,CAAC;CAC9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.js deleted file mode 100644 index de9fe20..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export class SasTokenProperties { -} -//# sourceMappingURL=SasTokenProperties.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.js.map deleted file mode 100644 index ed92f60..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/SasToken/SasTokenProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SasTokenProperties.js","sourceRoot":"","sources":["../../../../src/client/SasToken/SasTokenProperties.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,MAAM,OAAO,kBAAkB;CAkB9B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CosmosContainerChildResourceKind } from \"../../common/constants\";\nimport { CosmosKeyType } from \"../../common/constants\";\n\nexport class SasTokenProperties {\n user: string;\n userTag: string;\n databaseName: string;\n containerName: string;\n resourceName: string;\n resourcePath: string;\n resourceKind: CosmosContainerChildResourceKind;\n partitionKeyValueRanges: string[];\n startTime: Date;\n expiryTime: Date;\n keyType: CosmosKeyType | number;\n controlPlaneReaderScope: number;\n controlPlaneWriterScope: number;\n dataPlaneReaderScope: number;\n dataPlaneWriterScope: number;\n cosmosContainerChildResourceKind: CosmosContainerChildResourceKind;\n cosmosKeyType: CosmosKeyType;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.d.ts deleted file mode 100644 index 4a93489..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { StoredProcedures, StoredProcedure } from "../StoredProcedure"; -import { Trigger, Triggers } from "../Trigger"; -import { UserDefinedFunction, UserDefinedFunctions } from "../UserDefinedFunction"; -import { ClientContext } from "../../ClientContext"; -import { Container } from "../Container/Container"; -export declare class Scripts { - readonly container: Container; - private readonly clientContext; - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link StoredProcedure} by id. - * - * Use `.storedProcedures` for creating new stored procedures, or querying/reading all stored procedures. - * @param id - The id of the {@link StoredProcedure}. - */ - storedProcedure(id: string): StoredProcedure; - /** - * Used to read, replace, or delete a specific, existing {@link Trigger} by id. - * - * Use `.triggers` for creating new triggers, or querying/reading all triggers. - * @param id - The id of the {@link Trigger}. - */ - trigger(id: string): Trigger; - /** - * Used to read, replace, or delete a specific, existing {@link UserDefinedFunction} by id. - * - * Use `.userDefinedFunctions` for creating new user defined functions, or querying/reading all user defined functions. - * @param id - The id of the {@link UserDefinedFunction}. - */ - userDefinedFunction(id: string): UserDefinedFunction; - private $sprocs; - /** - * Operations for creating new stored procedures, and reading/querying all stored procedures. - * - * For reading, replacing, or deleting an existing stored procedure, use `.storedProcedure(id)`. - */ - get storedProcedures(): StoredProcedures; - private $triggers; - /** - * Operations for creating new triggers, and reading/querying all triggers. - * - * For reading, replacing, or deleting an existing trigger, use `.trigger(id)`. - */ - get triggers(): Triggers; - private $udfs; - /** - * Operations for creating new user defined functions, and reading/querying all user defined functions. - * - * For reading, replacing, or deleting an existing user defined function, use `.userDefinedFunction(id)`. - */ - get userDefinedFunctions(): UserDefinedFunctions; -} -//# sourceMappingURL=Scripts.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.d.ts.map deleted file mode 100644 index 758e21a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Scripts.d.ts","sourceRoot":"","sources":["../../../../src/client/Script/Scripts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,OAAO;aAMA,SAAS,EAAE,SAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC;;;OAGG;gBAEe,SAAS,EAAE,SAAS,EACnB,aAAa,EAAE,aAAa;IAG/C;;;;;OAKG;IACI,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe;IAInD;;;;;OAKG;IACI,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAInC;;;;;OAKG;IACI,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB;IAI3D,OAAO,CAAC,OAAO,CAAmB;IAClC;;;;OAIG;IACH,IAAW,gBAAgB,IAAI,gBAAgB,CAK9C;IAED,OAAO,CAAC,SAAS,CAAW;IAC5B;;;;OAIG;IACH,IAAW,QAAQ,IAAI,QAAQ,CAK9B;IAED,OAAO,CAAC,KAAK,CAAuB;IACpC;;;;OAIG;IACH,IAAW,oBAAoB,IAAI,oBAAoB,CAKtD;CACF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.js deleted file mode 100644 index 463e61a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { StoredProcedures, StoredProcedure } from "../StoredProcedure"; -import { Trigger, Triggers } from "../Trigger"; -import { UserDefinedFunction, UserDefinedFunctions } from "../UserDefinedFunction"; -export class Scripts { - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - /** - * Used to read, replace, or delete a specific, existing {@link StoredProcedure} by id. - * - * Use `.storedProcedures` for creating new stored procedures, or querying/reading all stored procedures. - * @param id - The id of the {@link StoredProcedure}. - */ - storedProcedure(id) { - return new StoredProcedure(this.container, id, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link Trigger} by id. - * - * Use `.triggers` for creating new triggers, or querying/reading all triggers. - * @param id - The id of the {@link Trigger}. - */ - trigger(id) { - return new Trigger(this.container, id, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link UserDefinedFunction} by id. - * - * Use `.userDefinedFunctions` for creating new user defined functions, or querying/reading all user defined functions. - * @param id - The id of the {@link UserDefinedFunction}. - */ - userDefinedFunction(id) { - return new UserDefinedFunction(this.container, id, this.clientContext); - } - /** - * Operations for creating new stored procedures, and reading/querying all stored procedures. - * - * For reading, replacing, or deleting an existing stored procedure, use `.storedProcedure(id)`. - */ - get storedProcedures() { - if (!this.$sprocs) { - this.$sprocs = new StoredProcedures(this.container, this.clientContext); - } - return this.$sprocs; - } - /** - * Operations for creating new triggers, and reading/querying all triggers. - * - * For reading, replacing, or deleting an existing trigger, use `.trigger(id)`. - */ - get triggers() { - if (!this.$triggers) { - this.$triggers = new Triggers(this.container, this.clientContext); - } - return this.$triggers; - } - /** - * Operations for creating new user defined functions, and reading/querying all user defined functions. - * - * For reading, replacing, or deleting an existing user defined function, use `.userDefinedFunction(id)`. - */ - get userDefinedFunctions() { - if (!this.$udfs) { - this.$udfs = new UserDefinedFunctions(this.container, this.clientContext); - } - return this.$udfs; - } -} -//# sourceMappingURL=Scripts.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.js.map deleted file mode 100644 index 79c2f2e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Script/Scripts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Scripts.js","sourceRoot":"","sources":["../../../../src/client/Script/Scripts.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAInF,MAAM,OAAO,OAAO;IAClB;;;OAGG;IACH,YACkB,SAAoB,EACnB,aAA4B;QAD7B,cAAS,GAAT,SAAS,CAAW;QACnB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAEJ;;;;;OAKG;IACI,eAAe,CAAC,EAAU;QAC/B,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACI,OAAO,CAAC,EAAU;QACvB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;OAKG;IACI,mBAAmB,CAAC,EAAU;QACnC,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACzE,CAAC;IAGD;;;;OAIG;IACH,IAAW,gBAAgB;QACzB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACzE;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;;;OAIG;IACH,IAAW,QAAQ;QACjB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;;;OAIG;IACH,IAAW,oBAAoB;QAC7B,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,IAAI,CAAC,KAAK,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SAC3E;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { StoredProcedures, StoredProcedure } from \"../StoredProcedure\";\nimport { Trigger, Triggers } from \"../Trigger\";\nimport { UserDefinedFunction, UserDefinedFunctions } from \"../UserDefinedFunction\";\nimport { ClientContext } from \"../../ClientContext\";\nimport { Container } from \"../Container/Container\";\n\nexport class Scripts {\n /**\n * @param container - The parent {@link Container}.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Used to read, replace, or delete a specific, existing {@link StoredProcedure} by id.\n *\n * Use `.storedProcedures` for creating new stored procedures, or querying/reading all stored procedures.\n * @param id - The id of the {@link StoredProcedure}.\n */\n public storedProcedure(id: string): StoredProcedure {\n return new StoredProcedure(this.container, id, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Trigger} by id.\n *\n * Use `.triggers` for creating new triggers, or querying/reading all triggers.\n * @param id - The id of the {@link Trigger}.\n */\n public trigger(id: string): Trigger {\n return new Trigger(this.container, id, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link UserDefinedFunction} by id.\n *\n * Use `.userDefinedFunctions` for creating new user defined functions, or querying/reading all user defined functions.\n * @param id - The id of the {@link UserDefinedFunction}.\n */\n public userDefinedFunction(id: string): UserDefinedFunction {\n return new UserDefinedFunction(this.container, id, this.clientContext);\n }\n\n private $sprocs: StoredProcedures;\n /**\n * Operations for creating new stored procedures, and reading/querying all stored procedures.\n *\n * For reading, replacing, or deleting an existing stored procedure, use `.storedProcedure(id)`.\n */\n public get storedProcedures(): StoredProcedures {\n if (!this.$sprocs) {\n this.$sprocs = new StoredProcedures(this.container, this.clientContext);\n }\n return this.$sprocs;\n }\n\n private $triggers: Triggers;\n /**\n * Operations for creating new triggers, and reading/querying all triggers.\n *\n * For reading, replacing, or deleting an existing trigger, use `.trigger(id)`.\n */\n public get triggers(): Triggers {\n if (!this.$triggers) {\n this.$triggers = new Triggers(this.container, this.clientContext);\n }\n return this.$triggers;\n }\n\n private $udfs: UserDefinedFunctions;\n /**\n * Operations for creating new user defined functions, and reading/querying all user defined functions.\n *\n * For reading, replacing, or deleting an existing user defined function, use `.userDefinedFunction(id)`.\n */\n public get userDefinedFunctions(): UserDefinedFunctions {\n if (!this.$udfs) {\n this.$udfs = new UserDefinedFunctions(this.container, this.clientContext);\n }\n return this.$udfs;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.d.ts deleted file mode 100644 index c198a5d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { PartitionKey } from "../../documents/PartitionKey"; -import { RequestOptions, ResourceResponse } from "../../request"; -import { Container } from "../Container"; -import { StoredProcedureDefinition } from "./StoredProcedureDefinition"; -import { StoredProcedureResponse } from "./StoredProcedureResponse"; -/** - * Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id. - * - * For operations to create, read all, or query Stored Procedures, - */ -export declare class StoredProcedure { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * Creates a new instance of {@link StoredProcedure} linked to the parent {@link Container}. - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link StoredProcedure}. - * @hidden - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link StoredProcedureDefinition} for the given {@link StoredProcedure}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link StoredProcedure} with the specified {@link StoredProcedureDefinition}. - * @param body - The specified {@link StoredProcedureDefinition} to replace the existing definition. - */ - replace(body: StoredProcedureDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link StoredProcedure}. - */ - delete(options?: RequestOptions): Promise; - /** - * Execute the given {@link StoredProcedure}. - * - * The specified type, T, is not enforced by the client. - * Be sure to validate the response from the stored procedure matches the type, T, you provide. - * - * @param partitionKey - The partition key to use when executing the stored procedure - * @param params - Array of parameters to pass as arguments to the given {@link StoredProcedure}. - * @param options - Additional options, such as the partition key to invoke the {@link StoredProcedure} on. - */ - execute(partitionKey: PartitionKey, params?: any[], options?: RequestOptions): Promise>; -} -//# sourceMappingURL=StoredProcedure.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.d.ts.map deleted file mode 100644 index ed63581..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedure.d.ts","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedure.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,eAAe;aAcR,SAAS,EAAE,SAAS;aACpB,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAfhC;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IACD;;;;;OAKG;gBAEe,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,EACT,aAAa,EAAE,aAAa;IAG/C;;OAEG;IACU,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAY7E;;;OAGG;IACU,OAAO,CAClB,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,uBAAuB,CAAC;IAuBnC;;OAEG;IACU,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAa/E;;;;;;;;;OASG;IACU,OAAO,CAAC,CAAC,GAAG,GAAG,EAC1B,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,GAAG,EAAE,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAchC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.js deleted file mode 100644 index 3740318..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.js +++ /dev/null @@ -1,103 +0,0 @@ -import { createStoredProcedureUri, getIdFromLink, getPathFromLink, isResourceValid, ResourceType, } from "../../common"; -import { undefinedPartitionKey } from "../../extractPartitionKey"; -import { ResourceResponse } from "../../request"; -import { StoredProcedureResponse } from "./StoredProcedureResponse"; -/** - * Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id. - * - * For operations to create, read all, or query Stored Procedures, - */ -export class StoredProcedure { - /** - * Creates a new instance of {@link StoredProcedure} linked to the parent {@link Container}. - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link StoredProcedure}. - * @hidden - */ - constructor(container, id, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createStoredProcedureUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the {@link StoredProcedureDefinition} for the given {@link StoredProcedure}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.sproc, - resourceId: id, - options, - }); - return new StoredProcedureResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link StoredProcedure} with the specified {@link StoredProcedureDefinition}. - * @param body - The specified {@link StoredProcedureDefinition} to replace the existing definition. - */ - async replace(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: ResourceType.sproc, - resourceId: id, - options, - }); - return new StoredProcedureResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link StoredProcedure}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.sproc, - resourceId: id, - options, - }); - return new StoredProcedureResponse(response.result, response.headers, response.code, this); - } - /** - * Execute the given {@link StoredProcedure}. - * - * The specified type, T, is not enforced by the client. - * Be sure to validate the response from the stored procedure matches the type, T, you provide. - * - * @param partitionKey - The partition key to use when executing the stored procedure - * @param params - Array of parameters to pass as arguments to the given {@link StoredProcedure}. - * @param options - Additional options, such as the partition key to invoke the {@link StoredProcedure} on. - */ - async execute(partitionKey, params, options) { - if (partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const response = await this.clientContext.execute({ - sprocLink: this.url, - params, - options, - partitionKey, - }); - return new ResourceResponse(response.result, response.headers, response.code); - } -} -//# sourceMappingURL=StoredProcedure.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.js.map deleted file mode 100644 index 2b79fbb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedure.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedure.js","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedure.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAkB,g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,sBAAsB,CAAC,CAAC;SAC9D;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAI;YACnD,SAAS,EAAE,IAAI,CAAC,GAAG;YACnB,MAAM;YACN,OAAO;YACP,YAAY;SACb,CAAC,CAAC;QACH,OAAO,IAAI,gBAAgB,CAAI,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createStoredProcedureUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { PartitionKey } from \"../../documents/PartitionKey\";\nimport { undefinedPartitionKey } from \"../../extractPartitionKey\";\nimport { RequestOptions, ResourceResponse } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { StoredProcedureDefinition } from \"./StoredProcedureDefinition\";\nimport { StoredProcedureResponse } from \"./StoredProcedureResponse\";\n\n/**\n * Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id.\n *\n * For operations to create, read all, or query Stored Procedures,\n */\nexport class StoredProcedure {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createStoredProcedureUri(this.container.database.id, this.container.id, this.id);\n }\n /**\n * Creates a new instance of {@link StoredProcedure} linked to the parent {@link Container}.\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link StoredProcedure}.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link StoredProcedureDefinition} for the given {@link StoredProcedure}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n return new StoredProcedureResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link StoredProcedure} with the specified {@link StoredProcedureDefinition}.\n * @param body - The specified {@link StoredProcedureDefinition} to replace the existing definition.\n */\n public async replace(\n body: StoredProcedureDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n return new StoredProcedureResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link StoredProcedure}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n return new StoredProcedureResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Execute the given {@link StoredProcedure}.\n *\n * The specified type, T, is not enforced by the client.\n * Be sure to validate the response from the stored procedure matches the type, T, you provide.\n *\n * @param partitionKey - The partition key to use when executing the stored procedure\n * @param params - Array of parameters to pass as arguments to the given {@link StoredProcedure}.\n * @param options - Additional options, such as the partition key to invoke the {@link StoredProcedure} on.\n */\n public async execute(\n partitionKey: PartitionKey,\n params?: any[],\n options?: RequestOptions\n ): Promise> {\n if (partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n const response = await this.clientContext.execute({\n sprocLink: this.url,\n params,\n options,\n partitionKey,\n });\n return new ResourceResponse(response.result, response.headers, response.code);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.d.ts deleted file mode 100644 index f62f4c5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface StoredProcedureDefinition { - /** - * The id of the {@link StoredProcedure}. - */ - id?: string; - /** - * The body of the {@link StoredProcedure}. This is a JavaScript function. - */ - body?: string | ((...inputs: any[]) => void); -} -//# sourceMappingURL=StoredProcedureDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.d.ts.map deleted file mode 100644 index 3dc9b8d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedureDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedureDefinition.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,CAAC;CAC9C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.js deleted file mode 100644 index 95ef674..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=StoredProcedureDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.js.map deleted file mode 100644 index 5316b1d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedureDefinition.js","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedureDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface StoredProcedureDefinition {\n /**\n * The id of the {@link StoredProcedure}.\n */\n id?: string;\n /**\n * The body of the {@link StoredProcedure}. This is a JavaScript function.\n */\n body?: string | ((...inputs: any[]) => void);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.d.ts deleted file mode 100644 index 009bdfd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request"; -import { Resource } from "../Resource"; -import { StoredProcedure } from "./StoredProcedure"; -import { StoredProcedureDefinition } from "./StoredProcedureDefinition"; -export declare class StoredProcedureResponse extends ResourceResponse { - constructor(resource: StoredProcedureDefinition & Resource, headers: CosmosHeaders, statusCode: number, storedProcedure: StoredProcedure); - /** - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - readonly storedProcedure: StoredProcedure; - /** - * Alias for storedProcedure. - * - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - get sproc(): StoredProcedure; -} -//# sourceMappingURL=StoredProcedureResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.d.ts.map deleted file mode 100644 index 0014aeb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedureResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedureResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,qBAAa,uBAAwB,SAAQ,gBAAgB,CAC3D,yBAAyB,GAAG,QAAQ,CACrC;gBAEG,QAAQ,EAAE,yBAAyB,GAAG,QAAQ,EAC9C,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,eAAe;IAKlC;;OAEG;IACH,SAAgB,eAAe,EAAE,eAAe,CAAC;IAEjD;;;;OAIG;IACH,IAAW,KAAK,IAAI,eAAe,CAElC;CACF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.js deleted file mode 100644 index a41e753..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.js +++ /dev/null @@ -1,16 +0,0 @@ -import { ResourceResponse } from "../../request"; -export class StoredProcedureResponse extends ResourceResponse { - constructor(resource, headers, statusCode, storedProcedure) { - super(resource, headers, statusCode); - this.storedProcedure = storedProcedure; - } - /** - * Alias for storedProcedure. - * - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - get sproc() { - return this.storedProcedure; - } -} -//# sourceMappingURL=StoredProcedureResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.js.map deleted file mode 100644 index 9b2d542..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedureResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedureResponse.js","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedureResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,OAAO,uBAAwB,SAAQ,gBAE5C;IACC,YACE,QAA8C,EAC9C,OAAsB,EACtB,UAAkB,EAClB,eAAgC;QAEhC,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAMD;;;;OAIG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { StoredProcedure } from \"./StoredProcedure\";\nimport { StoredProcedureDefinition } from \"./StoredProcedureDefinition\";\n\nexport class StoredProcedureResponse extends ResourceResponse<\n StoredProcedureDefinition & Resource\n> {\n constructor(\n resource: StoredProcedureDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n storedProcedure: StoredProcedure\n ) {\n super(resource, headers, statusCode);\n this.storedProcedure = storedProcedure;\n }\n /**\n * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to.\n */\n public readonly storedProcedure: StoredProcedure;\n\n /**\n * Alias for storedProcedure.\n *\n * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to.\n */\n public get sproc(): StoredProcedure {\n return this.storedProcedure;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.d.ts deleted file mode 100644 index 55fb6b8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions } from "../../request"; -import { Container } from "../Container"; -import { Resource } from "../Resource"; -import { StoredProcedureDefinition } from "./StoredProcedureDefinition"; -import { StoredProcedureResponse } from "./StoredProcedureResponse"; -/** - * Operations for creating, upserting, or reading/querying all Stored Procedures. - * - * For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see `container.storedProcedure()`. - */ -export declare class StoredProcedures { - readonly container: Container; - private readonly clientContext; - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all Stored Procedures. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @example Read all stored procedures to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @sproc", - * parameters: [ - * {name: "@sproc", value: "Todo"} - * ] - * }; - * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all Stored Procedures. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @example Read all stored procedures to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @sproc", - * parameters: [ - * {name: "@sproc", value: "Todo"} - * ] - * }; - * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all stored procedures. - * @example Read all stored procedures to array. - * ```typescript - * const {body: sprocList} = await containers.storedProcedures.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a StoredProcedure. - * - * Azure Cosmos DB allows stored procedures to be executed in the storage tier, - * directly against an item container. The script - * gets executed under ACID transactions on the primary storage partition of the - * specified container. For additional details, - * refer to the server-side JavaScript API documentation. - */ - create(body: StoredProcedureDefinition, options?: RequestOptions): Promise; -} -//# sourceMappingURL=StoredProcedures.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.d.ts.map deleted file mode 100644 index f6e3828..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedures.d.ts","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,gBAAgB;aAMT,SAAS,EAAE,SAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC;;;OAGG;gBAEe,SAAS,EAAE,SAAS,EACnB,aAAa,EAAE,aAAa;IAG/C;;;;;;;;;;;;;OAaG;IACI,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IAC5E;;;;;;;;;;;;;OAaG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAiB7E;;;;;;OAMG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,yBAAyB,GAAG,QAAQ,CAAC;IAI1F;;;;;;;;OAQG;IACU,MAAM,CACjB,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,uBAAuB,CAAC;CAuBpC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.js deleted file mode 100644 index 4d844e6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.js +++ /dev/null @@ -1,73 +0,0 @@ -import { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from "../../common"; -import { QueryIterator } from "../../queryIterator"; -import { StoredProcedure } from "./StoredProcedure"; -import { StoredProcedureResponse } from "./StoredProcedureResponse"; -/** - * Operations for creating, upserting, or reading/querying all Stored Procedures. - * - * For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see `container.storedProcedure()`. - */ -export class StoredProcedures { - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, ResourceType.sproc); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.sproc, - resourceId: id, - resultFn: (result) => result.StoredProcedures, - query, - options: innerOptions, - }); - }); - } - /** - * Read all stored procedures. - * @example Read all stored procedures to array. - * ```typescript - * const {body: sprocList} = await containers.storedProcedures.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a StoredProcedure. - * - * Azure Cosmos DB allows stored procedures to be executed in the storage tier, - * directly against an item container. The script - * gets executed under ACID transactions on the primary storage partition of the - * specified container. For additional details, - * refer to the server-side JavaScript API documentation. - */ - async create(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, ResourceType.sproc); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.sproc, - resourceId: id, - options, - }); - const ref = new StoredProcedure(this.container, response.result.id, this.clientContext); - return new StoredProcedureResponse(response.result, response.headers, response.code, ref); - } -} -//# sourceMappingURL=StoredProcedures.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.js.map deleted file mode 100644 index 0b3d0af..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/StoredProcedures.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StoredProcedures.js","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/StoredProcedures.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;GAIG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;;OAGG;IACH,YACkB,SAAoB,EACnB,aAA4B;QAD7B,cAAS,GAAT,SAAS,CAAW;QACnB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAgCG,KAAK,CAAI,KAAmB,EAAE,OAAqB;QACxD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACrE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE7C,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;gBAClC,IAAI;gBACJ,YAAY,EAAE,YAAY,CAAC,KAAK;gBAChC,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB;gBAC7C,KAAK;gBACL,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAuC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,MAAM,CACjB,IAA+B,EAC/B,OAAwB;QAExB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClC;QAED,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,CAAC;SACX;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACrE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE7C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAA4B;YAC1E,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,KAAK;YAChC,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACxF,OAAO,IAAI,uBAAuB,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5F,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { StoredProcedure } from \"./StoredProcedure\";\nimport { StoredProcedureDefinition } from \"./StoredProcedureDefinition\";\nimport { StoredProcedureResponse } from \"./StoredProcedureResponse\";\n\n/**\n * Operations for creating, upserting, or reading/querying all Stored Procedures.\n *\n * For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see `container.storedProcedure()`.\n */\nexport class StoredProcedures {\n /**\n * @param container - The parent {@link Container}.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all Stored Procedures.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @example Read all stored procedures to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @sproc\",\n * parameters: [\n * {name: \"@sproc\", value: \"Todo\"}\n * ]\n * };\n * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all Stored Procedures.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @example Read all stored procedures to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @sproc\",\n * parameters: [\n * {name: \"@sproc\", value: \"Todo\"}\n * ]\n * };\n * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.sproc);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n resultFn: (result) => result.StoredProcedures,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all stored procedures.\n * @example Read all stored procedures to array.\n * ```typescript\n * const {body: sprocList} = await containers.storedProcedures.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a StoredProcedure.\n *\n * Azure Cosmos DB allows stored procedures to be executed in the storage tier,\n * directly against an item container. The script\n * gets executed under ACID transactions on the primary storage partition of the\n * specified container. For additional details,\n * refer to the server-side JavaScript API documentation.\n */\n public async create(\n body: StoredProcedureDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.sproc);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n const ref = new StoredProcedure(this.container, response.result.id, this.clientContext);\n return new StoredProcedureResponse(response.result, response.headers, response.code, ref);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.d.ts deleted file mode 100644 index 34d6d06..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { StoredProcedure } from "./StoredProcedure"; -export { StoredProcedures } from "./StoredProcedures"; -export { StoredProcedureDefinition } from "./StoredProcedureDefinition"; -export { StoredProcedureResponse } from "./StoredProcedureResponse"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.d.ts.map deleted file mode 100644 index ab38c1c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.js deleted file mode 100644 index 588bda9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { StoredProcedure } from "./StoredProcedure"; -export { StoredProcedures } from "./StoredProcedures"; -export { StoredProcedureResponse } from "./StoredProcedureResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.js.map deleted file mode 100644 index a167ec3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/StoredProcedure/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/StoredProcedure/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { StoredProcedure } from \"./StoredProcedure\";\nexport { StoredProcedures } from \"./StoredProcedures\";\nexport { StoredProcedureDefinition } from \"./StoredProcedureDefinition\";\nexport { StoredProcedureResponse } from \"./StoredProcedureResponse\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.d.ts deleted file mode 100644 index d582343..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { RequestOptions } from "../../request"; -import { Container } from "../Container"; -import { TriggerDefinition } from "./TriggerDefinition"; -import { TriggerResponse } from "./TriggerResponse"; -/** - * Operations to read, replace, or delete a {@link Trigger}. - * - * Use `container.triggers` to create, upsert, query, or read all. - */ -export declare class Trigger { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Trigger}. - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link TriggerDefinition} for the given {@link Trigger}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Trigger} with the specified {@link TriggerDefinition}. - * @param body - The specified {@link TriggerDefinition} to replace the existing definition with. - */ - replace(body: TriggerDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link Trigger}. - */ - delete(options?: RequestOptions): Promise; -} -//# sourceMappingURL=Trigger.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.d.ts.map deleted file mode 100644 index 4de5e15..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../src/client/Trigger/Trigger.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;GAIG;AACH,qBAAa,OAAO;aAcA,SAAS,EAAE,SAAS;aACpB,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAfhC;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED;;;;OAIG;gBAEe,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,EACT,aAAa,EAAE,aAAa;IAG/C;;OAEG;IACU,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAarE;;;OAGG;IACU,OAAO,CAClB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,eAAe,CAAC;IAuB3B;;OAEG;IACU,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CAYxE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.js deleted file mode 100644 index c4b8129..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.js +++ /dev/null @@ -1,77 +0,0 @@ -import { createTriggerUri, getIdFromLink, getPathFromLink, isResourceValid, ResourceType, } from "../../common"; -import { TriggerResponse } from "./TriggerResponse"; -/** - * Operations to read, replace, or delete a {@link Trigger}. - * - * Use `container.triggers` to create, upsert, query, or read all. - */ -export class Trigger { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Trigger}. - */ - constructor(container, id, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createTriggerUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the {@link TriggerDefinition} for the given {@link Trigger}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.trigger, - resourceId: id, - options, - }); - return new TriggerResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link Trigger} with the specified {@link TriggerDefinition}. - * @param body - The specified {@link TriggerDefinition} to replace the existing definition with. - */ - async replace(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: ResourceType.trigger, - resourceId: id, - options, - }); - return new TriggerResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link Trigger}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.trigger, - resourceId: id, - options, - }); - return new TriggerResponse(response.result, response.headers, response.code, this); - } -} -//# sourceMappingURL=Trigger.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.js.map deleted file mode 100644 index 8b13bfd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Trigger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Trigger.js","sourceRoot":"","sources":["../../../../src/client/Trigger/Trigger.ts"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G,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,CAAC;SACX;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAoB;YACnE,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,OAAO;YAClC,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAAC,OAAwB;QAC1C,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAoB;YAClE,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,OAAO;YAClC,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createTriggerUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { TriggerDefinition } from \"./TriggerDefinition\";\nimport { TriggerResponse } from \"./TriggerResponse\";\n\n/**\n * Operations to read, replace, or delete a {@link Trigger}.\n *\n * Use `container.triggers` to create, upsert, query, or read all.\n */\nexport class Trigger {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createTriggerUri(this.container.database.id, this.container.id, this.id);\n }\n\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link Trigger}.\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link TriggerDefinition} for the given {@link Trigger}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n return new TriggerResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link Trigger} with the specified {@link TriggerDefinition}.\n * @param body - The specified {@link TriggerDefinition} to replace the existing definition with.\n */\n public async replace(\n body: TriggerDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n return new TriggerResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link Trigger}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n return new TriggerResponse(response.result, response.headers, response.code, this);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.d.ts deleted file mode 100644 index 01a07b3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TriggerOperation, TriggerType } from "../../documents"; -export interface TriggerDefinition { - /** The id of the trigger. */ - id?: string; - /** The body of the trigger, it can also be passed as a stringifed function */ - body: (() => void) | string; - /** The type of the trigger, should be one of the values of {@link TriggerType}. */ - triggerType: TriggerType; - /** The trigger operation, should be one of the values of {@link TriggerOperation}. */ - triggerOperation: TriggerOperation; -} -//# sourceMappingURL=TriggerDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.d.ts.map deleted file mode 100644 index 1121e53..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/Trigger/TriggerDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,CAAC;IAC5B,mFAAmF;IACnF,WAAW,EAAE,WAAW,CAAC;IACzB,sFAAsF;IACtF,gBAAgB,EAAE,gBAAgB,CAAC;CACpC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.js deleted file mode 100644 index c125562..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=TriggerDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.js.map deleted file mode 100644 index 874446f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerDefinition.js","sourceRoot":"","sources":["../../../../src/client/Trigger/TriggerDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { TriggerOperation, TriggerType } from \"../../documents\";\n\nexport interface TriggerDefinition {\n /** The id of the trigger. */\n id?: string;\n /** The body of the trigger, it can also be passed as a stringifed function */\n body: (() => void) | string;\n /** The type of the trigger, should be one of the values of {@link TriggerType}. */\n triggerType: TriggerType;\n /** The trigger operation, should be one of the values of {@link TriggerOperation}. */\n triggerOperation: TriggerOperation;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.d.ts deleted file mode 100644 index 3b219a2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request"; -import { Resource } from "../Resource"; -import { Trigger } from "./index"; -import { TriggerDefinition } from "./TriggerDefinition"; -export declare class TriggerResponse extends ResourceResponse { - constructor(resource: TriggerDefinition & Resource, headers: CosmosHeaders, statusCode: number, trigger: Trigger); - /** A reference to the {@link Trigger} corresponding to the returned {@link TriggerDefinition}. */ - readonly trigger: Trigger; -} -//# sourceMappingURL=TriggerResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.d.ts.map deleted file mode 100644 index 7a0eac2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/Trigger/TriggerResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,iBAAiB,GAAG,QAAQ,CAAC;gBAE/E,QAAQ,EAAE,iBAAiB,GAAG,QAAQ,EACtC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO;IAKlB,kGAAkG;IAClG,SAAgB,OAAO,EAAE,OAAO,CAAC;CAClC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.js deleted file mode 100644 index b50cf27..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.js +++ /dev/null @@ -1,8 +0,0 @@ -import { ResourceResponse } from "../../request"; -export class TriggerResponse extends ResourceResponse { - constructor(resource, headers, statusCode, trigger) { - super(resource, headers, statusCode); - this.trigger = trigger; - } -} -//# sourceMappingURL=TriggerResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.js.map deleted file mode 100644 index 0d7a78d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/TriggerResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerResponse.js","sourceRoot":"","sources":["../../../../src/client/Trigger/TriggerResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,OAAO,eAAgB,SAAQ,gBAA8C;IACjF,YACE,QAAsC,EACtC,OAAsB,EACtB,UAAkB,EAClB,OAAgB;QAEhB,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Trigger } from \"./index\";\nimport { TriggerDefinition } from \"./TriggerDefinition\";\n\nexport class TriggerResponse extends ResourceResponse {\n constructor(\n resource: TriggerDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n trigger: Trigger\n ) {\n super(resource, headers, statusCode);\n this.trigger = trigger;\n }\n /** A reference to the {@link Trigger} corresponding to the returned {@link TriggerDefinition}. */\n public readonly trigger: Trigger;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.d.ts deleted file mode 100644 index e320eb9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions } from "../../request"; -import { Container } from "../Container"; -import { Resource } from "../Resource"; -import { TriggerDefinition } from "./TriggerDefinition"; -import { TriggerResponse } from "./TriggerResponse"; -/** - * Operations to create, upsert, query, and read all triggers. - * - * Use `container.triggers` to read, replace, or delete a {@link Trigger}. - */ -export declare class Triggers { - readonly container: Container; - private readonly clientContext; - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all Triggers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all Triggers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all Triggers. - * @example Read all trigger to array. - * ```typescript - * const {body: triggerList} = await container.triggers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a trigger. - * - * Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed - * on creates, updates and deletes. - * - * For additional details, refer to the server-side JavaScript API documentation. - */ - create(body: TriggerDefinition, options?: RequestOptions): Promise; -} -//# sourceMappingURL=Triggers.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.d.ts.map deleted file mode 100644 index dec0832..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Triggers.d.ts","sourceRoot":"","sources":["../../../../src/client/Trigger/Triggers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;GAIG;AACH,qBAAa,QAAQ;aAMD,SAAS,EAAE,SAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC;;;OAGG;gBAEe,SAAS,EAAE,SAAS,EACnB,aAAa,EAAE,aAAa;IAG/C;;;OAGG;IACI,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IAC5E;;;OAGG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAiB7E;;;;;;OAMG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,iBAAiB,GAAG,QAAQ,CAAC;IAGlF;;;;;;;OAOG;IACU,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CAuBjG"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.js deleted file mode 100644 index 2453fc5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.js +++ /dev/null @@ -1,72 +0,0 @@ -import { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from "../../common"; -import { QueryIterator } from "../../queryIterator"; -import { Trigger } from "./Trigger"; -import { TriggerResponse } from "./TriggerResponse"; -/** - * Operations to create, upsert, query, and read all triggers. - * - * Use `container.triggers` to read, replace, or delete a {@link Trigger}. - */ -export class Triggers { - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, ResourceType.trigger); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.trigger, - resourceId: id, - resultFn: (result) => result.Triggers, - query, - options: innerOptions, - }); - }); - } - /** - * Read all Triggers. - * @example Read all trigger to array. - * ```typescript - * const {body: triggerList} = await container.triggers.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a trigger. - * - * Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed - * on creates, updates and deletes. - * - * For additional details, refer to the server-side JavaScript API documentation. - */ - async create(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, ResourceType.trigger); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.trigger, - resourceId: id, - options, - }); - const ref = new Trigger(this.container, response.result.id, this.clientContext); - return new TriggerResponse(response.result, response.headers, response.code, ref); - } -} -//# sourceMappingURL=Triggers.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.js.map deleted file mode 100644 index 427395f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/Triggers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Triggers.js","sourceRoot":"","sources":["../../../../src/client/Trigger/Triggers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,OAAO,QAAQ;IACnB;;;OAGG;IACH,YACkB,SAAoB,EACnB,aAA4B;QAD7B,cAAS,GAAT,SAAS,CAAW;QACnB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAYG,KAAK,CAAI,KAAmB,EAAE,OAAqB;QACxD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QACvE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE7C,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;gBAClC,IAAI;gBACJ,YAAY,EAAE,YAAY,CAAC,OAAO;gBAClC,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ;gBACrC,KAAK;gBACL,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC,KAAK,CAA+B,SAAS,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IACD;;;;;;;OAOG;IACI,KAAK,CAAC,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACnE,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClC;QAED,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,CAAC;SACX;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QACvE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE7C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAoB;YAClE,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,OAAO;YAClC,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAChF,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACpF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { Trigger } from \"./Trigger\";\nimport { TriggerDefinition } from \"./TriggerDefinition\";\nimport { TriggerResponse } from \"./TriggerResponse\";\n\n/**\n * Operations to create, upsert, query, and read all triggers.\n *\n * Use `container.triggers` to read, replace, or delete a {@link Trigger}.\n */\nexport class Triggers {\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all Triggers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all Triggers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.trigger);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n resultFn: (result) => result.Triggers,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all Triggers.\n * @example Read all trigger to array.\n * ```typescript\n * const {body: triggerList} = await container.triggers.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n /**\n * Create a trigger.\n *\n * Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed\n * on creates, updates and deletes.\n *\n * For additional details, refer to the server-side JavaScript API documentation.\n */\n public async create(body: TriggerDefinition, options?: RequestOptions): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.trigger);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n const ref = new Trigger(this.container, response.result.id, this.clientContext);\n return new TriggerResponse(response.result, response.headers, response.code, ref);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.d.ts deleted file mode 100644 index 64fc451..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { Trigger } from "./Trigger"; -export { Triggers } from "./Triggers"; -export { TriggerDefinition } from "./TriggerDefinition"; -export { TriggerResponse } from "./TriggerResponse"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.d.ts.map deleted file mode 100644 index afdbe4d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/Trigger/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.js deleted file mode 100644 index d496856..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { Trigger } from "./Trigger"; -export { Triggers } from "./Triggers"; -export { TriggerResponse } from "./TriggerResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.js.map deleted file mode 100644 index 1e2f9f5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/Trigger/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/Trigger/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { Trigger } from \"./Trigger\";\nexport { Triggers } from \"./Triggers\";\nexport { TriggerDefinition } from \"./TriggerDefinition\";\nexport { TriggerResponse } from \"./TriggerResponse\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.d.ts deleted file mode 100644 index f449a80..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { RequestOptions } from "../../request"; -import { Database } from "../Database"; -import { Permission, Permissions } from "../Permission"; -import { UserDefinition } from "./UserDefinition"; -import { UserResponse } from "./UserResponse"; -/** - * Used to read, replace, and delete Users. - * - * Additionally, you can access the permissions for a given user via `user.permission` and `user.permissions`. - * - * @see {@link Users} to create, upsert, query, or read all. - */ -export declare class User { - readonly database: Database; - readonly id: string; - private readonly clientContext; - /** - * Operations for creating, upserting, querying, or reading all operations. - * - * See `client.permission(id)` to read, replace, or delete a specific Permission by id. - */ - readonly permissions: Permissions; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database: Database, id: string, clientContext: ClientContext); - /** - * Operations to read, replace, or delete a specific Permission by id. - * - * See `client.permissions` for creating, upserting, querying, or reading all operations. - */ - permission(id: string): Permission; - /** - * Read the {@link UserDefinition} for the given {@link User}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link User}'s definition with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition} to replace the definition. - */ - replace(body: UserDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link User}. - */ - delete(options?: RequestOptions): Promise; -} -//# sourceMappingURL=User.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.d.ts.map deleted file mode 100644 index 3284849..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/client/User/User.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;GAMG;AACH,qBAAa,IAAI;aAkBG,QAAQ,EAAE,QAAQ;aAClB,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAnBhC;;;;OAIG;IACH,SAAgB,WAAW,EAAE,WAAW,CAAC;IACzC;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IACD;;;OAGG;gBAEe,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,MAAM,EACT,aAAa,EAAE,aAAa;IAK/C;;;;OAIG;IACI,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU;IAIzC;;OAEG;IACU,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAYlE;;;OAGG;IACU,OAAO,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAmB3F;;OAEG;IACU,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;CAYrE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.js deleted file mode 100644 index f33d9c9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.js +++ /dev/null @@ -1,85 +0,0 @@ -import { createUserUri, getIdFromLink, getPathFromLink, isResourceValid, ResourceType, } from "../../common"; -import { Permission, Permissions } from "../Permission"; -import { UserResponse } from "./UserResponse"; -/** - * Used to read, replace, and delete Users. - * - * Additionally, you can access the permissions for a given user via `user.permission` and `user.permissions`. - * - * @see {@link Users} to create, upsert, query, or read all. - */ -export class User { - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database, id, clientContext) { - this.database = database; - this.id = id; - this.clientContext = clientContext; - this.permissions = new Permissions(this, this.clientContext); - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createUserUri(this.database.id, this.id); - } - /** - * Operations to read, replace, or delete a specific Permission by id. - * - * See `client.permissions` for creating, upserting, querying, or reading all operations. - */ - permission(id) { - return new Permission(this, id, this.clientContext); - } - /** - * Read the {@link UserDefinition} for the given {@link User}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.user, - resourceId: id, - options, - }); - return new UserResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link User}'s definition with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition} to replace the definition. - */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: ResourceType.user, - resourceId: id, - options, - }); - return new UserResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link User}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.user, - resourceId: id, - options, - }); - return new UserResponse(response.result, response.headers, response.code, this); - } -} -//# sourceMappingURL=User.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.js.map deleted file mode 100644 index dc2cf60..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/User.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/client/User/User.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EACb,aAAa,EACb,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,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AG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAiB;YAChE,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,IAAI;YAC/B,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAAC,OAAwB;QAC1C,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAiB;YAC/D,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,IAAI;YAC/B,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createUserUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Database } from \"../Database\";\nimport { Permission, Permissions } from \"../Permission\";\nimport { UserDefinition } from \"./UserDefinition\";\nimport { UserResponse } from \"./UserResponse\";\n\n/**\n * Used to read, replace, and delete Users.\n *\n * Additionally, you can access the permissions for a given user via `user.permission` and `user.permissions`.\n *\n * @see {@link Users} to create, upsert, query, or read all.\n */\nexport class User {\n /**\n * Operations for creating, upserting, querying, or reading all operations.\n *\n * See `client.permission(id)` to read, replace, or delete a specific Permission by id.\n */\n public readonly permissions: Permissions;\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createUserUri(this.database.id, this.id);\n }\n /**\n * @hidden\n * @param database - The parent {@link Database}.\n */\n constructor(\n public readonly database: Database,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {\n this.permissions = new Permissions(this, this.clientContext);\n }\n\n /**\n * Operations to read, replace, or delete a specific Permission by id.\n *\n * See `client.permissions` for creating, upserting, querying, or reading all operations.\n */\n public permission(id: string): Permission {\n return new Permission(this, id, this.clientContext);\n }\n\n /**\n * Read the {@link UserDefinition} for the given {@link User}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new UserResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link User}'s definition with the specified {@link UserDefinition}.\n * @param body - The specified {@link UserDefinition} to replace the definition.\n */\n public async replace(body: UserDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new UserResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link User}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new UserResponse(response.result, response.headers, response.code, this);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.d.ts deleted file mode 100644 index 2323cb5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface UserDefinition { - /** The id of the user. */ - id?: string; -} -//# sourceMappingURL=UserDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.d.ts.map deleted file mode 100644 index 6745073..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/User/UserDefinition.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.js deleted file mode 100644 index 4897195..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=UserDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.js.map deleted file mode 100644 index bc88984..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinition.js","sourceRoot":"","sources":["../../../../src/client/User/UserDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface UserDefinition {\n /** The id of the user. */\n id?: string;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.d.ts deleted file mode 100644 index 6940619..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request"; -import { Resource } from "../Resource"; -import { User } from "./User"; -import { UserDefinition } from "./UserDefinition"; -export declare class UserResponse extends ResourceResponse { - constructor(resource: UserDefinition & Resource, headers: CosmosHeaders, statusCode: number, user: User); - /** A reference to the {@link User} corresponding to the returned {@link UserDefinition}. */ - readonly user: User; -} -//# sourceMappingURL=UserResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.d.ts.map deleted file mode 100644 index 9b64388..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/User/UserResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,cAAc,GAAG,QAAQ,CAAC;gBAEzE,QAAQ,EAAE,cAAc,GAAG,QAAQ,EACnC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,IAAI;IAKZ,4FAA4F;IAC5F,SAAgB,IAAI,EAAE,IAAI,CAAC;CAC5B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.js deleted file mode 100644 index eb6048a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.js +++ /dev/null @@ -1,8 +0,0 @@ -import { ResourceResponse } from "../../request"; -export class UserResponse extends ResourceResponse { - constructor(resource, headers, statusCode, user) { - super(resource, headers, statusCode); - this.user = user; - } -} -//# sourceMappingURL=UserResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.js.map deleted file mode 100644 index 49c46e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/UserResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserResponse.js","sourceRoot":"","sources":["../../../../src/client/User/UserResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,OAAO,YAAa,SAAQ,gBAA2C;IAC3E,YACE,QAAmC,EACnC,OAAsB,EACtB,UAAkB,EAClB,IAAU;QAEV,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { User } from \"./User\";\nimport { UserDefinition } from \"./UserDefinition\";\n\nexport class UserResponse extends ResourceResponse {\n constructor(\n resource: UserDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n user: User\n ) {\n super(resource, headers, statusCode);\n this.user = user;\n }\n /** A reference to the {@link User} corresponding to the returned {@link UserDefinition}. */\n public readonly user: User;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.d.ts deleted file mode 100644 index 97b6a2e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions } from "../../request"; -import { Database } from "../Database"; -import { Resource } from "../Resource"; -import { UserDefinition } from "./UserDefinition"; -import { UserResponse } from "./UserResponse"; -/** - * Used to create, upsert, query, and read all users. - * - * @see {@link User} to read, replace, or delete a specific User by id. - */ -export declare class Users { - readonly database: Database; - private readonly clientContext; - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database: Database, clientContext: ClientContext); - /** - * Query all users. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all users. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all users.- - * @example Read all users to array. - * ```typescript - * const {body: usersList} = await database.users.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a database user with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - create(body: UserDefinition, options?: RequestOptions): Promise; - /** - * Upsert a database user with a specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - upsert(body: UserDefinition, options?: RequestOptions): Promise; -} -//# sourceMappingURL=Users.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.d.ts.map deleted file mode 100644 index f49bef9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Users.d.ts","sourceRoot":"","sources":["../../../../src/client/User/Users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,qBAAa,KAAK;aAKY,QAAQ,EAAE,QAAQ;IAAE,OAAO,CAAC,QAAQ,CAAC,aAAa;IAJ9E;;;OAGG;gBACyB,QAAQ,EAAE,QAAQ,EAAmB,aAAa,EAAE,aAAa;IAE7F;;;OAGG;IACI,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IAC5E;;;OAGG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAiB7E;;;;;;OAMG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,cAAc,GAAG,QAAQ,CAAC;IAI/E;;;OAGG;IACU,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAmB1F;;;OAGG;IACU,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;CAmB3F"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.js deleted file mode 100644 index b667b03..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.js +++ /dev/null @@ -1,86 +0,0 @@ -import { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from "../../common"; -import { QueryIterator } from "../../queryIterator"; -import { User } from "./User"; -import { UserResponse } from "./UserResponse"; -/** - * Used to create, upsert, query, and read all users. - * - * @see {@link User} to read, replace, or delete a specific User by id. - */ -export class Users { - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database, clientContext) { - this.database = database; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.database.url, ResourceType.user); - const id = getIdFromLink(this.database.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.user, - resourceId: id, - resultFn: (result) => result.Users, - query, - options: innerOptions, - }); - }); - } - /** - * Read all users.- - * @example Read all users to array. - * ```typescript - * const {body: usersList} = await database.users.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a database user with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - async create(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.database.url, ResourceType.user); - const id = getIdFromLink(this.database.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.user, - resourceId: id, - options, - }); - const ref = new User(this.database, response.result.id, this.clientContext); - return new UserResponse(response.result, response.headers, response.code, ref); - } - /** - * Upsert a database user with a specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - async upsert(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.database.url, ResourceType.user); - const id = getIdFromLink(this.database.url); - const response = await this.clientContext.upsert({ - body, - path, - resourceType: ResourceType.user, - resourceId: id, - options, - }); - const ref = new User(this.database, response.result.id, this.clientContext); - return new UserResponse(response.result, response.headers, response.code, ref); - } -} -//# sourceMappingURL=Users.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.js.map deleted file mode 100644 index 1c711ef..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/Users.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Users.js","sourceRoot":"","sources":["../../../../src/client/User/Users.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,OAAO,KAAK;IAChB;;;OAGG;IACH,YAA4B,QAAkB,EAAmB,aAA4B;QAAjE,aAAQ,GAAR,QAAQ,CAAU;QAAmB,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAY1F,KAAK,CAAI,KAAmB,EAAE,OAAqB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CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5E,OAAO,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjF,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,IAAoB,EAAE,OAAwB;QAChE,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,CAAC;SACX;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QACnE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAiB;YAC/D,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,IAAI;YAC/B,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5E,OAAO,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Database } from \"../Database\";\nimport { Resource } from \"../Resource\";\nimport { User } from \"./User\";\nimport { UserDefinition } from \"./UserDefinition\";\nimport { UserResponse } from \"./UserResponse\";\n\n/**\n * Used to create, upsert, query, and read all users.\n *\n * @see {@link User} to read, replace, or delete a specific User by id.\n */\nexport class Users {\n /**\n * @hidden\n * @param database - The parent {@link Database}.\n */\n constructor(public readonly database: Database, private readonly clientContext: ClientContext) {}\n\n /**\n * Query all users.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all users.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.database.url, ResourceType.user);\n const id = getIdFromLink(this.database.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n resultFn: (result) => result.Users,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all users.-\n * @example Read all users to array.\n * ```typescript\n * const {body: usersList} = await database.users.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a database user with the specified {@link UserDefinition}.\n * @param body - The specified {@link UserDefinition}.\n */\n public async create(body: UserDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.database.url, ResourceType.user);\n const id = getIdFromLink(this.database.url);\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n const ref = new User(this.database, response.result.id, this.clientContext);\n return new UserResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Upsert a database user with a specified {@link UserDefinition}.\n * @param body - The specified {@link UserDefinition}.\n */\n public async upsert(body: UserDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.database.url, ResourceType.user);\n const id = getIdFromLink(this.database.url);\n\n const response = await this.clientContext.upsert({\n body,\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n const ref = new User(this.database, response.result.id, this.clientContext);\n return new UserResponse(response.result, response.headers, response.code, ref);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.d.ts deleted file mode 100644 index f7dcce3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { User } from "./User"; -export { Users } from "./Users"; -export { UserDefinition } from "./UserDefinition"; -export { UserResponse } from "./UserResponse"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.d.ts.map deleted file mode 100644 index 4a7623d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/User/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.js deleted file mode 100644 index 4d2e6a6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { User } from "./User"; -export { Users } from "./Users"; -export { UserResponse } from "./UserResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.js.map deleted file mode 100644 index eb84e3b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/User/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/User/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { User } from \"./User\";\nexport { Users } from \"./Users\";\nexport { UserDefinition } from \"./UserDefinition\";\nexport { UserResponse } from \"./UserResponse\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.d.ts deleted file mode 100644 index 6e21011..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { RequestOptions } from "../../request"; -import { Container } from "../Container"; -import { UserDefinedFunctionDefinition } from "./UserDefinedFunctionDefinition"; -import { UserDefinedFunctionResponse } from "./UserDefinedFunctionResponse"; -/** - * Used to read, replace, or delete a specified User Definied Function by id. - * - * @see {@link UserDefinedFunction} to create, upsert, query, read all User Defined Functions. - */ -export declare class UserDefinedFunction { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link UserDefinedFunction}. - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link UserDefinedFunctionDefinition} for the given {@link UserDefinedFunction}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link UserDefinedFunction} with the specified {@link UserDefinedFunctionDefinition}. - * @param options - - */ - replace(body: UserDefinedFunctionDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link UserDefined}. - */ - delete(options?: RequestOptions): Promise; -} -//# sourceMappingURL=UserDefinedFunction.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.d.ts.map deleted file mode 100644 index 0ae0546..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunction.d.ts","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;GAIG;AACH,qBAAa,mBAAmB;aAaZ,SAAS,EAAE,SAAS;aACpB,EAAE,EAAE,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAdhC;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IACD;;;;OAIG;gBAEe,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,EACT,aAAa,EAAE,aAAa;IAG/C;;OAEG;IACU,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAajF;;;OAGG;IACU,OAAO,CAClB,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,2BAA2B,CAAC;IAuBvC;;OAEG;IACU,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAYpF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.js deleted file mode 100644 index 12f3cf8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.js +++ /dev/null @@ -1,77 +0,0 @@ -import { createUserDefinedFunctionUri, getIdFromLink, getPathFromLink, isResourceValid, ResourceType, } from "../../common"; -import { UserDefinedFunctionResponse } from "./UserDefinedFunctionResponse"; -/** - * Used to read, replace, or delete a specified User Definied Function by id. - * - * @see {@link UserDefinedFunction} to create, upsert, query, read all User Defined Functions. - */ -export class UserDefinedFunction { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link UserDefinedFunction}. - */ - constructor(container, id, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createUserDefinedFunctionUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the {@link UserDefinedFunctionDefinition} for the given {@link UserDefinedFunction}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: ResourceType.udf, - resourceId: id, - options, - }); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link UserDefinedFunction} with the specified {@link UserDefinedFunctionDefinition}. - * @param options - - */ - async replace(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: ResourceType.udf, - resourceId: id, - options, - }); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link UserDefined}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: ResourceType.udf, - resourceId: id, - options, - }); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this); - } -} -//# sourceMappingURL=UserDefinedFunction.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.js.map deleted file mode 100644 index 84ec954..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunction.js","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunction.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,EAC5B,aAAa,EACb,eAAe,EACf,eAAe,EACf,YAAY,G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C/B,MAAM,GAAG,CAAC;SACX;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAgC;YAC/E,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,GAAG;YAC9B,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,2BAA2B,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjG,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAAC,OAAwB;QAC1C,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;YAC/C,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,GAAG;YAC9B,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,OAAO,IAAI,2BAA2B,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjG,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createUserDefinedFunctionUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { UserDefinedFunctionDefinition } from \"./UserDefinedFunctionDefinition\";\nimport { UserDefinedFunctionResponse } from \"./UserDefinedFunctionResponse\";\n\n/**\n * Used to read, replace, or delete a specified User Definied Function by id.\n *\n * @see {@link UserDefinedFunction} to create, upsert, query, read all User Defined Functions.\n */\nexport class UserDefinedFunction {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createUserDefinedFunctionUri(this.container.database.id, this.container.id, this.id);\n }\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link UserDefinedFunction}.\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link UserDefinedFunctionDefinition} for the given {@link UserDefinedFunction}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link UserDefinedFunction} with the specified {@link UserDefinedFunctionDefinition}.\n * @param options -\n */\n public async replace(\n body: UserDefinedFunctionDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link UserDefined}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.d.ts deleted file mode 100644 index 64a5cbc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface UserDefinedFunctionDefinition { - /** The id of the {@link UserDefinedFunction} */ - id?: string; - /** The body of the user defined function, it can also be passed as a stringifed function */ - body?: string | (() => void); -} -//# sourceMappingURL=UserDefinedFunctionDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.d.ts.map deleted file mode 100644 index b5ef6b6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctionDefinition.d.ts","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunctionDefinition.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,6BAA6B;IAC5C,gDAAgD;IAChD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;CAC9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.js deleted file mode 100644 index ef2fed9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=UserDefinedFunctionDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.js.map deleted file mode 100644 index 2b649c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctionDefinition.js","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunctionDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface UserDefinedFunctionDefinition {\n /** The id of the {@link UserDefinedFunction} */\n id?: string;\n /** The body of the user defined function, it can also be passed as a stringifed function */\n body?: string | (() => void);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.d.ts deleted file mode 100644 index 01caeef..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CosmosHeaders } from "../../queryExecutionContext"; -import { ResourceResponse } from "../../request"; -import { Resource } from "../Resource"; -import { UserDefinedFunction } from "./UserDefinedFunction"; -import { UserDefinedFunctionDefinition } from "./UserDefinedFunctionDefinition"; -export declare class UserDefinedFunctionResponse extends ResourceResponse { - constructor(resource: UserDefinedFunctionDefinition & Resource, headers: CosmosHeaders, statusCode: number, udf: UserDefinedFunction); - /** A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. */ - readonly userDefinedFunction: UserDefinedFunction; - /** - * Alias for `userDefinedFunction(id)`. - * - * A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. - */ - get udf(): UserDefinedFunction; -} -//# sourceMappingURL=UserDefinedFunctionResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.d.ts.map deleted file mode 100644 index c110f15..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctionResponse.d.ts","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunctionResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,qBAAa,2BAA4B,SAAQ,gBAAgB,CAC/D,6BAA6B,GAAG,QAAQ,CACzC;gBAEG,QAAQ,EAAE,6BAA6B,GAAG,QAAQ,EAClD,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,mBAAmB;IAK1B,0HAA0H;IAC1H,SAAgB,mBAAmB,EAAE,mBAAmB,CAAC;IACzD;;;;OAIG;IACH,IAAW,GAAG,IAAI,mBAAmB,CAEpC;CACF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.js deleted file mode 100644 index a01fd39..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.js +++ /dev/null @@ -1,16 +0,0 @@ -import { ResourceResponse } from "../../request"; -export class UserDefinedFunctionResponse extends ResourceResponse { - constructor(resource, headers, statusCode, udf) { - super(resource, headers, statusCode); - this.userDefinedFunction = udf; - } - /** - * Alias for `userDefinedFunction(id)`. - * - * A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. - */ - get udf() { - return this.userDefinedFunction; - } -} -//# sourceMappingURL=UserDefinedFunctionResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.js.map deleted file mode 100644 index 9df71a9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctionResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctionResponse.js","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunctionResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,OAAO,2BAA4B,SAAQ,gBAEhD;IACC,YACE,QAAkD,EAClD,OAAsB,EACtB,UAAkB,EAClB,GAAwB;QAExB,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,mBAAmB,GAAG,GAAG,CAAC;IACjC,CAAC;IAGD;;;;OAIG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { UserDefinedFunction } from \"./UserDefinedFunction\";\nimport { UserDefinedFunctionDefinition } from \"./UserDefinedFunctionDefinition\";\n\nexport class UserDefinedFunctionResponse extends ResourceResponse<\n UserDefinedFunctionDefinition & Resource\n> {\n constructor(\n resource: UserDefinedFunctionDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n udf: UserDefinedFunction\n ) {\n super(resource, headers, statusCode);\n this.userDefinedFunction = udf;\n }\n /** A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. */\n public readonly userDefinedFunction: UserDefinedFunction;\n /**\n * Alias for `userDefinedFunction(id)`.\n *\n * A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}.\n */\n public get udf(): UserDefinedFunction {\n return this.userDefinedFunction;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.d.ts deleted file mode 100644 index 597c09e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ClientContext } from "../../ClientContext"; -import { SqlQuerySpec } from "../../queryExecutionContext"; -import { QueryIterator } from "../../queryIterator"; -import { FeedOptions, RequestOptions } from "../../request"; -import { Container } from "../Container"; -import { Resource } from "../Resource"; -import { UserDefinedFunctionDefinition } from "./UserDefinedFunctionDefinition"; -import { UserDefinedFunctionResponse } from "./UserDefinedFunctionResponse"; -/** - * Used to create, upsert, query, or read all User Defined Functions. - * - * @see {@link UserDefinedFunction} to read, replace, or delete a given User Defined Function by id. - */ -export declare class UserDefinedFunctions { - readonly container: Container; - private readonly clientContext; - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all User Defined Functions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all User Defined Functions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all User Defined Functions. - * @example Read all User Defined Functions to array. - * ```typescript - * const {body: udfList} = await container.userDefinedFunctions.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a UserDefinedFunction. - * - * Azure Cosmos DB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers. - * - * For additional details, refer to the server-side JavaScript API documentation. - * - */ - create(body: UserDefinedFunctionDefinition, options?: RequestOptions): Promise; -} -//# sourceMappingURL=UserDefinedFunctions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.d.ts.map deleted file mode 100644 index 78ed600..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctions.d.ts","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunctions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;GAIG;AACH,qBAAa,oBAAoB;aAMb,SAAS,EAAE,SAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC;;;OAGG;gBAEe,SAAS,EAAE,SAAS,EACnB,aAAa,EAAE,aAAa;IAG/C;;;OAGG;IACI,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC;IAC5E;;;OAGG;IACI,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAiB7E;;;;;;OAMG;IACI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,6BAA6B,GAAG,QAAQ,CAAC;IAI9F;;;;;;;OAOG;IACU,MAAM,CACjB,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,2BAA2B,CAAC;CAuBxC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.js deleted file mode 100644 index 3540143..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.js +++ /dev/null @@ -1,72 +0,0 @@ -import { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from "../../common"; -import { QueryIterator } from "../../queryIterator"; -import { UserDefinedFunction } from "./UserDefinedFunction"; -import { UserDefinedFunctionResponse } from "./UserDefinedFunctionResponse"; -/** - * Used to create, upsert, query, or read all User Defined Functions. - * - * @see {@link UserDefinedFunction} to read, replace, or delete a given User Defined Function by id. - */ -export class UserDefinedFunctions { - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, ResourceType.udf); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.udf, - resourceId: id, - resultFn: (result) => result.UserDefinedFunctions, - query, - options: innerOptions, - }); - }); - } - /** - * Read all User Defined Functions. - * @example Read all User Defined Functions to array. - * ```typescript - * const {body: udfList} = await container.userDefinedFunctions.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a UserDefinedFunction. - * - * Azure Cosmos DB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers. - * - * For additional details, refer to the server-side JavaScript API documentation. - * - */ - async create(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, ResourceType.udf); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: ResourceType.udf, - resourceId: id, - options, - }); - const ref = new UserDefinedFunction(this.container, response.result.id, this.clientContext); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, ref); - } -} -//# sourceMappingURL=UserDefinedFunctions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.js.map deleted file mode 100644 index 3a3e64a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/UserDefinedFunctions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctions.js","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/UserDefinedFunctions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;;OAGG;IACH,YACkB,SAAoB,EACnB,aAA4B;QAD7B,cAAS,GAAT,SAAS,CAAW;QACnB,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAYG,KAAK,CAAI,KAAmB,EAAE,OAAqB;QACxD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;QACnE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE7C,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;gBAClC,IAAI;gBACJ,YAAY,EAAE,YAAY,CAAC,GAAG;gBAC9B,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,oBAAoB;gBACjD,KAAK;gBACL,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAC,OAAqB;QAClC,OAAO,IAAI,CAAC,KAAK,CAA2C,SAAS,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,MAAM,CACjB,IAAmC,EACnC,OAAwB;QAExB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClC;QAED,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,CAAC;SACX;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;QACnE,MAAM,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE7C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAgC;YAC9E,IAAI;YACJ,IAAI;YACJ,YAAY,EAAE,YAAY,CAAC,GAAG;YAC9B,UAAU,EAAE,EAAE;YACd,OAAO;SACR,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5F,OAAO,IAAI,2BAA2B,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAChG,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { UserDefinedFunction } from \"./UserDefinedFunction\";\nimport { UserDefinedFunctionDefinition } from \"./UserDefinedFunctionDefinition\";\nimport { UserDefinedFunctionResponse } from \"./UserDefinedFunctionResponse\";\n\n/**\n * Used to create, upsert, query, or read all User Defined Functions.\n *\n * @see {@link UserDefinedFunction} to read, replace, or delete a given User Defined Function by id.\n */\nexport class UserDefinedFunctions {\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all User Defined Functions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all User Defined Functions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.udf);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n resultFn: (result) => result.UserDefinedFunctions,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all User Defined Functions.\n * @example Read all User Defined Functions to array.\n * ```typescript\n * const {body: udfList} = await container.userDefinedFunctions.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a UserDefinedFunction.\n *\n * Azure Cosmos DB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers.\n *\n * For additional details, refer to the server-side JavaScript API documentation.\n *\n */\n public async create(\n body: UserDefinedFunctionDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.udf);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n const ref = new UserDefinedFunction(this.container, response.result.id, this.clientContext);\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, ref);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.d.ts deleted file mode 100644 index b7af3eb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { UserDefinedFunction } from "./UserDefinedFunction"; -export { UserDefinedFunctions } from "./UserDefinedFunctions"; -export { UserDefinedFunctionDefinition } from "./UserDefinedFunctionDefinition"; -export { UserDefinedFunctionResponse } from "./UserDefinedFunctionResponse"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.d.ts.map deleted file mode 100644 index 5b49114..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.js deleted file mode 100644 index dc9b790..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { UserDefinedFunction } from "./UserDefinedFunction"; -export { UserDefinedFunctions } from "./UserDefinedFunctions"; -export { UserDefinedFunctionResponse } from "./UserDefinedFunctionResponse"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.js.map deleted file mode 100644 index ff5a6af..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/UserDefinedFunction/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/UserDefinedFunction/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { UserDefinedFunction } from \"./UserDefinedFunction\";\nexport { UserDefinedFunctions } from \"./UserDefinedFunctions\";\nexport { UserDefinedFunctionDefinition } from \"./UserDefinedFunctionDefinition\";\nexport { UserDefinedFunctionResponse } from \"./UserDefinedFunctionResponse\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.d.ts deleted file mode 100644 index 5200cf6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export * from "./Conflict"; -export * from "./Container"; -export * from "./Database"; -export * from "./Item"; -export * from "./Offer"; -export * from "./Permission"; -export * from "./StoredProcedure"; -export * from "./Trigger"; -export * from "./User"; -export * from "./UserDefinedFunction"; -export * from "./Resource"; -export * from "./SasToken/SasTokenProperties"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.d.ts.map deleted file mode 100644 index 4ed20c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.js deleted file mode 100644 index 8f30d9a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export * from "./Conflict"; -export * from "./Container"; -export * from "./Database"; -export * from "./Item"; -export * from "./Offer"; -export * from "./Permission"; -export * from "./StoredProcedure"; -export * from "./Trigger"; -export * from "./User"; -export * from "./UserDefinedFunction"; -export * from "./Resource"; -export * from "./SasToken/SasTokenProperties"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.js.map deleted file mode 100644 index 47153cf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/client/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./Conflict\";\nexport * from \"./Container\";\nexport * from \"./Database\";\nexport * from \"./Item\";\nexport * from \"./Offer\";\nexport * from \"./Permission\";\nexport * from \"./StoredProcedure\";\nexport * from \"./Trigger\";\nexport * from \"./User\";\nexport * from \"./UserDefinedFunction\";\nexport * from \"./Resource\";\nexport * from \"./SasToken/SasTokenProperties\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.d.ts deleted file mode 100644 index 8576f83..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.d.ts +++ /dev/null @@ -1,350 +0,0 @@ -export interface PartitionKeyRangePropertiesNames { - MinInclusive: "minInclusive"; - MaxExclusive: "maxExclusive"; - Id: "id"; -} -/** - * @hidden - */ -export declare const Constants: { - HttpHeaders: { - Authorization: string; - ETag: string; - MethodOverride: string; - Slug: string; - ContentType: string; - LastModified: string; - ContentEncoding: string; - CharacterSet: string; - UserAgent: string; - IfModifiedSince: string; - IfMatch: string; - IfNoneMatch: string; - ContentLength: string; - AcceptEncoding: string; - KeepAlive: string; - CacheControl: string; - TransferEncoding: string; - ContentLanguage: string; - ContentLocation: string; - ContentMd5: string; - ContentRange: string; - Accept: string; - AcceptCharset: string; - AcceptLanguage: string; - IfRange: string; - IfUnmodifiedSince: string; - MaxForwards: string; - ProxyAuthorization: string; - AcceptRanges: string; - ProxyAuthenticate: string; - RetryAfter: string; - SetCookie: string; - WwwAuthenticate: string; - Origin: string; - Host: string; - AccessControlAllowOrigin: string; - AccessControlAllowHeaders: string; - KeyValueEncodingFormat: string; - WrapAssertionFormat: string; - WrapAssertion: string; - WrapScope: string; - SimpleToken: string; - HttpDate: string; - Prefer: string; - Location: string; - Referer: string; - A_IM: string; - Query: string; - IsQuery: string; - IsQueryPlan: string; - SupportedQueryFeatures: string; - QueryVersion: string; - Continuation: string; - PageSize: string; - ItemCount: string; - ActivityId: string; - PreTriggerInclude: string; - PreTriggerExclude: string; - PostTriggerInclude: string; - PostTriggerExclude: string; - IndexingDirective: string; - SessionToken: string; - ConsistencyLevel: string; - XDate: string; - CollectionPartitionInfo: string; - CollectionServiceInfo: string; - RetryAfterInMilliseconds: string; - RetryAfterInMs: string; - IsFeedUnfiltered: string; - ResourceTokenExpiry: string; - EnableScanInQuery: string; - EmitVerboseTracesInQuery: string; - EnableCrossPartitionQuery: string; - ParallelizeCrossPartitionQuery: string; - ResponseContinuationTokenLimitInKB: string; - PopulateQueryMetrics: string; - QueryMetrics: string; - Version: string; - OwnerFullName: string; - OwnerId: string; - PartitionKey: string; - PartitionKeyRangeID: string; - MaxEntityCount: string; - CurrentEntityCount: string; - CollectionQuotaInMb: string; - CollectionCurrentUsageInMb: string; - MaxMediaStorageUsageInMB: string; - CurrentMediaStorageUsageInMB: string; - RequestCharge: string; - PopulateQuotaInfo: string; - MaxResourceQuota: string; - OfferType: string; - OfferThroughput: string; - AutoscaleSettings: string; - DisableRUPerMinuteUsage: string; - IsRUPerMinuteUsed: string; - OfferIsRUPerMinuteThroughputEnabled: string; - IndexTransformationProgress: string; - LazyIndexingProgress: string; - IsUpsert: string; - SubStatus: string; - EnableScriptLogging: string; - ScriptLogResults: string; - ALLOW_MULTIPLE_WRITES: string; - IsBatchRequest: string; - IsBatchAtomic: string; - BatchContinueOnError: string; - DedicatedGatewayPerRequestCacheStaleness: string; - ForceRefresh: string; - }; - WritableLocations: string; - ReadableLocations: string; - LocationUnavailableExpirationTimeInMs: number; - ENABLE_MULTIPLE_WRITABLE_LOCATIONS: string; - DefaultUnavailableLocationExpirationTimeMS: number; - ThrottleRetryCount: string; - ThrottleRetryWaitTimeInMs: string; - CurrentVersion: string; - AzureNamespace: string; - AzurePackageName: string; - SDKName: string; - SDKVersion: string; - DefaultMaxBulkRequestBodySizeInBytes: number; - Quota: { - CollectionSize: string; - }; - Path: { - Root: string; - DatabasesPathSegment: string; - CollectionsPathSegment: string; - UsersPathSegment: string; - DocumentsPathSegment: string; - PermissionsPathSegment: string; - StoredProceduresPathSegment: string; - TriggersPathSegment: string; - UserDefinedFunctionsPathSegment: string; - ConflictsPathSegment: string; - AttachmentsPathSegment: string; - PartitionKeyRangesPathSegment: string; - SchemasPathSegment: string; - OffersPathSegment: string; - TopologyPathSegment: string; - DatabaseAccountPathSegment: string; - }; - PartitionKeyRange: PartitionKeyRangePropertiesNames; - QueryRangeConstants: { - MinInclusive: string; - MaxExclusive: string; - min: string; - }; - /** - * @deprecated Use EffectivePartitionKeyConstants instead - */ - EffectiveParitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: string; - MaximumExclusiveEffectivePartitionKey: string; - }; - EffectivePartitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: string; - MaximumExclusiveEffectivePartitionKey: string; - }; -}; -/** - * @hidden - */ -export declare enum ResourceType { - none = "", - database = "dbs", - offer = "offers", - user = "users", - permission = "permissions", - container = "colls", - conflicts = "conflicts", - sproc = "sprocs", - udf = "udfs", - trigger = "triggers", - item = "docs", - pkranges = "pkranges", - partitionkey = "partitionKey" -} -/** - * @hidden - */ -export declare enum HTTPMethod { - get = "GET", - patch = "PATCH", - post = "POST", - put = "PUT", - delete = "DELETE" -} -/** - * @hidden - */ -export declare enum OperationType { - Create = "create", - Replace = "replace", - Upsert = "upsert", - Delete = "delete", - Read = "read", - Query = "query", - Execute = "execute", - Batch = "batch", - Patch = "patch" -} -/** - * @hidden - */ -export declare enum CosmosKeyType { - PrimaryMaster = "PRIMARY_MASTER", - SecondaryMaster = "SECONDARY_MASTER", - PrimaryReadOnly = "PRIMARY_READONLY", - SecondaryReadOnly = "SECONDARY_READONLY" -} -/** - * @hidden - */ -export declare enum CosmosContainerChildResourceKind { - Item = "ITEM", - StoredProcedure = "STORED_PROCEDURE", - UserDefinedFunction = "USER_DEFINED_FUNCTION", - Trigger = "TRIGGER" -} -/** - * @hidden - */ -export declare enum PermissionScopeValues { - /** - * Values which set permission Scope applicable to control plane related operations. - */ - ScopeAccountReadValue = 1, - ScopeAccountListDatabasesValue = 2, - ScopeDatabaseReadValue = 4, - ScopeDatabaseReadOfferValue = 8, - ScopeDatabaseListContainerValue = 16, - ScopeContainerReadValue = 32, - ScopeContainerReadOfferValue = 64, - ScopeAccountCreateDatabasesValue = 1, - ScopeAccountDeleteDatabasesValue = 2, - ScopeDatabaseDeleteValue = 4, - ScopeDatabaseReplaceOfferValue = 8, - ScopeDatabaseCreateContainerValue = 16, - ScopeDatabaseDeleteContainerValue = 32, - ScopeContainerReplaceValue = 64, - ScopeContainerDeleteValue = 128, - ScopeContainerReplaceOfferValue = 256, - ScopeAccountReadAllAccessValue = 65535, - ScopeDatabaseReadAllAccessValue = 124, - ScopeContainersReadAllAccessValue = 96, - ScopeAccountWriteAllAccessValue = 65535, - ScopeDatabaseWriteAllAccessValue = 508, - ScopeContainersWriteAllAccessValue = 448, - /** - * Values which set permission Scope applicable to data plane related operations. - */ - ScopeContainerExecuteQueriesValue = 1, - ScopeContainerReadFeedsValue = 2, - ScopeContainerReadStoredProceduresValue = 4, - ScopeContainerReadUserDefinedFunctionsValue = 8, - ScopeContainerReadTriggersValue = 16, - ScopeContainerReadConflictsValue = 32, - ScopeItemReadValue = 64, - ScopeStoredProcedureReadValue = 128, - ScopeUserDefinedFunctionReadValue = 256, - ScopeTriggerReadValue = 512, - ScopeContainerCreateItemsValue = 1, - ScopeContainerReplaceItemsValue = 2, - ScopeContainerUpsertItemsValue = 4, - ScopeContainerDeleteItemsValue = 8, - ScopeContainerCreateStoredProceduresValue = 16, - ScopeContainerReplaceStoredProceduresValue = 32, - ScopeContainerDeleteStoredProceduresValue = 64, - ScopeContainerExecuteStoredProceduresValue = 128, - ScopeContainerCreateTriggersValue = 256, - ScopeContainerReplaceTriggersValue = 512, - ScopeContainerDeleteTriggersValue = 1024, - ScopeContainerCreateUserDefinedFunctionsValue = 2048, - ScopeContainerReplaceUserDefinedFunctionsValue = 4096, - ScopeContainerDeleteUserDefinedFunctionSValue = 8192, - ScopeContainerDeleteCONFLICTSValue = 16384, - ScopeItemReplaceValue = 65536, - ScopeItemUpsertValue = 131072, - ScopeItemDeleteValue = 262144, - ScopeStoredProcedureReplaceValue = 1048576, - ScopeStoredProcedureDeleteValue = 2097152, - ScopeStoredProcedureExecuteValue = 4194304, - ScopeUserDefinedFunctionReplaceValue = 8388608, - ScopeUserDefinedFunctionDeleteValue = 16777216, - ScopeTriggerReplaceValue = 33554432, - ScopeTriggerDeleteValue = 67108864, - ScopeContainerReadAllAccessValue = 4294967295, - ScopeItemReadAllAccessValue = 65, - ScopeContainerWriteAllAccessValue = 4294967295, - ScopeItemWriteAllAccessValue = 458767, - NoneValue = 0 -} -/** - * @hidden - */ -export declare enum SasTokenPermissionKind { - ContainerCreateItems = 1, - ContainerReplaceItems = 2, - ContainerUpsertItems = 4, - ContainerDeleteItems = 128, - ContainerExecuteQueries = 1, - ContainerReadFeeds = 2, - ContainerCreateStoreProcedure = 16, - ContainerReadStoreProcedure = 4, - ContainerReplaceStoreProcedure = 32, - ContainerDeleteStoreProcedure = 64, - ContainerCreateTriggers = 256, - ContainerReadTriggers = 16, - ContainerReplaceTriggers = 512, - ContainerDeleteTriggers = 1024, - ContainerCreateUserDefinedFunctions = 2048, - ContainerReadUserDefinedFunctions = 8, - ContainerReplaceUserDefinedFunctions = 4096, - ContainerDeleteUserDefinedFunctions = 8192, - ContainerExecuteStoredProcedure = 128, - ContainerReadConflicts = 32, - ContainerDeleteConflicts = 16384, - ContainerReadAny = 64, - ContainerFullAccess = 4294967295, - ItemReadAny = 65536, - ItemFullAccess = 65, - ItemRead = 64, - ItemReplace = 65536, - ItemUpsert = 131072, - ItemDelete = 262144, - StoreProcedureRead = 128, - StoreProcedureReplace = 1048576, - StoreProcedureDelete = 2097152, - StoreProcedureExecute = 4194304, - UserDefinedFuntionRead = 256, - UserDefinedFuntionReplace = 8388608, - UserDefinedFuntionDelete = 16777216, - TriggerRead = 512, - TriggerReplace = 33554432, - TriggerDelete = 67108864 -} -//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.d.ts.map deleted file mode 100644 index b6607d7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/constants.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gCAAgC;IAE/C,YAAY,EAAE,cAAc,CAAC;IAC7B,YAAY,EAAE,cAAc,CAAC;IAC7B,EAAE,EAAE,IAAI,CA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AI;CACd;AACD;;GAEG;AACH,oBAAY,sBAAsB;IAChC,oBAAoB,IAAuD;IAC3E,qBAAqB,IAAwD;IAC7E,oBAAoB,IAAuD;IAC3E,oBAAoB,MAAkD;IACtE,uBAAuB,IAA0D;IACjF,kBAAkB,IAAqD;IACvE,6BAA6B,KAAkE;IAC/F,2BAA2B,IAAgE;IAC3F,8BAA8B,KAAmE;IACjG,6BAA6B,KAAkE;IAC/F,uBAAuB,MAA0D;IACjF,qBAAqB,KAAwD;IAC7E,wBAAwB,MAA2D;IACnF,uBAAuB,OAA0D;IACjF,mCAAmC,OAAsE;IACzG,iCAAiC,IAAoE;IACrG,oCAAoC,OAAuE;IAC3G,mCAAmC,OAAsE;IACzG,+BAA+B,MAAmE;IAClG,sBAAsB,KAAyD;IAC/E,wBAAwB,QAA2D;IACnF,gBAAgB,KAAqD;IACrE,mBAAmB,aAAyD;IAC5E,WAAW,QAA8C;IACzD,cAAc,KAAoD;IAClE,QAAQ,KAA2C;IACnD,WAAW,QAA8C;IACzD,UAAU,SAA6C;IACvD,UAAU,SAA6C;IACvD,kBAAkB,MAAsD;IACxE,qBAAqB,UAAyD;IAC9E,oBAAoB,UAAwD;IAC5E,qBAAqB,UAAyD;IAC9E,sBAAsB,MAA0D;IAChF,yBAAyB,UAA6D;IACtF,wBAAwB,WAA4D;IACpF,WAAW,MAA8C;IACzD,cAAc,WAAiD;IAC/D,aAAa,WAAgD;CAC9D"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.js deleted file mode 100644 index 6727d6c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.js +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * @hidden - */ -export const Constants = { - HttpHeaders: { - Authorization: "authorization", - ETag: "etag", - MethodOverride: "X-HTTP-Method", - Slug: "Slug", - ContentType: "Content-Type", - LastModified: "Last-Modified", - ContentEncoding: "Content-Encoding", - CharacterSet: "CharacterSet", - UserAgent: "User-Agent", - IfModifiedSince: "If-Modified-Since", - IfMatch: "If-Match", - IfNoneMatch: "If-None-Match", - ContentLength: "Content-Length", - AcceptEncoding: "Accept-Encoding", - KeepAlive: "Keep-Alive", - CacheControl: "Cache-Control", - TransferEncoding: "Transfer-Encoding", - ContentLanguage: "Content-Language", - ContentLocation: "Content-Location", - ContentMd5: "Content-Md5", - ContentRange: "Content-Range", - Accept: "Accept", - AcceptCharset: "Accept-Charset", - AcceptLanguage: "Accept-Language", - IfRange: "If-Range", - IfUnmodifiedSince: "If-Unmodified-Since", - MaxForwards: "Max-Forwards", - ProxyAuthorization: "Proxy-Authorization", - AcceptRanges: "Accept-Ranges", - ProxyAuthenticate: "Proxy-Authenticate", - RetryAfter: "Retry-After", - SetCookie: "Set-Cookie", - WwwAuthenticate: "Www-Authenticate", - Origin: "Origin", - Host: "Host", - AccessControlAllowOrigin: "Access-Control-Allow-Origin", - AccessControlAllowHeaders: "Access-Control-Allow-Headers", - KeyValueEncodingFormat: "application/x-www-form-urlencoded", - WrapAssertionFormat: "wrap_assertion_format", - WrapAssertion: "wrap_assertion", - WrapScope: "wrap_scope", - SimpleToken: "SWT", - HttpDate: "date", - Prefer: "Prefer", - Location: "Location", - Referer: "referer", - A_IM: "A-IM", - // Query - Query: "x-ms-documentdb-query", - IsQuery: "x-ms-documentdb-isquery", - IsQueryPlan: "x-ms-cosmos-is-query-plan-request", - SupportedQueryFeatures: "x-ms-cosmos-supported-query-features", - QueryVersion: "x-ms-cosmos-query-version", - // Our custom Azure Cosmos DB headers - Continuation: "x-ms-continuation", - PageSize: "x-ms-max-item-count", - ItemCount: "x-ms-item-count", - // Request sender generated. Simply echoed by backend. - ActivityId: "x-ms-activity-id", - PreTriggerInclude: "x-ms-documentdb-pre-trigger-include", - PreTriggerExclude: "x-ms-documentdb-pre-trigger-exclude", - PostTriggerInclude: "x-ms-documentdb-post-trigger-include", - PostTriggerExclude: "x-ms-documentdb-post-trigger-exclude", - IndexingDirective: "x-ms-indexing-directive", - SessionToken: "x-ms-session-token", - ConsistencyLevel: "x-ms-consistency-level", - XDate: "x-ms-date", - CollectionPartitionInfo: "x-ms-collection-partition-info", - CollectionServiceInfo: "x-ms-collection-service-info", - // Deprecated, use RetryAfterInMs instead. - RetryAfterInMilliseconds: "x-ms-retry-after-ms", - RetryAfterInMs: "x-ms-retry-after-ms", - IsFeedUnfiltered: "x-ms-is-feed-unfiltered", - ResourceTokenExpiry: "x-ms-documentdb-expiry-seconds", - EnableScanInQuery: "x-ms-documentdb-query-enable-scan", - EmitVerboseTracesInQuery: "x-ms-documentdb-query-emit-traces", - EnableCrossPartitionQuery: "x-ms-documentdb-query-enablecrosspartition", - ParallelizeCrossPartitionQuery: "x-ms-documentdb-query-parallelizecrosspartitionquery", - ResponseContinuationTokenLimitInKB: "x-ms-documentdb-responsecontinuationtokenlimitinkb", - // QueryMetrics - // Request header to tell backend to give you query metrics. - PopulateQueryMetrics: "x-ms-documentdb-populatequerymetrics", - // Response header that holds the serialized version of query metrics. - QueryMetrics: "x-ms-documentdb-query-metrics", - // Version headers and values - Version: "x-ms-version", - // Owner name - OwnerFullName: "x-ms-alt-content-path", - // Owner ID used for name based request in session token. - OwnerId: "x-ms-content-path", - // Partition Key - PartitionKey: "x-ms-documentdb-partitionkey", - PartitionKeyRangeID: "x-ms-documentdb-partitionkeyrangeid", - // Quota Info - MaxEntityCount: "x-ms-root-entity-max-count", - CurrentEntityCount: "x-ms-root-entity-current-count", - CollectionQuotaInMb: "x-ms-collection-quota-mb", - CollectionCurrentUsageInMb: "x-ms-collection-usage-mb", - MaxMediaStorageUsageInMB: "x-ms-max-media-storage-usage-mb", - CurrentMediaStorageUsageInMB: "x-ms-media-storage-usage-mb", - RequestCharge: "x-ms-request-charge", - PopulateQuotaInfo: "x-ms-documentdb-populatequotainfo", - MaxResourceQuota: "x-ms-resource-quota", - // Offer header - OfferType: "x-ms-offer-type", - OfferThroughput: "x-ms-offer-throughput", - AutoscaleSettings: "x-ms-cosmos-offer-autopilot-settings", - // Custom RUs/minute headers - DisableRUPerMinuteUsage: "x-ms-documentdb-disable-ru-per-minute-usage", - IsRUPerMinuteUsed: "x-ms-documentdb-is-ru-per-minute-used", - OfferIsRUPerMinuteThroughputEnabled: "x-ms-offer-is-ru-per-minute-throughput-enabled", - // Index progress headers - IndexTransformationProgress: "x-ms-documentdb-collection-index-transformation-progress", - LazyIndexingProgress: "x-ms-documentdb-collection-lazy-indexing-progress", - // Upsert header - IsUpsert: "x-ms-documentdb-is-upsert", - // Sub status of the error - SubStatus: "x-ms-substatus", - // StoredProcedure related headers - EnableScriptLogging: "x-ms-documentdb-script-enable-logging", - ScriptLogResults: "x-ms-documentdb-script-log-results", - // Multi-Region Write - ALLOW_MULTIPLE_WRITES: "x-ms-cosmos-allow-tentative-writes", - // Bulk/Batch header - IsBatchRequest: "x-ms-cosmos-is-batch-request", - IsBatchAtomic: "x-ms-cosmos-batch-atomic", - BatchContinueOnError: "x-ms-cosmos-batch-continue-on-error", - // Dedicated Gateway Headers - DedicatedGatewayPerRequestCacheStaleness: "x-ms-dedicatedgateway-max-age", - // Cache Refresh header - ForceRefresh: "x-ms-force-refresh", - }, - // GlobalDB related constants - WritableLocations: "writableLocations", - ReadableLocations: "readableLocations", - LocationUnavailableExpirationTimeInMs: 5 * 60 * 1000, - // ServiceDocument Resource - ENABLE_MULTIPLE_WRITABLE_LOCATIONS: "enableMultipleWriteLocations", - // Background refresh time - DefaultUnavailableLocationExpirationTimeMS: 5 * 60 * 1000, - // Client generated retry count response header - ThrottleRetryCount: "x-ms-throttle-retry-count", - ThrottleRetryWaitTimeInMs: "x-ms-throttle-retry-wait-time-ms", - // Platform - CurrentVersion: "2020-07-15", - AzureNamespace: "Azure.Cosmos", - AzurePackageName: "@azure/cosmos", - SDKName: "azure-cosmos-js", - SDKVersion: "3.17.3", - // Bulk Operations - DefaultMaxBulkRequestBodySizeInBytes: 220201, - Quota: { - CollectionSize: "collectionSize", - }, - Path: { - Root: "/", - DatabasesPathSegment: "dbs", - CollectionsPathSegment: "colls", - UsersPathSegment: "users", - DocumentsPathSegment: "docs", - PermissionsPathSegment: "permissions", - StoredProceduresPathSegment: "sprocs", - TriggersPathSegment: "triggers", - UserDefinedFunctionsPathSegment: "udfs", - ConflictsPathSegment: "conflicts", - AttachmentsPathSegment: "attachments", - PartitionKeyRangesPathSegment: "pkranges", - SchemasPathSegment: "schemas", - OffersPathSegment: "offers", - TopologyPathSegment: "topology", - DatabaseAccountPathSegment: "databaseaccount", - }, - PartitionKeyRange: { - // Partition Key Range Constants - MinInclusive: "minInclusive", - MaxExclusive: "maxExclusive", - Id: "id", - }, - QueryRangeConstants: { - // Partition Key Range Constants - MinInclusive: "minInclusive", - MaxExclusive: "maxExclusive", - min: "min", - }, - /** - * @deprecated Use EffectivePartitionKeyConstants instead - */ - EffectiveParitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: "", - MaximumExclusiveEffectivePartitionKey: "FF", - }, - EffectivePartitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: "", - MaximumExclusiveEffectivePartitionKey: "FF", - }, -}; -/** - * @hidden - */ -export var ResourceType; -(function (ResourceType) { - ResourceType["none"] = ""; - ResourceType["database"] = "dbs"; - ResourceType["offer"] = "offers"; - ResourceType["user"] = "users"; - ResourceType["permission"] = "permissions"; - ResourceType["container"] = "colls"; - ResourceType["conflicts"] = "conflicts"; - ResourceType["sproc"] = "sprocs"; - ResourceType["udf"] = "udfs"; - ResourceType["trigger"] = "triggers"; - ResourceType["item"] = "docs"; - ResourceType["pkranges"] = "pkranges"; - ResourceType["partitionkey"] = "partitionKey"; -})(ResourceType || (ResourceType = {})); -/** - * @hidden - */ -export var HTTPMethod; -(function (HTTPMethod) { - HTTPMethod["get"] = "GET"; - HTTPMethod["patch"] = "PATCH"; - HTTPMethod["post"] = "POST"; - HTTPMethod["put"] = "PUT"; - HTTPMethod["delete"] = "DELETE"; -})(HTTPMethod || (HTTPMethod = {})); -/** - * @hidden - */ -export var OperationType; -(function (OperationType) { - OperationType["Create"] = "create"; - OperationType["Replace"] = "replace"; - OperationType["Upsert"] = "upsert"; - OperationType["Delete"] = "delete"; - OperationType["Read"] = "read"; - OperationType["Query"] = "query"; - OperationType["Execute"] = "execute"; - OperationType["Batch"] = "batch"; - OperationType["Patch"] = "patch"; -})(OperationType || (OperationType = {})); -/** - * @hidden - */ -export var CosmosKeyType; -(function (CosmosKeyType) { - CosmosKeyType["PrimaryMaster"] = "PRIMARY_MASTER"; - CosmosKeyType["SecondaryMaster"] = "SECONDARY_MASTER"; - CosmosKeyType["PrimaryReadOnly"] = "PRIMARY_READONLY"; - CosmosKeyType["SecondaryReadOnly"] = "SECONDARY_READONLY"; -})(CosmosKeyType || (CosmosKeyType = {})); -/** - * @hidden - */ -export var CosmosContainerChildResourceKind; -(function (CosmosContainerChildResourceKind) { - CosmosContainerChildResourceKind["Item"] = "ITEM"; - CosmosContainerChildResourceKind["StoredProcedure"] = "STORED_PROCEDURE"; - CosmosContainerChildResourceKind["UserDefinedFunction"] = "USER_DEFINED_FUNCTION"; - CosmosContainerChildResourceKind["Trigger"] = "TRIGGER"; -})(CosmosContainerChildResourceKind || (CosmosContainerChildResourceKind = {})); -/** - * @hidden - */ -export var PermissionScopeValues; -(function (PermissionScopeValues) { - /** - * Values which set permission Scope applicable to control plane related operations. - */ - PermissionScopeValues[PermissionScopeValues["ScopeAccountReadValue"] = 1] = "ScopeAccountReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountListDatabasesValue"] = 2] = "ScopeAccountListDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadValue"] = 4] = "ScopeDatabaseReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadOfferValue"] = 8] = "ScopeDatabaseReadOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseListContainerValue"] = 16] = "ScopeDatabaseListContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadValue"] = 32] = "ScopeContainerReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadOfferValue"] = 64] = "ScopeContainerReadOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountCreateDatabasesValue"] = 1] = "ScopeAccountCreateDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountDeleteDatabasesValue"] = 2] = "ScopeAccountDeleteDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseDeleteValue"] = 4] = "ScopeDatabaseDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReplaceOfferValue"] = 8] = "ScopeDatabaseReplaceOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseCreateContainerValue"] = 16] = "ScopeDatabaseCreateContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseDeleteContainerValue"] = 32] = "ScopeDatabaseDeleteContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceValue"] = 64] = "ScopeContainerReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteValue"] = 128] = "ScopeContainerDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceOfferValue"] = 256] = "ScopeContainerReplaceOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountReadAllAccessValue"] = 65535] = "ScopeAccountReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadAllAccessValue"] = 124] = "ScopeDatabaseReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainersReadAllAccessValue"] = 96] = "ScopeContainersReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountWriteAllAccessValue"] = 65535] = "ScopeAccountWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseWriteAllAccessValue"] = 508] = "ScopeDatabaseWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainersWriteAllAccessValue"] = 448] = "ScopeContainersWriteAllAccessValue"; - /** - * Values which set permission Scope applicable to data plane related operations. - */ - PermissionScopeValues[PermissionScopeValues["ScopeContainerExecuteQueriesValue"] = 1] = "ScopeContainerExecuteQueriesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadFeedsValue"] = 2] = "ScopeContainerReadFeedsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadStoredProceduresValue"] = 4] = "ScopeContainerReadStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadUserDefinedFunctionsValue"] = 8] = "ScopeContainerReadUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadTriggersValue"] = 16] = "ScopeContainerReadTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadConflictsValue"] = 32] = "ScopeContainerReadConflictsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReadValue"] = 64] = "ScopeItemReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureReadValue"] = 128] = "ScopeStoredProcedureReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionReadValue"] = 256] = "ScopeUserDefinedFunctionReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerReadValue"] = 512] = "ScopeTriggerReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateItemsValue"] = 1] = "ScopeContainerCreateItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceItemsValue"] = 2] = "ScopeContainerReplaceItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerUpsertItemsValue"] = 4] = "ScopeContainerUpsertItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteItemsValue"] = 8] = "ScopeContainerDeleteItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateStoredProceduresValue"] = 16] = "ScopeContainerCreateStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceStoredProceduresValue"] = 32] = "ScopeContainerReplaceStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteStoredProceduresValue"] = 64] = "ScopeContainerDeleteStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerExecuteStoredProceduresValue"] = 128] = "ScopeContainerExecuteStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateTriggersValue"] = 256] = "ScopeContainerCreateTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceTriggersValue"] = 512] = "ScopeContainerReplaceTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteTriggersValue"] = 1024] = "ScopeContainerDeleteTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateUserDefinedFunctionsValue"] = 2048] = "ScopeContainerCreateUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceUserDefinedFunctionsValue"] = 4096] = "ScopeContainerReplaceUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteUserDefinedFunctionSValue"] = 8192] = "ScopeContainerDeleteUserDefinedFunctionSValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteCONFLICTSValue"] = 16384] = "ScopeContainerDeleteCONFLICTSValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReplaceValue"] = 65536] = "ScopeItemReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemUpsertValue"] = 131072] = "ScopeItemUpsertValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemDeleteValue"] = 262144] = "ScopeItemDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureReplaceValue"] = 1048576] = "ScopeStoredProcedureReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureDeleteValue"] = 2097152] = "ScopeStoredProcedureDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureExecuteValue"] = 4194304] = "ScopeStoredProcedureExecuteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionReplaceValue"] = 8388608] = "ScopeUserDefinedFunctionReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionDeleteValue"] = 16777216] = "ScopeUserDefinedFunctionDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerReplaceValue"] = 33554432] = "ScopeTriggerReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerDeleteValue"] = 67108864] = "ScopeTriggerDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadAllAccessValue"] = 4294967295] = "ScopeContainerReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReadAllAccessValue"] = 65] = "ScopeItemReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerWriteAllAccessValue"] = 4294967295] = "ScopeContainerWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemWriteAllAccessValue"] = 458767] = "ScopeItemWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["NoneValue"] = 0] = "NoneValue"; -})(PermissionScopeValues || (PermissionScopeValues = {})); -/** - * @hidden - */ -export var SasTokenPermissionKind; -(function (SasTokenPermissionKind) { - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateItems"] = 1] = "ContainerCreateItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceItems"] = 2] = "ContainerReplaceItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerUpsertItems"] = 4] = "ContainerUpsertItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteItems"] = 128] = "ContainerDeleteItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerExecuteQueries"] = 1] = "ContainerExecuteQueries"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadFeeds"] = 2] = "ContainerReadFeeds"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateStoreProcedure"] = 16] = "ContainerCreateStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadStoreProcedure"] = 4] = "ContainerReadStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceStoreProcedure"] = 32] = "ContainerReplaceStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteStoreProcedure"] = 64] = "ContainerDeleteStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateTriggers"] = 256] = "ContainerCreateTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadTriggers"] = 16] = "ContainerReadTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceTriggers"] = 512] = "ContainerReplaceTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteTriggers"] = 1024] = "ContainerDeleteTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateUserDefinedFunctions"] = 2048] = "ContainerCreateUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadUserDefinedFunctions"] = 8] = "ContainerReadUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceUserDefinedFunctions"] = 4096] = "ContainerReplaceUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteUserDefinedFunctions"] = 8192] = "ContainerDeleteUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerExecuteStoredProcedure"] = 128] = "ContainerExecuteStoredProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadConflicts"] = 32] = "ContainerReadConflicts"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteConflicts"] = 16384] = "ContainerDeleteConflicts"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadAny"] = 64] = "ContainerReadAny"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerFullAccess"] = 4294967295] = "ContainerFullAccess"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemReadAny"] = 65536] = "ItemReadAny"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemFullAccess"] = 65] = "ItemFullAccess"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemRead"] = 64] = "ItemRead"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemReplace"] = 65536] = "ItemReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemUpsert"] = 131072] = "ItemUpsert"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemDelete"] = 262144] = "ItemDelete"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureRead"] = 128] = "StoreProcedureRead"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureReplace"] = 1048576] = "StoreProcedureReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureDelete"] = 2097152] = "StoreProcedureDelete"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureExecute"] = 4194304] = "StoreProcedureExecute"; - SasTokenPermissionKind[SasTokenPermissionKind["UserDefinedFuntionRead"] = 256] = "UserDefinedFuntionRead"; - SasTokenPermissionKind[SasTokenPermissionKind["UserDefinedFuntionReplace"] = 8388608] = "UserDefinedFuntionReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["UserDefinedFuntionDelete"] = 16777216] = "UserDefinedFuntionDelete"; - SasTokenPermissionKind[SasTokenPermissionKind["TriggerRead"] = 512] = "TriggerRead"; - SasTokenPermissionKind[SasTokenPermissionKind["TriggerReplace"] = 33554432] = "TriggerReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["TriggerDelete"] = 67108864] = "TriggerDelete"; -})(SasTokenPermissionKind || (SasTokenPermissionKind = {})); -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.js.map deleted file mode 100644 index e5b59ff..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/common/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE;QACX,aAAa,EAAE,eAAe;QAC9B,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,eAAe;QAC/B,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,eAAe;QAC7B,eAAe,EAAE,kBAAkB;QACnC,YAAY,EAAE,cAAc;QAC5B,SAAS,EAAE,YAAY;QACvB,eAAe,EAAE,mBAAmB;QACpC,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,eAAe;QAC5B,aAAa,EAAE,gBAAgB;QAC/B,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,YAAY;QACvB,YAAY,EAAE,eAAe;QAC7B,gBAAgB,EAAE,mBAAmB;QACrC,eAAe,EAAE,kBAAkB;QACnC,eAAe,EAAE,kBAAkB;QACnC,UAAU,EAAE,aAAa;QACzB,YAAY,EAAE,eAAe;QAC7B,MAAM,EAAE,QAAQ;QAChB,aAAa,EAAE,gBAAgB;QAC/B,cAAc,EAAE,iBAAiB;QACjC,OAAO,EAAE,UAAU;QACnB,iBAAiB,EAAE,qBAAqB;QACxC,WAAW,EAAE,cAAc;QAC3B,kBAAkB,EAAE,qBAAqB;QACzC,YAAY,EAAE,eAAe;QAC7B,iBAAiB,EAAE,oBAAoB;QACvC,UAAU,EAAE,aAAa;QACzB,SAAS,EAAE,YAAY;QACvB,eAAe,EAAE,kBAAkB;QACnC,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,MAAM;QACZ,wBAAwB,EAAE,6BAA6B;QACvD,yBA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ft Corporation.\n// Licensed under the MIT license.\n\nexport interface PartitionKeyRangePropertiesNames {\n // Partition Key Range Constants\n MinInclusive: \"minInclusive\";\n MaxExclusive: \"maxExclusive\";\n Id: \"id\";\n}\n\n/**\n * @hidden\n */\nexport const Constants = {\n HttpHeaders: {\n Authorization: \"authorization\",\n ETag: \"etag\",\n MethodOverride: \"X-HTTP-Method\",\n Slug: \"Slug\",\n ContentType: \"Content-Type\",\n LastModified: \"Last-Modified\",\n ContentEncoding: \"Content-Encoding\",\n CharacterSet: \"CharacterSet\",\n UserAgent: \"User-Agent\",\n IfModifiedSince: \"If-Modified-Since\",\n IfMatch: \"If-Match\",\n IfNoneMatch: \"If-None-Match\",\n ContentLength: \"Content-Length\",\n AcceptEncoding: \"Accept-Encoding\",\n KeepAlive: \"Keep-Alive\",\n CacheControl: \"Cache-Control\",\n TransferEncoding: \"Transfer-Encoding\",\n ContentLanguage: \"Content-Language\",\n ContentLocation: \"Content-Location\",\n ContentMd5: \"Content-Md5\",\n ContentRange: \"Content-Range\",\n Accept: \"Accept\",\n AcceptCharset: \"Accept-Charset\",\n AcceptLanguage: \"Accept-Language\",\n IfRange: \"If-Range\",\n IfUnmodifiedSince: \"If-Unmodified-Since\",\n MaxForwards: \"Max-Forwards\",\n ProxyAuthorization: \"Proxy-Authorization\",\n AcceptRanges: \"Accept-Ranges\",\n ProxyAuthenticate: \"Proxy-Authenticate\",\n RetryAfter: \"Retry-After\",\n SetCookie: \"Set-Cookie\",\n WwwAuthenticate: \"Www-Authenticate\",\n Origin: \"Origin\",\n Host: \"Host\",\n AccessControlAllowOrigin: \"Access-Control-Allow-Origin\",\n AccessControlAllowHeaders: \"Access-Control-Allow-Headers\",\n KeyValueEncodingFormat: \"application/x-www-form-urlencoded\",\n WrapAssertionFormat: \"wrap_assertion_format\",\n WrapAssertion: \"wrap_assertion\",\n WrapScope: \"wrap_scope\",\n SimpleToken: \"SWT\",\n HttpDate: \"date\",\n Prefer: \"Prefer\",\n Location: \"Location\",\n Referer: \"referer\",\n A_IM: \"A-IM\",\n\n // Query\n Query: \"x-ms-documentdb-query\",\n IsQuery: \"x-ms-documentdb-isquery\",\n IsQueryPlan: \"x-ms-cosmos-is-query-plan-request\",\n SupportedQueryFeatures: \"x-ms-cosmos-supported-query-features\",\n QueryVersion: \"x-ms-cosmos-query-version\",\n\n // Our custom Azure Cosmos DB headers\n Continuation: \"x-ms-continuation\",\n PageSize: \"x-ms-max-item-count\",\n ItemCount: \"x-ms-item-count\",\n\n // Request sender generated. Simply echoed by backend.\n ActivityId: \"x-ms-activity-id\",\n PreTriggerInclude: \"x-ms-documentdb-pre-trigger-include\",\n PreTriggerExclude: \"x-ms-documentdb-pre-trigger-exclude\",\n PostTriggerInclude: \"x-ms-documentdb-post-trigger-include\",\n PostTriggerExclude: \"x-ms-documentdb-post-trigger-exclude\",\n IndexingDirective: \"x-ms-indexing-directive\",\n SessionToken: \"x-ms-session-token\",\n ConsistencyLevel: \"x-ms-consistency-level\",\n XDate: \"x-ms-date\",\n CollectionPartitionInfo: \"x-ms-collection-partition-info\",\n CollectionServiceInfo: \"x-ms-collection-service-info\",\n // Deprecated, use RetryAfterInMs instead.\n RetryAfterInMilliseconds: \"x-ms-retry-after-ms\",\n RetryAfterInMs: \"x-ms-retry-after-ms\",\n IsFeedUnfiltered: \"x-ms-is-feed-unfiltered\",\n ResourceTokenExpiry: \"x-ms-documentdb-expiry-seconds\",\n EnableScanInQuery: \"x-ms-documentdb-query-enable-scan\",\n EmitVerboseTracesInQuery: \"x-ms-documentdb-query-emit-traces\",\n EnableCrossPartitionQuery: \"x-ms-documentdb-query-enablecrosspartition\",\n ParallelizeCrossPartitionQuery: \"x-ms-documentdb-query-parallelizecrosspartitionquery\",\n ResponseContinuationTokenLimitInKB: \"x-ms-documentdb-responsecontinuationtokenlimitinkb\",\n\n // QueryMetrics\n // Request header to tell backend to give you query metrics.\n PopulateQueryMetrics: \"x-ms-documentdb-populatequerymetrics\",\n // Response header that holds the serialized version of query metrics.\n QueryMetrics: \"x-ms-documentdb-query-metrics\",\n\n // Version headers and values\n Version: \"x-ms-version\",\n\n // Owner name\n OwnerFullName: \"x-ms-alt-content-path\",\n\n // Owner ID used for name based request in session token.\n OwnerId: \"x-ms-content-path\",\n\n // Partition Key\n PartitionKey: \"x-ms-documentdb-partitionkey\",\n PartitionKeyRangeID: \"x-ms-documentdb-partitionkeyrangeid\",\n\n // Quota Info\n MaxEntityCount: \"x-ms-root-entity-max-count\",\n CurrentEntityCount: \"x-ms-root-entity-current-count\",\n CollectionQuotaInMb: \"x-ms-collection-quota-mb\",\n CollectionCurrentUsageInMb: \"x-ms-collection-usage-mb\",\n MaxMediaStorageUsageInMB: \"x-ms-max-media-storage-usage-mb\",\n CurrentMediaStorageUsageInMB: \"x-ms-media-storage-usage-mb\",\n RequestCharge: \"x-ms-request-charge\",\n PopulateQuotaInfo: \"x-ms-documentdb-populatequotainfo\",\n MaxResourceQuota: \"x-ms-resource-quota\",\n\n // Offer header\n OfferType: \"x-ms-offer-type\",\n OfferThroughput: \"x-ms-offer-throughput\",\n AutoscaleSettings: \"x-ms-cosmos-offer-autopilot-settings\",\n\n // Custom RUs/minute headers\n DisableRUPerMinuteUsage: \"x-ms-documentdb-disable-ru-per-minute-usage\",\n IsRUPerMinuteUsed: \"x-ms-documentdb-is-ru-per-minute-used\",\n OfferIsRUPerMinuteThroughputEnabled: \"x-ms-offer-is-ru-per-minute-throughput-enabled\",\n\n // Index progress headers\n IndexTransformationProgress: \"x-ms-documentdb-collection-index-transformation-progress\",\n LazyIndexingProgress: \"x-ms-documentdb-collection-lazy-indexing-progress\",\n\n // Upsert header\n IsUpsert: \"x-ms-documentdb-is-upsert\",\n\n // Sub status of the error\n SubStatus: \"x-ms-substatus\",\n\n // StoredProcedure related headers\n EnableScriptLogging: \"x-ms-documentdb-script-enable-logging\",\n ScriptLogResults: \"x-ms-documentdb-script-log-results\",\n\n // Multi-Region Write\n ALLOW_MULTIPLE_WRITES: \"x-ms-cosmos-allow-tentative-writes\",\n\n // Bulk/Batch header\n IsBatchRequest: \"x-ms-cosmos-is-batch-request\",\n IsBatchAtomic: \"x-ms-cosmos-batch-atomic\",\n BatchContinueOnError: \"x-ms-cosmos-batch-continue-on-error\",\n\n // Dedicated Gateway Headers\n DedicatedGatewayPerRequestCacheStaleness: \"x-ms-dedicatedgateway-max-age\",\n\n // Cache Refresh header\n ForceRefresh: \"x-ms-force-refresh\",\n },\n\n // GlobalDB related constants\n WritableLocations: \"writableLocations\",\n ReadableLocations: \"readableLocations\",\n LocationUnavailableExpirationTimeInMs: 5 * 60 * 1000, // 5 minutes\n\n // ServiceDocument Resource\n ENABLE_MULTIPLE_WRITABLE_LOCATIONS: \"enableMultipleWriteLocations\",\n\n // Background refresh time\n DefaultUnavailableLocationExpirationTimeMS: 5 * 60 * 1000,\n\n // Client generated retry count response header\n ThrottleRetryCount: \"x-ms-throttle-retry-count\",\n ThrottleRetryWaitTimeInMs: \"x-ms-throttle-retry-wait-time-ms\",\n\n // Platform\n CurrentVersion: \"2020-07-15\",\n AzureNamespace: \"Azure.Cosmos\",\n AzurePackageName: \"@azure/cosmos\",\n SDKName: \"azure-cosmos-js\",\n SDKVersion: \"3.17.3\",\n\n // Bulk Operations\n DefaultMaxBulkRequestBodySizeInBytes: 220201,\n\n Quota: {\n CollectionSize: \"collectionSize\",\n },\n\n Path: {\n Root: \"/\",\n DatabasesPathSegment: \"dbs\",\n CollectionsPathSegment: \"colls\",\n UsersPathSegment: \"users\",\n DocumentsPathSegment: \"docs\",\n PermissionsPathSegment: \"permissions\",\n StoredProceduresPathSegment: \"sprocs\",\n TriggersPathSegment: \"triggers\",\n UserDefinedFunctionsPathSegment: \"udfs\",\n ConflictsPathSegment: \"conflicts\",\n AttachmentsPathSegment: \"attachments\",\n PartitionKeyRangesPathSegment: \"pkranges\",\n SchemasPathSegment: \"schemas\",\n OffersPathSegment: \"offers\",\n TopologyPathSegment: \"topology\",\n DatabaseAccountPathSegment: \"databaseaccount\",\n },\n\n PartitionKeyRange: {\n // Partition Key Range Constants\n MinInclusive: \"minInclusive\",\n MaxExclusive: \"maxExclusive\",\n Id: \"id\",\n } as PartitionKeyRangePropertiesNames,\n\n QueryRangeConstants: {\n // Partition Key Range Constants\n MinInclusive: \"minInclusive\",\n MaxExclusive: \"maxExclusive\",\n min: \"min\",\n },\n\n /**\n * @deprecated Use EffectivePartitionKeyConstants instead\n */\n EffectiveParitionKeyConstants: {\n MinimumInclusiveEffectivePartitionKey: \"\",\n MaximumExclusiveEffectivePartitionKey: \"FF\",\n },\n\n EffectivePartitionKeyConstants: {\n MinimumInclusiveEffectivePartitionKey: \"\",\n MaximumExclusiveEffectivePartitionKey: \"FF\",\n },\n};\n\n/**\n * @hidden\n */\nexport enum ResourceType {\n none = \"\",\n database = \"dbs\",\n offer = \"offers\",\n user = \"users\",\n permission = \"permissions\",\n container = \"colls\",\n conflicts = \"conflicts\",\n sproc = \"sprocs\",\n udf = \"udfs\",\n trigger = \"triggers\",\n item = \"docs\",\n pkranges = \"pkranges\",\n partitionkey = \"partitionKey\",\n}\n\n/**\n * @hidden\n */\nexport enum HTTPMethod {\n get = \"GET\",\n patch = \"PATCH\",\n post = \"POST\",\n put = \"PUT\",\n delete = \"DELETE\",\n}\n\n/**\n * @hidden\n */\nexport enum OperationType {\n Create = \"create\",\n Replace = \"replace\",\n Upsert = \"upsert\",\n Delete = \"delete\",\n Read = \"read\",\n Query = \"query\",\n Execute = \"execute\",\n Batch = \"batch\",\n Patch = \"patch\",\n}\n\n/**\n * @hidden\n */\nexport enum CosmosKeyType {\n PrimaryMaster = \"PRIMARY_MASTER\",\n SecondaryMaster = \"SECONDARY_MASTER\",\n PrimaryReadOnly = \"PRIMARY_READONLY\",\n SecondaryReadOnly = \"SECONDARY_READONLY\",\n}\n\n/**\n * @hidden\n */\nexport enum CosmosContainerChildResourceKind {\n Item = \"ITEM\",\n StoredProcedure = \"STORED_PROCEDURE\",\n UserDefinedFunction = \"USER_DEFINED_FUNCTION\",\n Trigger = \"TRIGGER\",\n}\n/**\n * @hidden\n */\nexport enum PermissionScopeValues {\n /**\n * Values which set permission Scope applicable to control plane related operations.\n */\n ScopeAccountReadValue = 0x0001,\n ScopeAccountListDatabasesValue = 0x0002,\n ScopeDatabaseReadValue = 0x0004,\n ScopeDatabaseReadOfferValue = 0x0008,\n ScopeDatabaseListContainerValue = 0x0010,\n ScopeContainerReadValue = 0x0020,\n ScopeContainerReadOfferValue = 0x0040,\n\n ScopeAccountCreateDatabasesValue = 0x0001,\n ScopeAccountDeleteDatabasesValue = 0x0002,\n ScopeDatabaseDeleteValue = 0x0004,\n ScopeDatabaseReplaceOfferValue = 0x0008,\n ScopeDatabaseCreateContainerValue = 0x0010,\n ScopeDatabaseDeleteContainerValue = 0x0020,\n ScopeContainerReplaceValue = 0x0040,\n ScopeContainerDeleteValue = 0x0080,\n ScopeContainerReplaceOfferValue = 0x0100,\n\n ScopeAccountReadAllAccessValue = 0xffff,\n ScopeDatabaseReadAllAccessValue = PermissionScopeValues.ScopeDatabaseReadValue |\n PermissionScopeValues.ScopeDatabaseReadOfferValue |\n PermissionScopeValues.ScopeDatabaseListContainerValue |\n PermissionScopeValues.ScopeContainerReadValue |\n PermissionScopeValues.ScopeContainerReadOfferValue,\n\n ScopeContainersReadAllAccessValue = PermissionScopeValues.ScopeContainerReadValue |\n PermissionScopeValues.ScopeContainerReadOfferValue,\n\n ScopeAccountWriteAllAccessValue = 0xffff,\n ScopeDatabaseWriteAllAccessValue = PermissionScopeValues.ScopeDatabaseDeleteValue |\n PermissionScopeValues.ScopeDatabaseReplaceOfferValue |\n PermissionScopeValues.ScopeDatabaseCreateContainerValue |\n PermissionScopeValues.ScopeDatabaseDeleteContainerValue |\n PermissionScopeValues.ScopeContainerReplaceValue |\n PermissionScopeValues.ScopeContainerDeleteValue |\n PermissionScopeValues.ScopeContainerReplaceOfferValue,\n\n ScopeContainersWriteAllAccessValue = PermissionScopeValues.ScopeContainerReplaceValue |\n PermissionScopeValues.ScopeContainerDeleteValue |\n PermissionScopeValues.ScopeContainerReplaceOfferValue,\n\n /**\n * Values which set permission Scope applicable to data plane related operations.\n */\n ScopeContainerExecuteQueriesValue = 0x00000001,\n ScopeContainerReadFeedsValue = 0x00000002,\n ScopeContainerReadStoredProceduresValue = 0x00000004,\n ScopeContainerReadUserDefinedFunctionsValue = 0x00000008,\n ScopeContainerReadTriggersValue = 0x00000010,\n ScopeContainerReadConflictsValue = 0x00000020,\n ScopeItemReadValue = 0x00000040,\n ScopeStoredProcedureReadValue = 0x00000080,\n ScopeUserDefinedFunctionReadValue = 0x00000100,\n ScopeTriggerReadValue = 0x00000200,\n\n ScopeContainerCreateItemsValue = 0x00000001,\n ScopeContainerReplaceItemsValue = 0x00000002,\n ScopeContainerUpsertItemsValue = 0x00000004,\n ScopeContainerDeleteItemsValue = 0x00000008,\n ScopeContainerCreateStoredProceduresValue = 0x00000010,\n ScopeContainerReplaceStoredProceduresValue = 0x00000020,\n ScopeContainerDeleteStoredProceduresValue = 0x00000040,\n ScopeContainerExecuteStoredProceduresValue = 0x00000080,\n ScopeContainerCreateTriggersValue = 0x00000100,\n ScopeContainerReplaceTriggersValue = 0x00000200,\n ScopeContainerDeleteTriggersValue = 0x00000400,\n ScopeContainerCreateUserDefinedFunctionsValue = 0x00000800,\n ScopeContainerReplaceUserDefinedFunctionsValue = 0x00001000,\n ScopeContainerDeleteUserDefinedFunctionSValue = 0x00002000,\n ScopeContainerDeleteCONFLICTSValue = 0x00004000,\n ScopeItemReplaceValue = 0x00010000,\n ScopeItemUpsertValue = 0x00020000,\n ScopeItemDeleteValue = 0x00040000,\n ScopeStoredProcedureReplaceValue = 0x00100000,\n ScopeStoredProcedureDeleteValue = 0x00200000,\n ScopeStoredProcedureExecuteValue = 0x00400000,\n ScopeUserDefinedFunctionReplaceValue = 0x00800000,\n ScopeUserDefinedFunctionDeleteValue = 0x01000000,\n ScopeTriggerReplaceValue = 0x02000000,\n ScopeTriggerDeleteValue = 0x04000000,\n\n ScopeContainerReadAllAccessValue = 0xffffffff,\n ScopeItemReadAllAccessValue = PermissionScopeValues.ScopeContainerExecuteQueriesValue |\n PermissionScopeValues.ScopeItemReadValue,\n ScopeContainerWriteAllAccessValue = 0xffffffff,\n ScopeItemWriteAllAccessValue = PermissionScopeValues.ScopeContainerCreateItemsValue |\n PermissionScopeValues.ScopeContainerReplaceItemsValue |\n PermissionScopeValues.ScopeContainerUpsertItemsValue |\n PermissionScopeValues.ScopeContainerDeleteItemsValue |\n PermissionScopeValues.ScopeItemReplaceValue |\n PermissionScopeValues.ScopeItemUpsertValue |\n PermissionScopeValues.ScopeItemDeleteValue,\n\n NoneValue = 0,\n}\n/**\n * @hidden\n */\nexport enum SasTokenPermissionKind {\n ContainerCreateItems = PermissionScopeValues.ScopeContainerCreateItemsValue,\n ContainerReplaceItems = PermissionScopeValues.ScopeContainerReplaceItemsValue,\n ContainerUpsertItems = PermissionScopeValues.ScopeContainerUpsertItemsValue,\n ContainerDeleteItems = PermissionScopeValues.ScopeContainerDeleteValue,\n ContainerExecuteQueries = PermissionScopeValues.ScopeContainerExecuteQueriesValue,\n ContainerReadFeeds = PermissionScopeValues.ScopeContainerReadFeedsValue,\n ContainerCreateStoreProcedure = PermissionScopeValues.ScopeContainerCreateStoredProceduresValue,\n ContainerReadStoreProcedure = PermissionScopeValues.ScopeContainerReadStoredProceduresValue,\n ContainerReplaceStoreProcedure = PermissionScopeValues.ScopeContainerReplaceStoredProceduresValue,\n ContainerDeleteStoreProcedure = PermissionScopeValues.ScopeContainerDeleteStoredProceduresValue,\n ContainerCreateTriggers = PermissionScopeValues.ScopeContainerCreateTriggersValue,\n ContainerReadTriggers = PermissionScopeValues.ScopeContainerReadTriggersValue,\n ContainerReplaceTriggers = PermissionScopeValues.ScopeContainerReplaceTriggersValue,\n ContainerDeleteTriggers = PermissionScopeValues.ScopeContainerDeleteTriggersValue,\n ContainerCreateUserDefinedFunctions = PermissionScopeValues.ScopeContainerCreateUserDefinedFunctionsValue,\n ContainerReadUserDefinedFunctions = PermissionScopeValues.ScopeContainerReadUserDefinedFunctionsValue,\n ContainerReplaceUserDefinedFunctions = PermissionScopeValues.ScopeContainerReplaceUserDefinedFunctionsValue,\n ContainerDeleteUserDefinedFunctions = PermissionScopeValues.ScopeContainerDeleteUserDefinedFunctionSValue,\n ContainerExecuteStoredProcedure = PermissionScopeValues.ScopeContainerExecuteStoredProceduresValue,\n ContainerReadConflicts = PermissionScopeValues.ScopeContainerReadConflictsValue,\n ContainerDeleteConflicts = PermissionScopeValues.ScopeContainerDeleteCONFLICTSValue,\n ContainerReadAny = PermissionScopeValues.ScopeContainerReadOfferValue,\n ContainerFullAccess = PermissionScopeValues.ScopeContainerReadAllAccessValue,\n ItemReadAny = PermissionScopeValues.ScopeItemReplaceValue,\n ItemFullAccess = PermissionScopeValues.ScopeItemReadAllAccessValue,\n ItemRead = PermissionScopeValues.ScopeItemReadValue,\n ItemReplace = PermissionScopeValues.ScopeItemReplaceValue,\n ItemUpsert = PermissionScopeValues.ScopeItemUpsertValue,\n ItemDelete = PermissionScopeValues.ScopeItemDeleteValue,\n StoreProcedureRead = PermissionScopeValues.ScopeStoredProcedureReadValue,\n StoreProcedureReplace = PermissionScopeValues.ScopeStoredProcedureReplaceValue,\n StoreProcedureDelete = PermissionScopeValues.ScopeStoredProcedureDeleteValue,\n StoreProcedureExecute = PermissionScopeValues.ScopeStoredProcedureExecuteValue,\n UserDefinedFuntionRead = PermissionScopeValues.ScopeUserDefinedFunctionReadValue,\n UserDefinedFuntionReplace = PermissionScopeValues.ScopeUserDefinedFunctionReplaceValue,\n UserDefinedFuntionDelete = PermissionScopeValues.ScopeUserDefinedFunctionDeleteValue,\n TriggerRead = PermissionScopeValues.ScopeTriggerReadValue,\n TriggerReplace = PermissionScopeValues.ScopeTriggerReplaceValue,\n TriggerDelete = PermissionScopeValues.ScopeTriggerDeleteValue,\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.d.ts deleted file mode 100644 index 15de706..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { CosmosClientOptions } from "../CosmosClientOptions"; -import { OperationType, ResourceType } from "./constants"; -/** @hidden */ -export declare function jsonStringifyAndEscapeNonASCII(arg: unknown): string; -/** - * @hidden - */ -export declare function parseLink(resourcePath: string): { - type: ResourceType; - objectBody: { - id: string; - self: string; - }; -}; -/** - * @hidden - */ -export declare function isReadRequest(operationType: OperationType): boolean; -/** - * @hidden - */ -export declare function sleep(time: number): Promise; -/** - * @hidden - */ -export declare function getContainerLink(link: string): string; -/** - * @hidden - */ -export declare function trimSlashes(source: string): string; -/** - * @hidden - */ -export declare function getHexaDigit(): string; -/** - * @hidden - */ -export declare function parsePath(path: string): string[]; -/** - * @hidden - */ -export declare function isResourceValid(resource: { - id?: string; -}, err: { - message?: string; -}): boolean; -/** - * @hidden - */ -export declare function isItemResourceValid(resource: { - id?: string; -}, err: { - message?: string; -}): boolean; -/** @hidden */ -export declare function getIdFromLink(resourceLink: string): string; -/** @hidden */ -export declare function getPathFromLink(resourceLink: string, resourceType?: string): string; -/** - * @hidden - */ -export declare function isStringNullOrEmpty(inputString: string): boolean; -/** - * @hidden - */ -export declare function trimSlashFromLeftAndRight(inputString: string): string; -/** - * @hidden - */ -export declare function validateResourceId(resourceId: string): boolean; -/** - * @hidden - */ -export declare function validateItemResourceId(resourceId: string): boolean; -/** - * @hidden - */ -export declare function getResourceIdFromPath(resourcePath: string): string; -/** - * @hidden - */ -export declare function parseConnectionString(connectionString: string): CosmosClientOptions; -//# sourceMappingURL=helper.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.d.ts.map deleted file mode 100644 index 613dceb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/common/helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO1D,cAAc;AACd,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAMnE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG;IAC/C,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH,CAkDA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAEnE;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CA8DhD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAwB7F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAkBjG;AAED,cAAc;AACd,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED,cAAc;AACd,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAOnF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAGhE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAMrE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAY9D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAYlE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAclE;AAUD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,GAAG,mBAAmB,CAiBnF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.js deleted file mode 100644 index a915ffd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.js +++ /dev/null @@ -1,289 +0,0 @@ -import { OperationType } from "./constants"; -const trimLeftSlashes = new RegExp("^[/]+"); -const trimRightSlashes = new RegExp("[/]+$"); -const illegalResourceIdCharacters = new RegExp("[/\\\\?#]"); -const illegalItemResourceIdCharacters = new RegExp("[/\\\\#]"); -/** @hidden */ -export function jsonStringifyAndEscapeNonASCII(arg) { - // TODO: better way for this? Not sure. - // escapes non-ASCII characters as \uXXXX - return JSON.stringify(arg).replace(/[\u007F-\uFFFF]/g, (m) => { - return "\\u" + ("0000" + m.charCodeAt(0).toString(16)).slice(-4); - }); -} -/** - * @hidden - */ -export function parseLink(resourcePath) { - if (resourcePath.length === 0) { - /* for DatabaseAccount case, both type and objectBody will be undefined. */ - return { - type: undefined, - objectBody: undefined, - }; - } - if (resourcePath[resourcePath.length - 1] !== "/") { - resourcePath = resourcePath + "/"; - } - if (resourcePath[0] !== "/") { - resourcePath = "/" + resourcePath; - } - /* - The path will be in the form of /[resourceType]/[resourceId]/ .... - /[resourceType]//[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/ - or /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/[resourceType]/[resourceId]/ .... - /[resourceType]/[resourceId]/ - The result of split will be in the form of - [[[resourceType], [resourceId] ... ,[resourceType], [resourceId], ""] - In the first case, to extract the resourceId it will the element before last ( at length -2 ) - and the type will be before it ( at length -3 ) - In the second case, to extract the resource type it will the element before last ( at length -2 ) - */ - const pathParts = resourcePath.split("/"); - let id; - let type; - if (pathParts.length % 2 === 0) { - // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]. - id = pathParts[pathParts.length - 2]; - type = pathParts[pathParts.length - 3]; - } - else { - // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/. - id = pathParts[pathParts.length - 3]; - type = pathParts[pathParts.length - 2]; - } - const result = { - type, - objectBody: { - id, - self: resourcePath, - }, - }; - return result; -} -/** - * @hidden - */ -export function isReadRequest(operationType) { - return operationType === OperationType.Read || operationType === OperationType.Query; -} -/** - * @hidden - */ -export function sleep(time) { - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }, time); - }); -} -/** - * @hidden - */ -export function getContainerLink(link) { - return link.split("/").slice(0, 4).join("/"); -} -/** - * @hidden - */ -export function trimSlashes(source) { - return source.replace(trimLeftSlashes, "").replace(trimRightSlashes, ""); -} -/** - * @hidden - */ -export function getHexaDigit() { - return Math.floor(Math.random() * 16).toString(16); -} -/** - * @hidden - */ -export function parsePath(path) { - const pathParts = []; - let currentIndex = 0; - const throwError = () => { - throw new Error("Path " + path + " is invalid at index " + currentIndex); - }; - const getEscapedToken = () => { - const quote = path[currentIndex]; - let newIndex = ++currentIndex; - for (;;) { - newIndex = path.indexOf(quote, newIndex); - if (newIndex === -1) { - throwError(); - } - if (path[newIndex - 1] !== "\\") { - break; - } - ++newIndex; - } - const token = path.substr(currentIndex, newIndex - currentIndex); - currentIndex = newIndex + 1; - return token; - }; - const getToken = () => { - const newIndex = path.indexOf("/", currentIndex); - let token = null; - if (newIndex === -1) { - token = path.substr(currentIndex); - currentIndex = path.length; - } - else { - token = path.substr(currentIndex, newIndex - currentIndex); - currentIndex = newIndex; - } - token = token.trim(); - return token; - }; - while (currentIndex < path.length) { - if (path[currentIndex] !== "/") { - throwError(); - } - if (++currentIndex === path.length) { - break; - } - if (path[currentIndex] === '"' || path[currentIndex] === "'") { - pathParts.push(getEscapedToken()); - } - else { - pathParts.push(getToken()); - } - } - return pathParts; -} -/** - * @hidden - */ -export function isResourceValid(resource, err) { - // TODO: fix strictness issues so that caller contexts respects the types of the functions - if (resource.id) { - if (typeof resource.id !== "string") { - err.message = "Id must be a string."; - return false; - } - if (resource.id.indexOf("/") !== -1 || - resource.id.indexOf("\\") !== -1 || - resource.id.indexOf("?") !== -1 || - resource.id.indexOf("#") !== -1) { - err.message = "Id contains illegal chars."; - return false; - } - if (resource.id[resource.id.length - 1] === " ") { - err.message = "Id ends with a space."; - return false; - } - } - return true; -} -/** - * @hidden - */ -export function isItemResourceValid(resource, err) { - // TODO: fix strictness issues so that caller contexts respects the types of the functions - if (resource.id) { - if (typeof resource.id !== "string") { - err.message = "Id must be a string."; - return false; - } - if (resource.id.indexOf("/") !== -1 || - resource.id.indexOf("\\") !== -1 || - resource.id.indexOf("#") !== -1) { - err.message = "Id contains illegal chars."; - return false; - } - } - return true; -} -/** @hidden */ -export function getIdFromLink(resourceLink) { - resourceLink = trimSlashes(resourceLink); - return resourceLink; -} -/** @hidden */ -export function getPathFromLink(resourceLink, resourceType) { - resourceLink = trimSlashes(resourceLink); - if (resourceType) { - return "/" + encodeURI(resourceLink) + "/" + resourceType; - } - else { - return "/" + encodeURI(resourceLink); - } -} -/** - * @hidden - */ -export function isStringNullOrEmpty(inputString) { - // checks whether string is null, undefined, empty or only contains space - return !inputString || /^\s*$/.test(inputString); -} -/** - * @hidden - */ -export function trimSlashFromLeftAndRight(inputString) { - if (typeof inputString !== "string") { - throw new Error("invalid input: input is not string"); - } - return inputString.replace(trimLeftSlashes, "").replace(trimRightSlashes, ""); -} -/** - * @hidden - */ -export function validateResourceId(resourceId) { - // if resourceId is not a string or is empty throw an error - if (typeof resourceId !== "string" || isStringNullOrEmpty(resourceId)) { - throw new Error("Resource ID must be a string and cannot be undefined, null or empty"); - } - // if resource id contains illegal characters throw an error - if (illegalResourceIdCharacters.test(resourceId)) { - throw new Error("Illegal characters ['/', '\\', '#', '?'] cannot be used in Resource ID"); - } - return true; -} -/** - * @hidden - */ -export function validateItemResourceId(resourceId) { - // if resourceId is not a string or is empty throw an error - if (typeof resourceId !== "string" || isStringNullOrEmpty(resourceId)) { - throw new Error("Resource ID must be a string and cannot be undefined, null or empty"); - } - // if resource id contains illegal characters throw an error - if (illegalItemResourceIdCharacters.test(resourceId)) { - throw new Error("Illegal characters ['/', '\\', '#'] cannot be used in Resource ID"); - } - return true; -} -/** - * @hidden - */ -export function getResourceIdFromPath(resourcePath) { - if (!resourcePath || typeof resourcePath !== "string") { - return null; - } - const trimmedPath = trimSlashFromLeftAndRight(resourcePath); - const pathSegments = trimmedPath.split("/"); - // number of segments of a path must always be even - if (pathSegments.length % 2 !== 0) { - return null; - } - return pathSegments[pathSegments.length - 1]; -} -/** - * @hidden - */ -export function parseConnectionString(connectionString) { - const keyValueStrings = connectionString.split(";"); - const { AccountEndpoint, AccountKey } = keyValueStrings.reduce((connectionObject, keyValueString) => { - const [key, ...value] = keyValueString.split("="); - connectionObject[key] = value.join("="); - return connectionObject; - }, {}); - if (!AccountEndpoint || !AccountKey) { - throw new Error("Could not parse the provided connection string"); - } - return { - endpoint: AccountEndpoint, - key: AccountKey, - }; -} -//# sourceMappingURL=helper.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.js.map deleted file mode 100644 index af1378a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/helper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/common/helper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAC;AAE1D,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAC5C,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAC7C,MAAM,2BAA2B,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;AAC5D,MAAM,+BAA+B,GAAG,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;AAE/D,cAAc;AACd,MAAM,UAAU,8BAA8B,CAAC,GAAY;IACzD,uCAAuC;IACvC,yCAAyC;IACzC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE;QAC3D,OAAO,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,YAAoB;IAO5C,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;QAC7B,2EAA2E;QAC3E,OAAO;YACL,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,SAAS;S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,KAAK,CAAC,GAAG,CAAC,CAAC;QACjD,gBAAwB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjD,OAAO,gBAAgB,CAAC;IAC1B,CAAC,EACD,EAAsB,CACvB,CAAC;IACF,IAAI,CAAC,eAAe,IAAI,CAAC,UAAU,EAAE;QACnC,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IACD,OAAO;QACL,QAAQ,EAAE,eAAe;QACzB,GAAG,EAAE,UAAU;KAChB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosClientOptions } from \"../CosmosClientOptions\";\nimport { OperationType, ResourceType } from \"./constants\";\n\nconst trimLeftSlashes = new RegExp(\"^[/]+\");\nconst trimRightSlashes = new RegExp(\"[/]+$\");\nconst illegalResourceIdCharacters = new RegExp(\"[/\\\\\\\\?#]\");\nconst illegalItemResourceIdCharacters = new RegExp(\"[/\\\\\\\\#]\");\n\n/** @hidden */\nexport function jsonStringifyAndEscapeNonASCII(arg: unknown): string {\n // TODO: better way for this? Not sure.\n // escapes non-ASCII characters as \\uXXXX\n return JSON.stringify(arg).replace(/[\\u007F-\\uFFFF]/g, (m) => {\n return \"\\\\u\" + (\"0000\" + m.charCodeAt(0).toString(16)).slice(-4);\n });\n}\n\n/**\n * @hidden\n */\nexport function parseLink(resourcePath: string): {\n type: ResourceType;\n objectBody: {\n id: string;\n self: string;\n };\n} {\n if (resourcePath.length === 0) {\n /* for DatabaseAccount case, both type and objectBody will be undefined. */\n return {\n type: undefined,\n objectBody: undefined,\n };\n }\n\n if (resourcePath[resourcePath.length - 1] !== \"/\") {\n resourcePath = resourcePath + \"/\";\n }\n\n if (resourcePath[0] !== \"/\") {\n resourcePath = \"/\" + resourcePath;\n }\n\n /*\n The path will be in the form of /[resourceType]/[resourceId]/ ....\n /[resourceType]//[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/\n or /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/[resourceType]/[resourceId]/ ....\n /[resourceType]/[resourceId]/\n The result of split will be in the form of\n [[[resourceType], [resourceId] ... ,[resourceType], [resourceId], \"\"]\n In the first case, to extract the resourceId it will the element before last ( at length -2 )\n and the type will be before it ( at length -3 )\n In the second case, to extract the resource type it will the element before last ( at length -2 )\n */\n const pathParts = resourcePath.split(\"/\");\n let id;\n let type: ResourceType;\n if (pathParts.length % 2 === 0) {\n // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId].\n id = pathParts[pathParts.length - 2];\n type = pathParts[pathParts.length - 3] as ResourceType;\n } else {\n // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/.\n id = pathParts[pathParts.length - 3];\n type = pathParts[pathParts.length - 2] as ResourceType;\n }\n\n const result = {\n type,\n objectBody: {\n id,\n self: resourcePath,\n },\n };\n\n return result;\n}\n\n/**\n * @hidden\n */\nexport function isReadRequest(operationType: OperationType): boolean {\n return operationType === OperationType.Read || operationType === OperationType.Query;\n}\n\n/**\n * @hidden\n */\nexport function sleep(time: number): Promise {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, time);\n });\n}\n\n/**\n * @hidden\n */\nexport function getContainerLink(link: string): string {\n return link.split(\"/\").slice(0, 4).join(\"/\");\n}\n\n/**\n * @hidden\n */\nexport function trimSlashes(source: string): string {\n return source.replace(trimLeftSlashes, \"\").replace(trimRightSlashes, \"\");\n}\n\n/**\n * @hidden\n */\nexport function getHexaDigit(): string {\n return Math.floor(Math.random() * 16).toString(16);\n}\n\n/**\n * @hidden\n */\nexport function parsePath(path: string): string[] {\n const pathParts = [];\n let currentIndex = 0;\n\n const throwError = (): never => {\n throw new Error(\"Path \" + path + \" is invalid at index \" + currentIndex);\n };\n\n const getEscapedToken = (): string => {\n const quote = path[currentIndex];\n let newIndex = ++currentIndex;\n\n for (;;) {\n newIndex = path.indexOf(quote, newIndex);\n if (newIndex === -1) {\n throwError();\n }\n\n if (path[newIndex - 1] !== \"\\\\\") {\n break;\n }\n\n ++newIndex;\n }\n\n const token = path.substr(currentIndex, newIndex - currentIndex);\n currentIndex = newIndex + 1;\n return token;\n };\n\n const getToken = (): string => {\n const newIndex = path.indexOf(\"/\", currentIndex);\n let token = null;\n if (newIndex === -1) {\n token = path.substr(currentIndex);\n currentIndex = path.length;\n } else {\n token = path.substr(currentIndex, newIndex - currentIndex);\n currentIndex = newIndex;\n }\n\n token = token.trim();\n return token;\n };\n\n while (currentIndex < path.length) {\n if (path[currentIndex] !== \"/\") {\n throwError();\n }\n\n if (++currentIndex === path.length) {\n break;\n }\n\n if (path[currentIndex] === '\"' || path[currentIndex] === \"'\") {\n pathParts.push(getEscapedToken());\n } else {\n pathParts.push(getToken());\n }\n }\n\n return pathParts;\n}\n\n/**\n * @hidden\n */\nexport function isResourceValid(resource: { id?: string }, err: { message?: string }): boolean {\n // TODO: fix strictness issues so that caller contexts respects the types of the functions\n if (resource.id) {\n if (typeof resource.id !== \"string\") {\n err.message = \"Id must be a string.\";\n return false;\n }\n\n if (\n resource.id.indexOf(\"/\") !== -1 ||\n resource.id.indexOf(\"\\\\\") !== -1 ||\n resource.id.indexOf(\"?\") !== -1 ||\n resource.id.indexOf(\"#\") !== -1\n ) {\n err.message = \"Id contains illegal chars.\";\n return false;\n }\n\n if (resource.id[resource.id.length - 1] === \" \") {\n err.message = \"Id ends with a space.\";\n return false;\n }\n }\n return true;\n}\n\n/**\n * @hidden\n */\nexport function isItemResourceValid(resource: { id?: string }, err: { message?: string }): boolean {\n // TODO: fix strictness issues so that caller contexts respects the types of the functions\n if (resource.id) {\n if (typeof resource.id !== \"string\") {\n err.message = \"Id must be a string.\";\n return false;\n }\n\n if (\n resource.id.indexOf(\"/\") !== -1 ||\n resource.id.indexOf(\"\\\\\") !== -1 ||\n resource.id.indexOf(\"#\") !== -1\n ) {\n err.message = \"Id contains illegal chars.\";\n return false;\n }\n }\n return true;\n}\n\n/** @hidden */\nexport function getIdFromLink(resourceLink: string): string {\n resourceLink = trimSlashes(resourceLink);\n return resourceLink;\n}\n\n/** @hidden */\nexport function getPathFromLink(resourceLink: string, resourceType?: string): string {\n resourceLink = trimSlashes(resourceLink);\n if (resourceType) {\n return \"/\" + encodeURI(resourceLink) + \"/\" + resourceType;\n } else {\n return \"/\" + encodeURI(resourceLink);\n }\n}\n\n/**\n * @hidden\n */\nexport function isStringNullOrEmpty(inputString: string): boolean {\n // checks whether string is null, undefined, empty or only contains space\n return !inputString || /^\\s*$/.test(inputString);\n}\n\n/**\n * @hidden\n */\nexport function trimSlashFromLeftAndRight(inputString: string): string {\n if (typeof inputString !== \"string\") {\n throw new Error(\"invalid input: input is not string\");\n }\n\n return inputString.replace(trimLeftSlashes, \"\").replace(trimRightSlashes, \"\");\n}\n\n/**\n * @hidden\n */\nexport function validateResourceId(resourceId: string): boolean {\n // if resourceId is not a string or is empty throw an error\n if (typeof resourceId !== \"string\" || isStringNullOrEmpty(resourceId)) {\n throw new Error(\"Resource ID must be a string and cannot be undefined, null or empty\");\n }\n\n // if resource id contains illegal characters throw an error\n if (illegalResourceIdCharacters.test(resourceId)) {\n throw new Error(\"Illegal characters ['/', '\\\\', '#', '?'] cannot be used in Resource ID\");\n }\n\n return true;\n}\n\n/**\n * @hidden\n */\nexport function validateItemResourceId(resourceId: string): boolean {\n // if resourceId is not a string or is empty throw an error\n if (typeof resourceId !== \"string\" || isStringNullOrEmpty(resourceId)) {\n throw new Error(\"Resource ID must be a string and cannot be undefined, null or empty\");\n }\n\n // if resource id contains illegal characters throw an error\n if (illegalItemResourceIdCharacters.test(resourceId)) {\n throw new Error(\"Illegal characters ['/', '\\\\', '#'] cannot be used in Resource ID\");\n }\n\n return true;\n}\n\n/**\n * @hidden\n */\nexport function getResourceIdFromPath(resourcePath: string): string {\n if (!resourcePath || typeof resourcePath !== \"string\") {\n return null;\n }\n\n const trimmedPath = trimSlashFromLeftAndRight(resourcePath);\n const pathSegments = trimmedPath.split(\"/\");\n\n // number of segments of a path must always be even\n if (pathSegments.length % 2 !== 0) {\n return null;\n }\n\n return pathSegments[pathSegments.length - 1];\n}\n\n/**\n * @hidden\n */\ninterface ConnectionObject {\n AccountEndpoint: string;\n AccountKey: string;\n}\n\n/**\n * @hidden\n */\nexport function parseConnectionString(connectionString: string): CosmosClientOptions {\n const keyValueStrings = connectionString.split(\";\");\n const { AccountEndpoint, AccountKey } = keyValueStrings.reduce(\n (connectionObject, keyValueString: string) => {\n const [key, ...value] = keyValueString.split(\"=\");\n (connectionObject as any)[key] = value.join(\"=\");\n return connectionObject;\n },\n {} as ConnectionObject\n );\n if (!AccountEndpoint || !AccountKey) {\n throw new Error(\"Could not parse the provided connection string\");\n }\n return {\n endpoint: AccountEndpoint,\n key: AccountKey,\n };\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.d.ts deleted file mode 100644 index b38ff30..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./constants"; -export * from "./helper"; -export * from "./statusCodes"; -export * from "./uriFactory"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.d.ts.map deleted file mode 100644 index 6beb0cf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.js deleted file mode 100644 index 6fe6e36..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export * from "./constants"; -export * from "./helper"; -export * from "./statusCodes"; -export * from "./uriFactory"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.js.map deleted file mode 100644 index f6f383f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./constants\";\nexport * from \"./helper\";\nexport * from \"./statusCodes\";\nexport * from \"./uriFactory\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.d.ts deleted file mode 100644 index 54135cd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AzureLogger } from "@azure/logger"; -/** - * The \@azure/logger configuration for this package. - */ -export declare const defaultLogger: AzureLogger; -//# sourceMappingURL=logger.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.d.ts.map deleted file mode 100644 index 0c28f71..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,WAAW,EAAE,MAAM,eAAe,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,WAA4C,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.js deleted file mode 100644 index c4f1205..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createClientLogger } from "@azure/logger"; -/** - * The \@azure/logger configuration for this package. - */ -export const defaultLogger = createClientLogger("cosmosdb"); -//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.js.map deleted file mode 100644 index 718ba06..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/logger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAe,MAAM,eAAe,CAAC;AAEhE;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAgB,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger, AzureLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n */\nexport const defaultLogger: AzureLogger = createClientLogger(\"cosmosdb\");\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.d.ts deleted file mode 100644 index 5d199b7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const DEFAULT_PARTITION_KEY_PATH: "/_partitionKey"; -//# sourceMappingURL=partitionKeys.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.d.ts.map deleted file mode 100644 index 367dd65..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partitionKeys.d.ts","sourceRoot":"","sources":["../../../src/common/partitionKeys.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,kBAAuC,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.js deleted file mode 100644 index fb3a638..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export const DEFAULT_PARTITION_KEY_PATH = "/_partitionKey"; // eslint-disable-line @typescript-eslint/prefer-as-const -//# sourceMappingURL=partitionKeys.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.js.map deleted file mode 100644 index 56d22b6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/partitionKeys.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partitionKeys.js","sourceRoot":"","sources":["../../../src/common/partitionKeys.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAoC,CAAC,CAAC,yDAAyD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport const DEFAULT_PARTITION_KEY_PATH = \"/_partitionKey\" as \"/_partitionKey\"; // eslint-disable-line @typescript-eslint/prefer-as-const\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.d.ts deleted file mode 100644 index 6b58869..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @hidden - */ -export declare function getUserAgent(suffix?: string): string; -//# sourceMappingURL=platform.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.d.ts.map deleted file mode 100644 index eff2ff3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/common/platform.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAMpD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.js deleted file mode 100644 index 56efc6b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { getUserAgent as userAgent } from "universal-user-agent"; -import { Constants } from "./constants"; -/** - * @hidden - */ -export function getUserAgent(suffix) { - const ua = `${userAgent()} ${Constants.SDKName}/${Constants.SDKVersion}`; - if (suffix) { - return ua + " " + suffix; - } - return ua; -} -//# sourceMappingURL=platform.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.js.map deleted file mode 100644 index 0c8a6a5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/platform.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../src/common/platform.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,MAAM,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;IACzE,IAAI,MAAM,EAAE;QACV,OAAO,EAAE,GAAG,GAAG,GAAG,MAAM,CAAC;KAC1B;IACD,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getUserAgent as userAgent } from \"universal-user-agent\";\nimport { Constants } from \"./constants\";\n\n/**\n * @hidden\n */\nexport function getUserAgent(suffix?: string): string {\n const ua = `${userAgent()} ${Constants.SDKName}/${Constants.SDKVersion}`;\n if (suffix) {\n return ua + \" \" + suffix;\n }\n return ua;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.d.ts deleted file mode 100644 index 5ac939b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @hidden - */ -export interface StatusCodesType { - Ok: 200; - Created: 201; - Accepted: 202; - NoContent: 204; - NotModified: 304; - BadRequest: 400; - Unauthorized: 401; - Forbidden: 403; - NotFound: 404; - MethodNotAllowed: 405; - RequestTimeout: 408; - Conflict: 409; - Gone: 410; - PreconditionFailed: 412; - RequestEntityTooLarge: 413; - TooManyRequests: 429; - RetryWith: 449; - InternalServerError: 500; - ServiceUnavailable: 503; - ENOTFOUND: "ENOTFOUND"; - OperationPaused: 1200; - OperationCancelled: 1201; -} -/** - * @hidden - */ -export declare const StatusCodes: StatusCodesType; -/** - * @hidden - */ -export interface SubStatusCodesType { - Unknown: 0; - CrossPartitionQueryNotServable: 1004; - PartitionKeyRangeGone: 1002; - ReadSessionNotAvailable: 1002; - WriteForbidden: 3; - DatabaseAccountNotFound: 1008; -} -/** - * @hidden - */ -export declare const SubStatusCodes: SubStatusCodesType; -//# sourceMappingURL=statusCodes.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.d.ts.map deleted file mode 100644 index 751fe53..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statusCodes.d.ts","sourceRoot":"","sources":["../../../src/common/statusCodes.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,eAAe;IAE9B,EAAE,EAAE,GAAG,CAAC;IACR,OAAO,EAAE,GAAG,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;IACf,WAAW,EAAE,GAAG,CAAC;IAGjB,UAAU,EAAE,GAAG,CAAC;IAChB,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,gBAAgB,EAAE,GAAG,CAAC;IACtB,cAAc,EAAE,GAAG,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;IACV,kBAAkB,EAAE,GAAG,CAAC;IACxB,qBAAqB,EAAE,GAAG,CAAC;IAC3B,eAAe,EAAE,GAAG,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC;IAGf,mBAAmB,EAAE,GAAG,CAAC;IACzB,kBAAkB,EAAE,GAAG,CAAC;IAGxB,SAAS,EAAE,WAAW,CAAC;IAGvB,eAAe,EAAE,IAAI,CAAC;IACtB,kBAAkB,EAAE,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,eAgCzB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,CAAC,CAAC;IAGX,8BAA8B,EAAE,IAAI,CAAC;IAGrC,qBAAqB,EAAE,IAAI,CAAC;IAG5B,uBAAuB,EAAE,IAAI,CAAC;IAG9B,cAAc,EAAE,CAAC,CAAC;IAClB,uBAAuB,EAAE,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,kBAe5B,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.js deleted file mode 100644 index 3eb5bd9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * @hidden - */ -export const StatusCodes = { - // Success - Ok: 200, - Created: 201, - Accepted: 202, - NoContent: 204, - NotModified: 304, - // Client error - BadRequest: 400, - Unauthorized: 401, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - PreconditionFailed: 412, - RequestEntityTooLarge: 413, - TooManyRequests: 429, - RetryWith: 449, - // Server Error - InternalServerError: 500, - ServiceUnavailable: 503, - // System codes - ENOTFOUND: "ENOTFOUND", - // Operation pause and cancel. These are FAKE status codes for QOS logging purpose only. - OperationPaused: 1200, - OperationCancelled: 1201, -}; -/** - * @hidden - */ -export const SubStatusCodes = { - Unknown: 0, - // 400: Bad Request Substatus - CrossPartitionQueryNotServable: 1004, - // 410: StatusCodeType_Gone: substatus - PartitionKeyRangeGone: 1002, - // 404: NotFound Substatus - ReadSessionNotAvailable: 1002, - // 403: Forbidden Substatus - WriteForbidden: 3, - DatabaseAccountNotFound: 1008, -}; -//# sourceMappingURL=statusCodes.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.js.map deleted file mode 100644 index 9796efe..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/statusCodes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"statusCodes.js","sourceRoot":"","sources":["../../../src/common/statusCodes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuClC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAoB;IAC1C,UAAU;IACV,EAAE,EAAE,GAAG;IACP,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,WAAW,EAAE,GAAG;IAEhB,eAAe;IACf,UAAU,EAAE,GAAG;IACf,YAAY,EAAE,GAAG;IACjB,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,GAAG;IACb,gBAAgB,EAAE,GAAG;IACrB,cAAc,EAAE,GAAG;IACnB,QAAQ,EAAE,GAAG;IACb,IAAI,EAAE,GAAG;IACT,kBAAkB,EAAE,GAAG;IACvB,qBAAqB,EAAE,GAAG;IAC1B,eAAe,EAAE,GAAG;IACpB,SAAS,EAAE,GAAG;IAEd,eAAe;IACf,mBAAmB,EAAE,GAAG;IACxB,kBAAkB,EAAE,GAAG;IAEvB,eAAe;IACf,SAAS,EAAE,WAAW;IAEtB,wFAAwF;IACxF,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,IAAI;CACzB,CAAC;AAsBF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAuB;IAChD,OAAO,EAAE,CAAC;IAEV,6BAA6B;IAC7B,8BAA8B,EAAE,IAAI;IAEpC,sCAAsC;IACtC,qBAAqB,EAAE,IAAI;IAE3B,0BAA0B;IAC1B,uBAAuB,EAAE,IAAI;IAE7B,2BAA2B;IAC3B,cAAc,EAAE,CAAC;IACjB,uBAAuB,EAAE,IAAI;CAC9B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * @hidden\n */\nexport interface StatusCodesType {\n // Success\n Ok: 200;\n Created: 201;\n Accepted: 202;\n NoContent: 204;\n NotModified: 304;\n\n // Client error\n BadRequest: 400;\n Unauthorized: 401;\n Forbidden: 403;\n NotFound: 404;\n MethodNotAllowed: 405;\n RequestTimeout: 408;\n Conflict: 409;\n Gone: 410;\n PreconditionFailed: 412;\n RequestEntityTooLarge: 413;\n TooManyRequests: 429;\n RetryWith: 449;\n\n // Server Error\n InternalServerError: 500;\n ServiceUnavailable: 503;\n\n // System codes\n ENOTFOUND: \"ENOTFOUND\";\n\n // Operation pause and cancel. These are FAKE status codes for QOS logging purpose only.\n OperationPaused: 1200;\n OperationCancelled: 1201;\n}\n\n/**\n * @hidden\n */\nexport const StatusCodes: StatusCodesType = {\n // Success\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NoContent: 204,\n NotModified: 304,\n\n // Client error\n BadRequest: 400,\n Unauthorized: 401,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n PreconditionFailed: 412,\n RequestEntityTooLarge: 413,\n TooManyRequests: 429,\n RetryWith: 449,\n\n // Server Error\n InternalServerError: 500,\n ServiceUnavailable: 503,\n\n // System codes\n ENOTFOUND: \"ENOTFOUND\",\n\n // Operation pause and cancel. These are FAKE status codes for QOS logging purpose only.\n OperationPaused: 1200,\n OperationCancelled: 1201,\n};\n\n/**\n * @hidden\n */\nexport interface SubStatusCodesType {\n Unknown: 0;\n\n // 400: Bad Request Substatus\n CrossPartitionQueryNotServable: 1004;\n\n // 410: StatusCodeType_Gone: substatus\n PartitionKeyRangeGone: 1002;\n\n // 404: NotFound Substatus\n ReadSessionNotAvailable: 1002;\n\n // 403: Forbidden Substatus\n WriteForbidden: 3;\n DatabaseAccountNotFound: 1008;\n}\n\n/**\n * @hidden\n */\nexport const SubStatusCodes: SubStatusCodesType = {\n Unknown: 0,\n\n // 400: Bad Request Substatus\n CrossPartitionQueryNotServable: 1004,\n\n // 410: StatusCodeType_Gone: substatus\n PartitionKeyRangeGone: 1002,\n\n // 404: NotFound Substatus\n ReadSessionNotAvailable: 1002,\n\n // 403: Forbidden Substatus\n WriteForbidden: 3,\n DatabaseAccountNotFound: 1008,\n};\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.d.ts deleted file mode 100644 index 6276d03..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Would be used when creating or deleting a DocumentCollection - * or a User in Azure Cosmos DB database service - * @hidden - * Given a database id, this creates a database link. - * @param databaseId - The database id - * @returns A database link in the format of `dbs/{0}` - * with `{0}` being a Uri escaped version of the databaseId - */ -export declare function createDatabaseUri(databaseId: string): string; -/** - * Given a database and collection id, this creates a collection link. - * Would be used when updating or deleting a DocumentCollection, creating a - * Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query - * with CreateDocumentQuery in Azure Cosmos DB database service. - * @param databaseId - The database id - * @param collectionId - The collection id - * @returns A collection link in the format of `dbs/{0}/colls/{1}` - * with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId - * @hidden - */ -export declare function createDocumentCollectionUri(databaseId: string, collectionId: string): string; -/** - * Given a database and user id, this creates a user link. - * Would be used when creating a Permission, or when replacing or deleting - * a User in Azure Cosmos DB database service - * @param databaseId - The database id - * @param userId - The user id - * @returns A user link in the format of `dbs/{0}/users/{1}` - * with `{0}` being a Uri escaped version of the databaseId and `{1}` being userId - * @hidden - */ -export declare function createUserUri(databaseId: string, userId: string): string; -/** - * Given a database and collection id, this creates a collection link. - * Would be used when creating an Attachment, or when replacing - * or deleting a Document in Azure Cosmos DB database service - * @param databaseId - The database id - * @param collectionId - The collection id - * @param documentId - The document id - * @returns A document link in the format of - * `dbs/{0}/colls/{1}/docs/{2}` with `{0}` being a Uri escaped version of - * the databaseId, `{1}` being collectionId and `{2}` being the documentId - * @hidden - */ -export declare function createDocumentUri(databaseId: string, collectionId: string, documentId: string): string; -/** - * Given a database, collection and document id, this creates a document link. - * Would be used when replacing or deleting a Permission in Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param userId -The user Id - * @param permissionId - The permissionId - * @returns A permission link in the format of `dbs/{0}/users/{1}/permissions/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being userId and `{2}` being permissionId - * @hidden - */ -export declare function createPermissionUri(databaseId: string, userId: string, permissionId: string): string; -/** - * Given a database, collection and stored proc id, this creates a stored proc link. - * Would be used when replacing, executing, or deleting a StoredProcedure in - * Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param storedProcedureId -The stored procedure Id - * @returns A stored procedure link in the format of - * `dbs/{0}/colls/{1}/sprocs/{2}` with `{0}` being a Uri escaped version of the databaseId, - * `{1}` being collectionId and `{2}` being the storedProcedureId - * @hidden - */ -export declare function createStoredProcedureUri(databaseId: string, collectionId: string, storedProcedureId: string): string; -/** - * Given a database, collection and trigger id, this creates a trigger link. - * Would be used when replacing, executing, or deleting a Trigger in Azure Cosmos DB database service - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param triggerId -The trigger Id - * @returns A trigger link in the format of - * `dbs/{0}/colls/{1}/triggers/{2}` with `{0}` being a Uri escaped version of the databaseId, - * `{1}` being collectionId and `{2}` being the triggerId - * @hidden - */ -export declare function createTriggerUri(databaseId: string, collectionId: string, triggerId: string): string; -/** - * Given a database, collection and udf id, this creates a udf link. - * Would be used when replacing, executing, or deleting a UserDefinedFunction in - * Azure Cosmos DB database service - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param udfId -The User Defined Function Id - * @returns A udf link in the format of `dbs/{0}/colls/{1}/udfs/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the udfId - * @hidden - */ -export declare function createUserDefinedFunctionUri(databaseId: string, collectionId: string, udfId: string): string; -/** - * Given a database, collection and conflict id, this creates a conflict link. - * Would be used when creating a Conflict in Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param conflictId -The conflict Id - * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId - * @hidden - */ -export declare function createConflictUri(databaseId: string, collectionId: string, conflictId: string): string; -/** - * Given a database, collection and conflict id, this creates a conflict link. - * Would be used when creating a Conflict in Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param documentId -The document Id - * @param attachmentId -The attachment Id - * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId - * @hidden - */ -export declare function createAttachmentUri(databaseId: string, collectionId: string, documentId: string, attachmentId: string): string; -/** - * Given a database and collection, this creates a partition key ranges link in - * the Azure Cosmos DB database service. - * @param databaseId - The database Id - * @param collectionId - The collection Id - * @returns A partition key ranges link in the format of - * `dbs/{0}/colls/{1}/pkranges` with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId - * @hidden - */ -export declare function createPartitionKeyRangesUri(databaseId: string, collectionId: string): string; -//# sourceMappingURL=uriFactory.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.d.ts.map deleted file mode 100644 index 4993056..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uriFactory.d.ts","sourceRoot":"","sources":["../../../src/common/uriFactory.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAK5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAO5F;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,CAWR;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,GACnB,MAAM,CAWR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,MAAM,GACxB,MAAM,CAWR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,MAAM,CAWR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GACZ,MAAM,CAWR;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,CAWR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CAWR;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAM5F"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.js deleted file mode 100644 index 34d61ae..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.js +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "./constants"; -import { trimSlashFromLeftAndRight, validateResourceId, validateItemResourceId } from "./helper"; -/** - * Would be used when creating or deleting a DocumentCollection - * or a User in Azure Cosmos DB database service - * @hidden - * Given a database id, this creates a database link. - * @param databaseId - The database id - * @returns A database link in the format of `dbs/{0}` - * with `{0}` being a Uri escaped version of the databaseId - */ -export function createDatabaseUri(databaseId) { - databaseId = trimSlashFromLeftAndRight(databaseId); - validateResourceId(databaseId); - return Constants.Path.DatabasesPathSegment + "/" + databaseId; -} -/** - * Given a database and collection id, this creates a collection link. - * Would be used when updating or deleting a DocumentCollection, creating a - * Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query - * with CreateDocumentQuery in Azure Cosmos DB database service. - * @param databaseId - The database id - * @param collectionId - The collection id - * @returns A collection link in the format of `dbs/{0}/colls/{1}` - * with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId - * @hidden - */ -export function createDocumentCollectionUri(databaseId, collectionId) { - collectionId = trimSlashFromLeftAndRight(collectionId); - validateResourceId(collectionId); - return (createDatabaseUri(databaseId) + "/" + Constants.Path.CollectionsPathSegment + "/" + collectionId); -} -/** - * Given a database and user id, this creates a user link. - * Would be used when creating a Permission, or when replacing or deleting - * a User in Azure Cosmos DB database service - * @param databaseId - The database id - * @param userId - The user id - * @returns A user link in the format of `dbs/{0}/users/{1}` - * with `{0}` being a Uri escaped version of the databaseId and `{1}` being userId - * @hidden - */ -export function createUserUri(databaseId, userId) { - userId = trimSlashFromLeftAndRight(userId); - validateResourceId(userId); - return createDatabaseUri(databaseId) + "/" + Constants.Path.UsersPathSegment + "/" + userId; -} -/** - * Given a database and collection id, this creates a collection link. - * Would be used when creating an Attachment, or when replacing - * or deleting a Document in Azure Cosmos DB database service - * @param databaseId - The database id - * @param collectionId - The collection id - * @param documentId - The document id - * @returns A document link in the format of - * `dbs/{0}/colls/{1}/docs/{2}` with `{0}` being a Uri escaped version of - * the databaseId, `{1}` being collectionId and `{2}` being the documentId - * @hidden - */ -export function createDocumentUri(databaseId, collectionId, documentId) { - documentId = trimSlashFromLeftAndRight(documentId); - validateItemResourceId(documentId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.DocumentsPathSegment + - "/" + - documentId); -} -/** - * Given a database, collection and document id, this creates a document link. - * Would be used when replacing or deleting a Permission in Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param userId -The user Id - * @param permissionId - The permissionId - * @returns A permission link in the format of `dbs/{0}/users/{1}/permissions/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being userId and `{2}` being permissionId - * @hidden - */ -export function createPermissionUri(databaseId, userId, permissionId) { - permissionId = trimSlashFromLeftAndRight(permissionId); - validateResourceId(permissionId); - return (createUserUri(databaseId, userId) + - "/" + - Constants.Path.PermissionsPathSegment + - "/" + - permissionId); -} -/** - * Given a database, collection and stored proc id, this creates a stored proc link. - * Would be used when replacing, executing, or deleting a StoredProcedure in - * Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param storedProcedureId -The stored procedure Id - * @returns A stored procedure link in the format of - * `dbs/{0}/colls/{1}/sprocs/{2}` with `{0}` being a Uri escaped version of the databaseId, - * `{1}` being collectionId and `{2}` being the storedProcedureId - * @hidden - */ -export function createStoredProcedureUri(databaseId, collectionId, storedProcedureId) { - storedProcedureId = trimSlashFromLeftAndRight(storedProcedureId); - validateResourceId(storedProcedureId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.StoredProceduresPathSegment + - "/" + - storedProcedureId); -} -/** - * Given a database, collection and trigger id, this creates a trigger link. - * Would be used when replacing, executing, or deleting a Trigger in Azure Cosmos DB database service - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param triggerId -The trigger Id - * @returns A trigger link in the format of - * `dbs/{0}/colls/{1}/triggers/{2}` with `{0}` being a Uri escaped version of the databaseId, - * `{1}` being collectionId and `{2}` being the triggerId - * @hidden - */ -export function createTriggerUri(databaseId, collectionId, triggerId) { - triggerId = trimSlashFromLeftAndRight(triggerId); - validateResourceId(triggerId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.TriggersPathSegment + - "/" + - triggerId); -} -/** - * Given a database, collection and udf id, this creates a udf link. - * Would be used when replacing, executing, or deleting a UserDefinedFunction in - * Azure Cosmos DB database service - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param udfId -The User Defined Function Id - * @returns A udf link in the format of `dbs/{0}/colls/{1}/udfs/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the udfId - * @hidden - */ -export function createUserDefinedFunctionUri(databaseId, collectionId, udfId) { - udfId = trimSlashFromLeftAndRight(udfId); - validateResourceId(udfId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.UserDefinedFunctionsPathSegment + - "/" + - udfId); -} -/** - * Given a database, collection and conflict id, this creates a conflict link. - * Would be used when creating a Conflict in Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param conflictId -The conflict Id - * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId - * @hidden - */ -export function createConflictUri(databaseId, collectionId, conflictId) { - conflictId = trimSlashFromLeftAndRight(conflictId); - validateResourceId(conflictId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.ConflictsPathSegment + - "/" + - conflictId); -} -/** - * Given a database, collection and conflict id, this creates a conflict link. - * Would be used when creating a Conflict in Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param documentId -The document Id - * @param attachmentId -The attachment Id - * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId - * @hidden - */ -export function createAttachmentUri(databaseId, collectionId, documentId, attachmentId) { - attachmentId = trimSlashFromLeftAndRight(attachmentId); - validateResourceId(attachmentId); - return (createDocumentUri(databaseId, collectionId, documentId) + - "/" + - Constants.Path.AttachmentsPathSegment + - "/" + - attachmentId); -} -/** - * Given a database and collection, this creates a partition key ranges link in - * the Azure Cosmos DB database service. - * @param databaseId - The database Id - * @param collectionId - The collection Id - * @returns A partition key ranges link in the format of - * `dbs/{0}/colls/{1}/pkranges` with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId - * @hidden - */ -export function createPartitionKeyRangesUri(databaseId, collectionId) { - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.PartitionKeyRangesPathSegment); -} -//# sourceMappingURL=uriFactory.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.js.map deleted file mode 100644 index e7bbf4e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/common/uriFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uriFactory.js","sourceRoot":"","sources":["../../../src/common/uriFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEjG;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB;IAClD,UAAU,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACnD,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAE/B,OAAO,SAAS,CAAC,IAAI,CAAC,oBAAoB,GAAG,GAAG,GAAG,UAAU,CAAC;AAChE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CAAC,UAAkB,EAAE,YAAoB;IAClF,YAAY,GAAG,yBAAyB,CAAC,YAAY,CAAC,CAAC;IACvD,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAEjC,OAAO,CACL,iBAAiB,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,sBAAsB,GAAG,GAAG,GAAG,YAAY,CACjG,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB,EAAE,MAAc;IAC9D,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G;QACH,SAAS,CAAC,IAAI,CAAC,sBAAsB;QACrC,GAAG;QACH,YAAY,CACb,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,2BAA2B,CAAC,UAAkB,EAAE,YAAoB;IAClF,OAAO,CACL,2BAA2B,CAAC,UAAU,EAAE,YAAY,CAAC;QACrD,GAAG;QACH,SAAS,CAAC,IAAI,CAAC,6BAA6B,CAC7C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"./constants\";\nimport { trimSlashFromLeftAndRight, validateResourceId, validateItemResourceId } from \"./helper\";\n\n/**\n * Would be used when creating or deleting a DocumentCollection\n * or a User in Azure Cosmos DB database service\n * @hidden\n * Given a database id, this creates a database link.\n * @param databaseId - The database id\n * @returns A database link in the format of `dbs/{0}`\n * with `{0}` being a Uri escaped version of the databaseId\n */\nexport function createDatabaseUri(databaseId: string): string {\n databaseId = trimSlashFromLeftAndRight(databaseId);\n validateResourceId(databaseId);\n\n return Constants.Path.DatabasesPathSegment + \"/\" + databaseId;\n}\n\n/**\n * Given a database and collection id, this creates a collection link.\n * Would be used when updating or deleting a DocumentCollection, creating a\n * Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query\n * with CreateDocumentQuery in Azure Cosmos DB database service.\n * @param databaseId - The database id\n * @param collectionId - The collection id\n * @returns A collection link in the format of `dbs/{0}/colls/{1}`\n * with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId\n * @hidden\n */\nexport function createDocumentCollectionUri(databaseId: string, collectionId: string): string {\n collectionId = trimSlashFromLeftAndRight(collectionId);\n validateResourceId(collectionId);\n\n return (\n createDatabaseUri(databaseId) + \"/\" + Constants.Path.CollectionsPathSegment + \"/\" + collectionId\n );\n}\n\n/**\n * Given a database and user id, this creates a user link.\n * Would be used when creating a Permission, or when replacing or deleting\n * a User in Azure Cosmos DB database service\n * @param databaseId - The database id\n * @param userId - The user id\n * @returns A user link in the format of `dbs/{0}/users/{1}`\n * with `{0}` being a Uri escaped version of the databaseId and `{1}` being userId\n * @hidden\n */\nexport function createUserUri(databaseId: string, userId: string): string {\n userId = trimSlashFromLeftAndRight(userId);\n validateResourceId(userId);\n\n return createDatabaseUri(databaseId) + \"/\" + Constants.Path.UsersPathSegment + \"/\" + userId;\n}\n\n/**\n * Given a database and collection id, this creates a collection link.\n * Would be used when creating an Attachment, or when replacing\n * or deleting a Document in Azure Cosmos DB database service\n * @param databaseId - The database id\n * @param collectionId - The collection id\n * @param documentId - The document id\n * @returns A document link in the format of\n * `dbs/{0}/colls/{1}/docs/{2}` with `{0}` being a Uri escaped version of\n * the databaseId, `{1}` being collectionId and `{2}` being the documentId\n * @hidden\n */\nexport function createDocumentUri(\n databaseId: string,\n collectionId: string,\n documentId: string\n): string {\n documentId = trimSlashFromLeftAndRight(documentId);\n validateItemResourceId(documentId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.DocumentsPathSegment +\n \"/\" +\n documentId\n );\n}\n\n/**\n * Given a database, collection and document id, this creates a document link.\n * Would be used when replacing or deleting a Permission in Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param userId -The user Id\n * @param permissionId - The permissionId\n * @returns A permission link in the format of `dbs/{0}/users/{1}/permissions/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being userId and `{2}` being permissionId\n * @hidden\n */\nexport function createPermissionUri(\n databaseId: string,\n userId: string,\n permissionId: string\n): string {\n permissionId = trimSlashFromLeftAndRight(permissionId);\n validateResourceId(permissionId);\n\n return (\n createUserUri(databaseId, userId) +\n \"/\" +\n Constants.Path.PermissionsPathSegment +\n \"/\" +\n permissionId\n );\n}\n\n/**\n * Given a database, collection and stored proc id, this creates a stored proc link.\n * Would be used when replacing, executing, or deleting a StoredProcedure in\n * Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param storedProcedureId -The stored procedure Id\n * @returns A stored procedure link in the format of\n * `dbs/{0}/colls/{1}/sprocs/{2}` with `{0}` being a Uri escaped version of the databaseId,\n * `{1}` being collectionId and `{2}` being the storedProcedureId\n * @hidden\n */\nexport function createStoredProcedureUri(\n databaseId: string,\n collectionId: string,\n storedProcedureId: string\n): string {\n storedProcedureId = trimSlashFromLeftAndRight(storedProcedureId);\n validateResourceId(storedProcedureId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.StoredProceduresPathSegment +\n \"/\" +\n storedProcedureId\n );\n}\n\n/**\n * Given a database, collection and trigger id, this creates a trigger link.\n * Would be used when replacing, executing, or deleting a Trigger in Azure Cosmos DB database service\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param triggerId -The trigger Id\n * @returns A trigger link in the format of\n * `dbs/{0}/colls/{1}/triggers/{2}` with `{0}` being a Uri escaped version of the databaseId,\n * `{1}` being collectionId and `{2}` being the triggerId\n * @hidden\n */\nexport function createTriggerUri(\n databaseId: string,\n collectionId: string,\n triggerId: string\n): string {\n triggerId = trimSlashFromLeftAndRight(triggerId);\n validateResourceId(triggerId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.TriggersPathSegment +\n \"/\" +\n triggerId\n );\n}\n\n/**\n * Given a database, collection and udf id, this creates a udf link.\n * Would be used when replacing, executing, or deleting a UserDefinedFunction in\n * Azure Cosmos DB database service\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param udfId -The User Defined Function Id\n * @returns A udf link in the format of `dbs/{0}/colls/{1}/udfs/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the udfId\n * @hidden\n */\nexport function createUserDefinedFunctionUri(\n databaseId: string,\n collectionId: string,\n udfId: string\n): string {\n udfId = trimSlashFromLeftAndRight(udfId);\n validateResourceId(udfId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.UserDefinedFunctionsPathSegment +\n \"/\" +\n udfId\n );\n}\n\n/**\n * Given a database, collection and conflict id, this creates a conflict link.\n * Would be used when creating a Conflict in Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param conflictId -The conflict Id\n * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId\n * @hidden\n */\nexport function createConflictUri(\n databaseId: string,\n collectionId: string,\n conflictId: string\n): string {\n conflictId = trimSlashFromLeftAndRight(conflictId);\n validateResourceId(conflictId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.ConflictsPathSegment +\n \"/\" +\n conflictId\n );\n}\n\n/**\n * Given a database, collection and conflict id, this creates a conflict link.\n * Would be used when creating a Conflict in Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param documentId -The document Id\n * @param attachmentId -The attachment Id\n * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId\n * @hidden\n */\nexport function createAttachmentUri(\n databaseId: string,\n collectionId: string,\n documentId: string,\n attachmentId: string\n): string {\n attachmentId = trimSlashFromLeftAndRight(attachmentId);\n validateResourceId(attachmentId);\n\n return (\n createDocumentUri(databaseId, collectionId, documentId) +\n \"/\" +\n Constants.Path.AttachmentsPathSegment +\n \"/\" +\n attachmentId\n );\n}\n\n/**\n * Given a database and collection, this creates a partition key ranges link in\n * the Azure Cosmos DB database service.\n * @param databaseId - The database Id\n * @param collectionId - The collection Id\n * @returns A partition key ranges link in the format of\n * `dbs/{0}/colls/{1}/pkranges` with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId\n * @hidden\n */\nexport function createPartitionKeyRangesUri(databaseId: string, collectionId: string): string {\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.PartitionKeyRangesPathSegment\n );\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.d.ts deleted file mode 100644 index 22c40e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. */ -export declare enum ConnectionMode { - /** Gateway mode talks to an intermediate gateway which handles the direct communication with your individual partitions. */ - Gateway = 0 -} -//# sourceMappingURL=ConnectionMode.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.d.ts.map deleted file mode 100644 index 959e991..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectionMode.d.ts","sourceRoot":"","sources":["../../../src/documents/ConnectionMode.ts"],"names":[],"mappings":"AAEA,4GAA4G;AAC5G,oBAAY,cAAc;IACxB,4HAA4H;IAC5H,OAAO,IAAI;CACZ"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.js deleted file mode 100644 index 1f7bc37..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. */ -export var ConnectionMode; -(function (ConnectionMode) { - /** Gateway mode talks to an intermediate gateway which handles the direct communication with your individual partitions. */ - ConnectionMode[ConnectionMode["Gateway"] = 0] = "Gateway"; -})(ConnectionMode || (ConnectionMode = {})); -//# sourceMappingURL=ConnectionMode.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.js.map deleted file mode 100644 index 2205aa0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionMode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectionMode.js","sourceRoot":"","sources":["../../../src/documents/ConnectionMode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4GAA4G;AAC5G,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,4HAA4H;IAC5H,yDAAW,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. */\nexport enum ConnectionMode {\n /** Gateway mode talks to an intermediate gateway which handles the direct communication with your individual partitions. */\n Gateway = 0,\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.d.ts deleted file mode 100644 index 696b317..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { RetryOptions } from "../retry/retryOptions"; -import { ConnectionMode } from "./ConnectionMode"; -/** - * Represents the Connection policy associated with a CosmosClient in the Azure Cosmos DB database service. - */ -export interface ConnectionPolicy { - /** Determines which mode to connect to Cosmos with. (Currently only supports Gateway option) */ - connectionMode?: ConnectionMode; - /** Request timeout (time to wait for response from network peer). Represented in milliseconds. */ - requestTimeout?: number; - /** - * Flag to enable/disable automatic redirecting of requests based on read/write operations. Default true. - * Required to call client.dispose() when this is set to true after destroying the CosmosClient inside another process or in the browser. - */ - enableEndpointDiscovery?: boolean; - /** List of azure regions to be used as preferred locations for read requests. */ - preferredLocations?: string[]; - /** RetryOptions object which defines several configurable properties used during retry. */ - retryOptions?: RetryOptions; - /** - * The flag that enables writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. - * Default is `false`. - */ - useMultipleWriteLocations?: boolean; - /** Rate in milliseconds at which the client will refresh the endpoints list in the background */ - endpointRefreshRateInMs?: number; - /** Flag to enable/disable background refreshing of endpoints. Defaults to false. - * Endpoint discovery using `enableEndpointsDiscovery` will still work for failed requests. */ - enableBackgroundEndpointRefreshing?: boolean; -} -/** - * @hidden - */ -export declare const defaultConnectionPolicy: ConnectionPolicy; -//# sourceMappingURL=ConnectionPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.d.ts.map deleted file mode 100644 index 2f08b29..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectionPolicy.d.ts","sourceRoot":"","sources":["../../../src/documents/ConnectionPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gGAAgG;IAChG,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,kGAAkG;IAClG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,2FAA2F;IAC3F,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iGAAiG;IACjG,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;kGAC8F;IAC9F,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAapC,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.js deleted file mode 100644 index 17707a0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.js +++ /dev/null @@ -1,19 +0,0 @@ -import { ConnectionMode } from "./ConnectionMode"; -/** - * @hidden - */ -export const defaultConnectionPolicy = Object.freeze({ - connectionMode: ConnectionMode.Gateway, - requestTimeout: 60000, - enableEndpointDiscovery: true, - preferredLocations: [], - retryOptions: { - maxRetryAttemptCount: 9, - fixedRetryIntervalInMilliseconds: 0, - maxWaitTimeInSeconds: 30, - }, - useMultipleWriteLocations: true, - endpointRefreshRateInMs: 300000, - enableBackgroundEndpointRefreshing: true, -}); -//# sourceMappingURL=ConnectionPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.js.map deleted file mode 100644 index e770a14..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConnectionPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectionPolicy.js","sourceRoot":"","sources":["../../../src/documents/ConnectionPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA8BlD;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAqB,MAAM,CAAC,MAAM,CAAC;IACrE,cAAc,EAAE,cAAc,CAAC,OAAO;IACtC,cAAc,EAAE,KAAK;IACrB,uBAAuB,EAAE,IAAI;IAC7B,kBAAkB,EAAE,EAAE;IACtB,YAAY,EAAE;QACZ,oBAAoB,EAAE,CAAC;QACvB,gCAAgC,EAAE,CAAC;QACnC,oBAAoB,EAAE,EAAE;KACzB;IACD,yBAAyB,EAAE,IAAI;IAC/B,uBAAuB,EAAE,MAAM;IAC/B,kCAAkC,EAAE,IAAI;CACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { RetryOptions } from \"../retry/retryOptions\";\nimport { ConnectionMode } from \"./ConnectionMode\";\n/**\n * Represents the Connection policy associated with a CosmosClient in the Azure Cosmos DB database service.\n */\nexport interface ConnectionPolicy {\n /** Determines which mode to connect to Cosmos with. (Currently only supports Gateway option) */\n connectionMode?: ConnectionMode;\n /** Request timeout (time to wait for response from network peer). Represented in milliseconds. */\n requestTimeout?: number;\n /**\n * Flag to enable/disable automatic redirecting of requests based on read/write operations. Default true.\n * Required to call client.dispose() when this is set to true after destroying the CosmosClient inside another process or in the browser.\n */\n enableEndpointDiscovery?: boolean;\n /** List of azure regions to be used as preferred locations for read requests. */\n preferredLocations?: string[];\n /** RetryOptions object which defines several configurable properties used during retry. */\n retryOptions?: RetryOptions;\n /**\n * The flag that enables writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service.\n * Default is `false`.\n */\n useMultipleWriteLocations?: boolean;\n /** Rate in milliseconds at which the client will refresh the endpoints list in the background */\n endpointRefreshRateInMs?: number;\n /** Flag to enable/disable background refreshing of endpoints. Defaults to false.\n * Endpoint discovery using `enableEndpointsDiscovery` will still work for failed requests. */\n enableBackgroundEndpointRefreshing?: boolean;\n}\n\n/**\n * @hidden\n */\nexport const defaultConnectionPolicy: ConnectionPolicy = Object.freeze({\n connectionMode: ConnectionMode.Gateway,\n requestTimeout: 60000,\n enableEndpointDiscovery: true,\n preferredLocations: [],\n retryOptions: {\n maxRetryAttemptCount: 9,\n fixedRetryIntervalInMilliseconds: 0,\n maxWaitTimeInSeconds: 30,\n },\n useMultipleWriteLocations: true,\n endpointRefreshRateInMs: 300000,\n enableBackgroundEndpointRefreshing: true,\n});\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.d.ts deleted file mode 100644 index 6ae59ae..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Represents the consistency levels supported for Azure Cosmos DB client operations.
- * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. - * Consistency levels. - * - * Consistency levels by order of strength are Strong, BoundedStaleness, Session, Consistent Prefix, and Eventual. - * - * See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels. - */ -export declare enum ConsistencyLevel { - /** - * Strong Consistency guarantees that read operations always return the value that was last written. - */ - Strong = "Strong", - /** - * Bounded Staleness guarantees that reads are not too out-of-date. - * This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds). - */ - BoundedStaleness = "BoundedStaleness", - /** - * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), - * monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) - * within any single session. - */ - Session = "Session", - /** - * Eventual Consistency guarantees that reads will return a subset of writes. - * All writes will be eventually be available for reads. - */ - Eventual = "Eventual", - /** - * ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. - * All writes will be eventually be available for reads. - */ - ConsistentPrefix = "ConsistentPrefix" -} -//# sourceMappingURL=ConsistencyLevel.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.d.ts.map deleted file mode 100644 index c123c25..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConsistencyLevel.d.ts","sourceRoot":"","sources":["../../../src/documents/ConsistencyLevel.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,oBAAY,gBAAgB;IAC1B;;OAEG;IACH,MAAM,WAAW;IACjB;;;OAGG;IACH,gBAAgB,qBAAqB;IACrC;;;;OAIG;IACH,OAAO,YAAY;IACnB;;;OAGG;IACH,QAAQ,aAAa;IACrB;;;OAGG;IACH,gBAAgB,qBAAqB;CACtC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.js deleted file mode 100644 index 99701fe..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Represents the consistency levels supported for Azure Cosmos DB client operations.
- * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. - * Consistency levels. - * - * Consistency levels by order of strength are Strong, BoundedStaleness, Session, Consistent Prefix, and Eventual. - * - * See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels. - */ -export var ConsistencyLevel; -(function (ConsistencyLevel) { - /** - * Strong Consistency guarantees that read operations always return the value that was last written. - */ - ConsistencyLevel["Strong"] = "Strong"; - /** - * Bounded Staleness guarantees that reads are not too out-of-date. - * This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds). - */ - ConsistencyLevel["BoundedStaleness"] = "BoundedStaleness"; - /** - * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), - * monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) - * within any single session. - */ - ConsistencyLevel["Session"] = "Session"; - /** - * Eventual Consistency guarantees that reads will return a subset of writes. - * All writes will be eventually be available for reads. - */ - ConsistencyLevel["Eventual"] = "Eventual"; - /** - * ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. - * All writes will be eventually be available for reads. - */ - ConsistencyLevel["ConsistentPrefix"] = "ConsistentPrefix"; -})(ConsistencyLevel || (ConsistencyLevel = {})); -//# sourceMappingURL=ConsistencyLevel.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.js.map deleted file mode 100644 index 0d98173..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/ConsistencyLevel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConsistencyLevel.js","sourceRoot":"","sources":["../../../src/documents/ConsistencyLevel.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,gBA0BX;AA1BD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,qCAAiB,CAAA;IACjB;;;OAGG;IACH,yDAAqC,CAAA;IACrC;;;;OAIG;IACH,uCAAmB,CAAA;IACnB;;;OAGG;IACH,yCAAqB,CAAA;IACrB;;;OAGG;IACH,yDAAqC,CAAA;AACvC,CAAC,EA1BW,gBAAgB,KAAhB,gBAAgB,QA0B3B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Represents the consistency levels supported for Azure Cosmos DB client operations.
\n * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account.\n * Consistency levels.\n *\n * Consistency levels by order of strength are Strong, BoundedStaleness, Session, Consistent Prefix, and Eventual.\n *\n * See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels.\n */\nexport enum ConsistencyLevel {\n /**\n * Strong Consistency guarantees that read operations always return the value that was last written.\n */\n Strong = \"Strong\",\n /**\n * Bounded Staleness guarantees that reads are not too out-of-date.\n * This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds).\n */\n BoundedStaleness = \"BoundedStaleness\",\n /**\n * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again),\n * monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads)\n * within any single session.\n */\n Session = \"Session\",\n /**\n * Eventual Consistency guarantees that reads will return a subset of writes.\n * All writes will be eventually be available for reads.\n */\n Eventual = \"Eventual\",\n /**\n * ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps.\n * All writes will be eventually be available for reads.\n */\n ConsistentPrefix = \"ConsistentPrefix\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.d.ts deleted file mode 100644 index 6090711..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** Defines a target data type of an index path specification in the Azure Cosmos DB service. */ -export declare enum DataType { - /** Represents a numeric data type. */ - Number = "Number", - /** Represents a string data type. */ - String = "String", - /** Represents a point data type. */ - Point = "Point", - /** Represents a line string data type. */ - LineString = "LineString", - /** Represents a polygon data type. */ - Polygon = "Polygon", - /** Represents a multi-polygon data type. */ - MultiPolygon = "MultiPolygon" -} -//# sourceMappingURL=DataType.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.d.ts.map deleted file mode 100644 index 5f5f4cf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DataType.d.ts","sourceRoot":"","sources":["../../../src/documents/DataType.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,oBAAY,QAAQ;IAClB,sCAAsC;IACtC,MAAM,WAAW;IACjB,qCAAqC;IACrC,MAAM,WAAW;IACjB,oCAAoC;IACpC,KAAK,UAAU;IACf,0CAA0C;IAC1C,UAAU,eAAe;IACzB,sCAAsC;IACtC,OAAO,YAAY;IACnB,4CAA4C;IAC5C,YAAY,iBAAiB;CAC9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.js deleted file mode 100644 index 5163614..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** Defines a target data type of an index path specification in the Azure Cosmos DB service. */ -export var DataType; -(function (DataType) { - /** Represents a numeric data type. */ - DataType["Number"] = "Number"; - /** Represents a string data type. */ - DataType["String"] = "String"; - /** Represents a point data type. */ - DataType["Point"] = "Point"; - /** Represents a line string data type. */ - DataType["LineString"] = "LineString"; - /** Represents a polygon data type. */ - DataType["Polygon"] = "Polygon"; - /** Represents a multi-polygon data type. */ - DataType["MultiPolygon"] = "MultiPolygon"; -})(DataType || (DataType = {})); -//# sourceMappingURL=DataType.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.js.map deleted file mode 100644 index 8682dbd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DataType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DataType.js","sourceRoot":"","sources":["../../../src/documents/DataType.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,gGAAgG;AAChG,MAAM,CAAN,IAAY,QAaX;AAbD,WAAY,QAAQ;IAClB,sCAAsC;IACtC,6BAAiB,CAAA;IACjB,qCAAqC;IACrC,6BAAiB,CAAA;IACjB,oCAAoC;IACpC,2BAAe,CAAA;IACf,0CAA0C;IAC1C,qCAAyB,CAAA;IACzB,sCAAsC;IACtC,+BAAmB,CAAA;IACnB,4CAA4C;IAC5C,yCAA6B,CAAA;AAC/B,CAAC,EAbW,QAAQ,KAAR,QAAQ,QAanB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** Defines a target data type of an index path specification in the Azure Cosmos DB service. */\nexport enum DataType {\n /** Represents a numeric data type. */\n Number = \"Number\",\n /** Represents a string data type. */\n String = \"String\",\n /** Represents a point data type. */\n Point = \"Point\",\n /** Represents a line string data type. */\n LineString = \"LineString\",\n /** Represents a polygon data type. */\n Polygon = \"Polygon\",\n /** Represents a multi-polygon data type. */\n MultiPolygon = \"MultiPolygon\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.d.ts deleted file mode 100644 index a354a80..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { CosmosHeaders } from "../queryExecutionContext"; -import { ConsistencyLevel } from "./ConsistencyLevel"; -/** - * Represents a DatabaseAccount in the Azure Cosmos DB database service. - */ -export declare class DatabaseAccount { - /** The list of writable locations for a geo-replicated database account. */ - readonly writableLocations: Location[]; - /** The list of readable locations for a geo-replicated database account. */ - readonly readableLocations: Location[]; - /** - * The self-link for Databases in the databaseAccount. - * @deprecated Use `databasesLink` - */ - get DatabasesLink(): string; - /** The self-link for Databases in the databaseAccount. */ - readonly databasesLink: string; - /** - * The self-link for Media in the databaseAccount. - * @deprecated Use `mediaLink` - */ - get MediaLink(): string; - /** The self-link for Media in the databaseAccount. */ - readonly mediaLink: string; - /** - * Attachment content (media) storage quota in MBs ( Retrieved from gateway ). - * @deprecated use `maxMediaStorageUsageInMB` - */ - get MaxMediaStorageUsageInMB(): number; - /** Attachment content (media) storage quota in MBs ( Retrieved from gateway ). */ - readonly maxMediaStorageUsageInMB: number; - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - * - * @deprecated use `currentMediaStorageUsageInMB` - */ - get CurrentMediaStorageUsageInMB(): number; - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - */ - readonly currentMediaStorageUsageInMB: number; - /** - * Gets the UserConsistencyPolicy settings. - * @deprecated use `consistencyPolicy` - */ - get ConsistencyPolicy(): ConsistencyLevel; - /** Gets the UserConsistencyPolicy settings. */ - readonly consistencyPolicy: ConsistencyLevel; - readonly enableMultipleWritableLocations: boolean; - constructor(body: { - [key: string]: any; - }, headers: CosmosHeaders); -} -/** - * Used to specify the locations that are available, read is index 1 and write is index 0. - */ -export interface Location { - name: string; - databaseAccountEndpoint: string; - unavailable?: boolean; - lastUnavailabilityTimestampInMs?: number; -} -//# sourceMappingURL=DatabaseAccount.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.d.ts.map deleted file mode 100644 index fc379ca..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseAccount.d.ts","sourceRoot":"","sources":["../../../src/documents/DatabaseAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,qBAAa,eAAe;IAC1B,4EAA4E;IAC5E,SAAgB,iBAAiB,EAAE,QAAQ,EAAE,CAAM;IACnD,4EAA4E;IAC5E,SAAgB,iBAAiB,EAAE,QAAQ,EAAE,CAAM;IACnD;;;OAGG;IACH,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,0DAA0D;IAC1D,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC;;;OAGG;IACH,IAAW,SAAS,IAAI,MAAM,CAE7B;IACD,sDAAsD;IACtD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,IAAW,wBAAwB,IAAI,MAAM,CAE5C;IACD,kFAAkF;IAClF,SAAgB,wBAAwB,EAAE,MAAM,CAAC;IACjD;;;;;;;OAOG;IACH,IAAW,4BAA4B,IAAI,MAAM,CAEhD;IACD;;;;;OAKG;IACH,SAAgB,4BAA4B,EAAE,MAAM,CAAC;IACrD;;;OAGG;IACH,IAAW,iBAAiB,IAAI,gBAAgB,CAE/C;IACD,+CAA+C;IAC/C,SAAgB,iBAAiB,EAAE,gBAAgB,CAAC;IACpD,SAAgB,+BAA+B,EAAE,OAAO,CAAC;gBAGtC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAAE,OAAO,EAAE,aAAa;CAoBxE;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.js deleted file mode 100644 index 31e09f7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "../common"; -import { ConsistencyLevel } from "./ConsistencyLevel"; -/** - * Represents a DatabaseAccount in the Azure Cosmos DB database service. - */ -export class DatabaseAccount { - // TODO: body - any - constructor(body, headers) { - /** The list of writable locations for a geo-replicated database account. */ - this.writableLocations = []; - /** The list of readable locations for a geo-replicated database account. */ - this.readableLocations = []; - this.databasesLink = "/dbs/"; - this.mediaLink = "/media/"; - this.maxMediaStorageUsageInMB = headers[Constants.HttpHeaders.MaxMediaStorageUsageInMB]; - this.currentMediaStorageUsageInMB = headers[Constants.HttpHeaders.CurrentMediaStorageUsageInMB]; - this.consistencyPolicy = body.userConsistencyPolicy - ? body.userConsistencyPolicy.defaultConsistencyLevel - : ConsistencyLevel.Session; - if (body[Constants.WritableLocations] && body.id !== "localhost") { - this.writableLocations = body[Constants.WritableLocations]; - } - if (body[Constants.ReadableLocations] && body.id !== "localhost") { - this.readableLocations = body[Constants.ReadableLocations]; - } - if (body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]) { - this.enableMultipleWritableLocations = - body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === true || - body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === "true"; - } - } - /** - * The self-link for Databases in the databaseAccount. - * @deprecated Use `databasesLink` - */ - get DatabasesLink() { - return this.databasesLink; - } - /** - * The self-link for Media in the databaseAccount. - * @deprecated Use `mediaLink` - */ - get MediaLink() { - return this.mediaLink; - } - /** - * Attachment content (media) storage quota in MBs ( Retrieved from gateway ). - * @deprecated use `maxMediaStorageUsageInMB` - */ - get MaxMediaStorageUsageInMB() { - return this.maxMediaStorageUsageInMB; - } - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - * - * @deprecated use `currentMediaStorageUsageInMB` - */ - get CurrentMediaStorageUsageInMB() { - return this.currentMediaStorageUsageInMB; - } - /** - * Gets the UserConsistencyPolicy settings. - * @deprecated use `consistencyPolicy` - */ - get ConsistencyPolicy() { - return this.consistencyPolicy; - } -} -//# sourceMappingURL=DatabaseAccount.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.js.map deleted file mode 100644 index 954e5b9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/DatabaseAccount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DatabaseAccount.js","sourceRoot":"","sources":["../../../src/documents/DatabaseAccount.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,eAAe;IA6D1B,mBAAmB;IACnB,YAAmB,IAA4B,EAAE,OAAsB;QA7DvE,4EAA4E;QAC5D,sBAAiB,GAAe,EAAE,CAAC;QACnD,4EAA4E;QAC5D,sBAAiB,GAAe,EAAE,CAAC;QA2DjD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;QACxF,IAAI,CAAC,4BAA4B,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;QAChG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,qBAAqB;YACjD,CAAC,CAAE,IAAI,CAAC,qBAAqB,CAAC,uBAA4C;YAC1E,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC;QAC7B,IAAI,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,WAAW,EAAE;YAChE,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAe,CAAC;SAC1E;QACD,IAAI,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,WAAW,EAAE;YAChE,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAe,CAAC;SAC1E;QACD,IAAI,IAAI,CAAC,SAAS,CAAC,kCAAkC,CAAC,EAAE;YACtD,IAAI,CAAC,+BAA+B;gBAClC,IAAI,CAAC,SAAS,CAAC,kCAAkC,CAAC,KAAK,IAAI;oBAC3D,IAAI,CAAC,SAAS,CAAC,kCAAkC,CAAC,KAAK,MAAM,CAAC;SACjE;IACH,CAAC;IA5ED;;;OAGG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAGD;;;OAGG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;;OAGG;IACH,IAAW,wBAAwB;QACjC,OAAO,IAAI,CAAC,wBAAwB,CAAC;IACvC,CAAC;IAGD;;;;;;;OAOG;IACH,IAAW,4BAA4B;QACrC,OAAO,IAAI,CAAC,4BAA4B,CAAC;IAC3C,CAAC;IAQD;;;OAGG;IACH,IAAW,iBAAiB;QAC1B,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;CA0BF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\nimport { ConsistencyLevel } from \"./ConsistencyLevel\";\n\n/**\n * Represents a DatabaseAccount in the Azure Cosmos DB database service.\n */\nexport class DatabaseAccount {\n /** The list of writable locations for a geo-replicated database account. */\n public readonly writableLocations: Location[] = [];\n /** The list of readable locations for a geo-replicated database account. */\n public readonly readableLocations: Location[] = [];\n /**\n * The self-link for Databases in the databaseAccount.\n * @deprecated Use `databasesLink`\n */\n public get DatabasesLink(): string {\n return this.databasesLink;\n }\n /** The self-link for Databases in the databaseAccount. */\n public readonly databasesLink: string;\n /**\n * The self-link for Media in the databaseAccount.\n * @deprecated Use `mediaLink`\n */\n public get MediaLink(): string {\n return this.mediaLink;\n }\n /** The self-link for Media in the databaseAccount. */\n public readonly mediaLink: string;\n /**\n * Attachment content (media) storage quota in MBs ( Retrieved from gateway ).\n * @deprecated use `maxMediaStorageUsageInMB`\n */\n public get MaxMediaStorageUsageInMB(): number {\n return this.maxMediaStorageUsageInMB;\n }\n /** Attachment content (media) storage quota in MBs ( Retrieved from gateway ). */\n public readonly maxMediaStorageUsageInMB: number;\n /**\n * Current attachment content (media) usage in MBs (Retrieved from gateway )\n *\n * Value is returned from cached information updated periodically and is not guaranteed\n * to be real time.\n *\n * @deprecated use `currentMediaStorageUsageInMB`\n */\n public get CurrentMediaStorageUsageInMB(): number {\n return this.currentMediaStorageUsageInMB;\n }\n /**\n * Current attachment content (media) usage in MBs (Retrieved from gateway )\n *\n * Value is returned from cached information updated periodically and is not guaranteed\n * to be real time.\n */\n public readonly currentMediaStorageUsageInMB: number;\n /**\n * Gets the UserConsistencyPolicy settings.\n * @deprecated use `consistencyPolicy`\n */\n public get ConsistencyPolicy(): ConsistencyLevel {\n return this.consistencyPolicy;\n }\n /** Gets the UserConsistencyPolicy settings. */\n public readonly consistencyPolicy: ConsistencyLevel;\n public readonly enableMultipleWritableLocations: boolean;\n\n // TODO: body - any\n public constructor(body: { [key: string]: any }, headers: CosmosHeaders) {\n this.databasesLink = \"/dbs/\";\n this.mediaLink = \"/media/\";\n this.maxMediaStorageUsageInMB = headers[Constants.HttpHeaders.MaxMediaStorageUsageInMB];\n this.currentMediaStorageUsageInMB = headers[Constants.HttpHeaders.CurrentMediaStorageUsageInMB];\n this.consistencyPolicy = body.userConsistencyPolicy\n ? (body.userConsistencyPolicy.defaultConsistencyLevel as ConsistencyLevel)\n : ConsistencyLevel.Session;\n if (body[Constants.WritableLocations] && body.id !== \"localhost\") {\n this.writableLocations = body[Constants.WritableLocations] as Location[];\n }\n if (body[Constants.ReadableLocations] && body.id !== \"localhost\") {\n this.readableLocations = body[Constants.ReadableLocations] as Location[];\n }\n if (body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]) {\n this.enableMultipleWritableLocations =\n body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === true ||\n body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === \"true\";\n }\n }\n}\n\n/**\n * Used to specify the locations that are available, read is index 1 and write is index 0.\n */\nexport interface Location {\n name: string;\n databaseAccountEndpoint: string;\n unavailable?: boolean;\n lastUnavailabilityTimestampInMs?: number;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.d.ts deleted file mode 100644 index 870e3f3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Document { - [key: string]: any; -} -//# sourceMappingURL=Document.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.d.ts.map deleted file mode 100644 index e16e796..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../../src/documents/Document.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.js deleted file mode 100644 index 5ec9a63..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Document.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.js.map deleted file mode 100644 index e9692e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/Document.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Document.js","sourceRoot":"","sources":["../../../src/documents/Document.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface Document {\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.d.ts deleted file mode 100644 index bd961cf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum GeospatialType { - /** Represents data in round-earth coordinate system. */ - Geography = "Geography", - /** Represents data in Eucledian(flat) coordinate system. */ - Geometry = "Geometry" -} -//# sourceMappingURL=GeospatialType.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.d.ts.map deleted file mode 100644 index e7b17cc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GeospatialType.d.ts","sourceRoot":"","sources":["../../../src/documents/GeospatialType.ts"],"names":[],"mappings":"AAGA,oBAAY,cAAc;IACxB,wDAAwD;IACxD,SAAS,cAAc;IACvB,4DAA4D;IAC5D,QAAQ,aAAa;CACtB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.js deleted file mode 100644 index 53fdbd9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export var GeospatialType; -(function (GeospatialType) { - /** Represents data in round-earth coordinate system. */ - GeospatialType["Geography"] = "Geography"; - /** Represents data in Eucledian(flat) coordinate system. */ - GeospatialType["Geometry"] = "Geometry"; -})(GeospatialType || (GeospatialType = {})); -//# sourceMappingURL=GeospatialType.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.js.map deleted file mode 100644 index f4ec1b4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/GeospatialType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GeospatialType.js","sourceRoot":"","sources":["../../../src/documents/GeospatialType.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,wDAAwD;IACxD,yCAAuB,CAAA;IACvB,4DAA4D;IAC5D,uCAAqB,CAAA;AACvB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport enum GeospatialType {\n /** Represents data in round-earth coordinate system. */\n Geography = \"Geography\",\n /** Represents data in Eucledian(flat) coordinate system. */\n Geometry = \"Geometry\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.d.ts deleted file mode 100644 index 96a3c46..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Specifies the supported Index types. - */ -export declare enum IndexKind { - /** - * This is supplied for a path which requires sorting. - */ - Range = "Range", - /** - * This is supplied for a path which requires geospatial indexing. - */ - Spatial = "Spatial" -} -//# sourceMappingURL=IndexKind.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.d.ts.map deleted file mode 100644 index 3baa478..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IndexKind.d.ts","sourceRoot":"","sources":["../../../src/documents/IndexKind.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS;IACnB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,OAAO,YAAY;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.js deleted file mode 100644 index a23dc48..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Specifies the supported Index types. - */ -export var IndexKind; -(function (IndexKind) { - /** - * This is supplied for a path which requires sorting. - */ - IndexKind["Range"] = "Range"; - /** - * This is supplied for a path which requires geospatial indexing. - */ - IndexKind["Spatial"] = "Spatial"; -})(IndexKind || (IndexKind = {})); -//# sourceMappingURL=IndexKind.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.js.map deleted file mode 100644 index 33936e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexKind.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IndexKind.js","sourceRoot":"","sources":["../../../src/documents/IndexKind.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB;;OAEG;IACH,4BAAe,CAAA;IACf;;OAEG;IACH,gCAAmB,CAAA;AACrB,CAAC,EATW,SAAS,KAAT,SAAS,QASpB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Specifies the supported Index types.\n */\nexport enum IndexKind {\n /**\n * This is supplied for a path which requires sorting.\n */\n Range = \"Range\",\n /**\n * This is supplied for a path which requires geospatial indexing.\n */\n Spatial = \"Spatial\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.d.ts deleted file mode 100644 index 080eb80..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Specifies the supported indexing modes. - */ -export declare enum IndexingMode { - /** - * Index is updated synchronously with a create or update operation. - * - * With consistent indexing, query behavior is the same as the default consistency level for the container. - * The index is always kept up to date with the data. - */ - consistent = "consistent", - /** - * Index is updated asynchronously with respect to a create or update operation. - * - * With lazy indexing, queries are eventually consistent. The index is updated when the container is idle. - */ - lazy = "lazy", - /** No Index is provided. */ - none = "none" -} -//# sourceMappingURL=IndexingMode.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.d.ts.map deleted file mode 100644 index 1ed4154..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IndexingMode.d.ts","sourceRoot":"","sources":["../../../src/documents/IndexingMode.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,YAAY;IACtB;;;;;OAKG;IACH,UAAU,eAAe;IACzB;;;;OAIG;IACH,IAAI,SAAS;IACb,4BAA4B;IAC5B,IAAI,SAAS;CACd"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.js deleted file mode 100644 index 74c3a39..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Specifies the supported indexing modes. - */ -export var IndexingMode; -(function (IndexingMode) { - /** - * Index is updated synchronously with a create or update operation. - * - * With consistent indexing, query behavior is the same as the default consistency level for the container. - * The index is always kept up to date with the data. - */ - IndexingMode["consistent"] = "consistent"; - /** - * Index is updated asynchronously with respect to a create or update operation. - * - * With lazy indexing, queries are eventually consistent. The index is updated when the container is idle. - */ - IndexingMode["lazy"] = "lazy"; - /** No Index is provided. */ - IndexingMode["none"] = "none"; -})(IndexingMode || (IndexingMode = {})); -//# sourceMappingURL=IndexingMode.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.js.map deleted file mode 100644 index c2c18ad..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingMode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IndexingMode.js","sourceRoot":"","sources":["../../../src/documents/IndexingMode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACH,MAAM,CAAN,IAAY,YAgBX;AAhBD,WAAY,YAAY;IACtB;;;;;OAKG;IACH,yCAAyB,CAAA;IACzB;;;;OAIG;IACH,6BAAa,CAAA;IACb,4BAA4B;IAC5B,6BAAa,CAAA;AACf,CAAC,EAhBW,YAAY,KAAZ,YAAY,QAgBvB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Specifies the supported indexing modes.\n */\nexport enum IndexingMode {\n /**\n * Index is updated synchronously with a create or update operation.\n *\n * With consistent indexing, query behavior is the same as the default consistency level for the container.\n * The index is always kept up to date with the data.\n */\n consistent = \"consistent\",\n /**\n * Index is updated asynchronously with respect to a create or update operation.\n *\n * With lazy indexing, queries are eventually consistent. The index is updated when the container is idle.\n */\n lazy = \"lazy\",\n /** No Index is provided. */\n none = \"none\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.d.ts deleted file mode 100644 index 40c91a7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { DataType, IndexingMode, IndexKind } from "./index"; -export interface IndexingPolicy { - /** The indexing mode (consistent or lazy) {@link IndexingMode}. */ - indexingMode?: keyof typeof IndexingMode; - automatic?: boolean; - /** An array of {@link IncludedPath} represents the paths to be included for indexing. */ - includedPaths?: IndexedPath[]; - /** An array of {@link IncludedPath} represents the paths to be excluded for indexing. */ - excludedPaths?: IndexedPath[]; - spatialIndexes?: SpatialIndex[]; -} -export declare enum SpatialType { - LineString = "LineString", - MultiPolygon = "MultiPolygon", - Point = "Point", - Polygon = "Polygon" -} -export interface SpatialIndex { - path: string; - types: SpatialType[]; - boundingBox: { - xmin: number; - ymin: number; - xmax: number; - ymax: number; - }; -} -export interface IndexedPath { - path: string; - indexes?: Index[]; -} -export interface Index { - kind: keyof typeof IndexKind; - dataType: keyof typeof DataType; - precision?: number; -} -//# sourceMappingURL=IndexingPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.d.ts.map deleted file mode 100644 index e2d60fc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IndexingPolicy.d.ts","sourceRoot":"","sources":["../../../src/documents/IndexingPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yFAAyF;IACzF,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9B,yFAAyF;IACzF,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9B,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;CACjC;AAGD,oBAAY,WAAW;IACrB,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,YAAY;IAE3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IAErB,WAAW,EAAE;QAEX,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,OAAO,SAAS,CAAC;IAC7B,QAAQ,EAAE,MAAM,OAAO,QAAQ,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.js deleted file mode 100644 index 06feeb2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.js +++ /dev/null @@ -1,9 +0,0 @@ -/* The target data type of a spatial path */ -export var SpatialType; -(function (SpatialType) { - SpatialType["LineString"] = "LineString"; - SpatialType["MultiPolygon"] = "MultiPolygon"; - SpatialType["Point"] = "Point"; - SpatialType["Polygon"] = "Polygon"; -})(SpatialType || (SpatialType = {})); -//# sourceMappingURL=IndexingPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.js.map deleted file mode 100644 index 0d7bc7a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/IndexingPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IndexingPolicy.js","sourceRoot":"","sources":["../../../src/documents/IndexingPolicy.ts"],"names":[],"mappings":"AAeA,4CAA4C;AAC5C,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,wCAAyB,CAAA;IACzB,4CAA6B,CAAA;IAC7B,8BAAe,CAAA;IACf,kCAAmB,CAAA;AACrB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { DataType, IndexingMode, IndexKind } from \"./index\";\n\nexport interface IndexingPolicy {\n /** The indexing mode (consistent or lazy) {@link IndexingMode}. */\n indexingMode?: keyof typeof IndexingMode;\n automatic?: boolean;\n /** An array of {@link IncludedPath} represents the paths to be included for indexing. */\n includedPaths?: IndexedPath[];\n /** An array of {@link IncludedPath} represents the paths to be excluded for indexing. */\n excludedPaths?: IndexedPath[];\n spatialIndexes?: SpatialIndex[];\n}\n\n/* The target data type of a spatial path */\nexport enum SpatialType {\n LineString = \"LineString\",\n MultiPolygon = \"MultiPolygon\",\n Point = \"Point\",\n Polygon = \"Polygon\",\n}\n\nexport interface SpatialIndex {\n /* Path in JSON document to index */\n path: string;\n types: SpatialType[];\n /* Bounding box for geometry spatial path */\n boundingBox: {\n /* X-coordinate of the lower-left corner of the bounding box. */\n xmin: number;\n /* Y-coordinate of the lower-left corner of the bounding box. */\n ymin: number;\n /* X-coordinate of the upper-right corner of the bounding box. */\n xmax: number;\n /* Y-coordinate of the upper-right corner of the bounding box. */\n ymax: number;\n };\n}\n\nexport interface IndexedPath {\n path: string;\n indexes?: Index[];\n}\n\nexport interface Index {\n kind: keyof typeof IndexKind;\n dataType: keyof typeof DataType;\n precision?: number;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.d.ts deleted file mode 100644 index 7a9dd9d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { PartitionKeyDefinition } from "./PartitionKeyDefinition"; -export declare type PartitionKey = PartitionKeyDefinition | string | number | unknown; -//# sourceMappingURL=PartitionKey.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.d.ts.map deleted file mode 100644 index 2cf3f0d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PartitionKey.d.ts","sourceRoot":"","sources":["../../../src/documents/PartitionKey.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,oBAAY,YAAY,GAAG,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.js deleted file mode 100644 index 89deaf2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=PartitionKey.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.js.map deleted file mode 100644 index bfb95d1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKey.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PartitionKey.js","sourceRoot":"","sources":["../../../src/documents/PartitionKey.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyDefinition } from \"./PartitionKeyDefinition\";\n\nexport type PartitionKey = PartitionKeyDefinition | string | number | unknown;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.d.ts deleted file mode 100644 index 1f92f39..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface PartitionKeyDefinition { - /** - * An array of paths for which data within the collection can be partitioned. Paths must not contain a wildcard or - * a trailing slash. For example, the JSON property “AccountNumber” is specified as “/AccountNumber”. The array must - * contain only a single value. - */ - paths: string[]; - /** - * An optional field, if not specified the default value is 1. To use the large partition key set the version to 2. - * To learn about large partition keys, see [how to create containers with large partition key](https://docs.microsoft.com/en-us/azure/cosmos-db/large-partition-keys) article. - */ - version?: number; - systemKey?: boolean; -} -//# sourceMappingURL=PartitionKeyDefinition.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.d.ts.map deleted file mode 100644 index fc370a6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PartitionKeyDefinition.d.ts","sourceRoot":"","sources":["../../../src/documents/PartitionKeyDefinition.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.js deleted file mode 100644 index 95dbe18..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=PartitionKeyDefinition.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.js.map deleted file mode 100644 index ba092c1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PartitionKeyDefinition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PartitionKeyDefinition.js","sourceRoot":"","sources":["../../../src/documents/PartitionKeyDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface PartitionKeyDefinition {\n /**\n * An array of paths for which data within the collection can be partitioned. Paths must not contain a wildcard or\n * a trailing slash. For example, the JSON property “AccountNumber” is specified as “/AccountNumber”. The array must\n * contain only a single value.\n */\n paths: string[];\n /**\n * An optional field, if not specified the default value is 1. To use the large partition key set the version to 2.\n * To learn about large partition keys, see [how to create containers with large partition key](https://docs.microsoft.com/en-us/azure/cosmos-db/large-partition-keys) article.\n */\n version?: number;\n systemKey?: boolean;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.d.ts deleted file mode 100644 index bc1724a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Enum for permission mode values. - */ -export declare enum PermissionMode { - /** Permission not valid. */ - None = "none", - /** Permission applicable for read operations only. */ - Read = "read", - /** Permission applicable for all operations. */ - All = "all" -} -//# sourceMappingURL=PermissionMode.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.d.ts.map deleted file mode 100644 index 6d01d4a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionMode.d.ts","sourceRoot":"","sources":["../../../src/documents/PermissionMode.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,cAAc;IACxB,4BAA4B;IAC5B,IAAI,SAAS;IACb,sDAAsD;IACtD,IAAI,SAAS;IACb,gDAAgD;IAChD,GAAG,QAAQ;CACZ"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.js deleted file mode 100644 index 0a5ab9c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for permission mode values. - */ -export var PermissionMode; -(function (PermissionMode) { - /** Permission not valid. */ - PermissionMode["None"] = "none"; - /** Permission applicable for read operations only. */ - PermissionMode["Read"] = "read"; - /** Permission applicable for all operations. */ - PermissionMode["All"] = "all"; -})(PermissionMode || (PermissionMode = {})); -//# sourceMappingURL=PermissionMode.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.js.map deleted file mode 100644 index 5834cd4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/PermissionMode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PermissionMode.js","sourceRoot":"","sources":["../../../src/documents/PermissionMode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACH,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,4BAA4B;IAC5B,+BAAa,CAAA;IACb,sDAAsD;IACtD,+BAAa,CAAA;IACb,gDAAgD;IAChD,6BAAW,CAAA;AACb,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for permission mode values.\n */\nexport enum PermissionMode {\n /** Permission not valid. */\n None = \"none\",\n /** Permission applicable for read operations only. */\n Read = \"read\",\n /** Permission applicable for all operations. */\n All = \"all\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.d.ts deleted file mode 100644 index 576a119..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Enum for trigger operation values. - * specifies the operations on which a trigger should be executed. - */ -export declare enum TriggerOperation { - /** All operations. */ - All = "all", - /** Create operations only. */ - Create = "create", - /** Update operations only. */ - Update = "update", - /** Delete operations only. */ - Delete = "delete", - /** Replace operations only. */ - Replace = "replace" -} -//# sourceMappingURL=TriggerOperation.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.d.ts.map deleted file mode 100644 index 3473863..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerOperation.d.ts","sourceRoot":"","sources":["../../../src/documents/TriggerOperation.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,sBAAsB;IACtB,GAAG,QAAQ;IACX,8BAA8B;IAC9B,MAAM,WAAW;IACjB,8BAA8B;IAC9B,MAAM,WAAW;IACjB,8BAA8B;IAC9B,MAAM,WAAW;IACjB,+BAA+B;IAC/B,OAAO,YAAY;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.js deleted file mode 100644 index aa3078c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for trigger operation values. - * specifies the operations on which a trigger should be executed. - */ -export var TriggerOperation; -(function (TriggerOperation) { - /** All operations. */ - TriggerOperation["All"] = "all"; - /** Create operations only. */ - TriggerOperation["Create"] = "create"; - /** Update operations only. */ - TriggerOperation["Update"] = "update"; - /** Delete operations only. */ - TriggerOperation["Delete"] = "delete"; - /** Replace operations only. */ - TriggerOperation["Replace"] = "replace"; -})(TriggerOperation || (TriggerOperation = {})); -//# sourceMappingURL=TriggerOperation.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.js.map deleted file mode 100644 index cd7f375..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerOperation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerOperation.js","sourceRoot":"","sources":["../../../src/documents/TriggerOperation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAC1B,sBAAsB;IACtB,+BAAW,CAAA;IACX,8BAA8B;IAC9B,qCAAiB,CAAA;IACjB,8BAA8B;IAC9B,qCAAiB,CAAA;IACjB,8BAA8B;IAC9B,qCAAiB,CAAA;IACjB,+BAA+B;IAC/B,uCAAmB,CAAA;AACrB,CAAC,EAXW,gBAAgB,KAAhB,gBAAgB,QAW3B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for trigger operation values.\n * specifies the operations on which a trigger should be executed.\n */\nexport enum TriggerOperation {\n /** All operations. */\n All = \"all\",\n /** Create operations only. */\n Create = \"create\",\n /** Update operations only. */\n Update = \"update\",\n /** Delete operations only. */\n Delete = \"delete\",\n /** Replace operations only. */\n Replace = \"replace\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.d.ts deleted file mode 100644 index 0764950..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Enum for trigger type values. - * Specifies the type of the trigger. - */ -export declare enum TriggerType { - /** Trigger should be executed before the associated operation(s). */ - Pre = "pre", - /** Trigger should be executed after the associated operation(s). */ - Post = "post" -} -//# sourceMappingURL=TriggerType.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.d.ts.map deleted file mode 100644 index 00e78ae..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerType.d.ts","sourceRoot":"","sources":["../../../src/documents/TriggerType.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,oBAAY,WAAW;IACrB,qEAAqE;IACrE,GAAG,QAAQ;IACX,oEAAoE;IACpE,IAAI,SAAS;CACd"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.js deleted file mode 100644 index e336f5c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for trigger type values. - * Specifies the type of the trigger. - */ -export var TriggerType; -(function (TriggerType) { - /** Trigger should be executed before the associated operation(s). */ - TriggerType["Pre"] = "pre"; - /** Trigger should be executed after the associated operation(s). */ - TriggerType["Post"] = "post"; -})(TriggerType || (TriggerType = {})); -//# sourceMappingURL=TriggerType.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.js.map deleted file mode 100644 index f8084bc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/TriggerType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TriggerType.js","sourceRoot":"","sources":["../../../src/documents/TriggerType.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,qEAAqE;IACrE,0BAAW,CAAA;IACX,oEAAoE;IACpE,4BAAa,CAAA;AACf,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for trigger type values.\n * Specifies the type of the trigger.\n */\nexport enum TriggerType {\n /** Trigger should be executed before the associated operation(s). */\n Pre = \"pre\",\n /** Trigger should be executed after the associated operation(s). */\n Post = \"post\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.d.ts deleted file mode 100644 index 9c5aa27..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Enum for udf type values. - * Specifies the types of user defined functions. - */ -export declare enum UserDefinedFunctionType { - /** The User Defined Function is written in JavaScript. This is currently the only option. */ - Javascript = "Javascript" -} -//# sourceMappingURL=UserDefinedFunctionType.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.d.ts.map deleted file mode 100644 index 6e18d45..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctionType.d.ts","sourceRoot":"","sources":["../../../src/documents/UserDefinedFunctionType.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,oBAAY,uBAAuB;IACjC,6FAA6F;IAC7F,UAAU,eAAe;CAC1B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.js deleted file mode 100644 index a16d5e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for udf type values. - * Specifies the types of user defined functions. - */ -export var UserDefinedFunctionType; -(function (UserDefinedFunctionType) { - /** The User Defined Function is written in JavaScript. This is currently the only option. */ - UserDefinedFunctionType["Javascript"] = "Javascript"; -})(UserDefinedFunctionType || (UserDefinedFunctionType = {})); -//# sourceMappingURL=UserDefinedFunctionType.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.js.map deleted file mode 100644 index 849ba29..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/UserDefinedFunctionType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDefinedFunctionType.js","sourceRoot":"","sources":["../../../src/documents/UserDefinedFunctionType.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;GAGG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,6FAA6F;IAC7F,oDAAyB,CAAA;AAC3B,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for udf type values.\n * Specifies the types of user defined functions.\n */\nexport enum UserDefinedFunctionType {\n /** The User Defined Function is written in JavaScript. This is currently the only option. */\n Javascript = \"Javascript\",\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.d.ts deleted file mode 100644 index efeebd4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export * from "./ConnectionMode"; -export * from "./ConnectionPolicy"; -export * from "./ConsistencyLevel"; -export * from "./DatabaseAccount"; -export * from "./DataType"; -export * from "./Document"; -export * from "./IndexingMode"; -export * from "./IndexingPolicy"; -export * from "./IndexKind"; -export * from "./PartitionKey"; -export * from "./PartitionKeyDefinition"; -export * from "./PermissionMode"; -export * from "./TriggerOperation"; -export * from "./TriggerType"; -export * from "./UserDefinedFunctionType"; -export * from "./GeospatialType"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.d.ts.map deleted file mode 100644 index e1f844b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/documents/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.js deleted file mode 100644 index adf0d05..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export * from "./ConnectionMode"; -export * from "./ConnectionPolicy"; -export * from "./ConsistencyLevel"; -export * from "./DatabaseAccount"; -export * from "./DataType"; -export * from "./Document"; -export * from "./IndexingMode"; -export * from "./IndexingPolicy"; -export * from "./IndexKind"; -export * from "./PartitionKey"; -export * from "./PartitionKeyDefinition"; -export * from "./PermissionMode"; -export * from "./TriggerOperation"; -export * from "./TriggerType"; -export * from "./UserDefinedFunctionType"; -export * from "./GeospatialType"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.js.map deleted file mode 100644 index bdab1c0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/documents/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/documents/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./ConnectionMode\";\nexport * from \"./ConnectionPolicy\";\nexport * from \"./ConsistencyLevel\";\nexport * from \"./DatabaseAccount\";\nexport * from \"./DataType\";\nexport * from \"./Document\";\nexport * from \"./IndexingMode\";\nexport * from \"./IndexingPolicy\";\nexport * from \"./IndexKind\";\nexport * from \"./PartitionKey\";\nexport * from \"./PartitionKeyDefinition\";\nexport * from \"./PermissionMode\";\nexport * from \"./TriggerOperation\";\nexport * from \"./TriggerType\";\nexport * from \"./UserDefinedFunctionType\";\nexport * from \"./GeospatialType\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.d.ts deleted file mode 100644 index de41e27..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PartitionKey, PartitionKeyDefinition } from "./documents"; -/** - * @hidden - */ -export declare function extractPartitionKey(document: unknown, partitionKeyDefinition: PartitionKeyDefinition): PartitionKey[]; -/** - * @hidden - */ -export declare function undefinedPartitionKey(partitionKeyDefinition: PartitionKeyDefinition): unknown[]; -//# sourceMappingURL=extractPartitionKey.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.d.ts.map deleted file mode 100644 index 3e78bd3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extractPartitionKey.d.ts","sourceRoot":"","sources":["../../src/extractPartitionKey.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEnE;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,OAAO,EACjB,sBAAsB,EAAE,sBAAsB,GAC7C,YAAY,EAAE,CAyBhB;AACD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,EAAE,CAM/F"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.js deleted file mode 100644 index 08320c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { parsePath } from "./common"; -/** - * @hidden - */ -export function extractPartitionKey(document, partitionKeyDefinition) { - if (partitionKeyDefinition && - partitionKeyDefinition.paths && - partitionKeyDefinition.paths.length > 0) { - const partitionKey = []; - partitionKeyDefinition.paths.forEach((path) => { - const pathParts = parsePath(path); - let obj = document; - for (const part of pathParts) { - if (typeof obj === "object" && part in obj) { - obj = obj[part]; - } - else { - obj = undefined; - break; - } - } - partitionKey.push(obj); - }); - if (partitionKey.length === 1 && partitionKey[0] === undefined) { - return undefinedPartitionKey(partitionKeyDefinition); - } - return partitionKey; - } -} -/** - * @hidden - */ -export function undefinedPartitionKey(partitionKeyDefinition) { - if (partitionKeyDefinition.systemKey === true) { - return []; - } - else { - return [{}]; - } -} -//# sourceMappingURL=extractPartitionKey.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.js.map deleted file mode 100644 index 6b57692..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/extractPartitionKey.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extractPartitionKey.js","sourceRoot":"","sources":["../../src/extractPartitionKey.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAiB,EACjB,sBAA8C;IAE9C,IACE,sBAAsB;QACtB,sBAAsB,CAAC,KAAK;QAC5B,sBAAsB,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EACvC;QACA,MAAM,YAAY,GAAmB,EAAE,CAAC;QACxC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,EAAE;YACpD,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,GAAG,GAAG,QAAQ,CAAC;YACnB,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE;gBAC5B,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,IAAI,IAAI,GAAG,EAAE;oBAC1C,GAAG,GAAI,GAA+B,CAAC,IAAI,CAAC,CAAC;iBAC9C;qBAAM;oBACL,GAAG,GAAG,SAAS,CAAC;oBAChB,MAAM;iBACP;aACF;YACD,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QACH,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;YAC9D,OAAO,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;SACtD;QACD,OAAO,YAAY,CAAC;KACrB;AACH,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,sBAA8C;IAClF,IAAI,sBAAsB,CAAC,SAAS,KAAK,IAAI,EAAE;QAC7C,OAAO,EAAE,CAAC;KACX;SAAM;QACL,OAAO,CAAC,EAAE,CAAC,CAAC;KACb;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { parsePath } from \"./common\";\nimport { PartitionKey, PartitionKeyDefinition } from \"./documents\";\n\n/**\n * @hidden\n */\nexport function extractPartitionKey(\n document: unknown,\n partitionKeyDefinition: PartitionKeyDefinition\n): PartitionKey[] {\n if (\n partitionKeyDefinition &&\n partitionKeyDefinition.paths &&\n partitionKeyDefinition.paths.length > 0\n ) {\n const partitionKey: PartitionKey[] = [];\n partitionKeyDefinition.paths.forEach((path: string) => {\n const pathParts = parsePath(path);\n let obj = document;\n for (const part of pathParts) {\n if (typeof obj === \"object\" && part in obj) {\n obj = (obj as Record)[part];\n } else {\n obj = undefined;\n break;\n }\n }\n partitionKey.push(obj);\n });\n if (partitionKey.length === 1 && partitionKey[0] === undefined) {\n return undefinedPartitionKey(partitionKeyDefinition);\n }\n return partitionKey;\n }\n}\n/**\n * @hidden\n */\nexport function undefinedPartitionKey(partitionKeyDefinition: PartitionKeyDefinition): unknown[] {\n if (partitionKeyDefinition.systemKey === true) {\n return [];\n } else {\n return [{}];\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.d.ts deleted file mode 100644 index ad1afd8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { OperationType, ResourceType } from "./common"; -import { CosmosClientOptions } from "./CosmosClientOptions"; -import { DatabaseAccount } from "./documents"; -import { RequestOptions } from "./index"; -import { ResourceResponse } from "./request"; -/** - * @hidden - * This internal class implements the logic for endpoint management for geo-replicated database accounts. - */ -export declare class GlobalEndpointManager { - private readDatabaseAccount; - /** - * The endpoint used to create the client instance. - */ - private defaultEndpoint; - /** - * Flag to enable/disable automatic redirecting of requests based on read/write operations. - */ - enableEndpointDiscovery: boolean; - private isRefreshing; - private options; - /** - * List of azure regions to be used as preferred locations for read requests. - */ - private preferredLocations; - private writeableLocations; - private readableLocations; - private unavailableReadableLocations; - private unavailableWriteableLocations; - /** - * @param options - The document client instance. - */ - constructor(options: CosmosClientOptions, readDatabaseAccount: (opts: RequestOptions) => Promise>); - /** - * Gets the current read endpoint from the endpoint cache. - */ - getReadEndpoint(): Promise; - /** - * Gets the current write endpoint from the endpoint cache. - */ - getWriteEndpoint(): Promise; - getReadEndpoints(): Promise>; - getWriteEndpoints(): Promise>; - markCurrentLocationUnavailableForRead(endpoint: string): Promise; - markCurrentLocationUnavailableForWrite(endpoint: string): Promise; - canUseMultipleWriteLocations(resourceType?: ResourceType, operationType?: OperationType): boolean; - resolveServiceEndpoint(resourceType: ResourceType, operationType: OperationType): Promise; - /** - * Refreshes the endpoint list by clearning stale unavailability and then - * retrieving the writable and readable locations from the geo-replicated database account - * and then updating the locations cache. - * We skip the refreshing if enableEndpointDiscovery is set to False - */ - refreshEndpointList(): Promise; - private refreshEndpoints; - private refreshStaleUnavailableLocations; - /** - * update the locationUnavailability to undefined if the location is available again - * @param now - current time - * @param unavailableLocations - list of unavailable locations - * @param allLocations - list of all locations - */ - private updateLocation; - private cleanUnavailableLocationList; - /** - * Gets the database account first by using the default endpoint, and if that doesn't returns - * use the endpoints for the preferred locations in the order they are specified to get - * the database account. - */ - private getDatabaseAccountFromAnyEndpoint; - /** - * Gets the locational endpoint using the location name passed to it using the default endpoint. - * - * @param defaultEndpoint - The default endpoint to use for the endpoint. - * @param locationName - The location name for the azure region like "East US". - */ - private static getLocationalEndpoint; -} -//# sourceMappingURL=globalEndpointManager.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.d.ts.map deleted file mode 100644 index 32df74f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalEndpointManager.d.ts","sourceRoot":"","sources":["../../src/globalEndpointManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAiB,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAY,eAAe,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C;;;GAGG;AACH,qBAAa,qBAAqB;IAyB9B,OAAO,CAAC,mBAAmB;IAxB7B;;OAEG;IACH,OAAO,CAAC,eAAe,CAAS;IAChC;;OAEG;IACI,uBAAuB,EAAE,OAAO,CAAC;IACxC,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,OAAO,CAAsB;IACrC;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAAW;IACrC,OAAO,CAAC,kBAAkB,CAAkB;IAC5C,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,4BAA4B,CAAkB;IACtD,OAAO,CAAC,6BAA6B,CAAkB;IAEvD;;OAEG;gBAED,OAAO,EAAE,mBAAmB,EACpB,mBAAmB,EAAE,CAC3B,IAAI,EAAE,cAAc,KACjB,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IASjD;;OAEG;IACU,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;IAI/C;;OAEG;IACU,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAInC,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAIlD,iBAAiB,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAInD,qCAAqC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUtE,sCAAsC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7E,4BAA4B,CACjC,YAAY,CAAC,EAAE,YAAY,EAC3B,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO;IAaG,sBAAsB,CACjC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,MAAM,CAAC;IA+ClB;;;;;OAKG;IACU,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYjD,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,gCAAgC;IAexC;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,4BAA4B;IAYpC;;;;OAIG;YACW,iCAAiC;IAkC/C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;CA4BrC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.js deleted file mode 100644 index d4f73bc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.js +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { OperationType, ResourceType, isReadRequest } from "./common"; -import { Constants } from "./common/constants"; -/** - * @hidden - * This internal class implements the logic for endpoint management for geo-replicated database accounts. - */ -export class GlobalEndpointManager { - /** - * @param options - The document client instance. - */ - constructor(options, readDatabaseAccount) { - this.readDatabaseAccount = readDatabaseAccount; - this.writeableLocations = []; - this.readableLocations = []; - this.unavailableReadableLocations = []; - this.unavailableWriteableLocations = []; - this.options = options; - this.defaultEndpoint = options.endpoint; - this.enableEndpointDiscovery = options.connectionPolicy.enableEndpointDiscovery; - this.isRefreshing = false; - this.preferredLocations = this.options.connectionPolicy.preferredLocations; - } - /** - * Gets the current read endpoint from the endpoint cache. - */ - async getReadEndpoint() { - return this.resolveServiceEndpoint(ResourceType.item, OperationType.Read); - } - /** - * Gets the current write endpoint from the endpoint cache. - */ - async getWriteEndpoint() { - return this.resolveServiceEndpoint(ResourceType.item, OperationType.Replace); - } - async getReadEndpoints() { - return this.readableLocations.map((loc) => loc.databaseAccountEndpoint); - } - async getWriteEndpoints() { - return this.writeableLocations.map((loc) => loc.databaseAccountEndpoint); - } - async markCurrentLocationUnavailableForRead(endpoint) { - await this.refreshEndpointList(); - const location = this.readableLocations.find((loc) => loc.databaseAccountEndpoint === endpoint); - if (location) { - location.unavailable = true; - location.lastUnavailabilityTimestampInMs = Date.now(); - this.unavailableReadableLocations.push(location); - } - } - async markCurrentLocationUnavailableForWrite(endpoint) { - await this.refreshEndpointList(); - const location = this.writeableLocations.find((loc) => loc.databaseAccountEndpoint === endpoint); - if (location) { - location.unavailable = true; - location.lastUnavailabilityTimestampInMs = Date.now(); - this.unavailableWriteableLocations.push(location); - } - } - canUseMultipleWriteLocations(resourceType, operationType) { - let canUse = this.options.connectionPolicy.useMultipleWriteLocations; - if (resourceType) { - canUse = - canUse && - (resourceType === ResourceType.item || - (resourceType === ResourceType.sproc && operationType === OperationType.Execute)); - } - return canUse; - } - async resolveServiceEndpoint(resourceType, operationType) { - // If endpoint discovery is disabled, always use the user provided endpoint - if (!this.options.connectionPolicy.enableEndpointDiscovery) { - return this.defaultEndpoint; - } - // If getting the database account, always use the user provided endpoint - if (resourceType === ResourceType.none) { - return this.defaultEndpoint; - } - if (this.readableLocations.length === 0 || this.writeableLocations.length === 0) { - const { resource: databaseAccount } = await this.readDatabaseAccount({ - urlConnection: this.defaultEndpoint, - }); - this.writeableLocations = databaseAccount.writableLocations; - this.readableLocations = databaseAccount.readableLocations; - } - const locations = isReadRequest(operationType) - ? this.readableLocations - : this.writeableLocations; - let location; - // If we have preferred locations, try each one in order and use the first available one - if (this.preferredLocations && this.preferredLocations.length > 0) { - for (const preferredLocation of this.preferredLocations) { - location = locations.find((loc) => loc.unavailable !== true && - normalizeEndpoint(loc.name) === normalizeEndpoint(preferredLocation)); - if (location) { - break; - } - } - } - // If no preferred locations or one did not match, just grab the first one that is available - if (!location) { - location = locations.find((loc) => { - return loc.unavailable !== true; - }); - } - return location ? location.databaseAccountEndpoint : this.defaultEndpoint; - } - /** - * Refreshes the endpoint list by clearning stale unavailability and then - * retrieving the writable and readable locations from the geo-replicated database account - * and then updating the locations cache. - * We skip the refreshing if enableEndpointDiscovery is set to False - */ - async refreshEndpointList() { - if (!this.isRefreshing && this.enableEndpointDiscovery) { - this.isRefreshing = true; - const databaseAccount = await this.getDatabaseAccountFromAnyEndpoint(); - if (databaseAccount) { - this.refreshStaleUnavailableLocations(); - this.refreshEndpoints(databaseAccount); - } - this.isRefreshing = false; - } - } - refreshEndpoints(databaseAccount) { - for (const location of databaseAccount.writableLocations) { - const existingLocation = this.writeableLocations.find((loc) => loc.name === location.name); - if (!existingLocation) { - this.writeableLocations.push(location); - } - } - for (const location of databaseAccount.readableLocations) { - const existingLocation = this.readableLocations.find((loc) => loc.name === location.name); - if (!existingLocation) { - this.readableLocations.push(location); - } - } - } - refreshStaleUnavailableLocations() { - const now = Date.now(); - this.updateLocation(now, this.unavailableReadableLocations, this.readableLocations); - this.unavailableReadableLocations = this.cleanUnavailableLocationList(now, this.unavailableReadableLocations); - this.updateLocation(now, this.unavailableWriteableLocations, this.writeableLocations); - this.unavailableWriteableLocations = this.cleanUnavailableLocationList(now, this.unavailableWriteableLocations); - } - /** - * update the locationUnavailability to undefined if the location is available again - * @param now - current time - * @param unavailableLocations - list of unavailable locations - * @param allLocations - list of all locations - */ - updateLocation(now, unavailableLocations, allLocations) { - for (const location of unavailableLocations) { - const unavaialableLocation = allLocations.find((loc) => loc.name === location.name); - if (unavaialableLocation && - now - unavaialableLocation.lastUnavailabilityTimestampInMs > - Constants.LocationUnavailableExpirationTimeInMs) { - unavaialableLocation.unavailable = false; - } - } - } - cleanUnavailableLocationList(now, unavailableLocations) { - return unavailableLocations.filter((loc) => { - if (loc && - now - loc.lastUnavailabilityTimestampInMs >= Constants.LocationUnavailableExpirationTimeInMs) { - return false; - } - return true; - }); - } - /** - * Gets the database account first by using the default endpoint, and if that doesn't returns - * use the endpoints for the preferred locations in the order they are specified to get - * the database account. - */ - async getDatabaseAccountFromAnyEndpoint() { - try { - const options = { urlConnection: this.defaultEndpoint }; - const { resource: databaseAccount } = await this.readDatabaseAccount(options); - return databaseAccount; - // If for any reason(non - globaldb related), we are not able to get the database - // account from the above call to readDatabaseAccount, - // we would try to get this information from any of the preferred locations that the user - // might have specified (by creating a locational endpoint) - // and keeping eating the exception until we get the database account and return None at the end, - // if we are not able to get that info from any endpoints - } - catch (err) { - // TODO: Tracing - } - if (this.preferredLocations) { - for (const location of this.preferredLocations) { - try { - const locationalEndpoint = GlobalEndpointManager.getLocationalEndpoint(this.defaultEndpoint, location); - const options = { urlConnection: locationalEndpoint }; - const { resource: databaseAccount } = await this.readDatabaseAccount(options); - if (databaseAccount) { - return databaseAccount; - } - } - catch (err) { - // TODO: Tracing - } - } - } - } - /** - * Gets the locational endpoint using the location name passed to it using the default endpoint. - * - * @param defaultEndpoint - The default endpoint to use for the endpoint. - * @param locationName - The location name for the azure region like "East US". - */ - static getLocationalEndpoint(defaultEndpoint, locationName) { - // For defaultEndpoint like 'https://contoso.documents.azure.com:443/' parse it to generate URL format - // This defaultEndpoint should be global endpoint(and cannot be a locational endpoint) - // and we agreed to document that - const endpointUrl = new URL(defaultEndpoint); - // hostname attribute in endpointUrl will return 'contoso.documents.azure.com' - if (endpointUrl.hostname) { - const hostnameParts = endpointUrl.hostname.toString().toLowerCase().split("."); - if (hostnameParts) { - // globalDatabaseAccountName will return 'contoso' - const globalDatabaseAccountName = hostnameParts[0]; - // Prepare the locationalDatabaseAccountName as contoso-EastUS for location_name 'East US' - const locationalDatabaseAccountName = globalDatabaseAccountName + "-" + locationName.replace(" ", ""); - // Replace 'contoso' with 'contoso-EastUS' and - // return locationalEndpoint as https://contoso-EastUS.documents.azure.com:443/ - const locationalEndpoint = defaultEndpoint - .toLowerCase() - .replace(globalDatabaseAccountName, locationalDatabaseAccountName); - return locationalEndpoint; - } - } - return null; - } -} -function normalizeEndpoint(endpoint) { - return endpoint.split(" ").join("").toLowerCase(); -} -//# sourceMappingURL=globalEndpointManager.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.js.map deleted file mode 100644 index c7598d4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/globalEndpointManager.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalEndpointManager.js","sourceRoot":"","sources":["../../src/globalEndpointManager.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAItE,OAAO,EAAE,SAAS,EAAE,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AW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/E,IAAI,aAAa,EAAE;gBACjB,kDAAkD;gBAClD,MAAM,yBAAyB,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;gBAEnD,0FAA0F;gBAC1F,MAAM,6BAA6B,GACjC,yBAAyB,GAAG,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBAElE,8CAA8C;gBAC9C,+EAA+E;gBAC/E,MAAM,kBAAkB,GAAG,eAAe;qBACvC,WAAW,EAAE;qBACb,OAAO,CAAC,yBAAyB,EAAE,6BAA6B,CAAC,CAAC;gBACrE,OAAO,kBAAkB,CAAC;aAC3B;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AACpD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType, ResourceType, isReadRequest } from \"./common\";\nimport { CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { Location, DatabaseAccount } from \"./documents\";\nimport { RequestOptions } from \"./index\";\nimport { Constants } from \"./common/constants\";\nimport { ResourceResponse } from \"./request\";\n\n/**\n * @hidden\n * This internal class implements the logic for endpoint management for geo-replicated database accounts.\n */\nexport class GlobalEndpointManager {\n /**\n * The endpoint used to create the client instance.\n */\n private defaultEndpoint: string;\n /**\n * Flag to enable/disable automatic redirecting of requests based on read/write operations.\n */\n public enableEndpointDiscovery: boolean;\n private isRefreshing: boolean;\n private options: CosmosClientOptions;\n /**\n * List of azure regions to be used as preferred locations for read requests.\n */\n private preferredLocations: string[];\n private writeableLocations: Location[] = [];\n private readableLocations: Location[] = [];\n private unavailableReadableLocations: Location[] = [];\n private unavailableWriteableLocations: Location[] = [];\n\n /**\n * @param options - The document client instance.\n */\n constructor(\n options: CosmosClientOptions,\n private readDatabaseAccount: (\n opts: RequestOptions\n ) => Promise>\n ) {\n this.options = options;\n this.defaultEndpoint = options.endpoint;\n this.enableEndpointDiscovery = options.connectionPolicy.enableEndpointDiscovery;\n this.isRefreshing = false;\n this.preferredLocations = this.options.connectionPolicy.preferredLocations;\n }\n\n /**\n * Gets the current read endpoint from the endpoint cache.\n */\n public async getReadEndpoint(): Promise {\n return this.resolveServiceEndpoint(ResourceType.item, OperationType.Read);\n }\n\n /**\n * Gets the current write endpoint from the endpoint cache.\n */\n public async getWriteEndpoint(): Promise {\n return this.resolveServiceEndpoint(ResourceType.item, OperationType.Replace);\n }\n\n public async getReadEndpoints(): Promise> {\n return this.readableLocations.map((loc) => loc.databaseAccountEndpoint);\n }\n\n public async getWriteEndpoints(): Promise> {\n return this.writeableLocations.map((loc) => loc.databaseAccountEndpoint);\n }\n\n public async markCurrentLocationUnavailableForRead(endpoint: string): Promise {\n await this.refreshEndpointList();\n const location = this.readableLocations.find((loc) => loc.databaseAccountEndpoint === endpoint);\n if (location) {\n location.unavailable = true;\n location.lastUnavailabilityTimestampInMs = Date.now();\n this.unavailableReadableLocations.push(location);\n }\n }\n\n public async markCurrentLocationUnavailableForWrite(endpoint: string): Promise {\n await this.refreshEndpointList();\n const location = this.writeableLocations.find(\n (loc) => loc.databaseAccountEndpoint === endpoint\n );\n if (location) {\n location.unavailable = true;\n location.lastUnavailabilityTimestampInMs = Date.now();\n this.unavailableWriteableLocations.push(location);\n }\n }\n\n public canUseMultipleWriteLocations(\n resourceType?: ResourceType,\n operationType?: OperationType\n ): boolean {\n let canUse = this.options.connectionPolicy.useMultipleWriteLocations;\n\n if (resourceType) {\n canUse =\n canUse &&\n (resourceType === ResourceType.item ||\n (resourceType === ResourceType.sproc && operationType === OperationType.Execute));\n }\n\n return canUse;\n }\n\n public async resolveServiceEndpoint(\n resourceType: ResourceType,\n operationType: OperationType\n ): Promise {\n // If endpoint discovery is disabled, always use the user provided endpoint\n if (!this.options.connectionPolicy.enableEndpointDiscovery) {\n return this.defaultEndpoint;\n }\n\n // If getting the database account, always use the user provided endpoint\n if (resourceType === ResourceType.none) {\n return this.defaultEndpoint;\n }\n\n if (this.readableLocations.length === 0 || this.writeableLocations.length === 0) {\n const { resource: databaseAccount } = await this.readDatabaseAccount({\n urlConnection: this.defaultEndpoint,\n });\n this.writeableLocations = databaseAccount.writableLocations;\n this.readableLocations = databaseAccount.readableLocations;\n }\n\n const locations = isReadRequest(operationType)\n ? this.readableLocations\n : this.writeableLocations;\n\n let location;\n // If we have preferred locations, try each one in order and use the first available one\n if (this.preferredLocations && this.preferredLocations.length > 0) {\n for (const preferredLocation of this.preferredLocations) {\n location = locations.find(\n (loc) =>\n loc.unavailable !== true &&\n normalizeEndpoint(loc.name) === normalizeEndpoint(preferredLocation)\n );\n if (location) {\n break;\n }\n }\n }\n\n // If no preferred locations or one did not match, just grab the first one that is available\n if (!location) {\n location = locations.find((loc) => {\n return loc.unavailable !== true;\n });\n }\n return location ? location.databaseAccountEndpoint : this.defaultEndpoint;\n }\n\n /**\n * Refreshes the endpoint list by clearning stale unavailability and then\n * retrieving the writable and readable locations from the geo-replicated database account\n * and then updating the locations cache.\n * We skip the refreshing if enableEndpointDiscovery is set to False\n */\n public async refreshEndpointList(): Promise {\n if (!this.isRefreshing && this.enableEndpointDiscovery) {\n this.isRefreshing = true;\n const databaseAccount = await this.getDatabaseAccountFromAnyEndpoint();\n if (databaseAccount) {\n this.refreshStaleUnavailableLocations();\n this.refreshEndpoints(databaseAccount);\n }\n this.isRefreshing = false;\n }\n }\n\n private refreshEndpoints(databaseAccount: DatabaseAccount): void {\n for (const location of databaseAccount.writableLocations) {\n const existingLocation = this.writeableLocations.find((loc) => loc.name === location.name);\n if (!existingLocation) {\n this.writeableLocations.push(location);\n }\n }\n for (const location of databaseAccount.readableLocations) {\n const existingLocation = this.readableLocations.find((loc) => loc.name === location.name);\n if (!existingLocation) {\n this.readableLocations.push(location);\n }\n }\n }\n\n private refreshStaleUnavailableLocations(): void {\n const now = Date.now();\n this.updateLocation(now, this.unavailableReadableLocations, this.readableLocations);\n this.unavailableReadableLocations = this.cleanUnavailableLocationList(\n now,\n this.unavailableReadableLocations\n );\n\n this.updateLocation(now, this.unavailableWriteableLocations, this.writeableLocations);\n this.unavailableWriteableLocations = this.cleanUnavailableLocationList(\n now,\n this.unavailableWriteableLocations\n );\n }\n\n /**\n * update the locationUnavailability to undefined if the location is available again\n * @param now - current time\n * @param unavailableLocations - list of unavailable locations\n * @param allLocations - list of all locations\n */\n private updateLocation(now: number, unavailableLocations: Location[], allLocations: Location[]) {\n for (const location of unavailableLocations) {\n const unavaialableLocation = allLocations.find((loc) => loc.name === location.name);\n if (\n unavaialableLocation &&\n now - unavaialableLocation.lastUnavailabilityTimestampInMs >\n Constants.LocationUnavailableExpirationTimeInMs\n ) {\n unavaialableLocation.unavailable = false;\n }\n }\n }\n\n private cleanUnavailableLocationList(now: number, unavailableLocations: Location[]): Location[] {\n return unavailableLocations.filter((loc) => {\n if (\n loc &&\n now - loc.lastUnavailabilityTimestampInMs >= Constants.LocationUnavailableExpirationTimeInMs\n ) {\n return false;\n }\n return true;\n });\n }\n\n /**\n * Gets the database account first by using the default endpoint, and if that doesn't returns\n * use the endpoints for the preferred locations in the order they are specified to get\n * the database account.\n */\n private async getDatabaseAccountFromAnyEndpoint(): Promise {\n try {\n const options = { urlConnection: this.defaultEndpoint };\n const { resource: databaseAccount } = await this.readDatabaseAccount(options);\n return databaseAccount;\n // If for any reason(non - globaldb related), we are not able to get the database\n // account from the above call to readDatabaseAccount,\n // we would try to get this information from any of the preferred locations that the user\n // might have specified (by creating a locational endpoint)\n // and keeping eating the exception until we get the database account and return None at the end,\n // if we are not able to get that info from any endpoints\n } catch (err: any) {\n // TODO: Tracing\n }\n\n if (this.preferredLocations) {\n for (const location of this.preferredLocations) {\n try {\n const locationalEndpoint = GlobalEndpointManager.getLocationalEndpoint(\n this.defaultEndpoint,\n location\n );\n const options = { urlConnection: locationalEndpoint };\n const { resource: databaseAccount } = await this.readDatabaseAccount(options);\n if (databaseAccount) {\n return databaseAccount;\n }\n } catch (err: any) {\n // TODO: Tracing\n }\n }\n }\n }\n\n /**\n * Gets the locational endpoint using the location name passed to it using the default endpoint.\n *\n * @param defaultEndpoint - The default endpoint to use for the endpoint.\n * @param locationName - The location name for the azure region like \"East US\".\n */\n private static getLocationalEndpoint(defaultEndpoint: string, locationName: string): string {\n // For defaultEndpoint like 'https://contoso.documents.azure.com:443/' parse it to generate URL format\n // This defaultEndpoint should be global endpoint(and cannot be a locational endpoint)\n // and we agreed to document that\n const endpointUrl = new URL(defaultEndpoint);\n\n // hostname attribute in endpointUrl will return 'contoso.documents.azure.com'\n if (endpointUrl.hostname) {\n const hostnameParts = endpointUrl.hostname.toString().toLowerCase().split(\".\");\n if (hostnameParts) {\n // globalDatabaseAccountName will return 'contoso'\n const globalDatabaseAccountName = hostnameParts[0];\n\n // Prepare the locationalDatabaseAccountName as contoso-EastUS for location_name 'East US'\n const locationalDatabaseAccountName =\n globalDatabaseAccountName + \"-\" + locationName.replace(\" \", \"\");\n\n // Replace 'contoso' with 'contoso-EastUS' and\n // return locationalEndpoint as https://contoso-EastUS.documents.azure.com:443/\n const locationalEndpoint = defaultEndpoint\n .toLowerCase()\n .replace(globalDatabaseAccountName, locationalDatabaseAccountName);\n return locationalEndpoint;\n }\n }\n\n return null;\n }\n}\n\nfunction normalizeEndpoint(endpoint: string): string {\n return endpoint.split(\" \").join(\"\").toLowerCase();\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.d.ts deleted file mode 100644 index 147129d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export { DEFAULT_PARTITION_KEY_PATH } from "./common/partitionKeys"; -export { StatusCodes, StatusCodesType, PartitionKeyRangePropertiesNames } from "./common"; -export { extractPartitionKey } from "./extractPartitionKey"; -export { setAuthorizationTokenHeaderUsingMasterKey } from "./auth"; -export { Operation, OperationResponse, BulkOptions, CreateOperation, UpsertOperation, ReplaceOperation, DeleteOperation, ReadOperation, OperationBase, OperationWithItem, OperationInput, BulkOperationType, CreateOperationInput, UpsertOperationInput, ReplaceOperationInput, ReadOperationInput, DeleteOperationInput, PatchOperationInput, BulkPatchOperation, } from "./utils/batch"; -export { PatchOperation, PatchOperationType, ExistingKeyOperation, RemoveOperation, PatchRequestBody, } from "./utils/patch"; -export { ConnectionMode, ConsistencyLevel, ConnectionPolicy, DatabaseAccount, DataType, Index, IndexedPath, IndexingMode, IndexingPolicy, SpatialIndex, SpatialType, GeospatialType, IndexKind, Location, PartitionKey, PartitionKeyDefinition, PermissionMode, TriggerOperation, TriggerType, UserDefinedFunctionType, } from "./documents"; -export { UniqueKeyPolicy, UniqueKey } from "./client/Container/UniqueKeyPolicy"; -export { ContainerRequest } from "./client/Container/ContainerRequest"; -export { Constants, OperationType, ResourceType, HTTPMethod } from "./common"; -export { RetryOptions } from "./retry"; -export * from "./request"; -export { CosmosHeaders, SqlParameter, SqlQuerySpec, JSONValue, JSONArray, JSONObject, } from "./queryExecutionContext"; -export { QueryIterator } from "./queryIterator"; -export * from "./queryMetrics"; -export { CosmosClient } from "./CosmosClient"; -export { CosmosClientOptions, Agent } from "./CosmosClientOptions"; -export * from "./client"; -export { Scripts } from "./client/Script/Scripts"; -export { Next, Plugin, PluginConfig, PluginOn } from "./plugins/Plugin"; -export { TokenProvider, RequestInfo } from "./auth"; -export { ChangeFeedIterator } from "./ChangeFeedIterator"; -export { ChangeFeedOptions } from "./ChangeFeedOptions"; -export { ChangeFeedResponse } from "./ChangeFeedResponse"; -export { ClientContext } from "./ClientContext"; -export { GlobalEndpointManager } from "./globalEndpointManager"; -export { SasTokenPermissionKind } from "./common/constants"; -export { createAuthorizationSasToken } from "./utils/SasToken"; -export { RestError } from "@azure/core-rest-pipeline"; -export { AbortError } from "@azure/abort-controller"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.d.ts.map deleted file mode 100644 index e982efa..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,yCAAyC,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,KAAK,EACL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,WAAW,EACX,cAAc,EACd,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,uBAAuB,GACxB,MA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CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.js deleted file mode 100644 index faccb18..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { DEFAULT_PARTITION_KEY_PATH } from "./common/partitionKeys"; -export { StatusCodes } from "./common"; -export { extractPartitionKey } from "./extractPartitionKey"; -export { setAuthorizationTokenHeaderUsingMasterKey } from "./auth"; -export { BulkOperationType, } from "./utils/batch"; -export { PatchOperationType, } from "./utils/patch"; -export { ConnectionMode, ConsistencyLevel, DatabaseAccount, DataType, IndexingMode, SpatialType, GeospatialType, IndexKind, PermissionMode, TriggerOperation, TriggerType, UserDefinedFunctionType, } from "./documents"; -export { Constants, OperationType, ResourceType, HTTPMethod } from "./common"; -export * from "./request"; -export { QueryIterator } from "./queryIterator"; -export * from "./queryMetrics"; -export { CosmosClient } from "./CosmosClient"; -export * from "./client"; -export { Scripts } from "./client/Script/Scripts"; -export { PluginOn } from "./plugins/Plugin"; -export { ChangeFeedIterator } from "./ChangeFeedIterator"; -export { ChangeFeedResponse } from "./ChangeFeedResponse"; -export { ClientContext } from "./ClientContext"; -export { GlobalEndpointManager } from "./globalEndpointManager"; -export { SasTokenPermissionKind } from "./common/constants"; -export { createAuthorizationSasToken } from "./utils/SasToken"; -export { RestError } from "@azure/core-rest-pipeline"; -export { AbortError } from "@azure/abort-controller"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.js.map deleted file mode 100644 index e56ba2d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/index.js.map +++ /dev/null @@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AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { DEFAULT_PARTITION_KEY_PATH } from \"./common/partitionKeys\";\nexport { StatusCodes, StatusCodesType, PartitionKeyRangePropertiesNames } from \"./common\";\nexport { extractPartitionKey } from \"./extractPartitionKey\";\nexport { setAuthorizationTokenHeaderUsingMasterKey } from \"./auth\";\nexport {\n Operation,\n OperationResponse,\n BulkOptions,\n CreateOperation,\n UpsertOperation,\n ReplaceOperation,\n DeleteOperation,\n ReadOperation,\n OperationBase,\n OperationWithItem,\n OperationInput,\n BulkOperationType,\n CreateOperationInput,\n UpsertOperationInput,\n ReplaceOperationInput,\n ReadOperationInput,\n DeleteOperationInput,\n PatchOperationInput,\n BulkPatchOperation,\n} from \"./utils/batch\";\nexport {\n PatchOperation,\n PatchOperationType,\n ExistingKeyOperation,\n RemoveOperation,\n PatchRequestBody,\n} from \"./utils/patch\";\nexport {\n ConnectionMode,\n ConsistencyLevel,\n ConnectionPolicy,\n DatabaseAccount,\n DataType,\n Index,\n IndexedPath,\n IndexingMode,\n IndexingPolicy,\n SpatialIndex,\n SpatialType,\n GeospatialType,\n IndexKind,\n Location,\n PartitionKey,\n PartitionKeyDefinition,\n PermissionMode,\n TriggerOperation,\n TriggerType,\n UserDefinedFunctionType,\n} from \"./documents\";\n\nexport { UniqueKeyPolicy, UniqueKey } from \"./client/Container/UniqueKeyPolicy\";\nexport { ContainerRequest } from \"./client/Container/ContainerRequest\";\nexport { Constants, OperationType, ResourceType, HTTPMethod } from \"./common\";\nexport { RetryOptions } from \"./retry\";\nexport * from \"./request\";\n\nexport {\n CosmosHeaders,\n SqlParameter,\n SqlQuerySpec,\n JSONValue,\n JSONArray,\n JSONObject,\n} from \"./queryExecutionContext\";\nexport { QueryIterator } from \"./queryIterator\";\nexport * from \"./queryMetrics\";\nexport { CosmosClient } from \"./CosmosClient\";\nexport { CosmosClientOptions, Agent } from \"./CosmosClientOptions\";\nexport * from \"./client\";\nexport { Scripts } from \"./client/Script/Scripts\";\nexport { Next, Plugin, PluginConfig, PluginOn } from \"./plugins/Plugin\";\nexport { TokenProvider, RequestInfo } from \"./auth\";\n\nexport { ChangeFeedIterator } from \"./ChangeFeedIterator\";\nexport { ChangeFeedOptions } from \"./ChangeFeedOptions\";\nexport { ChangeFeedResponse } from \"./ChangeFeedResponse\";\nexport { ClientContext } from \"./ClientContext\";\nexport { GlobalEndpointManager } from \"./globalEndpointManager\";\nexport { SasTokenPermissionKind } from \"./common/constants\";\nexport { createAuthorizationSasToken } from \"./utils/SasToken\";\nexport { RestError } from \"@azure/core-rest-pipeline\";\nexport { AbortError } from \"@azure/abort-controller\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.d.ts deleted file mode 100644 index 30e5d1b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { RequestContext } from "../request/RequestContext"; -import { Response } from "../request/Response"; -/** - * Used to specify which type of events to execute this plug in on. - * - * @hidden - */ -export declare enum PluginOn { - /** - * Will be executed per network request - */ - request = "request", - /** - * Will be executed per API operation - */ - operation = "operation" -} -/** - * Specifies which event to run for the specified plugin - * - * @hidden - */ -export interface PluginConfig { - /** - * The event to run the plugin on - */ - on: keyof typeof PluginOn; - /** - * The plugin to run - */ - plugin: Plugin; -} -/** - * Plugins allow you to customize the behavior of the SDk with additional logging, retry, or additional functionality. - * - * A plugin is a function which returns a `Promise>`, and is passed a RequestContext and Next object. - * - * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, - * allowing you to log those results or handle errors. - * - * RequestContext is an object which controls what operation is happening, against which endpoint, and more. Modifying this and passing it along via next is how - * you modify future SDK behavior. - * - * @hidden - */ -export declare type Plugin = (context: RequestContext, next: Next) => Promise>; -/** - * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, - * allowing you to log those results or handle errors. - * @hidden - */ -export declare type Next = (context: RequestContext) => Promise>; -//# sourceMappingURL=Plugin.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.d.ts.map deleted file mode 100644 index db0e8f6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/Plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C;;;;GAIG;AACH,oBAAY,QAAQ;IAClB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,SAAS,cAAc;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,oBAAY,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzF;;;;GAIG;AACH,oBAAY,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.js deleted file mode 100644 index bbb0e87..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Used to specify which type of events to execute this plug in on. - * - * @hidden - */ -export var PluginOn; -(function (PluginOn) { - /** - * Will be executed per network request - */ - PluginOn["request"] = "request"; - /** - * Will be executed per API operation - */ - PluginOn["operation"] = "operation"; -})(PluginOn || (PluginOn = {})); -/** - * @internal - */ -export async function executePlugins(requestContext, next, on) { - if (!requestContext.plugins) { - return next(requestContext, undefined); - } - let level = 0; - const _ = (inner) => { - if (++level >= inner.plugins.length) { - return next(requestContext, undefined); - } - else if (inner.plugins[level].on !== on) { - return _(requestContext); - } - else { - return inner.plugins[level].plugin(inner, _); - } - }; - if (requestContext.plugins[level].on !== on) { - return _(requestContext); - } - else { - return requestContext.plugins[level].plugin(requestContext, _); - } -} -//# sourceMappingURL=Plugin.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.js.map deleted file mode 100644 index 0f225c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/plugins/Plugin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../../src/plugins/Plugin.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,CAAN,IAAY,QASX;AATD,WAAY,QAAQ;IAClB;;OAEG;IACH,+BAAmB,CAAA;IACnB;;OAEG;IACH,mCAAuB,CAAA;AACzB,CAAC,EATW,QAAQ,KAAR,QAAQ,QASnB;AAwCD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,cAA8B,EAC9B,IAAiB,EACjB,EAAY;IAEZ,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QAC3B,OAAO,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;KACxC;IACD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,CAAC,GAAc,CAAC,KAAqB,EAA0B,EAAE;QACrE,IAAI,EAAE,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;YACnC,OAAO,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;SACxC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;YACzC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC;SAC1B;aAAM;YACL,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC9C;IACH,CAAC,CAAC;IACF,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;QAC3C,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC;KAC1B;SAAM;QACL,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;KAChE;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { RequestContext } from \"../request/RequestContext\";\nimport { Response } from \"../request/Response\";\n\n/**\n * Used to specify which type of events to execute this plug in on.\n *\n * @hidden\n */\nexport enum PluginOn {\n /**\n * Will be executed per network request\n */\n request = \"request\",\n /**\n * Will be executed per API operation\n */\n operation = \"operation\",\n}\n\n/**\n * Specifies which event to run for the specified plugin\n *\n * @hidden\n */\nexport interface PluginConfig {\n /**\n * The event to run the plugin on\n */\n on: keyof typeof PluginOn;\n /**\n * The plugin to run\n */\n plugin: Plugin;\n}\n\n/**\n * Plugins allow you to customize the behavior of the SDk with additional logging, retry, or additional functionality.\n *\n * A plugin is a function which returns a `Promise>`, and is passed a RequestContext and Next object.\n *\n * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins,\n * allowing you to log those results or handle errors.\n *\n * RequestContext is an object which controls what operation is happening, against which endpoint, and more. Modifying this and passing it along via next is how\n * you modify future SDK behavior.\n *\n * @hidden\n */\nexport type Plugin = (context: RequestContext, next: Next) => Promise>;\n\n/**\n * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins,\n * allowing you to log those results or handle errors.\n * @hidden\n */\nexport type Next = (context: RequestContext) => Promise>;\n\n/**\n * @internal\n */\nexport async function executePlugins(\n requestContext: RequestContext,\n next: Plugin,\n on: PluginOn\n): Promise> {\n if (!requestContext.plugins) {\n return next(requestContext, undefined);\n }\n let level = 0;\n const _: Next = (inner: RequestContext): Promise> => {\n if (++level >= inner.plugins.length) {\n return next(requestContext, undefined);\n } else if (inner.plugins[level].on !== on) {\n return _(requestContext);\n } else {\n return inner.plugins[level].plugin(inner, _);\n }\n };\n if (requestContext.plugins[level].on !== on) {\n return _(requestContext);\n } else {\n return requestContext.plugins[level].plugin(requestContext, _);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.d.ts deleted file mode 100644 index b837ce6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** @hidden */ -export interface Aggregator { - aggregate: (other: any) => void; - getResult: () => number; -} -//# sourceMappingURL=Aggregator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.d.ts.map deleted file mode 100644 index d44c6d9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Aggregator.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/Aggregator.ts"],"names":[],"mappings":"AAEA,cAAc;AACd,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,SAAS,EAAE,MAAM,MAAM,CAAC;CACzB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.js deleted file mode 100644 index 12114e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Aggregator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.js.map deleted file mode 100644 index 5b3136b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/Aggregator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Aggregator.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/Aggregator.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** @hidden */\nexport interface Aggregator {\n aggregate: (other: any) => void;\n getResult: () => number;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.d.ts deleted file mode 100644 index 379ddda..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Aggregator } from "./Aggregator"; -/** @hidden */ -export interface AverageAggregateResult { - sum: number; - count: number; -} -/** @hidden */ -export declare class AverageAggregator implements Aggregator { - sum: number; - count: number; - /** - * Add the provided item to aggregation result. - */ - aggregate(other: AverageAggregateResult): void; - /** - * Get the aggregation result. - */ - getResult(): number; -} -//# sourceMappingURL=AverageAggregator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.d.ts.map deleted file mode 100644 index a0f1abd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AverageAggregator.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/AverageAggregator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,qBAAa,iBAAkB,YAAW,UAAU;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACrB;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI;IAYrD;;OAEG;IACI,SAAS,IAAI,MAAM;CAM3B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.js deleted file mode 100644 index e7d3d25..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.js +++ /dev/null @@ -1,27 +0,0 @@ -/** @hidden */ -export class AverageAggregator { - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (other == null || other.sum == null) { - return; - } - if (this.sum == null) { - this.sum = 0.0; - this.count = 0; - } - this.sum += other.sum; - this.count += other.count; - } - /** - * Get the aggregation result. - */ - getResult() { - if (this.sum == null || this.count <= 0) { - return undefined; - } - return this.sum / this.count; - } -} -//# sourceMappingURL=AverageAggregator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.js.map deleted file mode 100644 index 4515436..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/AverageAggregator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AverageAggregator.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/AverageAggregator.ts"],"names":[],"mappings":"AAUA,cAAc;AACd,MAAM,OAAO,iBAAiB;IAG5B;;OAEG;IACI,SAAS,CAAC,KAA6B;QAC5C,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,GAAG,IAAI,IAAI,EAAE;YACtC,OAAO;SACR;QACD,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE;YACpB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;SAChB;QACD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,SAAS;QACd,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,EAAE;YACvC,OAAO,SAAS,CAAC;SAClB;QACD,OAAO,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport interface AverageAggregateResult {\n sum: number;\n count: number;\n}\n\n/** @hidden */\nexport class AverageAggregator implements Aggregator {\n public sum: number;\n public count: number;\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: AverageAggregateResult): void {\n if (other == null || other.sum == null) {\n return;\n }\n if (this.sum == null) {\n this.sum = 0.0;\n this.count = 0;\n }\n this.sum += other.sum;\n this.count += other.count;\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n if (this.sum == null || this.count <= 0) {\n return undefined;\n }\n return this.sum / this.count;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.d.ts deleted file mode 100644 index b12b5a7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Aggregator } from "./Aggregator"; -/** @hidden */ -export declare class CountAggregator implements Aggregator { - value: number; - /** - * Represents an aggregator for COUNT operator. - * @hidden - */ - constructor(); - /** - * Add the provided item to aggregation result. - */ - aggregate(other: number): void; - /** - * Get the aggregation result. - */ - getResult(): number; -} -//# sourceMappingURL=CountAggregator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.d.ts.map deleted file mode 100644 index bb5618b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CountAggregator.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/CountAggregator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,qBAAa,eAAgB,YAAW,UAAU;IACzC,KAAK,EAAE,MAAM,CAAC;IACrB;;;OAGG;;IAIH;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIrC;;OAEG;IACI,SAAS,IAAI,MAAM;CAG3B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.js deleted file mode 100644 index a2e0b94..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.js +++ /dev/null @@ -1,23 +0,0 @@ -/** @hidden */ -export class CountAggregator { - /** - * Represents an aggregator for COUNT operator. - * @hidden - */ - constructor() { - this.value = 0; - } - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - this.value += other; - } - /** - * Get the aggregation result. - */ - getResult() { - return this.value; - } -} -//# sourceMappingURL=CountAggregator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.js.map deleted file mode 100644 index f2f95f4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/CountAggregator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CountAggregator.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/CountAggregator.ts"],"names":[],"mappings":"AAIA,cAAc;AACd,MAAM,OAAO,eAAe;IAE1B;;;OAGG;IACH;QACE,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACjB,CAAC;IACD;;OAEG;IACI,SAAS,CAAC,KAAa;QAC5B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport class CountAggregator implements Aggregator {\n public value: number;\n /**\n * Represents an aggregator for COUNT operator.\n * @hidden\n */\n constructor() {\n this.value = 0;\n }\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: number): void {\n this.value += other;\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.value;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.d.ts deleted file mode 100644 index 109e5e7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Aggregator } from "./Aggregator"; -interface MaxAggregateResult { - count: number; - max?: number; -} -/** @hidden */ -export declare class MaxAggregator implements Aggregator { - private value; - private comparer; - /** - * Represents an aggregator for MAX operator. - * @hidden - */ - constructor(); - /** - * Add the provided item to aggregation result. - */ - aggregate(other: MaxAggregateResult): void; - /** - * Get the aggregation result. - */ - getResult(): number; -} -export {}; -//# sourceMappingURL=MaxAggregator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.d.ts.map deleted file mode 100644 index 14b6809..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MaxAggregator.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/MaxAggregator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,cAAc;AACd,qBAAa,aAAc,YAAW,UAAU;IAC9C,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,QAAQ,CAAoC;IACpD;;;OAGG;;IAKH;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAUjD;;OAEG;IACI,SAAS,IAAI,MAAM;CAG3B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.js deleted file mode 100644 index 6d78279..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { OrderByDocumentProducerComparator } from "../orderByDocumentProducerComparator"; -/** @hidden */ -export class MaxAggregator { - /** - * Represents an aggregator for MAX operator. - * @hidden - */ - constructor() { - this.value = undefined; - this.comparer = new OrderByDocumentProducerComparator(["Ascending"]); - } - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (this.value === undefined) { - this.value = other.max; - } - else if (this.comparer.compareValue(other.max, typeof other.max, this.value, typeof this.value) > 0) { - this.value = other.max; - } - } - /** - * Get the aggregation result. - */ - getResult() { - return this.value; - } -} -//# sourceMappingURL=MaxAggregator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.js.map deleted file mode 100644 index 53021e0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MaxAggregator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MaxAggregator.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/MaxAggregator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAQzF,cAAc;AACd,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH;QACE,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,iCAAiC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IACvE,CAAC;IACD;;OAEG;IACI,SAAS,CAAC,KAAyB;QACxC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;SACxB;aAAM,IACL,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAC1F;YACA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;SACxB;IACH,CAAC;IAED;;OAEG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OrderByDocumentProducerComparator } from \"../orderByDocumentProducerComparator\";\nimport { Aggregator } from \"./Aggregator\";\n\ninterface MaxAggregateResult {\n count: number;\n max?: number;\n}\n\n/** @hidden */\nexport class MaxAggregator implements Aggregator {\n private value: number;\n private comparer: OrderByDocumentProducerComparator;\n /**\n * Represents an aggregator for MAX operator.\n * @hidden\n */\n constructor() {\n this.value = undefined;\n this.comparer = new OrderByDocumentProducerComparator([\"Ascending\"]);\n }\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: MaxAggregateResult): void {\n if (this.value === undefined) {\n this.value = other.max;\n } else if (\n this.comparer.compareValue(other.max, typeof other.max, this.value, typeof this.value) > 0\n ) {\n this.value = other.max;\n }\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.value;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.d.ts deleted file mode 100644 index a4a910c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Aggregator } from "./Aggregator"; -export interface MinAggregateResult { - min: number; - count: number; -} -/** @hidden */ -export declare class MinAggregator implements Aggregator { - private value; - private comparer; - /** - * Represents an aggregator for MIN operator. - * @hidden - */ - constructor(); - /** - * Add the provided item to aggregation result. - */ - aggregate(other: MinAggregateResult): void; - /** - * Get the aggregation result. - */ - getResult(): number; -} -//# sourceMappingURL=MinAggregator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.d.ts.map deleted file mode 100644 index 8e9f0d0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MinAggregator.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/MinAggregator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,qBAAa,aAAc,YAAW,UAAU;IAC9C,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,QAAQ,CAAoC;IACpD;;;OAGG;;IAKH;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAajD;;OAEG;IACI,SAAS,IAAI,MAAM;CAG3B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.js deleted file mode 100644 index 28c5a50..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { OrderByDocumentProducerComparator } from "../orderByDocumentProducerComparator"; -/** @hidden */ -export class MinAggregator { - /** - * Represents an aggregator for MIN operator. - * @hidden - */ - constructor() { - this.value = undefined; - this.comparer = new OrderByDocumentProducerComparator(["Ascending"]); - } - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (this.value === undefined) { - // || typeof this.value === "object" - this.value = other.min; - } - else { - const otherType = other.min === null ? "NoValue" : typeof other.min; // || typeof other === "object" - const thisType = this.value === null ? "NoValue" : typeof this.value; - if (this.comparer.compareValue(other.min, otherType, this.value, thisType) < 0) { - this.value = other.min; - } - } - } - /** - * Get the aggregation result. - */ - getResult() { - return this.value; - } -} -//# sourceMappingURL=MinAggregator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.js.map deleted file mode 100644 index b9d0be2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/MinAggregator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MinAggregator.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/MinAggregator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAQzF,cAAc;AACd,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH;QACE,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,iCAAiC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IACvE,CAAC;IACD;;OAEG;IACI,SAAS,CAAC,KAAyB;QACxC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,oCAAoC;YACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;SACxB;aAAM;YACL,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,+BAA+B;YACpG,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC;YACrE,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9E,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;aACxB;SACF;IACH,CAAC;IAED;;OAEG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OrderByDocumentProducerComparator } from \"../orderByDocumentProducerComparator\";\nimport { Aggregator } from \"./Aggregator\";\n\nexport interface MinAggregateResult {\n min: number;\n count: number;\n}\n\n/** @hidden */\nexport class MinAggregator implements Aggregator {\n private value: number;\n private comparer: OrderByDocumentProducerComparator;\n /**\n * Represents an aggregator for MIN operator.\n * @hidden\n */\n constructor() {\n this.value = undefined;\n this.comparer = new OrderByDocumentProducerComparator([\"Ascending\"]);\n }\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: MinAggregateResult): void {\n if (this.value === undefined) {\n // || typeof this.value === \"object\"\n this.value = other.min;\n } else {\n const otherType = other.min === null ? \"NoValue\" : typeof other.min; // || typeof other === \"object\"\n const thisType = this.value === null ? \"NoValue\" : typeof this.value;\n if (this.comparer.compareValue(other.min, otherType, this.value, thisType) < 0) {\n this.value = other.min;\n }\n }\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.value;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.d.ts deleted file mode 100644 index faf52d6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Aggregator } from "./Aggregator"; -/** @hidden */ -export declare class StaticValueAggregator implements Aggregator { - value: any; - aggregate(other: unknown): void; - getResult(): any; -} -//# sourceMappingURL=StaticValueAggregator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.d.ts.map deleted file mode 100644 index d271fcd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StaticValueAggregator.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/StaticValueAggregator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,qBAAa,qBAAsB,YAAW,UAAU;IAC/C,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAM/B,SAAS,IAAI,GAAG;CAGxB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.js deleted file mode 100644 index 4d5ea18..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @hidden */ -export class StaticValueAggregator { - aggregate(other) { - if (this.value === undefined) { - this.value = other; - } - } - getResult() { - return this.value; - } -} -//# sourceMappingURL=StaticValueAggregator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.js.map deleted file mode 100644 index 18a9d4f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/StaticValueAggregator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StaticValueAggregator.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/StaticValueAggregator.ts"],"names":[],"mappings":"AAIA,cAAc;AACd,MAAM,OAAO,qBAAqB;IAEzB,SAAS,CAAC,KAAc;QAC7B,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACpB;IACH,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport class StaticValueAggregator implements Aggregator {\n public value: any;\n public aggregate(other: unknown): void {\n if (this.value === undefined) {\n this.value = other;\n }\n }\n\n public getResult(): any {\n return this.value;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.d.ts deleted file mode 100644 index ad9c445..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Aggregator } from "./Aggregator"; -/** @hidden */ -export declare class SumAggregator implements Aggregator { - sum: number; - /** - * Add the provided item to aggregation result. - */ - aggregate(other: number): void; - /** - * Get the aggregation result. - */ - getResult(): number; -} -//# sourceMappingURL=SumAggregator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.d.ts.map deleted file mode 100644 index 428eb18..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SumAggregator.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/SumAggregator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,qBAAa,aAAc,YAAW,UAAU;IACvC,GAAG,EAAE,MAAM,CAAC;IACnB;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAWrC;;OAEG;IACI,SAAS,IAAI,MAAM;CAG3B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.js deleted file mode 100644 index a85cf16..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.js +++ /dev/null @@ -1,24 +0,0 @@ -/** @hidden */ -export class SumAggregator { - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (other === undefined) { - return; - } - if (this.sum === undefined) { - this.sum = other; - } - else { - this.sum += other; - } - } - /** - * Get the aggregation result. - */ - getResult() { - return this.sum; - } -} -//# sourceMappingURL=SumAggregator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.js.map deleted file mode 100644 index 1ca3718..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/SumAggregator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SumAggregator.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/SumAggregator.ts"],"names":[],"mappings":"AAIA,cAAc;AACd,MAAM,OAAO,aAAa;IAExB;;OAEG;IACI,SAAS,CAAC,KAAa;QAC5B,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,OAAO;SACR;QACD,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;YAC1B,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;SAClB;aAAM;YACL,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC;SACnB;IACH,CAAC;IAED;;OAEG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport class SumAggregator implements Aggregator {\n public sum: number;\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: number): void {\n if (other === undefined) {\n return;\n }\n if (this.sum === undefined) {\n this.sum = other;\n } else {\n this.sum += other;\n }\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.sum;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.d.ts deleted file mode 100644 index ea717a2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { AverageAggregator } from "./AverageAggregator"; -import { CountAggregator } from "./CountAggregator"; -import { MaxAggregator } from "./MaxAggregator"; -import { MinAggregator } from "./MinAggregator"; -import { SumAggregator } from "./SumAggregator"; -import { StaticValueAggregator } from "./StaticValueAggregator"; -import { AggregateType } from "../../request/ErrorResponse"; -export declare function createAggregator(aggregateType: AggregateType): AverageAggregator | CountAggregator | MaxAggregator | MinAggregator | SumAggregator | StaticValueAggregator; -export { AverageAggregator, CountAggregator, MaxAggregator, MinAggregator, SumAggregator }; -export { Aggregator } from "./Aggregator"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.d.ts.map deleted file mode 100644 index 51e5f8c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,aAAa,GAE1B,iBAAiB,GACjB,eAAe,GACf,aAAa,GACb,aAAa,GACb,aAAa,GACb,qBAAqB,CAexB;AAED,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.js deleted file mode 100644 index a3401a1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { AverageAggregator } from "./AverageAggregator"; -import { CountAggregator } from "./CountAggregator"; -import { MaxAggregator } from "./MaxAggregator"; -import { MinAggregator } from "./MinAggregator"; -import { SumAggregator } from "./SumAggregator"; -import { StaticValueAggregator } from "./StaticValueAggregator"; -export function createAggregator(aggregateType) { - switch (aggregateType) { - case "Average": - return new AverageAggregator(); - case "Count": - return new CountAggregator(); - case "Max": - return new MaxAggregator(); - case "Min": - return new MinAggregator(); - case "Sum": - return new SumAggregator(); - default: - return new StaticValueAggregator(); - } -} -export { AverageAggregator, CountAggregator, MaxAggregator, MinAggregator, SumAggregator }; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.js.map deleted file mode 100644 index daa5f8e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/Aggregators/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/Aggregators/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,UAAU,gBAAgB,CAC9B,aAA4B;IAQ5B,QAAQ,aAAa,EAAE;QACrB,KAAK,SAAS;YACZ,OAAO,IAAI,iBAAiB,EAAE,CAAC;QACjC,KAAK,OAAO;YACV,OAAO,IAAI,eAAe,EAAE,CAAC;QAC/B,KAAK,KAAK;YACR,OAAO,IAAI,aAAa,EAAE,CAAC;QAC7B,KAAK,KAAK;YACR,OAAO,IAAI,aAAa,EAAE,CAAC;QAC7B,KAAK,KAAK;YACR,OAAO,IAAI,aAAa,EAAE,CAAC;QAC7B;YACE,OAAO,IAAI,qBAAqB,EAAE,CAAC;KACtC;AACH,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AverageAggregator } from \"./AverageAggregator\";\nimport { CountAggregator } from \"./CountAggregator\";\nimport { MaxAggregator } from \"./MaxAggregator\";\nimport { MinAggregator } from \"./MinAggregator\";\nimport { SumAggregator } from \"./SumAggregator\";\nimport { StaticValueAggregator } from \"./StaticValueAggregator\";\nimport { AggregateType } from \"../../request/ErrorResponse\";\n\nexport function createAggregator(\n aggregateType: AggregateType\n):\n | AverageAggregator\n | CountAggregator\n | MaxAggregator\n | MinAggregator\n | SumAggregator\n | StaticValueAggregator {\n switch (aggregateType) {\n case \"Average\":\n return new AverageAggregator();\n case \"Count\":\n return new CountAggregator();\n case \"Max\":\n return new MaxAggregator();\n case \"Min\":\n return new MinAggregator();\n case \"Sum\":\n return new SumAggregator();\n default:\n return new StaticValueAggregator();\n }\n}\n\nexport { AverageAggregator, CountAggregator, MaxAggregator, MinAggregator, SumAggregator };\nexport { Aggregator } from \"./Aggregator\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.d.ts deleted file mode 100644 index 2530006..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface CosmosHeaders { - [key: string]: string | boolean | number; -} -//# sourceMappingURL=CosmosHeaders.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.d.ts.map deleted file mode 100644 index bc40af3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CosmosHeaders.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/CosmosHeaders.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CAC1C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.js deleted file mode 100644 index 040170e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=CosmosHeaders.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.js.map deleted file mode 100644 index 8e2679d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/CosmosHeaders.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CosmosHeaders.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/CosmosHeaders.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface CosmosHeaders {\n [key: string]: string | boolean | number;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts deleted file mode 100644 index 14c4ba4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Response } from "../../request"; -import { ExecutionContext } from "../ExecutionContext"; -import { QueryInfo } from "../../request/ErrorResponse"; -/** @hidden */ -export declare class GroupByEndpointComponent implements ExecutionContext { - private executionContext; - private queryInfo; - constructor(executionContext: ExecutionContext, queryInfo: QueryInfo); - private readonly groupings; - private readonly aggregateResultArray; - private completed; - nextItem(): Promise>; - hasMoreResults(): boolean; -} -//# sourceMappingURL=GroupByEndpointComponent.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map deleted file mode 100644 index 5fa6d44..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GroupByEndpointComponent.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAgBxD,cAAc;AACd,qBAAa,wBAAyB,YAAW,gBAAgB;IACnD,OAAO,CAAC,gBAAgB;IAAoB,OAAO,CAAC,SAAS;gBAArD,gBAAgB,EAAE,gBAAgB,EAAU,SAAS,EAAE,SAAS;IAEpF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmD;IAC7E,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAa;IAClD,OAAO,CAAC,SAAS,CAAkB;IAEtB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAgExC,cAAc,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js deleted file mode 100644 index 07348c5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +++ /dev/null @@ -1,78 +0,0 @@ -import { hashObject } from "../../utils/hashObject"; -import { createAggregator } from "../Aggregators"; -import { getInitialHeader, mergeHeaders } from "../headerUtils"; -import { emptyGroup, extractAggregateResult } from "./emptyGroup"; -/** @hidden */ -export class GroupByEndpointComponent { - constructor(executionContext, queryInfo) { - this.executionContext = executionContext; - this.queryInfo = queryInfo; - this.groupings = new Map(); - this.aggregateResultArray = []; - this.completed = false; - } - async nextItem() { - // If we have a full result set, begin returning results - if (this.aggregateResultArray.length > 0) { - return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() }; - } - if (this.completed) { - return { result: undefined, headers: getInitialHeader() }; - } - const aggregateHeaders = getInitialHeader(); - while (this.executionContext.hasMoreResults()) { - // Grab the next result - const { result, headers } = (await this.executionContext.nextItem()); - mergeHeaders(aggregateHeaders, headers); - // If it exists, process it via aggregators - if (result) { - const group = result.groupByItems ? await hashObject(result.groupByItems) : emptyGroup; - const aggregators = this.groupings.get(group); - const payload = result.payload; - if (aggregators) { - // Iterator over all results in the payload - Object.keys(payload).map((key) => { - // in case the value of a group is null make sure we create a dummy payload with item2==null - const effectiveGroupByValue = payload[key] - ? payload[key] - : new Map().set("item2", null); - const aggregateResult = extractAggregateResult(effectiveGroupByValue); - aggregators.get(key).aggregate(aggregateResult); - }); - } - else { - // This is the first time we have seen a grouping. Setup the initial result without aggregate values - const grouping = new Map(); - this.groupings.set(group, grouping); - // Iterator over all results in the payload - Object.keys(payload).map((key) => { - const aggregateType = this.queryInfo.groupByAliasToAggregateType[key]; - // Create a new aggregator for this specific aggregate field - const aggregator = createAggregator(aggregateType); - grouping.set(key, aggregator); - if (aggregateType) { - const aggregateResult = extractAggregateResult(payload[key]); - aggregator.aggregate(aggregateResult); - } - else { - aggregator.aggregate(payload[key]); - } - }); - } - } - } - for (const grouping of this.groupings.values()) { - const groupResult = {}; - for (const [aggregateKey, aggregator] of grouping.entries()) { - groupResult[aggregateKey] = aggregator.getResult(); - } - this.aggregateResultArray.push(groupResult); - } - this.completed = true; - return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0; - } -} -//# sourceMappingURL=GroupByEndpointComponent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map deleted file mode 100644 index b4503b3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GroupByEndpointComponent.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAc,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAYlE,cAAc;AACd,MAAM,OAAO,wBAAwB;IACnC,YAAoB,gBAAkC,EAAU,SAAoB;QAAhE,qBAAgB,GAAhB,gBAAgB,CAAkB;QAAU,cAAS,GAAT,SAAS,CAAW;QAEnE,cAAS,GAAyC,IAAI,GAAG,EAAE,CAAC;QAC5D,yBAAoB,GAAU,EAAE,CAAC;QAC1C,cAAS,GAAY,KAAK,CAAC;IAJoD,CAAC;IAMjF,KAAK,CAAC,QAAQ;QACnB,wDAAwD;QACxD,IAAI,IAAI,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE;YACxC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,CAAC;SACjF;QAED,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,CAAC;SAC3D;QAED,MAAM,gBAAgB,GAAG,g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microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { CosmosHeaders } from \"../CosmosHeaders\";\nimport { QueryInfo } from \"../../request/ErrorResponse\";\nimport { hashObject } from \"../../utils/hashObject\";\nimport { Aggregator, createAggregator } from \"../Aggregators\";\nimport { getInitialHeader, mergeHeaders } from \"../headerUtils\";\nimport { emptyGroup, extractAggregateResult } from \"./emptyGroup\";\n\ninterface GroupByResponse {\n result: GroupByResult;\n headers: CosmosHeaders;\n}\n\ninterface GroupByResult {\n groupByItems: any[];\n payload: any;\n}\n\n/** @hidden */\nexport class GroupByEndpointComponent implements ExecutionContext {\n constructor(private executionContext: ExecutionContext, private queryInfo: QueryInfo) {}\n\n private readonly groupings: Map> = new Map();\n private readonly aggregateResultArray: any[] = [];\n private completed: boolean = false;\n\n public async nextItem(): Promise> {\n // If we have a full result set, begin returning results\n if (this.aggregateResultArray.length > 0) {\n return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() };\n }\n\n if (this.completed) {\n return { result: undefined, headers: getInitialHeader() };\n }\n\n const aggregateHeaders = getInitialHeader();\n\n while (this.executionContext.hasMoreResults()) {\n // Grab the next result\n const { result, headers } = (await this.executionContext.nextItem()) as GroupByResponse;\n mergeHeaders(aggregateHeaders, headers);\n\n // If it exists, process it via aggregators\n if (result) {\n const group = result.groupByItems ? await hashObject(result.groupByItems) : emptyGroup;\n const aggregators = this.groupings.get(group);\n const payload = result.payload;\n if (aggregators) {\n // Iterator over all results in the payload\n Object.keys(payload).map((key) => {\n // in case the value of a group is null make sure we create a dummy payload with item2==null\n const effectiveGroupByValue = payload[key]\n ? payload[key]\n : new Map().set(\"item2\", null);\n const aggregateResult = extractAggregateResult(effectiveGroupByValue);\n aggregators.get(key).aggregate(aggregateResult);\n });\n } else {\n // This is the first time we have seen a grouping. Setup the initial result without aggregate values\n const grouping = new Map();\n this.groupings.set(group, grouping);\n // Iterator over all results in the payload\n Object.keys(payload).map((key) => {\n const aggregateType = this.queryInfo.groupByAliasToAggregateType[key];\n // Create a new aggregator for this specific aggregate field\n const aggregator = createAggregator(aggregateType);\n grouping.set(key, aggregator);\n if (aggregateType) {\n const aggregateResult = extractAggregateResult(payload[key]);\n aggregator.aggregate(aggregateResult);\n } else {\n aggregator.aggregate(payload[key]);\n }\n });\n }\n }\n }\n\n for (const grouping of this.groupings.values()) {\n const groupResult: any = {};\n for (const [aggregateKey, aggregator] of grouping.entries()) {\n groupResult[aggregateKey] = aggregator.getResult();\n }\n this.aggregateResultArray.push(groupResult);\n }\n this.completed = true;\n return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts deleted file mode 100644 index bbcebfa..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Response } from "../../request"; -import { ExecutionContext } from "../ExecutionContext"; -import { QueryInfo } from "../../request/ErrorResponse"; -/** @hidden */ -export declare class GroupByValueEndpointComponent implements ExecutionContext { - private executionContext; - private queryInfo; - private readonly aggregators; - private readonly aggregateResultArray; - private aggregateType; - private completed; - constructor(executionContext: ExecutionContext, queryInfo: QueryInfo); - nextItem(): Promise>; - hasMoreResults(): boolean; -} -//# sourceMappingURL=GroupByValueEndpointComponent.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map deleted file mode 100644 index 45f09a7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GroupByValueEndpointComponent.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAiB,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAgBvE,cAAc;AACd,qBAAa,6BAA8B,YAAW,gBAAgB;IAMxD,OAAO,CAAC,gBAAgB;IAAoB,OAAO,CAAC,SAAS;IALzE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;IAClE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAa;IAClD,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAkB;gBAEf,gBAAgB,EAAE,gBAAgB,EAAU,SAAS,EAAE,SAAS;IAKvE,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IA4DxC,cAAc,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js deleted file mode 100644 index 43e6e2e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +++ /dev/null @@ -1,73 +0,0 @@ -import { hashObject } from "../../utils/hashObject"; -import { createAggregator } from "../Aggregators"; -import { getInitialHeader, mergeHeaders } from "../headerUtils"; -import { emptyGroup, extractAggregateResult } from "./emptyGroup"; -/** @hidden */ -export class GroupByValueEndpointComponent { - constructor(executionContext, queryInfo) { - this.executionContext = executionContext; - this.queryInfo = queryInfo; - this.aggregators = new Map(); - this.aggregateResultArray = []; - this.completed = false; - // VALUE queries will only every have a single grouping - this.aggregateType = this.queryInfo.aggregates[0]; - } - async nextItem() { - // Start returning results if we have processed a full results set - if (this.aggregateResultArray.length > 0) { - return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() }; - } - if (this.completed) { - return { result: undefined, headers: getInitialHeader() }; - } - const aggregateHeaders = getInitialHeader(); - while (this.executionContext.hasMoreResults()) { - // Grab the next result - const { result, headers } = (await this.executionContext.nextItem()); - mergeHeaders(aggregateHeaders, headers); - // If it exists, process it via aggregators - if (result) { - let grouping = emptyGroup; - let payload = result; - if (result.groupByItems) { - // If the query contains a GROUP BY clause, it will have a payload property and groupByItems - payload = result.payload; - grouping = await hashObject(result.groupByItems); - } - const aggregator = this.aggregators.get(grouping); - if (!aggregator) { - // This is the first time we have seen a grouping so create a new aggregator - this.aggregators.set(grouping, createAggregator(this.aggregateType)); - } - if (this.aggregateType) { - const aggregateResult = extractAggregateResult(payload[0]); - // if aggregate result is null, we need to short circuit aggregation and return undefined - if (aggregateResult === null) { - this.completed = true; - } - this.aggregators.get(grouping).aggregate(aggregateResult); - } - else { - // Queries with no aggregates pass the payload directly to the aggregator - // Example: SELECT VALUE c.team FROM c GROUP BY c.team - this.aggregators.get(grouping).aggregate(payload); - } - } - } - // We bail early since we got an undefined result back `[{}]` - if (this.completed) { - return { result: undefined, headers: aggregateHeaders }; - } - // If no results are left in the underlying execution context, convert our aggregate results to an array - for (const aggregator of this.aggregators.values()) { - this.aggregateResultArray.push(aggregator.getResult()); - } - this.completed = true; - return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0; - } -} -//# sourceMappingURL=GroupByValueEndpointComponent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map deleted file mode 100644 index 67dd72a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GroupByValueEndpointComponent.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAc,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAYlE,cAAc;AACd,MAAM,OAAO,6BAA6B;IAMxC,YAAoB,gBAAkC,EAAU,SAAoB;QAAhE,qBAAgB,GAAhB,gBAAgB,CAAkB;QAAU,cAAS,GAAT,SAAS,CAAW;QALnE,gBAAW,GAA4B,IAAI,GAAG,EAAE,CAAC;QACjD,yBAAoB,GAAU,EAAE,CAAC;QAE1C,cAAS,GAAY,KAAK,CAAC;QAGjC,uDAAuD;QACvD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,kEAAkE;QAClE,IAAI,IAAI,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE;YACxC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,gBAAgB,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,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;iBAC3D;qBAAM;oBACL,yEAAyE;oBACzE,sDAAsD;oBACtD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;iBACnD;aACF;SACF;QAED,6DAA6D;QAC7D,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;SACzD;QACD,wGAAwG;QACxG,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE;YAClD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;SACxD;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAChF,CAAC;IAEM,cAAc;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC;IACxF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { CosmosHeaders } from \"../CosmosHeaders\";\nimport { AggregateType, QueryInfo } from \"../../request/ErrorResponse\";\nimport { hashObject } from \"../../utils/hashObject\";\nimport { Aggregator, createAggregator } from \"../Aggregators\";\nimport { getInitialHeader, mergeHeaders } from \"../headerUtils\";\nimport { emptyGroup, extractAggregateResult } from \"./emptyGroup\";\n\ninterface GroupByResponse {\n result: GroupByResult;\n headers: CosmosHeaders;\n}\n\ninterface GroupByResult {\n groupByItems: any[];\n payload: any;\n}\n\n/** @hidden */\nexport class GroupByValueEndpointComponent implements ExecutionContext {\n private readonly aggregators: Map = new Map();\n private readonly aggregateResultArray: any[] = [];\n private aggregateType: AggregateType;\n private completed: boolean = false;\n\n constructor(private executionContext: ExecutionContext, private queryInfo: QueryInfo) {\n // VALUE queries will only every have a single grouping\n this.aggregateType = this.queryInfo.aggregates[0];\n }\n\n public async nextItem(): Promise> {\n // Start returning results if we have processed a full results set\n if (this.aggregateResultArray.length > 0) {\n return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() };\n }\n\n if (this.completed) {\n return { result: undefined, headers: getInitialHeader() };\n }\n\n const aggregateHeaders = getInitialHeader();\n\n while (this.executionContext.hasMoreResults()) {\n // Grab the next result\n const { result, headers } = (await this.executionContext.nextItem()) as GroupByResponse;\n mergeHeaders(aggregateHeaders, headers);\n\n // If it exists, process it via aggregators\n if (result) {\n let grouping: string = emptyGroup;\n let payload: any = result;\n if (result.groupByItems) {\n // If the query contains a GROUP BY clause, it will have a payload property and groupByItems\n payload = result.payload;\n grouping = await hashObject(result.groupByItems);\n }\n\n const aggregator = this.aggregators.get(grouping);\n if (!aggregator) {\n // This is the first time we have seen a grouping so create a new aggregator\n this.aggregators.set(grouping, createAggregator(this.aggregateType));\n }\n\n if (this.aggregateType) {\n const aggregateResult = extractAggregateResult(payload[0]);\n // if aggregate result is null, we need to short circuit aggregation and return undefined\n if (aggregateResult === null) {\n this.completed = true;\n }\n this.aggregators.get(grouping).aggregate(aggregateResult);\n } else {\n // Queries with no aggregates pass the payload directly to the aggregator\n // Example: SELECT VALUE c.team FROM c GROUP BY c.team\n this.aggregators.get(grouping).aggregate(payload);\n }\n }\n }\n\n // We bail early since we got an undefined result back `[{}]`\n if (this.completed) {\n return { result: undefined, headers: aggregateHeaders };\n }\n // If no results are left in the underlying execution context, convert our aggregate results to an array\n for (const aggregator of this.aggregators.values()) {\n this.aggregateResultArray.push(aggregator.getResult());\n }\n this.completed = true;\n return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts deleted file mode 100644 index 000d283..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Response } from "../../request"; -import { ExecutionContext } from "../ExecutionContext"; -/** @hidden */ -export declare class OffsetLimitEndpointComponent implements ExecutionContext { - private executionContext; - private offset; - private limit; - constructor(executionContext: ExecutionContext, offset: number, limit: number); - nextItem(): Promise>; - hasMoreResults(): boolean; -} -//# sourceMappingURL=OffsetLimitEndpointComponent.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map deleted file mode 100644 index 60437b2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OffsetLimitEndpointComponent.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,cAAc;AACd,qBAAa,4BAA6B,YAAW,gBAAgB;IAEjE,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,KAAK;gBAFL,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM;IAGV,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAkBxC,cAAc,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js deleted file mode 100644 index 8973b81..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +++ /dev/null @@ -1,30 +0,0 @@ -import { getInitialHeader, mergeHeaders } from "../headerUtils"; -/** @hidden */ -export class OffsetLimitEndpointComponent { - constructor(executionContext, offset, limit) { - this.executionContext = executionContext; - this.offset = offset; - this.limit = limit; - } - async nextItem() { - const aggregateHeaders = getInitialHeader(); - while (this.offset > 0) { - // Grab next item but ignore the result. We only need the headers - const { headers } = await this.executionContext.nextItem(); - this.offset--; - mergeHeaders(aggregateHeaders, headers); - } - if (this.limit > 0) { - const { result, headers } = await this.executionContext.nextItem(); - this.limit--; - mergeHeaders(aggregateHeaders, headers); - return { result, headers: aggregateHeaders }; - } - // If both limit and offset are 0, return nothing - return { result: undefined, headers: getInitialHeader() }; - } - hasMoreResults() { - return (this.offset > 0 || this.limit > 0) && this.executionContext.hasMoreResults(); - } -} -//# sourceMappingURL=OffsetLimitEndpointComponent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map deleted file mode 100644 index 2fa7bbe..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OffsetLimitEndpointComponent.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhE,cAAc;AACd,MAAM,OAAO,4BAA4B;IACvC,YACU,gBAAkC,EAClC,MAAc,EACd,KAAa;QAFb,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAQ;IACpB,CAAC;IAEG,KAAK,CAAC,QAAQ;QACnB,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACtB,iEAAiE;YACjE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;SACzC;QACD,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAClB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACnE,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;YACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;SAC9C;QACD,iDAAiD;QACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,CAAC;IAC5D,CAAC;IAEM,cAAc;QACnB,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC;IACvF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { getInitialHeader, mergeHeaders } from \"../headerUtils\";\n\n/** @hidden */\nexport class OffsetLimitEndpointComponent implements ExecutionContext {\n constructor(\n private executionContext: ExecutionContext,\n private offset: number,\n private limit: number\n ) {}\n\n public async nextItem(): Promise> {\n const aggregateHeaders = getInitialHeader();\n while (this.offset > 0) {\n // Grab next item but ignore the result. We only need the headers\n const { headers } = await this.executionContext.nextItem();\n this.offset--;\n mergeHeaders(aggregateHeaders, headers);\n }\n if (this.limit > 0) {\n const { result, headers } = await this.executionContext.nextItem();\n this.limit--;\n mergeHeaders(aggregateHeaders, headers);\n return { result, headers: aggregateHeaders };\n }\n // If both limit and offset are 0, return nothing\n return { result: undefined, headers: getInitialHeader() };\n }\n\n public hasMoreResults(): boolean {\n return (this.offset > 0 || this.limit > 0) && this.executionContext.hasMoreResults();\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts deleted file mode 100644 index 35c3326..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Response } from "../../request"; -import { ExecutionContext } from "../ExecutionContext"; -/** @hidden */ -export declare class OrderByEndpointComponent implements ExecutionContext { - private executionContext; - /** - * Represents an endpoint in handling an order by query. For each processed orderby - * result it returns 'payload' item of the result - * - * @param executionContext - Underlying Execution Context - * @hidden - */ - constructor(executionContext: ExecutionContext); - /** - * Execute a provided function on the next element in the OrderByEndpointComponent. - */ - nextItem(): Promise>; - /** - * Determine if there are still remaining resources to processs. - * @returns true if there is other elements to process in the OrderByEndpointComponent. - */ - hasMoreResults(): boolean; -} -//# sourceMappingURL=OrderByEndpointComponent.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map deleted file mode 100644 index 5628313..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderByEndpointComponent.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,cAAc;AACd,qBAAa,wBAAyB,YAAW,gBAAgB;IAQnD,OAAO,CAAC,gBAAgB;IAPpC;;;;;;OAMG;gBACiB,gBAAgB,EAAE,gBAAgB;IACtD;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAQ/C;;;OAGG;IACI,cAAc,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js deleted file mode 100644 index 9039e96..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +++ /dev/null @@ -1,31 +0,0 @@ -/** @hidden */ -export class OrderByEndpointComponent { - /** - * Represents an endpoint in handling an order by query. For each processed orderby - * result it returns 'payload' item of the result - * - * @param executionContext - Underlying Execution Context - * @hidden - */ - constructor(executionContext) { - this.executionContext = executionContext; - } - /** - * Execute a provided function on the next element in the OrderByEndpointComponent. - */ - async nextItem() { - const { result: item, headers } = await this.executionContext.nextItem(); - return { - result: item !== undefined ? item.payload : undefined, - headers, - }; - } - /** - * Determine if there are still remaining resources to processs. - * @returns true if there is other elements to process in the OrderByEndpointComponent. - */ - hasMoreResults() { - return this.executionContext.hasMoreResults(); - } -} -//# sourceMappingURL=OrderByEndpointComponent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map deleted file mode 100644 index 1cb4cc4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderByEndpointComponent.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.ts"],"names":[],"mappings":"AAKA,cAAc;AACd,MAAM,OAAO,wBAAwB;IACnC;;;;;;OAMG;IACH,YAAoB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAAG,CAAC;IAC1D;;OAEG;IACI,KAAK,CAAC,QAAQ;QACnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QACzE,OAAO;YACL,MAAM,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YACrD,OAAO;SACR,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC;IAChD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\n\n/** @hidden */\nexport class OrderByEndpointComponent implements ExecutionContext {\n /**\n * Represents an endpoint in handling an order by query. For each processed orderby\n * result it returns 'payload' item of the result\n *\n * @param executionContext - Underlying Execution Context\n * @hidden\n */\n constructor(private executionContext: ExecutionContext) {}\n /**\n * Execute a provided function on the next element in the OrderByEndpointComponent.\n */\n public async nextItem(): Promise> {\n const { result: item, headers } = await this.executionContext.nextItem();\n return {\n result: item !== undefined ? item.payload : undefined,\n headers,\n };\n }\n\n /**\n * Determine if there are still remaining resources to processs.\n * @returns true if there is other elements to process in the OrderByEndpointComponent.\n */\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults();\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts deleted file mode 100644 index ef29f40..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Response } from "../../request"; -import { ExecutionContext } from "../ExecutionContext"; -/** @hidden */ -export declare class OrderedDistinctEndpointComponent implements ExecutionContext { - private executionContext; - private hashedLastResult; - constructor(executionContext: ExecutionContext); - nextItem(): Promise>; - hasMoreResults(): boolean; -} -//# sourceMappingURL=OrderedDistinctEndpointComponent.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map deleted file mode 100644 index d54fec7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderedDistinctEndpointComponent.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,cAAc;AACd,qBAAa,gCAAiC,YAAW,gBAAgB;IAE3D,OAAO,CAAC,gBAAgB;IADpC,OAAO,CAAC,gBAAgB,CAAS;gBACb,gBAAgB,EAAE,gBAAgB;IAEzC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAYxC,cAAc,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js deleted file mode 100644 index 3e3a349..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +++ /dev/null @@ -1,22 +0,0 @@ -import { hashObject } from "../../utils/hashObject"; -/** @hidden */ -export class OrderedDistinctEndpointComponent { - constructor(executionContext) { - this.executionContext = executionContext; - } - async nextItem() { - const { headers, result } = await this.executionContext.nextItem(); - if (result) { - const hashedResult = await hashObject(result); - if (hashedResult === this.hashedLastResult) { - return { result: undefined, headers }; - } - this.hashedLastResult = hashedResult; - } - return { result, headers }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults(); - } -} -//# sourceMappingURL=OrderedDistinctEndpointComponent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map deleted file mode 100644 index 2246aa8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderedDistinctEndpointComponent.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,cAAc;AACd,MAAM,OAAO,gCAAgC;IAE3C,YAAoB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAAG,CAAC;IAEnD,KAAK,CAAC,QAAQ;QACnB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QACnE,IAAI,MAAM,EAAE;YACV,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;YAC9C,IAAI,YAAY,KAAK,IAAI,CAAC,gBAAgB,EAAE;gBAC1C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;aACvC;YACD,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAC;SACtC;QACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;IAEM,cAAc;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC;IAChD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { hashObject } from \"../../utils/hashObject\";\n\n/** @hidden */\nexport class OrderedDistinctEndpointComponent implements ExecutionContext {\n private hashedLastResult: string;\n constructor(private executionContext: ExecutionContext) {}\n\n public async nextItem(): Promise> {\n const { headers, result } = await this.executionContext.nextItem();\n if (result) {\n const hashedResult = await hashObject(result);\n if (hashedResult === this.hashedLastResult) {\n return { result: undefined, headers };\n }\n this.hashedLastResult = hashedResult;\n }\n return { result, headers };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults();\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts deleted file mode 100644 index f96ee5d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Response } from "../../request"; -import { ExecutionContext } from "../ExecutionContext"; -/** @hidden */ -export declare class UnorderedDistinctEndpointComponent implements ExecutionContext { - private executionContext; - private hashedResults; - constructor(executionContext: ExecutionContext); - nextItem(): Promise>; - hasMoreResults(): boolean; -} -//# sourceMappingURL=UnorderedDistinctEndpointComponent.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map deleted file mode 100644 index 8bd2300..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UnorderedDistinctEndpointComponent.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,cAAc;AACd,qBAAa,kCAAmC,YAAW,gBAAgB;IAE7D,OAAO,CAAC,gBAAgB;IADpC,OAAO,CAAC,aAAa,CAAc;gBACf,gBAAgB,EAAE,gBAAgB;IAIzC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAYxC,cAAc,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js deleted file mode 100644 index 825d67c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +++ /dev/null @@ -1,23 +0,0 @@ -import { hashObject } from "../../utils/hashObject"; -/** @hidden */ -export class UnorderedDistinctEndpointComponent { - constructor(executionContext) { - this.executionContext = executionContext; - this.hashedResults = new Set(); - } - async nextItem() { - const { headers, result } = await this.executionContext.nextItem(); - if (result) { - const hashedResult = await hashObject(result); - if (this.hashedResults.has(hashedResult)) { - return { result: undefined, headers }; - } - this.hashedResults.add(hashedResult); - } - return { result, headers }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults(); - } -} -//# sourceMappingURL=UnorderedDistinctEndpointComponent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map deleted file mode 100644 index fff192a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UnorderedDistinctEndpointComponent.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,cAAc;AACd,MAAM,OAAO,kCAAkC;IAE7C,YAAoB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QACpD,IAAI,CAAC,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QACnE,IAAI,MAAM,EAAE;YACV,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;YAC9C,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;gBACxC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;aACvC;YACD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;SACtC;QACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;IAEM,cAAc;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC;IAChD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { hashObject } from \"../../utils/hashObject\";\n\n/** @hidden */\nexport class UnorderedDistinctEndpointComponent implements ExecutionContext {\n private hashedResults: Set;\n constructor(private executionContext: ExecutionContext) {\n this.hashedResults = new Set();\n }\n\n public async nextItem(): Promise> {\n const { headers, result } = await this.executionContext.nextItem();\n if (result) {\n const hashedResult = await hashObject(result);\n if (this.hashedResults.has(hashedResult)) {\n return { result: undefined, headers };\n }\n this.hashedResults.add(hashedResult);\n }\n return { result, headers };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults();\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.d.ts deleted file mode 100644 index e5a3ddf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare const emptyGroup = "__empty__"; -export declare const extractAggregateResult: (payload: { - item2?: unknown; - item: unknown; -}) => any; -//# sourceMappingURL=emptyGroup.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.d.ts.map deleted file mode 100644 index bc354ad..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"emptyGroup.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/emptyGroup.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,cAAc,CAAC;AAItC,eAAO,MAAM,sBAAsB,YAAa;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,KAAG,GACI,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.js deleted file mode 100644 index 6e5f51a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// All aggregates are effectively a group by operation -// The empty group is used for aggregates without a GROUP BY clause -export const emptyGroup = "__empty__"; -// Newer API versions rewrite the query to return `item2`. It fixes some legacy issues with the original `item` result -// Aggregator code should use item2 when available -export const extractAggregateResult = (payload) => Object.keys(payload).length > 0 ? (payload.item2 ? payload.item2 : payload.item) : null; -//# sourceMappingURL=emptyGroup.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.js.map deleted file mode 100644 index a0a93c8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/EndpointComponent/emptyGroup.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"emptyGroup.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/EndpointComponent/emptyGroup.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,sDAAsD;AACtD,mEAAmE;AACnE,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC,sHAAsH;AACtH,kDAAkD;AAClD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAA2C,EAAO,EAAE,CACzF,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// All aggregates are effectively a group by operation\n// The empty group is used for aggregates without a GROUP BY clause\nexport const emptyGroup = \"__empty__\";\n\n// Newer API versions rewrite the query to return `item2`. It fixes some legacy issues with the original `item` result\n// Aggregator code should use item2 when available\nexport const extractAggregateResult = (payload: { item2?: unknown; item: unknown }): any =>\n Object.keys(payload).length > 0 ? (payload.item2 ? payload.item2 : payload.item) : null;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.d.ts deleted file mode 100644 index edcbc9c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Response } from "../request"; -/** @hidden */ -export interface ExecutionContext { - nextItem: () => Promise>; - hasMoreResults: () => boolean; - fetchMore?: () => Promise>; -} -//# sourceMappingURL=ExecutionContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.d.ts.map deleted file mode 100644 index f6fd666..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/ExecutionContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,cAAc;AACd,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,cAAc,EAAE,MAAM,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.js deleted file mode 100644 index 45811ce..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=ExecutionContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.js.map deleted file mode 100644 index b404c7f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/ExecutionContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/ExecutionContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../request\";\n\n/** @hidden */\nexport interface ExecutionContext {\n nextItem: () => Promise>;\n hasMoreResults: () => boolean;\n fetchMore?: () => Promise>; // TODO: code smell\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.d.ts deleted file mode 100644 index fb97cef..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** @hidden */ -export declare enum FetchResultType { - "Done" = 0, - "Exception" = 1, - "Result" = 2 -} -/** @hidden */ -export declare class FetchResult { - feedResponse: any; - fetchResultType: FetchResultType; - error: any; - /** - * Wraps fetch results for the document producer. - * This allows the document producer to buffer exceptions so that actual results don't get flushed during splits. - * - * @param feedReponse - The response the document producer got back on a successful fetch - * @param error - The exception meant to be buffered on an unsuccessful fetch - * @hidden - */ - constructor(feedResponse: unknown, error: unknown); -} -//# sourceMappingURL=FetchResult.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.d.ts.map deleted file mode 100644 index ba90b6b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FetchResult.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/FetchResult.ts"],"names":[],"mappings":"AAEA,cAAc;AACd,oBAAY,eAAe;IACzB,MAAM,IAAI;IACV,WAAW,IAAI;IACf,QAAQ,IAAI;CACb;AAED,cAAc;AACd,qBAAa,WAAW;IACf,YAAY,EAAE,GAAG,CAAC;IAClB,eAAe,EAAE,eAAe,CAAC;IACjC,KAAK,EAAE,GAAG,CAAC;IAClB;;;;;;;OAOG;gBACS,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;CAUlD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.js deleted file mode 100644 index 8f040af..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** @hidden */ -export var FetchResultType; -(function (FetchResultType) { - FetchResultType[FetchResultType["Done"] = 0] = "Done"; - FetchResultType[FetchResultType["Exception"] = 1] = "Exception"; - FetchResultType[FetchResultType["Result"] = 2] = "Result"; -})(FetchResultType || (FetchResultType = {})); -/** @hidden */ -export class FetchResult { - /** - * Wraps fetch results for the document producer. - * This allows the document producer to buffer exceptions so that actual results don't get flushed during splits. - * - * @param feedReponse - The response the document producer got back on a successful fetch - * @param error - The exception meant to be buffered on an unsuccessful fetch - * @hidden - */ - constructor(feedResponse, error) { - // TODO: feedResponse/error - if (feedResponse !== undefined) { - this.feedResponse = feedResponse; - this.fetchResultType = FetchResultType.Result; - } - else { - this.error = error; - this.fetchResultType = FetchResultType.Exception; - } - } -} -//# sourceMappingURL=FetchResult.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.js.map deleted file mode 100644 index 2145bea..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/FetchResult.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FetchResult.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/FetchResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,cAAc;AACd,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,qDAAU,CAAA;IACV,+DAAe,CAAA;IACf,yDAAY,CAAA;AACd,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED,cAAc;AACd,MAAM,OAAO,WAAW;IAItB;;;;;;;OAOG;IACH,YAAY,YAAqB,EAAE,KAAc;QAC/C,2BAA2B;QAC3B,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;YACjC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC;SAC/C;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC;SAClD;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** @hidden */\nexport enum FetchResultType {\n \"Done\" = 0,\n \"Exception\" = 1,\n \"Result\" = 2,\n}\n\n/** @hidden */\nexport class FetchResult {\n public feedResponse: any;\n public fetchResultType: FetchResultType;\n public error: any;\n /**\n * Wraps fetch results for the document producer.\n * This allows the document producer to buffer exceptions so that actual results don't get flushed during splits.\n *\n * @param feedReponse - The response the document producer got back on a successful fetch\n * @param error - The exception meant to be buffered on an unsuccessful fetch\n * @hidden\n */\n constructor(feedResponse: unknown, error: unknown) {\n // TODO: feedResponse/error\n if (feedResponse !== undefined) {\n this.feedResponse = feedResponse;\n this.fetchResultType = FetchResultType.Result;\n } else {\n this.error = error;\n this.fetchResultType = FetchResultType.Exception;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.d.ts deleted file mode 100644 index cfd9964..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Represents a SQL query in the Azure Cosmos DB service. - * - * Queries with inputs should be parameterized to protect against SQL injection. - * - * @example Parameterized SQL Query - * ```typescript - * const query: SqlQuerySpec = { - * query: "SELECT * FROM Families f where f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Wakefield"} - * ] - * }; - * ``` - */ -export interface SqlQuerySpec { - /** The text of the SQL query */ - query: string; - /** The parameters you provide in the query */ - parameters?: SqlParameter[]; -} -/** - * Represents a parameter in a Parameterized SQL query, specified in {@link SqlQuerySpec} - */ -export interface SqlParameter { - /** Name of the parameter. (i.e. `@lastName`) */ - name: string; - /** Value of the parameter (this is safe to come from users, assuming they are authorized) */ - value: JSONValue; -} -export declare type JSONValue = boolean | number | string | null | JSONArray | JSONObject; -export interface JSONObject { - [key: string]: JSONValue; -} -export interface JSONArray extends ArrayLike { -} -//# sourceMappingURL=SqlQuerySpec.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.d.ts.map deleted file mode 100644 index 90a7219..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SqlQuerySpec.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/SqlQuerySpec.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,oBAAY,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC;AAClF,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AACD,MAAM,WAAW,SAAU,SAAQ,SAAS,CAAC,SAAS,CAAC;CAAG"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.js deleted file mode 100644 index 6ba9f7d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=SqlQuerySpec.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.js.map deleted file mode 100644 index 3960534..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/SqlQuerySpec.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SqlQuerySpec.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/SqlQuerySpec.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Represents a SQL query in the Azure Cosmos DB service.\n *\n * Queries with inputs should be parameterized to protect against SQL injection.\n *\n * @example Parameterized SQL Query\n * ```typescript\n * const query: SqlQuerySpec = {\n * query: \"SELECT * FROM Families f where f.lastName = @lastName\",\n * parameters: [\n * {name: \"@lastName\", value: \"Wakefield\"}\n * ]\n * };\n * ```\n */\nexport interface SqlQuerySpec {\n /** The text of the SQL query */\n query: string;\n /** The parameters you provide in the query */\n parameters?: SqlParameter[];\n}\n\n/**\n * Represents a parameter in a Parameterized SQL query, specified in {@link SqlQuerySpec}\n */\nexport interface SqlParameter {\n /** Name of the parameter. (i.e. `@lastName`) */\n name: string;\n /** Value of the parameter (this is safe to come from users, assuming they are authorized) */\n value: JSONValue;\n}\n\nexport type JSONValue = boolean | number | string | null | JSONArray | JSONObject;\nexport interface JSONObject {\n [key: string]: JSONValue;\n}\nexport interface JSONArray extends ArrayLike {}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.d.ts deleted file mode 100644 index 2b8043b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { FeedOptions, Response } from "../request"; -import { ExecutionContext } from "./index"; -/** @hidden */ -export declare type FetchFunctionCallback = (options: FeedOptions) => Promise>; -/** @hidden */ -export declare class DefaultQueryExecutionContext implements ExecutionContext { - private static readonly STATES; - private resources; - private currentIndex; - private currentPartitionIndex; - private fetchFunctions; - private options; - continuationToken: string; - get continuation(): string; - private state; - private nextFetchFunction; - /** - * Provides the basic Query Execution Context. - * This wraps the internal logic query execution using provided fetch functions - * - * @param clientContext - Is used to read the partitionKeyRanges for split proofing - * @param query - A SQL query. - * @param options - Represents the feed options. - * @param fetchFunctions - A function to retrieve each page of data. - * An array of functions may be used to query more than one partition. - * @hidden - */ - constructor(options: FeedOptions, fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[]); - /** - * Execute a provided callback on the next element in the execution context. - */ - nextItem(): Promise>; - /** - * Retrieve the current element on the execution context. - */ - current(): Promise>; - /** - * Determine if there are still remaining resources to processs based on - * the value of the continuation token or the elements remaining on the current batch in the execution context. - * - * @returns true if there is other elements to process in the DefaultQueryExecutionContext. - */ - hasMoreResults(): boolean; - /** - * Fetches the next batch of the feed and pass them as an array to a callback - */ - fetchMore(): Promise>; - private _canFetchMore; -} -//# sourceMappingURL=defaultQueryExecutionContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.d.ts.map deleted file mode 100644 index 59fe47b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultQueryExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/defaultQueryExecutionContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3C,cAAc;AACd,oBAAY,qBAAqB,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AASrF,cAAc;AACd,qBAAa,4BAA6B,YAAW,gBAAgB;IACnE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAU;IACxC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,cAAc,CAA0B;IAChD,OAAO,CAAC,OAAO,CAAc;IACtB,iBAAiB,EAAE,MAAM,CAAC;IACjC,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,iBAAiB,CAAyB;IAClD;;;;;;;;;;OAUG;gBAED,OAAO,EAAE,WAAW,EACpB,cAAc,EAAE,qBAAqB,GAAG,qBAAqB,EAAE;IAWjE;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAM/C;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IA0B9C;;;;;OAKG;IACI,cAAc,IAAI,OAAO;IAShC;;OAEG;IACU,SAAS,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAuFhD,OAAO,CAAC,aAAa;CAQtB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.js deleted file mode 100644 index e87ed34..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.js +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createClientLogger } from "@azure/logger"; -import { Constants } from "../common"; -import { ClientSideMetrics, QueryMetrics } from "../queryMetrics"; -import { getInitialHeader } from "./headerUtils"; -const logger = createClientLogger("ClientContext"); -/** @hidden */ -var STATES; -(function (STATES) { - STATES["start"] = "start"; - STATES["inProgress"] = "inProgress"; - STATES["ended"] = "ended"; -})(STATES || (STATES = {})); -/** @hidden */ -export class DefaultQueryExecutionContext { - /** - * Provides the basic Query Execution Context. - * This wraps the internal logic query execution using provided fetch functions - * - * @param clientContext - Is used to read the partitionKeyRanges for split proofing - * @param query - A SQL query. - * @param options - Represents the feed options. - * @param fetchFunctions - A function to retrieve each page of data. - * An array of functions may be used to query more than one partition. - * @hidden - */ - constructor(options, fetchFunctions) { - this.resources = []; - this.currentIndex = 0; - this.currentPartitionIndex = 0; - this.fetchFunctions = Array.isArray(fetchFunctions) ? fetchFunctions : [fetchFunctions]; - this.options = options || {}; - this.continuationToken = this.options.continuationToken || this.options.continuation || null; - this.state = DefaultQueryExecutionContext.STATES.start; - } - get continuation() { - return this.continuationToken; - } - /** - * Execute a provided callback on the next element in the execution context. - */ - async nextItem() { - ++this.currentIndex; - const response = await this.current(); - return response; - } - /** - * Retrieve the current element on the execution context. - */ - async current() { - if (this.currentIndex < this.resources.length) { - return { - result: this.resources[this.currentIndex], - headers: getInitialHeader(), - }; - } - if (this._canFetchMore()) { - const { result: resources, headers } = await this.fetchMore(); - this.resources = resources; - if (this.resources.length === 0) { - if (!this.continuationToken && this.currentPartitionIndex >= this.fetchFunctions.length) { - this.state = DefaultQueryExecutionContext.STATES.ended; - return { result: undefined, headers }; - } - else { - return this.current(); - } - } - return { result: this.resources[this.currentIndex], headers }; - } - else { - this.state = DefaultQueryExecutionContext.STATES.ended; - return { result: undefined, headers: getInitialHeader() }; - } - } - /** - * Determine if there are still remaining resources to processs based on - * the value of the continuation token or the elements remaining on the current batch in the execution context. - * - * @returns true if there is other elements to process in the DefaultQueryExecutionContext. - */ - hasMoreResults() { - return (this.state === DefaultQueryExecutionContext.STATES.start || - this.continuationToken !== undefined || - this.currentIndex < this.resources.length - 1 || - this.currentPartitionIndex < this.fetchFunctions.length); - } - /** - * Fetches the next batch of the feed and pass them as an array to a callback - */ - async fetchMore() { - if (this.currentPartitionIndex >= this.fetchFunctions.length) { - return { headers: getInitialHeader(), result: undefined }; - } - // Keep to the original continuation and to restore the value after fetchFunction call - const originalContinuation = this.options.continuationToken || this.options.continuation; - this.options.continuationToken = this.continuationToken; - // Return undefined if there is no more results - if (this.currentPartitionIndex >= this.fetchFunctions.length) { - return { headers: getInitialHeader(), result: undefined }; - } - let resources; - let responseHeaders; - try { - let p; - if (this.nextFetchFunction !== undefined) { - logger.verbose("using prefetch"); - p = this.nextFetchFunction; - this.nextFetchFunction = undefined; - } - else { - logger.verbose("using fresh fetch"); - p = this.fetchFunctions[this.currentPartitionIndex](this.options); - } - const response = await p; - resources = response.result; - responseHeaders = response.headers; - this.continuationToken = responseHeaders[Constants.HttpHeaders.Continuation]; - if (!this.continuationToken) { - ++this.currentPartitionIndex; - } - if (this.options && this.options.bufferItems === true) { - const fetchFunction = this.fetchFunctions[this.currentPartitionIndex]; - this.nextFetchFunction = fetchFunction - ? fetchFunction(Object.assign(Object.assign({}, this.options), { continuationToken: this.continuationToken })) - : undefined; - } - } - catch (err) { - this.state = DefaultQueryExecutionContext.STATES.ended; - // return callback(err, undefined, responseHeaders); - // TODO: Error and data being returned is an antipattern, this might broken - throw err; - } - this.state = DefaultQueryExecutionContext.STATES.inProgress; - this.currentIndex = 0; - this.options.continuationToken = originalContinuation; - this.options.continuation = originalContinuation; - // deserializing query metrics so that we aren't working with delimited strings in the rest of the code base - if (Constants.HttpHeaders.QueryMetrics in responseHeaders) { - const delimitedString = responseHeaders[Constants.HttpHeaders.QueryMetrics]; - let queryMetrics = QueryMetrics.createFromDelimitedString(delimitedString); - // Add the request charge to the query metrics so that we can have per partition request charge. - if (Constants.HttpHeaders.RequestCharge in responseHeaders) { - const requestCharge = Number(responseHeaders[Constants.HttpHeaders.RequestCharge]) || 0; - queryMetrics = new QueryMetrics(queryMetrics.retrievedDocumentCount, queryMetrics.retrievedDocumentSize, queryMetrics.outputDocumentCount, queryMetrics.outputDocumentSize, queryMetrics.indexHitDocumentCount, queryMetrics.totalQueryExecutionTime, queryMetrics.queryPreparationTimes, queryMetrics.indexLookupTime, queryMetrics.documentLoadTime, queryMetrics.vmExecutionTime, queryMetrics.runtimeExecutionTimes, queryMetrics.documentWriteTime, new ClientSideMetrics(requestCharge)); - } - // Wraping query metrics in a object where the key is '0' just so single partition - // and partition queries have the same response schema - responseHeaders[Constants.HttpHeaders.QueryMetrics] = {}; - responseHeaders[Constants.HttpHeaders.QueryMetrics]["0"] = queryMetrics; - } - return { result: resources, headers: responseHeaders }; - } - _canFetchMore() { - const res = this.state === DefaultQueryExecutionContext.STATES.start || - (this.continuationToken && this.state === DefaultQueryExecutionContext.STATES.inProgress) || - (this.currentPartitionIndex < this.fetchFunctions.length && - this.state === DefaultQueryExecutionContext.STATES.inProgress); - return res; - } -} -DefaultQueryExecutionContext.STATES = STATES; -//# sourceMappingURL=defaultQueryExecutionContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.js.map deleted file mode 100644 index 0ab1e9b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/defaultQueryExecutionContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultQueryExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/defaultQueryExecutionContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAe,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,MAAM,MAAM,GAAgB,kBAAkB,CAAC,eAAe,CAAC,CAAC;AAIhE,cAAc;AACd,IAAK,MAIJ;AAJD,WAAK,MAAM;IACT,yBAAe,CAAA;IACf,mCAAyB,CAAA;IACzB,yBAAe,CAAA;AACjB,CAAC,EAJI,MAAM,KAAN,MAAM,QAIV;AAED,cAAc;AACd,MAAM,OAAO,4BAA4B;IAavC;;;;;;;;;;OAUG;IACH,YACE,OAAoB,EACpB,cAA+D;QAE/D,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,qBAAqB,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QACxF,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC;QAC7F,IAAI,CAAC,KAAK,GAAG,4BAA4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IAAI,IAAI,CAAC,KAAK,KAAK,4BAA4B,CAAC,MAAM,CAAC,UAAU,CAAC;YACzF,CAAC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM;gBACtD,IAAI,CAAC,KAAK,KAAK,4BAA4B,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACnE,OAAO,GAAG,CAAC;IACb,CAAC;;AA1LuB,mCAAM,GAAG,MAAM,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\nimport { Constants } from \"../common\";\nimport { ClientSideMetrics, QueryMetrics } from \"../queryMetrics\";\nimport { FeedOptions, Response } from \"../request\";\nimport { getInitialHeader } from \"./headerUtils\";\nimport { ExecutionContext } from \"./index\";\n\nconst logger: AzureLogger = createClientLogger(\"ClientContext\");\n/** @hidden */\nexport type FetchFunctionCallback = (options: FeedOptions) => Promise>;\n\n/** @hidden */\nenum STATES {\n start = \"start\",\n inProgress = \"inProgress\",\n ended = \"ended\",\n}\n\n/** @hidden */\nexport class DefaultQueryExecutionContext implements ExecutionContext {\n private static readonly STATES = STATES;\n private resources: any[]; // TODO: any resources\n private currentIndex: number;\n private currentPartitionIndex: number;\n private fetchFunctions: FetchFunctionCallback[];\n private options: FeedOptions; // TODO: any options\n public continuationToken: string; // TODO: any continuation\n public get continuation(): string {\n return this.continuationToken;\n }\n private state: STATES;\n private nextFetchFunction: Promise>;\n /**\n * Provides the basic Query Execution Context.\n * This wraps the internal logic query execution using provided fetch functions\n *\n * @param clientContext - Is used to read the partitionKeyRanges for split proofing\n * @param query - A SQL query.\n * @param options - Represents the feed options.\n * @param fetchFunctions - A function to retrieve each page of data.\n * An array of functions may be used to query more than one partition.\n * @hidden\n */\n constructor(\n options: FeedOptions,\n fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[]\n ) {\n this.resources = [];\n this.currentIndex = 0;\n this.currentPartitionIndex = 0;\n this.fetchFunctions = Array.isArray(fetchFunctions) ? fetchFunctions : [fetchFunctions];\n this.options = options || {};\n this.continuationToken = this.options.continuationToken || this.options.continuation || null;\n this.state = DefaultQueryExecutionContext.STATES.start;\n }\n\n /**\n * Execute a provided callback on the next element in the execution context.\n */\n public async nextItem(): Promise> {\n ++this.currentIndex;\n const response = await this.current();\n return response;\n }\n\n /**\n * Retrieve the current element on the execution context.\n */\n public async current(): Promise> {\n if (this.currentIndex < this.resources.length) {\n return {\n result: this.resources[this.currentIndex],\n headers: getInitialHeader(),\n };\n }\n\n if (this._canFetchMore()) {\n const { result: resources, headers } = await this.fetchMore();\n this.resources = resources;\n if (this.resources.length === 0) {\n if (!this.continuationToken && this.currentPartitionIndex >= this.fetchFunctions.length) {\n this.state = DefaultQueryExecutionContext.STATES.ended;\n return { result: undefined, headers };\n } else {\n return this.current();\n }\n }\n return { result: this.resources[this.currentIndex], headers };\n } else {\n this.state = DefaultQueryExecutionContext.STATES.ended;\n return { result: undefined, headers: getInitialHeader() };\n }\n }\n\n /**\n * Determine if there are still remaining resources to processs based on\n * the value of the continuation token or the elements remaining on the current batch in the execution context.\n *\n * @returns true if there is other elements to process in the DefaultQueryExecutionContext.\n */\n public hasMoreResults(): boolean {\n return (\n this.state === DefaultQueryExecutionContext.STATES.start ||\n this.continuationToken !== undefined ||\n this.currentIndex < this.resources.length - 1 ||\n this.currentPartitionIndex < this.fetchFunctions.length\n );\n }\n\n /**\n * Fetches the next batch of the feed and pass them as an array to a callback\n */\n public async fetchMore(): Promise> {\n if (this.currentPartitionIndex >= this.fetchFunctions.length) {\n return { headers: getInitialHeader(), result: undefined };\n }\n\n // Keep to the original continuation and to restore the value after fetchFunction call\n const originalContinuation = this.options.continuationToken || this.options.continuation;\n this.options.continuationToken = this.continuationToken;\n\n // Return undefined if there is no more results\n if (this.currentPartitionIndex >= this.fetchFunctions.length) {\n return { headers: getInitialHeader(), result: undefined };\n }\n\n let resources;\n let responseHeaders;\n try {\n let p: Promise>;\n if (this.nextFetchFunction !== undefined) {\n logger.verbose(\"using prefetch\");\n p = this.nextFetchFunction;\n this.nextFetchFunction = undefined;\n } else {\n logger.verbose(\"using fresh fetch\");\n p = this.fetchFunctions[this.currentPartitionIndex](this.options);\n }\n const response = await p;\n resources = response.result;\n responseHeaders = response.headers;\n\n this.continuationToken = responseHeaders[Constants.HttpHeaders.Continuation];\n if (!this.continuationToken) {\n ++this.currentPartitionIndex;\n }\n\n if (this.options && this.options.bufferItems === true) {\n const fetchFunction = this.fetchFunctions[this.currentPartitionIndex];\n this.nextFetchFunction = fetchFunction\n ? fetchFunction({ ...this.options, continuationToken: this.continuationToken })\n : undefined;\n }\n } catch (err: any) {\n this.state = DefaultQueryExecutionContext.STATES.ended;\n // return callback(err, undefined, responseHeaders);\n // TODO: Error and data being returned is an antipattern, this might broken\n throw err;\n }\n\n this.state = DefaultQueryExecutionContext.STATES.inProgress;\n this.currentIndex = 0;\n this.options.continuationToken = originalContinuation;\n this.options.continuation = originalContinuation;\n\n // deserializing query metrics so that we aren't working with delimited strings in the rest of the code base\n if (Constants.HttpHeaders.QueryMetrics in responseHeaders) {\n const delimitedString = responseHeaders[Constants.HttpHeaders.QueryMetrics];\n let queryMetrics = QueryMetrics.createFromDelimitedString(delimitedString);\n\n // Add the request charge to the query metrics so that we can have per partition request charge.\n if (Constants.HttpHeaders.RequestCharge in responseHeaders) {\n const requestCharge = Number(responseHeaders[Constants.HttpHeaders.RequestCharge]) || 0;\n queryMetrics = new QueryMetrics(\n queryMetrics.retrievedDocumentCount,\n queryMetrics.retrievedDocumentSize,\n queryMetrics.outputDocumentCount,\n queryMetrics.outputDocumentSize,\n queryMetrics.indexHitDocumentCount,\n queryMetrics.totalQueryExecutionTime,\n queryMetrics.queryPreparationTimes,\n queryMetrics.indexLookupTime,\n queryMetrics.documentLoadTime,\n queryMetrics.vmExecutionTime,\n queryMetrics.runtimeExecutionTimes,\n queryMetrics.documentWriteTime,\n new ClientSideMetrics(requestCharge)\n );\n }\n\n // Wraping query metrics in a object where the key is '0' just so single partition\n // and partition queries have the same response schema\n responseHeaders[Constants.HttpHeaders.QueryMetrics] = {};\n responseHeaders[Constants.HttpHeaders.QueryMetrics][\"0\"] = queryMetrics;\n }\n\n return { result: resources, headers: responseHeaders };\n }\n\n private _canFetchMore(): boolean {\n const res =\n this.state === DefaultQueryExecutionContext.STATES.start ||\n (this.continuationToken && this.state === DefaultQueryExecutionContext.STATES.inProgress) ||\n (this.currentPartitionIndex < this.fetchFunctions.length &&\n this.state === DefaultQueryExecutionContext.STATES.inProgress);\n return res;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.d.ts deleted file mode 100644 index dc6ea4c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { PartitionKeyRange, Resource } from "../client"; -import { ClientContext } from "../ClientContext"; -import { FeedOptions } from "../request"; -import { Response } from "../request"; -import { FetchResult } from "./FetchResult"; -import { SqlQuerySpec } from "./index"; -/** @hidden */ -export declare class DocumentProducer { - private clientContext; - private collectionLink; - private query; - targetPartitionKeyRange: PartitionKeyRange; - fetchResults: FetchResult[]; - allFetched: boolean; - private err; - previousContinuationToken: string; - continuationToken: string; - generation: number; - private respHeaders; - private internalExecutionContext; - /** - * Provides the Target Partition Range Query Execution Context. - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - Represents collection link - * @param query - A SQL query. - * @param targetPartitionKeyRange - Query Target Partition key Range - * @hidden - */ - constructor(clientContext: ClientContext, collectionLink: string, query: SqlQuerySpec, targetPartitionKeyRange: PartitionKeyRange, options: FeedOptions); - /** - * Synchronously gives the contiguous buffered results (stops at the first non result) if any - * @returns buffered current items if any - * @hidden - */ - peekBufferedItems(): any[]; - fetchFunction: (options: FeedOptions) => Promise>; - hasMoreResults(): boolean; - gotSplit(): boolean; - private _getAndResetActiveResponseHeaders; - private _updateStates; - private static _needPartitionKeyRangeCacheRefresh; - /** - * Fetches and bufferes the next page of results and executes the given callback - */ - bufferMore(): Promise>; - /** - * Synchronously gives the bufferend current item if any - * @returns buffered current item if any - * @hidden - */ - getTargetParitionKeyRange(): PartitionKeyRange; - /** - * Fetches the next element in the DocumentProducer. - */ - nextItem(): Promise>; - /** - * Retrieve the current element on the DocumentProducer. - */ - current(): Promise>; -} -//# sourceMappingURL=documentProducer.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.d.ts.map deleted file mode 100644 index 944cf1a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"documentProducer.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/documentProducer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASjD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,cAAc;AACd,qBAAa,gBAAgB;IAsBzB,OAAO,CAAC,aAAa;IArBvB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,KAAK,CAAwB;IAC9B,uBAAuB,EAAE,iBAAiB,CAAC;IAC3C,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAQ;IACZ,yBAAyB,EAAE,MAAM,CAAC;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAK;IAC9B,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,wBAAwB,CAA+B;IAE/D;;;;;;;OAOG;gBAEO,aAAa,EAAE,aAAa,EACpC,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,YAAY,EACnB,uBAAuB,EAAE,iBAAiB,EAC1C,OAAO,EAAE,WAAW;IAiBtB;;;;OAIG;IACI,iBAAiB,IAAI,GAAG,EAAE;IAmB1B,aAAa,YAAmB,WAAW,KAAG,QAAQ,SAAS,QAAQ,CAAC,CAAC,CAgB9E;IAEK,cAAc,IAAI,OAAO;IAIzB,QAAQ,IAAI,OAAO;IAW1B,OAAO,CAAC,iCAAiC;IAMzC,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,MAAM,CAAC,kCAAkC;IASjD;;OAEG;IACU,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IA8CjD;;;;OAIG;IACI,yBAAyB,IAAI,iBAAiB;IAIrD;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IA6B/C;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;CAsC/C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.js deleted file mode 100644 index ce51e68..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.js +++ /dev/null @@ -1,228 +0,0 @@ -import { Constants, getIdFromLink, getPathFromLink, ResourceType, StatusCodes, SubStatusCodes, } from "../common"; -import { DefaultQueryExecutionContext } from "./defaultQueryExecutionContext"; -import { FetchResult, FetchResultType } from "./FetchResult"; -import { getInitialHeader, mergeHeaders } from "./headerUtils"; -/** @hidden */ -export class DocumentProducer { - /** - * Provides the Target Partition Range Query Execution Context. - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - Represents collection link - * @param query - A SQL query. - * @param targetPartitionKeyRange - Query Target Partition key Range - * @hidden - */ - constructor(clientContext, collectionLink, query, targetPartitionKeyRange, options) { - this.clientContext = clientContext; - this.generation = 0; - this.fetchFunction = async (options) => { - const path = getPathFromLink(this.collectionLink, ResourceType.item); - const id = getIdFromLink(this.collectionLink); - return this.clientContext.queryFeed({ - path, - resourceType: ResourceType.item, - resourceId: id, - resultFn: (result) => result.Documents, - query: this.query, - options, - partitionKeyRangeId: this.targetPartitionKeyRange["id"], - }); - }; - // TODO: any options - this.collectionLink = collectionLink; - this.query = query; - this.targetPartitionKeyRange = targetPartitionKeyRange; - this.fetchResults = []; - this.allFetched = false; - this.err = undefined; - this.previousContinuationToken = undefined; - this.continuationToken = undefined; - this.respHeaders = getInitialHeader(); - this.internalExecutionContext = new DefaultQueryExecutionContext(options, this.fetchFunction); - } - /** - * Synchronously gives the contiguous buffered results (stops at the first non result) if any - * @returns buffered current items if any - * @hidden - */ - peekBufferedItems() { - const bufferedResults = []; - for (let i = 0, done = false; i < this.fetchResults.length && !done; i++) { - const fetchResult = this.fetchResults[i]; - switch (fetchResult.fetchResultType) { - case FetchResultType.Done: - done = true; - break; - case FetchResultType.Exception: - done = true; - break; - case FetchResultType.Result: - bufferedResults.push(fetchResult.feedResponse); - break; - } - } - return bufferedResults; - } - hasMoreResults() { - return this.internalExecutionContext.hasMoreResults() || this.fetchResults.length !== 0; - } - gotSplit() { - const fetchResult = this.fetchResults[0]; - if (fetchResult.fetchResultType === FetchResultType.Exception) { - if (DocumentProducer._needPartitionKeyRangeCacheRefresh(fetchResult.error)) { - return true; - } - } - return false; - } - _getAndResetActiveResponseHeaders() { - const ret = this.respHeaders; - this.respHeaders = getInitialHeader(); - return ret; - } - _updateStates(err, allFetched) { - // TODO: any Error - if (err) { - this.err = err; - return; - } - if (allFetched) { - this.allFetched = true; - } - if (this.internalExecutionContext.continuationToken === this.continuationToken) { - // nothing changed - return; - } - this.previousContinuationToken = this.continuationToken; - this.continuationToken = this.internalExecutionContext.continuationToken; - } - static _needPartitionKeyRangeCacheRefresh(error) { - // TODO: error - return (error.code === StatusCodes.Gone && - "substatus" in error && - error["substatus"] === SubStatusCodes.PartitionKeyRangeGone); - } - /** - * Fetches and bufferes the next page of results and executes the given callback - */ - async bufferMore() { - if (this.err) { - throw this.err; - } - try { - const { result: resources, headers: headerResponse } = await this.internalExecutionContext.fetchMore(); - ++this.generation; - this._updateStates(undefined, resources === undefined); - if (resources !== undefined) { - // some more results - resources.forEach((element) => { - // TODO: resources any - this.fetchResults.push(new FetchResult(element, undefined)); - }); - } - // need to modify the header response so that the query metrics are per partition - if (headerResponse != null && Constants.HttpHeaders.QueryMetrics in headerResponse) { - // "0" is the default partition before one is actually assigned. - const queryMetrics = headerResponse[Constants.HttpHeaders.QueryMetrics]["0"]; - // Wraping query metrics in a object where the keys are the partition key range. - headerResponse[Constants.HttpHeaders.QueryMetrics] = {}; - headerResponse[Constants.HttpHeaders.QueryMetrics][this.targetPartitionKeyRange.id] = - queryMetrics; - } - return { result: resources, headers: headerResponse }; - } - catch (err) { - // TODO: any error - if (DocumentProducer._needPartitionKeyRangeCacheRefresh(err)) { - // Split just happend - // Buffer the error so the execution context can still get the feedResponses in the itemBuffer - const bufferedError = new FetchResult(undefined, err); - this.fetchResults.push(bufferedError); - // Putting a dummy result so that the rest of code flows - return { result: [bufferedError], headers: err.headers }; - } - else { - this._updateStates(err, err.resources === undefined); - throw err; - } - } - } - /** - * Synchronously gives the bufferend current item if any - * @returns buffered current item if any - * @hidden - */ - getTargetParitionKeyRange() { - return this.targetPartitionKeyRange; - } - /** - * Fetches the next element in the DocumentProducer. - */ - async nextItem() { - if (this.err) { - this._updateStates(this.err, undefined); - throw this.err; - } - try { - const { result, headers } = await this.current(); - const fetchResult = this.fetchResults.shift(); - this._updateStates(undefined, result === undefined); - if (fetchResult.feedResponse !== result) { - throw new Error(`Expected ${fetchResult.feedResponse} to equal ${result}`); - } - switch (fetchResult.fetchResultType) { - case FetchResultType.Done: - return { result: undefined, headers }; - case FetchResultType.Exception: - fetchResult.error.headers = headers; - throw fetchResult.error; - case FetchResultType.Result: - return { result: fetchResult.feedResponse, headers }; - } - } - catch (err) { - this._updateStates(err, err.item === undefined); - throw err; - } - } - /** - * Retrieve the current element on the DocumentProducer. - */ - async current() { - // If something is buffered just give that - if (this.fetchResults.length > 0) { - const fetchResult = this.fetchResults[0]; - // Need to unwrap fetch results - switch (fetchResult.fetchResultType) { - case FetchResultType.Done: - return { - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }; - case FetchResultType.Exception: - fetchResult.error.headers = this._getAndResetActiveResponseHeaders(); - throw fetchResult.error; - case FetchResultType.Result: - return { - result: fetchResult.feedResponse, - headers: this._getAndResetActiveResponseHeaders(), - }; - } - } - // If there isn't anymore items left to fetch then let the user know. - if (this.allFetched) { - return { - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }; - } - // If there are no more bufferd items and there are still items to be fetched then buffer more - const { result, headers } = await this.bufferMore(); - mergeHeaders(this.respHeaders, headers); - if (result === undefined) { - return { result: undefined, headers: this.respHeaders }; - } - return this.current(); - } -} -//# sourceMappingURL=documentProducer.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.js.map deleted file mode 100644 index e749b1c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/documentProducer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"documentProducer.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/documentProducer.ts"],"names":[],"mappings":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IT license.\nimport { PartitionKeyRange, Resource } from \"../client\";\nimport { ClientContext } from \"../ClientContext\";\nimport {\n Constants,\n getIdFromLink,\n getPathFromLink,\n ResourceType,\n StatusCodes,\n SubStatusCodes,\n} from \"../common\";\nimport { FeedOptions } from \"../request\";\nimport { Response } from \"../request\";\nimport { DefaultQueryExecutionContext } from \"./defaultQueryExecutionContext\";\nimport { FetchResult, FetchResultType } from \"./FetchResult\";\nimport { CosmosHeaders, getInitialHeader, mergeHeaders } from \"./headerUtils\";\nimport { SqlQuerySpec } from \"./index\";\n\n/** @hidden */\nexport class DocumentProducer {\n private collectionLink: string;\n private query: string | SqlQuerySpec;\n public targetPartitionKeyRange: PartitionKeyRange;\n public fetchResults: FetchResult[];\n public allFetched: boolean;\n private err: Error;\n public previousContinuationToken: string;\n public continuationToken: string;\n public generation: number = 0;\n private respHeaders: CosmosHeaders;\n private internalExecutionContext: DefaultQueryExecutionContext;\n\n /**\n * Provides the Target Partition Range Query Execution Context.\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - Represents collection link\n * @param query - A SQL query.\n * @param targetPartitionKeyRange - Query Target Partition key Range\n * @hidden\n */\n constructor(\n private clientContext: ClientContext,\n collectionLink: string,\n query: SqlQuerySpec,\n targetPartitionKeyRange: PartitionKeyRange,\n options: FeedOptions\n ) {\n // TODO: any options\n this.collectionLink = collectionLink;\n this.query = query;\n this.targetPartitionKeyRange = targetPartitionKeyRange;\n this.fetchResults = [];\n\n this.allFetched = false;\n this.err = undefined;\n\n this.previousContinuationToken = undefined;\n this.continuationToken = undefined;\n this.respHeaders = getInitialHeader();\n\n this.internalExecutionContext = new DefaultQueryExecutionContext(options, this.fetchFunction);\n }\n /**\n * Synchronously gives the contiguous buffered results (stops at the first non result) if any\n * @returns buffered current items if any\n * @hidden\n */\n public peekBufferedItems(): any[] {\n const bufferedResults = [];\n for (let i = 0, done = false; i < this.fetchResults.length && !done; i++) {\n const fetchResult = this.fetchResults[i];\n switch (fetchResult.fetchResultType) {\n case FetchResultType.Done:\n done = true;\n break;\n case FetchResultType.Exception:\n done = true;\n break;\n case FetchResultType.Result:\n bufferedResults.push(fetchResult.feedResponse);\n break;\n }\n }\n return bufferedResults;\n }\n\n public fetchFunction = async (options: FeedOptions): Promise> => {\n const path = getPathFromLink(this.collectionLink, ResourceType.item);\n\n const id = getIdFromLink(this.collectionLink);\n\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n resultFn: (result: any) => result.Documents,\n\n query: this.query,\n options,\n\n partitionKeyRangeId: this.targetPartitionKeyRange[\"id\"],\n });\n };\n\n public hasMoreResults(): boolean {\n return this.internalExecutionContext.hasMoreResults() || this.fetchResults.length !== 0;\n }\n\n public gotSplit(): boolean {\n const fetchResult = this.fetchResults[0];\n if (fetchResult.fetchResultType === FetchResultType.Exception) {\n if (DocumentProducer._needPartitionKeyRangeCacheRefresh(fetchResult.error)) {\n return true;\n }\n }\n\n return false;\n }\n\n private _getAndResetActiveResponseHeaders(): CosmosHeaders {\n const ret = this.respHeaders;\n this.respHeaders = getInitialHeader();\n return ret;\n }\n\n private _updateStates(err: any, allFetched: boolean): void {\n // TODO: any Error\n if (err) {\n this.err = err;\n return;\n }\n if (allFetched) {\n this.allFetched = true;\n }\n if (this.internalExecutionContext.continuationToken === this.continuationToken) {\n // nothing changed\n return;\n }\n this.previousContinuationToken = this.continuationToken;\n this.continuationToken = this.internalExecutionContext.continuationToken;\n }\n\n private static _needPartitionKeyRangeCacheRefresh(error: any): boolean {\n // TODO: error\n return (\n error.code === StatusCodes.Gone &&\n \"substatus\" in error &&\n error[\"substatus\"] === SubStatusCodes.PartitionKeyRangeGone\n );\n }\n\n /**\n * Fetches and bufferes the next page of results and executes the given callback\n */\n public async bufferMore(): Promise> {\n if (this.err) {\n throw this.err;\n }\n\n try {\n const { result: resources, headers: headerResponse } =\n await this.internalExecutionContext.fetchMore();\n ++this.generation;\n this._updateStates(undefined, resources === undefined);\n if (resources !== undefined) {\n // some more results\n resources.forEach((element: any) => {\n // TODO: resources any\n this.fetchResults.push(new FetchResult(element, undefined));\n });\n }\n\n // need to modify the header response so that the query metrics are per partition\n if (headerResponse != null && Constants.HttpHeaders.QueryMetrics in headerResponse) {\n // \"0\" is the default partition before one is actually assigned.\n const queryMetrics = headerResponse[Constants.HttpHeaders.QueryMetrics][\"0\"];\n\n // Wraping query metrics in a object where the keys are the partition key range.\n headerResponse[Constants.HttpHeaders.QueryMetrics] = {};\n headerResponse[Constants.HttpHeaders.QueryMetrics][this.targetPartitionKeyRange.id] =\n queryMetrics;\n }\n\n return { result: resources, headers: headerResponse };\n } catch (err: any) {\n // TODO: any error\n if (DocumentProducer._needPartitionKeyRangeCacheRefresh(err)) {\n // Split just happend\n // Buffer the error so the execution context can still get the feedResponses in the itemBuffer\n const bufferedError = new FetchResult(undefined, err);\n this.fetchResults.push(bufferedError);\n // Putting a dummy result so that the rest of code flows\n return { result: [bufferedError], headers: err.headers };\n } else {\n this._updateStates(err, err.resources === undefined);\n throw err;\n }\n }\n }\n\n /**\n * Synchronously gives the bufferend current item if any\n * @returns buffered current item if any\n * @hidden\n */\n public getTargetParitionKeyRange(): PartitionKeyRange {\n return this.targetPartitionKeyRange;\n }\n\n /**\n * Fetches the next element in the DocumentProducer.\n */\n public async nextItem(): Promise> {\n if (this.err) {\n this._updateStates(this.err, undefined);\n throw this.err;\n }\n\n try {\n const { result, headers } = await this.current();\n\n const fetchResult = this.fetchResults.shift();\n this._updateStates(undefined, result === undefined);\n if (fetchResult.feedResponse !== result) {\n throw new Error(`Expected ${fetchResult.feedResponse} to equal ${result}`);\n }\n switch (fetchResult.fetchResultType) {\n case FetchResultType.Done:\n return { result: undefined, headers };\n case FetchResultType.Exception:\n fetchResult.error.headers = headers;\n throw fetchResult.error;\n case FetchResultType.Result:\n return { result: fetchResult.feedResponse, headers };\n }\n } catch (err: any) {\n this._updateStates(err, err.item === undefined);\n throw err;\n }\n }\n\n /**\n * Retrieve the current element on the DocumentProducer.\n */\n public async current(): Promise> {\n // If something is buffered just give that\n if (this.fetchResults.length > 0) {\n const fetchResult = this.fetchResults[0];\n // Need to unwrap fetch results\n switch (fetchResult.fetchResultType) {\n case FetchResultType.Done:\n return {\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n };\n case FetchResultType.Exception:\n fetchResult.error.headers = this._getAndResetActiveResponseHeaders();\n throw fetchResult.error;\n case FetchResultType.Result:\n return {\n result: fetchResult.feedResponse,\n headers: this._getAndResetActiveResponseHeaders(),\n };\n }\n }\n\n // If there isn't anymore items left to fetch then let the user know.\n if (this.allFetched) {\n return {\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n };\n }\n\n // If there are no more bufferd items and there are still items to be fetched then buffer more\n const { result, headers } = await this.bufferMore();\n mergeHeaders(this.respHeaders, headers);\n if (result === undefined) {\n return { result: undefined, headers: this.respHeaders };\n }\n return this.current();\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.d.ts deleted file mode 100644 index e242cd5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface CosmosHeaders { - [key: string]: any; -} -/** @hidden */ -export declare function getRequestChargeIfAny(headers: CosmosHeaders | number): number; -/** - * @hidden - */ -export declare function getInitialHeader(): CosmosHeaders; -/** - * @hidden - */ -export declare function mergeHeaders(headers: CosmosHeaders, toBeMergedHeaders: CosmosHeaders): void; -//# sourceMappingURL=headerUtils.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.d.ts.map deleted file mode 100644 index f4a5f88..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"headerUtils.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/headerUtils.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,cAAc;AAEd,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM,CAiB7E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAKhD;AAED;;GAEG;AAEH,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,GAAG,IAAI,CAkC3F"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.js deleted file mode 100644 index e717b46..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "../common"; -import { QueryMetrics } from "../queryMetrics/queryMetrics"; -/** @hidden */ -// TODO: docs -export function getRequestChargeIfAny(headers) { - if (typeof headers === "number") { - return headers; - } - else if (typeof headers === "string") { - return parseFloat(headers); - } - if (headers) { - const rc = headers[Constants.HttpHeaders.RequestCharge]; - if (rc) { - return parseFloat(rc); - } - else { - return 0; - } - } - else { - return 0; - } -} -/** - * @hidden - */ -export function getInitialHeader() { - const headers = {}; - headers[Constants.HttpHeaders.RequestCharge] = 0; - headers[Constants.HttpHeaders.QueryMetrics] = {}; - return headers; -} -/** - * @hidden - */ -// TODO: The name of this method isn't very accurate to what it does -export function mergeHeaders(headers, toBeMergedHeaders) { - if (headers[Constants.HttpHeaders.RequestCharge] === undefined) { - headers[Constants.HttpHeaders.RequestCharge] = 0; - } - if (headers[Constants.HttpHeaders.QueryMetrics] === undefined) { - headers[Constants.HttpHeaders.QueryMetrics] = QueryMetrics.zero; - } - if (!toBeMergedHeaders) { - return; - } - headers[Constants.HttpHeaders.RequestCharge] += getRequestChargeIfAny(toBeMergedHeaders); - if (toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed]) { - headers[Constants.HttpHeaders.IsRUPerMinuteUsed] = - toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed]; - } - if (Constants.HttpHeaders.QueryMetrics in toBeMergedHeaders) { - const headerQueryMetrics = headers[Constants.HttpHeaders.QueryMetrics]; - const toBeMergedHeaderQueryMetrics = toBeMergedHeaders[Constants.HttpHeaders.QueryMetrics]; - for (const partitionId in toBeMergedHeaderQueryMetrics) { - if (headerQueryMetrics[partitionId]) { - const combinedQueryMetrics = headerQueryMetrics[partitionId].add([ - toBeMergedHeaderQueryMetrics[partitionId], - ]); - headerQueryMetrics[partitionId] = combinedQueryMetrics; - } - else { - headerQueryMetrics[partitionId] = toBeMergedHeaderQueryMetrics[partitionId]; - } - } - } -} -//# sourceMappingURL=headerUtils.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.js.map deleted file mode 100644 index c0c9936..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/headerUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"headerUtils.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/headerUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAM5D,cAAc;AACd,aAAa;AACb,MA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,iBAAiB,CAAC,CAAC;IACzF,IAAI,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE;QAC9D,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,iBAAiB,CAAC;YAC9C,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;KAC9D;IAED,IAAI,SAAS,CAAC,WAAW,CAAC,YAAY,IAAI,iBAAiB,EAAE;QAC3D,MAAM,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACvE,MAAM,4BAA4B,GAAG,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAE3F,KAAK,MAAM,WAAW,IAAI,4BAA4B,EAAE;YACtD,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE;gBACnC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC;oBAC/D,4BAA4B,CAAC,WAAW,CAAC;iBAC1C,CAAC,CAAC;gBACH,kBAAkB,CAAC,WAAW,CAAC,GAAG,oBAAoB,CAAC;aACxD;iBAAM;gBACL,kBAAkB,CAAC,WAAW,CAAC,GAAG,4BAA4B,CAAC,WAAW,CAAC,CAAC;aAC7E;SACF;KACF;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { QueryMetrics } from \"../queryMetrics/queryMetrics\";\n\nexport interface CosmosHeaders {\n [key: string]: any;\n}\n\n/** @hidden */\n// TODO: docs\nexport function getRequestChargeIfAny(headers: CosmosHeaders | number): number {\n if (typeof headers === \"number\") {\n return headers;\n } else if (typeof headers === \"string\") {\n return parseFloat(headers);\n }\n\n if (headers) {\n const rc = headers[Constants.HttpHeaders.RequestCharge];\n if (rc) {\n return parseFloat(rc as string);\n } else {\n return 0;\n }\n } else {\n return 0;\n }\n}\n\n/**\n * @hidden\n */\nexport function getInitialHeader(): CosmosHeaders {\n const headers: CosmosHeaders = {};\n headers[Constants.HttpHeaders.RequestCharge] = 0;\n headers[Constants.HttpHeaders.QueryMetrics] = {};\n return headers;\n}\n\n/**\n * @hidden\n */\n// TODO: The name of this method isn't very accurate to what it does\nexport function mergeHeaders(headers: CosmosHeaders, toBeMergedHeaders: CosmosHeaders): void {\n if (headers[Constants.HttpHeaders.RequestCharge] === undefined) {\n headers[Constants.HttpHeaders.RequestCharge] = 0;\n }\n\n if (headers[Constants.HttpHeaders.QueryMetrics] === undefined) {\n headers[Constants.HttpHeaders.QueryMetrics] = QueryMetrics.zero;\n }\n\n if (!toBeMergedHeaders) {\n return;\n }\n\n headers[Constants.HttpHeaders.RequestCharge] += getRequestChargeIfAny(toBeMergedHeaders);\n if (toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed]) {\n headers[Constants.HttpHeaders.IsRUPerMinuteUsed] =\n toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed];\n }\n\n if (Constants.HttpHeaders.QueryMetrics in toBeMergedHeaders) {\n const headerQueryMetrics = headers[Constants.HttpHeaders.QueryMetrics];\n const toBeMergedHeaderQueryMetrics = toBeMergedHeaders[Constants.HttpHeaders.QueryMetrics];\n\n for (const partitionId in toBeMergedHeaderQueryMetrics) {\n if (headerQueryMetrics[partitionId]) {\n const combinedQueryMetrics = headerQueryMetrics[partitionId].add([\n toBeMergedHeaderQueryMetrics[partitionId],\n ]);\n headerQueryMetrics[partitionId] = combinedQueryMetrics;\n } else {\n headerQueryMetrics[partitionId] = toBeMergedHeaderQueryMetrics[partitionId];\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.d.ts deleted file mode 100644 index 76f9dee..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export * from "./headerUtils"; -export * from "./SqlQuerySpec"; -export * from "./defaultQueryExecutionContext"; -export * from "./Aggregators"; -export * from "./documentProducer"; -export * from "./FetchResult"; -export * from "./orderByDocumentProducerComparator"; -export * from "./ExecutionContext"; -export * from "./parallelQueryExecutionContextBase"; -export * from "./parallelQueryExecutionContext"; -export * from "./orderByQueryExecutionContext"; -export * from "./pipelinedQueryExecutionContext"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.d.ts.map deleted file mode 100644 index f52b66b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/index.ts"],"names":[],"mappings":"AAEA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,qCAAqC,CAAC;AACpD,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.js deleted file mode 100644 index 5162c12..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export * from "./headerUtils"; -export * from "./SqlQuerySpec"; -export * from "./defaultQueryExecutionContext"; -export * from "./Aggregators"; -export * from "./documentProducer"; -export * from "./FetchResult"; -export * from "./orderByDocumentProducerComparator"; -export * from "./ExecutionContext"; -export * from "./parallelQueryExecutionContextBase"; -export * from "./parallelQueryExecutionContext"; -export * from "./orderByQueryExecutionContext"; -export * from "./pipelinedQueryExecutionContext"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.js.map deleted file mode 100644 index fbb5be8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,qCAAqC,CAAC;AACpD,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./headerUtils\";\nexport * from \"./SqlQuerySpec\";\nexport * from \"./defaultQueryExecutionContext\";\nexport * from \"./Aggregators\";\nexport * from \"./documentProducer\";\nexport * from \"./FetchResult\";\nexport * from \"./orderByDocumentProducerComparator\";\nexport * from \"./ExecutionContext\";\nexport * from \"./parallelQueryExecutionContextBase\";\nexport * from \"./parallelQueryExecutionContext\";\nexport * from \"./orderByQueryExecutionContext\";\nexport * from \"./pipelinedQueryExecutionContext\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.d.ts deleted file mode 100644 index 8aa23f0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { DocumentProducer } from "./documentProducer"; -/** @hidden */ -export declare class OrderByDocumentProducerComparator { - sortOrder: string[]; - constructor(sortOrder: string[]); - private targetPartitionKeyRangeDocProdComparator; - compare(docProd1: DocumentProducer, docProd2: DocumentProducer): number; - compareValue(item1: unknown, type1: string, item2: unknown, type2: string): number; - private compareOrderByItem; - private validateOrderByItems; - private getType; - private getOrderByItems; -} -//# sourceMappingURL=orderByDocumentProducerComparator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map deleted file mode 100644 index c0495f9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"orderByDocumentProducerComparator.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/orderByDocumentProducerComparator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAiCtD,cAAc;AACd,qBAAa,iCAAiC;IACzB,SAAS,EAAE,MAAM,EAAE;gBAAnB,SAAS,EAAE,MAAM,EAAE;IAEtC,OAAO,CAAC,wCAAwC;IASzC,OAAO,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,GAAG,MAAM;IAiCvE,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IA8BzF,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,OAAO;IAuBf,OAAO,CAAC,eAAe;CAIxB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.js deleted file mode 100644 index 72f35cf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.js +++ /dev/null @@ -1,128 +0,0 @@ -// TODO: this smells funny -/** @hidden */ -const TYPEORDCOMPARATOR = Object.freeze({ - NoValue: { - ord: 0, - }, - undefined: { - ord: 1, - }, - boolean: { - ord: 2, - compFunc: (a, b) => { - return a === b ? 0 : a > b ? 1 : -1; - }, - }, - number: { - ord: 4, - compFunc: (a, b) => { - return a === b ? 0 : a > b ? 1 : -1; - }, - }, - string: { - ord: 5, - compFunc: (a, b) => { - return a === b ? 0 : a > b ? 1 : -1; - }, - }, -}); -/** @hidden */ -export class OrderByDocumentProducerComparator { - constructor(sortOrder) { - this.sortOrder = sortOrder; - } // TODO: This should be an enum - targetPartitionKeyRangeDocProdComparator(docProd1, docProd2) { - const a = docProd1.getTargetParitionKeyRange()["minInclusive"]; - const b = docProd2.getTargetParitionKeyRange()["minInclusive"]; - return a === b ? 0 : a > b ? 1 : -1; - } - compare(docProd1, docProd2) { - // Need to check for split, since we don't want to dereference "item" of undefined / exception - if (docProd1.gotSplit()) { - return -1; - } - if (docProd2.gotSplit()) { - return 1; - } - const orderByItemsRes1 = this.getOrderByItems(docProd1.peekBufferedItems()[0]); - const orderByItemsRes2 = this.getOrderByItems(docProd2.peekBufferedItems()[0]); - // validate order by items and types - // TODO: once V1 order by on different types is fixed this need to change - this.validateOrderByItems(orderByItemsRes1, orderByItemsRes2); - // no async call in the for loop - for (let i = 0; i < orderByItemsRes1.length; i++) { - // compares the orderby items one by one - const compRes = this.compareOrderByItem(orderByItemsRes1[i], orderByItemsRes2[i]); - if (compRes !== 0) { - if (this.sortOrder[i] === "Ascending") { - return compRes; - } - else if (this.sortOrder[i] === "Descending") { - return -compRes; - } - } - } - return this.targetPartitionKeyRangeDocProdComparator(docProd1, docProd2); - } - // TODO: This smells funny - compareValue(item1, type1, item2, type2) { - if (type1 === "object" || type2 === "object") { - throw new Error("Tried to compare an object type"); - } - const type1Ord = TYPEORDCOMPARATOR[type1].ord; - const type2Ord = TYPEORDCOMPARATOR[type2].ord; - const typeCmp = type1Ord - type2Ord; - if (typeCmp !== 0) { - // if the types are different, use type ordinal - return typeCmp; - } - // both are of the same type - if (type1Ord === TYPEORDCOMPARATOR["undefined"].ord || - type1Ord === TYPEORDCOMPARATOR["NoValue"].ord) { - // if both types are undefined or Null they are equal - return 0; - } - const compFunc = TYPEORDCOMPARATOR[type1].compFunc; - if (typeof compFunc === "undefined") { - throw new Error("Cannot find the comparison function"); - } - // same type and type is defined compare the items - return compFunc(item1, item2); - } - compareOrderByItem(orderByItem1, orderByItem2) { - const type1 = this.getType(orderByItem1); - const type2 = this.getType(orderByItem2); - return this.compareValue(orderByItem1["item"], type1, orderByItem2["item"], type2); - } - validateOrderByItems(res1, res2) { - if (res1.length !== res2.length) { - throw new Error(`Expected ${res1.length}, but got ${res2.length}.`); - } - if (res1.length !== this.sortOrder.length) { - throw new Error("orderByItems cannot have a different size than sort orders."); - } - for (let i = 0; i < this.sortOrder.length; i++) { - const type1 = this.getType(res1[i]); - const type2 = this.getType(res2[i]); - if (type1 !== type2) { - throw new Error(`Expected ${type1}, but got ${type2}. Cannot execute cross partition order-by queries on mixed types. Consider filtering your query using IS_STRING or IS_NUMBER to get around this exception.`); - } - } - } - getType(orderByItem) { - // TODO: any item? - if (orderByItem === undefined || orderByItem.item === undefined) { - return "NoValue"; - } - const type = typeof orderByItem.item; - if (TYPEORDCOMPARATOR[type] === undefined) { - throw new Error(`unrecognizable type ${type}`); - } - return type; - } - getOrderByItems(res) { - // TODO: any res? - return res["orderByItems"]; - } -} -//# sourceMappingURL=orderByDocumentProducerComparator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.js.map deleted file mode 100644 index 2e4f82a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByDocumentProducerComparator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"orderByDocumentProducerComparator.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/orderByDocumentProducerComparator.ts"],"names":[],"mappings":"AAIA,0BAA0B;AAC1B,cAAc;AACd,MAAM,iBAAiB,GAEnB,MAAM,CAAC,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,GAAG,EAAE,CAAC;KACP;IACD,SAAS,EAAE;QACT,GAAG,EAAE,CAAC;KACP;IACD,OAAO,EAAE;QACP,GAAG,EAAE,CAAC;QACN,QAAQ,EAAE,CAAC,CAAU,EAAE,CAAU,EAAE,EAAE;YACnC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC;KACF;IACD,MAAM,EAAE;QACN,GAAG,EAAE,CAAC;QACN,QAAQ,EAAE,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAA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K,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACpC,IAAI,KAAK,KAAK,KAAK,EAAE;gBACnB,MAAM,IAAI,KAAK,CACb,YAAY,KAAK,aAAa,KAAK,4JAA4J,CAChM,CAAC;aACH;SACF;IACH,CAAC;IAEO,OAAO,CACb,WAAgB;QAWhB,kBAAkB;QAClB,IAAI,WAAW,KAAK,SAAS,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,EAAE;YAC/D,OAAO,SAAS,CAAC;SAClB;QACD,MAAM,IAAI,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;QACrC,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE;YACzC,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;SAChD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,eAAe,CAAC,GAAQ;QAC9B,iBAAiB;QACjB,OAAO,GAAG,CAAC,cAAc,CAAC,CAAC;IAC7B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { DocumentProducer } from \"./documentProducer\";\n\n// TODO: this smells funny\n/** @hidden */\nconst TYPEORDCOMPARATOR: {\n [type: string]: { ord: number; compFunc?: (a: any, b: any) => number };\n} = Object.freeze({\n NoValue: {\n ord: 0,\n },\n undefined: {\n ord: 1,\n },\n boolean: {\n ord: 2,\n compFunc: (a: boolean, b: boolean) => {\n return a === b ? 0 : a > b ? 1 : -1;\n },\n },\n number: {\n ord: 4,\n compFunc: (a: number, b: number) => {\n return a === b ? 0 : a > b ? 1 : -1;\n },\n },\n string: {\n ord: 5,\n compFunc: (a: string, b: string) => {\n return a === b ? 0 : a > b ? 1 : -1;\n },\n },\n});\n\n/** @hidden */\nexport class OrderByDocumentProducerComparator {\n constructor(public sortOrder: string[]) {} // TODO: This should be an enum\n\n private targetPartitionKeyRangeDocProdComparator(\n docProd1: DocumentProducer,\n docProd2: DocumentProducer\n ): 0 | 1 | -1 {\n const a = docProd1.getTargetParitionKeyRange()[\"minInclusive\"];\n const b = docProd2.getTargetParitionKeyRange()[\"minInclusive\"];\n return a === b ? 0 : a > b ? 1 : -1;\n }\n\n public compare(docProd1: DocumentProducer, docProd2: DocumentProducer): number {\n // Need to check for split, since we don't want to dereference \"item\" of undefined / exception\n if (docProd1.gotSplit()) {\n return -1;\n }\n if (docProd2.gotSplit()) {\n return 1;\n }\n\n const orderByItemsRes1 = this.getOrderByItems(docProd1.peekBufferedItems()[0]);\n const orderByItemsRes2 = this.getOrderByItems(docProd2.peekBufferedItems()[0]);\n\n // validate order by items and types\n // TODO: once V1 order by on different types is fixed this need to change\n this.validateOrderByItems(orderByItemsRes1, orderByItemsRes2);\n\n // no async call in the for loop\n for (let i = 0; i < orderByItemsRes1.length; i++) {\n // compares the orderby items one by one\n const compRes = this.compareOrderByItem(orderByItemsRes1[i], orderByItemsRes2[i]);\n if (compRes !== 0) {\n if (this.sortOrder[i] === \"Ascending\") {\n return compRes;\n } else if (this.sortOrder[i] === \"Descending\") {\n return -compRes;\n }\n }\n }\n\n return this.targetPartitionKeyRangeDocProdComparator(docProd1, docProd2);\n }\n\n // TODO: This smells funny\n public compareValue(item1: unknown, type1: string, item2: unknown, type2: string): number {\n if (type1 === \"object\" || type2 === \"object\") {\n throw new Error(\"Tried to compare an object type\");\n }\n const type1Ord = TYPEORDCOMPARATOR[type1].ord;\n const type2Ord = TYPEORDCOMPARATOR[type2].ord;\n const typeCmp = type1Ord - type2Ord;\n\n if (typeCmp !== 0) {\n // if the types are different, use type ordinal\n return typeCmp;\n }\n\n // both are of the same type\n if (\n type1Ord === TYPEORDCOMPARATOR[\"undefined\"].ord ||\n type1Ord === TYPEORDCOMPARATOR[\"NoValue\"].ord\n ) {\n // if both types are undefined or Null they are equal\n return 0;\n }\n\n const compFunc = TYPEORDCOMPARATOR[type1].compFunc;\n if (typeof compFunc === \"undefined\") {\n throw new Error(\"Cannot find the comparison function\");\n }\n // same type and type is defined compare the items\n return compFunc(item1, item2);\n }\n\n private compareOrderByItem(orderByItem1: any, orderByItem2: any): number {\n const type1 = this.getType(orderByItem1);\n const type2 = this.getType(orderByItem2);\n return this.compareValue(orderByItem1[\"item\"], type1, orderByItem2[\"item\"], type2);\n }\n\n private validateOrderByItems(res1: string[], res2: string[]): void {\n if (res1.length !== res2.length) {\n throw new Error(`Expected ${res1.length}, but got ${res2.length}.`);\n }\n if (res1.length !== this.sortOrder.length) {\n throw new Error(\"orderByItems cannot have a different size than sort orders.\");\n }\n\n for (let i = 0; i < this.sortOrder.length; i++) {\n const type1 = this.getType(res1[i]);\n const type2 = this.getType(res2[i]);\n if (type1 !== type2) {\n throw new Error(\n `Expected ${type1}, but got ${type2}. Cannot execute cross partition order-by queries on mixed types. Consider filtering your query using IS_STRING or IS_NUMBER to get around this exception.`\n );\n }\n }\n }\n\n private getType(\n orderByItem: any\n ):\n | \"string\"\n | \"number\"\n | \"bigint\"\n | \"boolean\"\n | \"symbol\"\n | \"undefined\"\n | \"object\"\n | \"function\"\n | \"NoValue\" {\n // TODO: any item?\n if (orderByItem === undefined || orderByItem.item === undefined) {\n return \"NoValue\";\n }\n const type = typeof orderByItem.item;\n if (TYPEORDCOMPARATOR[type] === undefined) {\n throw new Error(`unrecognizable type ${type}`);\n }\n return type;\n }\n\n private getOrderByItems(res: any): any {\n // TODO: any res?\n return res[\"orderByItems\"];\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.d.ts deleted file mode 100644 index fc83c74..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { ClientContext } from "../ClientContext"; -import { PartitionedQueryExecutionInfo } from "../request/ErrorResponse"; -import { FeedOptions } from "../request/FeedOptions"; -import { DocumentProducer } from "./documentProducer"; -import { ExecutionContext } from "./ExecutionContext"; -import { ParallelQueryExecutionContextBase } from "./parallelQueryExecutionContextBase"; -import { SqlQuerySpec } from "./SqlQuerySpec"; -/** @hidden */ -export declare class OrderByQueryExecutionContext extends ParallelQueryExecutionContextBase implements ExecutionContext { - private orderByComparator; - /** - * Provides the OrderByQueryExecutionContext. - * This class is capable of handling orderby queries and dervives from ParallelQueryExecutionContextBase. - * - * When handling a parallelized query, it instantiates one instance of - * DocumentProcuder per target partition key range and aggregates the result of each. - * - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - The Collection Link - * @param options - Represents the feed options. - * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo - * @hidden - */ - constructor(clientContext: ClientContext, collectionLink: string, query: string | SqlQuerySpec, options: FeedOptions, partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo); - /** - * Provides a Comparator for document producers which respects orderby sort order. - * @returns Comparator Function - * @hidden - */ - documentProducerComparator(docProd1: DocumentProducer, docProd2: DocumentProducer): any; -} -//# sourceMappingURL=orderByQueryExecutionContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.d.ts.map deleted file mode 100644 index 00183b7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"orderByQueryExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/orderByQueryExecutionContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,cAAc;AACd,qBAAa,4BACX,SAAQ,iCACR,YAAW,gBAAgB;IAE3B,OAAO,CAAC,iBAAiB,CAAM;IAC/B;;;;;;;;;;;;OAYG;gBAED,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,GAAG,YAAY,EAC5B,OAAO,EAAE,WAAW,EACpB,6BAA6B,EAAE,6BAA6B;IAS9D;;;;OAIG;IACI,0BAA0B,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,GAAG,GAAG;CAG/F"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.js deleted file mode 100644 index 67e9616..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.js +++ /dev/null @@ -1,34 +0,0 @@ -import { OrderByDocumentProducerComparator } from "./orderByDocumentProducerComparator"; -import { ParallelQueryExecutionContextBase } from "./parallelQueryExecutionContextBase"; -/** @hidden */ -export class OrderByQueryExecutionContext extends ParallelQueryExecutionContextBase { - /** - * Provides the OrderByQueryExecutionContext. - * This class is capable of handling orderby queries and dervives from ParallelQueryExecutionContextBase. - * - * When handling a parallelized query, it instantiates one instance of - * DocumentProcuder per target partition key range and aggregates the result of each. - * - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - The Collection Link - * @param options - Represents the feed options. - * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo - * @hidden - */ - constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo) { - // Calling on base class constructor - super(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo); - this.orderByComparator = new OrderByDocumentProducerComparator(this.sortOrders); - } - // Instance members are inherited - // Overriding documentProducerComparator for OrderByQueryExecutionContexts - /** - * Provides a Comparator for document producers which respects orderby sort order. - * @returns Comparator Function - * @hidden - */ - documentProducerComparator(docProd1, docProd2) { - return this.orderByComparator.compare(docProd1, docProd2); - } -} -//# sourceMappingURL=orderByQueryExecutionContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.js.map deleted file mode 100644 index 614ae68..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/orderByQueryExecutionContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"orderByQueryExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/orderByQueryExecutionContext.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAGxF,cAAc;AACd,MAAM,OAAO,4BACX,SAAQ,iCAAiC;IAIzC;;;;;;;;;;;;OAYG;IACH,YACE,aAA4B,EAC5B,cAAsB,EACtB,KAA4B,EAC5B,OAAoB,EACpB,6BAA4D;QAE5D,oCAAoC;QACpC,KAAK,CAAC,aAAa,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,6BAA6B,CAAC,CAAC;QACpF,IAAI,CAAC,iBAAiB,GAAG,IAAI,iCAAiC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClF,CAAC;IACD,iCAAiC;IAEjC,0EAA0E;IAC1E;;;;OAIG;IACI,0BAA0B,CAAC,QAA0B,EAAE,QAA0B;QACtF,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../ClientContext\";\nimport { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse\";\nimport { FeedOptions } from \"../request/FeedOptions\";\nimport { DocumentProducer } from \"./documentProducer\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { OrderByDocumentProducerComparator } from \"./orderByDocumentProducerComparator\";\nimport { ParallelQueryExecutionContextBase } from \"./parallelQueryExecutionContextBase\";\nimport { SqlQuerySpec } from \"./SqlQuerySpec\";\n\n/** @hidden */\nexport class OrderByQueryExecutionContext\n extends ParallelQueryExecutionContextBase\n implements ExecutionContext\n{\n private orderByComparator: any;\n /**\n * Provides the OrderByQueryExecutionContext.\n * This class is capable of handling orderby queries and dervives from ParallelQueryExecutionContextBase.\n *\n * When handling a parallelized query, it instantiates one instance of\n * DocumentProcuder per target partition key range and aggregates the result of each.\n *\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - The Collection Link\n * @param options - Represents the feed options.\n * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo\n * @hidden\n */\n constructor(\n clientContext: ClientContext,\n collectionLink: string,\n query: string | SqlQuerySpec,\n options: FeedOptions,\n partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo\n ) {\n // Calling on base class constructor\n super(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo);\n this.orderByComparator = new OrderByDocumentProducerComparator(this.sortOrders);\n }\n // Instance members are inherited\n\n // Overriding documentProducerComparator for OrderByQueryExecutionContexts\n /**\n * Provides a Comparator for document producers which respects orderby sort order.\n * @returns Comparator Function\n * @hidden\n */\n public documentProducerComparator(docProd1: DocumentProducer, docProd2: DocumentProducer): any {\n return this.orderByComparator.compare(docProd1, docProd2);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.d.ts deleted file mode 100644 index 80840db..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { DocumentProducer } from "./documentProducer"; -import { ExecutionContext } from "./ExecutionContext"; -import { ParallelQueryExecutionContextBase } from "./parallelQueryExecutionContextBase"; -/** - * Provides the ParallelQueryExecutionContext. - * This class is capable of handling parallelized queries and derives from ParallelQueryExecutionContextBase. - * @hidden - */ -export declare class ParallelQueryExecutionContext extends ParallelQueryExecutionContextBase implements ExecutionContext { - /** - * Provides a Comparator for document producers using the min value of the corresponding target partition. - * @returns Comparator Function - * @hidden - */ - documentProducerComparator(docProd1: DocumentProducer, docProd2: DocumentProducer): number; -} -//# sourceMappingURL=parallelQueryExecutionContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.d.ts.map deleted file mode 100644 index e7745d3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parallelQueryExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryExecutionContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF;;;;GAIG;AACH,qBAAa,6BACX,SAAQ,iCACR,YAAW,gBAAgB;IAK3B;;;;OAIG;IACI,0BAA0B,CAC/B,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,gBAAgB,GACzB,MAAM;CAGV"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.js deleted file mode 100644 index ea191c4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { ParallelQueryExecutionContextBase } from "./parallelQueryExecutionContextBase"; -/** - * Provides the ParallelQueryExecutionContext. - * This class is capable of handling parallelized queries and derives from ParallelQueryExecutionContextBase. - * @hidden - */ -export class ParallelQueryExecutionContext extends ParallelQueryExecutionContextBase { - // Instance members are inherited - // Overriding documentProducerComparator for ParallelQueryExecutionContexts - /** - * Provides a Comparator for document producers using the min value of the corresponding target partition. - * @returns Comparator Function - * @hidden - */ - documentProducerComparator(docProd1, docProd2) { - return docProd1.generation - docProd2.generation; - } -} -//# sourceMappingURL=parallelQueryExecutionContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.js.map deleted file mode 100644 index ef4b95b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parallelQueryExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryExecutionContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF;;;;GAIG;AACH,MAAM,OAAO,6BACX,SAAQ,iCAAiC;IAGzC,iCAAiC;IAEjC,2EAA2E;IAC3E;;;;OAIG;IACI,0BAA0B,CAC/B,QAA0B,EAC1B,QAA0B;QAE1B,OAAO,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACnD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { DocumentProducer } from \"./documentProducer\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { ParallelQueryExecutionContextBase } from \"./parallelQueryExecutionContextBase\";\n\n/**\n * Provides the ParallelQueryExecutionContext.\n * This class is capable of handling parallelized queries and derives from ParallelQueryExecutionContextBase.\n * @hidden\n */\nexport class ParallelQueryExecutionContext\n extends ParallelQueryExecutionContextBase\n implements ExecutionContext\n{\n // Instance members are inherited\n\n // Overriding documentProducerComparator for ParallelQueryExecutionContexts\n /**\n * Provides a Comparator for document producers using the min value of the corresponding target partition.\n * @returns Comparator Function\n * @hidden\n */\n public documentProducerComparator(\n docProd1: DocumentProducer,\n docProd2: DocumentProducer\n ): number {\n return docProd1.generation - docProd2.generation;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.d.ts deleted file mode 100644 index 0b983f0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { ClientContext } from "../ClientContext"; -import { FeedOptions, Response } from "../request"; -import { PartitionedQueryExecutionInfo } from "../request/ErrorResponse"; -import { DocumentProducer } from "./documentProducer"; -import { ExecutionContext } from "./ExecutionContext"; -import { SqlQuerySpec } from "./SqlQuerySpec"; -/** @hidden */ -export declare enum ParallelQueryExecutionContextBaseStates { - started = "started", - inProgress = "inProgress", - ended = "ended" -} -/** @hidden */ -export declare abstract class ParallelQueryExecutionContextBase implements ExecutionContext { - private clientContext; - private collectionLink; - private query; - private options; - private partitionedQueryExecutionInfo; - private err; - private state; - private static STATES; - private routingProvider; - protected sortOrders: any; - private requestContinuation; - private respHeaders; - private orderByPQ; - private sem; - private waitingForInternalExecutionContexts; - /** - * Provides the ParallelQueryExecutionContextBase. - * This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from. - * - * When handling a parallelized query, it instantiates one instance of - * DocumentProcuder per target partition key range and aggregates the result of each. - * - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - The Collection Link - * @param options - Represents the feed options. - * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo - * @hidden - */ - constructor(clientContext: ClientContext, collectionLink: string, query: string | SqlQuerySpec, options: FeedOptions, partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo); - protected abstract documentProducerComparator(dp1: DocumentProducer, dp2: DocumentProducer): number; - private _decrementInitiationLock; - private _mergeWithActiveResponseHeaders; - private _getAndResetActiveResponseHeaders; - private _onTargetPartitionRanges; - /** - * Gets the replacement ranges for a partitionkeyrange that has been split - */ - private _getReplacementPartitionKeyRanges; - /** - * Removes the current document producer from the priqueue, - * replaces that document producer with child document producers, - * then reexecutes the originFunction with the corrrected executionContext - */ - private _repairExecutionContext; - private static _needPartitionKeyRangeCacheRefresh; - /** - * Checks to see if the executionContext needs to be repaired. - * if so it repairs the execution context and executes the ifCallback, - * else it continues with the current execution context and executes the elseCallback - */ - private _repairExecutionContextIfNeeded; - /** - * Fetches the next element in the ParallelQueryExecutionContextBase. - */ - nextItem(): Promise>; - /** - * Determine if there are still remaining resources to processs based on the value of the continuation - * token or the elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the ParallelQueryExecutionContextBase. - */ - hasMoreResults(): boolean; - /** - * Creates document producers - */ - private _createTargetPartitionQueryExecutionContext; -} -//# sourceMappingURL=parallelQueryExecutionContextBase.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map deleted file mode 100644 index 5379e60..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parallelQueryExecutionContextBase.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryExecutionContextBase.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAIzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C,cAAc;AACd,oBAAY,uCAAuC;IACjD,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,KAAK,UAAU;CAChB;AAED,cAAc;AACd,8BAAsB,iCAAkC,YAAW,gBAAgB;IAyB/E,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,6BAA6B;IA5BvC,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,MAAM,CAAC,MAAM,CAA2C;IAChE,OAAO,CAAC,eAAe,CAA0B;IACjD,SAAS,CAAC,UAAU,EAAE,GAAG,CAAC;IAC1B,OAAO,CAAC,mBAAmB,CAAM;IACjC,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,SAAS,CAAkC;IACnD,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,mCAAmC,CAAS;IACpD;;;;;;;;;;;;OAYG;gBAEO,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,GAAG,YAAY,EAC5B,OAAO,EAAE,WAAW,EACpB,6BAA6B,EAAE,6BAA6B;IAqGtE,SAAS,CAAC,QAAQ,CAAC,0BAA0B,CAC3C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,gBAAgB,GACpB,MAAM;IAET,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,+BAA+B;IAIvC,OAAO,CAAC,iCAAiC;YAM3B,wBAAwB;IAOtC;;OAEG;YACW,iCAAiC;IAY/C;;;;OAIG;YACW,uBAAuB;IA2DrC,OAAO,CAAC,MAAM,CAAC,kCAAkC;IASjD;;;;OAIG;YACW,+BAA+B;IAkB7C;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAkI/C;;;;OAIG;IACI,cAAc,IAAI,OAAO;IAMhC;;OAEG;IACH,OAAO,CAAC,2CAA2C;CAkCpD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.js deleted file mode 100644 index 024ffff..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.js +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import PriorityQueue from "priorityqueuejs"; -import semaphore from "semaphore"; -import { createClientLogger } from "@azure/logger"; -import { StatusCodes, SubStatusCodes } from "../common/statusCodes"; -import { QueryRange } from "../routing/QueryRange"; -import { SmartRoutingMapProvider } from "../routing/smartRoutingMapProvider"; -import { DocumentProducer } from "./documentProducer"; -import { getInitialHeader, mergeHeaders } from "./headerUtils"; -/** @hidden */ -const logger = createClientLogger("parallelQueryExecutionContextBase"); -/** @hidden */ -export var ParallelQueryExecutionContextBaseStates; -(function (ParallelQueryExecutionContextBaseStates) { - ParallelQueryExecutionContextBaseStates["started"] = "started"; - ParallelQueryExecutionContextBaseStates["inProgress"] = "inProgress"; - ParallelQueryExecutionContextBaseStates["ended"] = "ended"; -})(ParallelQueryExecutionContextBaseStates || (ParallelQueryExecutionContextBaseStates = {})); -/** @hidden */ -export class ParallelQueryExecutionContextBase { - /** - * Provides the ParallelQueryExecutionContextBase. - * This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from. - * - * When handling a parallelized query, it instantiates one instance of - * DocumentProcuder per target partition key range and aggregates the result of each. - * - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - The Collection Link - * @param options - Represents the feed options. - * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo - * @hidden - */ - constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo) { - this.clientContext = clientContext; - this.collectionLink = collectionLink; - this.query = query; - this.options = options; - this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo; - this.clientContext = clientContext; - this.collectionLink = collectionLink; - this.query = query; - this.options = options; - this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo; - this.err = undefined; - this.state = ParallelQueryExecutionContextBase.STATES.started; - this.routingProvider = new SmartRoutingMapProvider(this.clientContext); - this.sortOrders = this.partitionedQueryExecutionInfo.queryInfo.orderBy; - this.requestContinuation = options ? options.continuationToken || options.continuation : null; - // response headers of undergoing operation - this.respHeaders = getInitialHeader(); - // Make priority queue for documentProducers - // The comparator is supplied by the derived class - this.orderByPQ = new PriorityQueue((a, b) => this.documentProducerComparator(b, a)); - // Creating the documentProducers - this.sem = semaphore(1); - // Creating callback for semaphore - // TODO: Code smell - const createDocumentProducersAndFillUpPriorityQueueFunc = async () => { - // ensure the lock is released after finishing up - try { - const targetPartitionRanges = await this._onTargetPartitionRanges(); - this.waitingForInternalExecutionContexts = targetPartitionRanges.length; - const maxDegreeOfParallelism = options.maxDegreeOfParallelism === undefined || options.maxDegreeOfParallelism < 1 - ? targetPartitionRanges.length - : Math.min(options.maxDegreeOfParallelism, targetPartitionRanges.length); - logger.info("Query starting against " + - targetPartitionRanges.length + - " ranges with parallelism of " + - maxDegreeOfParallelism); - const parallelismSem = semaphore(maxDegreeOfParallelism); - let filteredPartitionKeyRanges = []; - // The document producers generated from filteredPartitionKeyRanges - const targetPartitionQueryExecutionContextList = []; - if (this.requestContinuation) { - throw new Error("Continuation tokens are not yet supported for cross partition queries"); - } - else { - filteredPartitionKeyRanges = targetPartitionRanges; - } - // Create one documentProducer for each partitionTargetRange - filteredPartitionKeyRanges.forEach((partitionTargetRange) => { - // TODO: any partitionTargetRange - // no async callback - targetPartitionQueryExecutionContextList.push(this._createTargetPartitionQueryExecutionContext(partitionTargetRange)); - }); - // Fill up our priority queue with documentProducers - targetPartitionQueryExecutionContextList.forEach((documentProducer) => { - // has async callback - const throttledFunc = async () => { - try { - const { result: document, headers } = await documentProducer.current(); - this._mergeWithActiveResponseHeaders(headers); - if (document === undefined) { - // no results on this one - return; - } - // if there are matching results in the target ex range add it to the priority queue - try { - this.orderByPQ.enq(documentProducer); - } - catch (e) { - this.err = e; - } - } - catch (err) { - this._mergeWithActiveResponseHeaders(err.headers); - this.err = err; - } - finally { - parallelismSem.leave(); - this._decrementInitiationLock(); - } - }; - parallelismSem.take(throttledFunc); - }); - } - catch (err) { - this.err = err; - // release the lock - this.sem.leave(); - return; - } - }; - this.sem.take(createDocumentProducersAndFillUpPriorityQueueFunc); - } - _decrementInitiationLock() { - // decrements waitingForInternalExecutionContexts - // if waitingForInternalExecutionContexts reaches 0 releases the semaphore and changes the state - this.waitingForInternalExecutionContexts = this.waitingForInternalExecutionContexts - 1; - if (this.waitingForInternalExecutionContexts === 0) { - this.sem.leave(); - if (this.orderByPQ.size() === 0) { - this.state = ParallelQueryExecutionContextBase.STATES.inProgress; - } - } - } - _mergeWithActiveResponseHeaders(headers) { - mergeHeaders(this.respHeaders, headers); - } - _getAndResetActiveResponseHeaders() { - const ret = this.respHeaders; - this.respHeaders = getInitialHeader(); - return ret; - } - async _onTargetPartitionRanges() { - // invokes the callback when the target partition ranges are ready - const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges; - const queryRanges = parsedRanges.map((item) => QueryRange.parseFromDict(item)); - return this.routingProvider.getOverlappingRanges(this.collectionLink, queryRanges); - } - /** - * Gets the replacement ranges for a partitionkeyrange that has been split - */ - async _getReplacementPartitionKeyRanges(documentProducer) { - const partitionKeyRange = documentProducer.targetPartitionKeyRange; - // Download the new routing map - this.routingProvider = new SmartRoutingMapProvider(this.clientContext); - // Get the queryRange that relates to this partitionKeyRange - const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange); - return this.routingProvider.getOverlappingRanges(this.collectionLink, [queryRange]); - } - // TODO: P0 Code smell - can barely tell what this is doing - /** - * Removes the current document producer from the priqueue, - * replaces that document producer with child document producers, - * then reexecutes the originFunction with the corrrected executionContext - */ - async _repairExecutionContext(originFunction) { - // TODO: any - // Get the replacement ranges - // Removing the invalid documentProducer from the orderByPQ - const parentDocumentProducer = this.orderByPQ.deq(); - try { - const replacementPartitionKeyRanges = await this._getReplacementPartitionKeyRanges(parentDocumentProducer); - const replacementDocumentProducers = []; - // Create the replacement documentProducers - replacementPartitionKeyRanges.forEach((partitionKeyRange) => { - // Create replacment document producers with the parent's continuationToken - const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(partitionKeyRange, parentDocumentProducer.continuationToken); - replacementDocumentProducers.push(replacementDocumentProducer); - }); - // We need to check if the documentProducers even has anything left to fetch from before enqueing them - const checkAndEnqueueDocumentProducer = async (documentProducerToCheck, checkNextDocumentProducerCallback) => { - try { - const { result: afterItem } = await documentProducerToCheck.current(); - if (afterItem === undefined) { - // no more results left in this document producer, so we don't enqueue it - } - else { - // Safe to put document producer back in the queue - this.orderByPQ.enq(documentProducerToCheck); - } - await checkNextDocumentProducerCallback(); - } - catch (err) { - this.err = err; - return; - } - }; - const checkAndEnqueueDocumentProducers = async (rdp) => { - if (rdp.length > 0) { - // We still have a replacementDocumentProducer to check - const replacementDocumentProducer = rdp.shift(); - await checkAndEnqueueDocumentProducer(replacementDocumentProducer, async () => { - await checkAndEnqueueDocumentProducers(rdp); - }); - } - else { - // reexecutes the originFunction with the corrrected executionContext - return originFunction(); - } - }; - // Invoke the recursive function to get the ball rolling - await checkAndEnqueueDocumentProducers(replacementDocumentProducers); - } - catch (err) { - this.err = err; - throw err; - } - } - static _needPartitionKeyRangeCacheRefresh(error) { - // TODO: any error - return (error.code === StatusCodes.Gone && - "substatus" in error && - error["substatus"] === SubStatusCodes.PartitionKeyRangeGone); - } - /** - * Checks to see if the executionContext needs to be repaired. - * if so it repairs the execution context and executes the ifCallback, - * else it continues with the current execution context and executes the elseCallback - */ - async _repairExecutionContextIfNeeded(ifCallback, elseCallback) { - const documentProducer = this.orderByPQ.peek(); - // Check if split happened - try { - await documentProducer.current(); - elseCallback(); - } - catch (err) { - if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) { - // Split has happened so we need to repair execution context before continueing - return this._repairExecutionContext(ifCallback); - } - else { - // Something actually bad happened ... - this.err = err; - throw err; - } - } - } - /** - * Fetches the next element in the ParallelQueryExecutionContextBase. - */ - async nextItem() { - if (this.err) { - // if there is a prior error return error - throw this.err; - } - return new Promise((resolve, reject) => { - this.sem.take(() => { - // NOTE: lock must be released before invoking quitting - if (this.err) { - // release the lock before invoking callback - this.sem.leave(); - // if there is a prior error return error - this.err.headers = this._getAndResetActiveResponseHeaders(); - reject(this.err); - return; - } - if (this.orderByPQ.size() === 0) { - // there is no more results - this.state = ParallelQueryExecutionContextBase.STATES.ended; - // release the lock before invoking callback - this.sem.leave(); - return resolve({ - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }); - } - const ifCallback = () => { - // Release the semaphore to avoid deadlock - this.sem.leave(); - // Reexcute the function - return resolve(this.nextItem()); - }; - const elseCallback = async () => { - let documentProducer; - try { - documentProducer = this.orderByPQ.deq(); - } - catch (e) { - // if comparing elements of the priority queue throws exception - // set that error and return error - this.err = e; - // release the lock before invoking callback - this.sem.leave(); - this.err.headers = this._getAndResetActiveResponseHeaders(); - reject(this.err); - return; - } - let item; - let headers; - try { - const response = await documentProducer.nextItem(); - item = response.result; - headers = response.headers; - this._mergeWithActiveResponseHeaders(headers); - if (item === undefined) { - // this should never happen - // because the documentProducer already has buffered an item - // assert item !== undefined - this.err = new Error(`Extracted DocumentProducer from the priority queue \ - doesn't have any buffered item!`); - // release the lock before invoking callback - this.sem.leave(); - return resolve({ - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }); - } - } - catch (err) { - this.err = new Error(`Extracted DocumentProducer from the priority queue fails to get the \ - buffered item. Due to ${JSON.stringify(err)}`); - this.err.headers = this._getAndResetActiveResponseHeaders(); - // release the lock before invoking callback - this.sem.leave(); - reject(this.err); - return; - } - // we need to put back the document producer to the queue if it has more elements. - // the lock will be released after we know document producer must be put back in the queue or not - try { - const { result: afterItem, headers: otherHeaders } = await documentProducer.current(); - this._mergeWithActiveResponseHeaders(otherHeaders); - if (afterItem === undefined) { - // no more results is left in this document producer - } - else { - try { - const headItem = documentProducer.fetchResults[0]; - if (typeof headItem === "undefined") { - throw new Error("Extracted DocumentProducer from PQ is invalid state with no result!"); - } - this.orderByPQ.enq(documentProducer); - } - catch (e) { - // if comparing elements in priority queue throws exception - // set error - this.err = e; - } - } - } - catch (err) { - if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) { - // We want the document producer enqueued - // So that later parts of the code can repair the execution context - this.orderByPQ.enq(documentProducer); - } - else { - // Something actually bad happened - this.err = err; - reject(this.err); - } - } - finally { - // release the lock before returning - this.sem.leave(); - } - // invoke the callback on the item - return resolve({ - result: item, - headers: this._getAndResetActiveResponseHeaders(), - }); - }; - this._repairExecutionContextIfNeeded(ifCallback, elseCallback).catch(reject); - }); - }); - } - /** - * Determine if there are still remaining resources to processs based on the value of the continuation - * token or the elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the ParallelQueryExecutionContextBase. - */ - hasMoreResults() { - return !(this.state === ParallelQueryExecutionContextBase.STATES.ended || this.err !== undefined); - } - /** - * Creates document producers - */ - _createTargetPartitionQueryExecutionContext(partitionKeyTargetRange, continuationToken) { - // TODO: any - // creates target partition range Query Execution Context - let rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery; - let sqlQuerySpec; - const query = this.query; - if (typeof query === "string") { - sqlQuerySpec = { query }; - } - else { - sqlQuerySpec = query; - } - const formatPlaceHolder = "{documentdb-formattableorderbyquery-filter}"; - if (rewrittenQuery) { - sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec)); - // We hardcode the formattable filter to true for now - rewrittenQuery = rewrittenQuery.replace(formatPlaceHolder, "true"); - sqlQuerySpec["query"] = rewrittenQuery; - } - const options = Object.assign({}, this.options); - options.continuationToken = continuationToken; - return new DocumentProducer(this.clientContext, this.collectionLink, sqlQuerySpec, partitionKeyTargetRange, options); - } -} -ParallelQueryExecutionContextBase.STATES = ParallelQueryExecutionContextBaseStates; -//# sourceMappingURL=parallelQueryExecutionContextBase.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.js.map deleted file mode 100644 index 1f530f0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/parallelQueryExecutionContextBase.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parallelQueryExecutionContextBase.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryExecutionContextBase.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,EAAe,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG/D,cAAc;AACd,MAAM,MAAM,GAAgB,kBAAkB,CAAC,mCAAmC,CAAC,CAAC;AAEpF,cAAc;AACd,MAAM,CAAN,IAAY,uCAIX;AAJD,WAAY,uCAAuC;IACjD,8DAAmB,CAAA;IACnB,oEAAyB,CAAA;IACzB,0DAAe,CAAA;AACjB,CAAC,EAJW,uCAAuC,KAAvC,uCAAuC,QAIlD;AAED,cAAc;AACd,MAAM,OAAgB,iCAAiC;IAWrD;;;;;;;;;;;;OAYG;IACH,YACU,aAA4B,EAC5B,cAAsB,EACtB,KAA4B,EAC5B,OAAoB,EACpB,6BAA4D;QAJ5D,kBAAa,GAAb,aAAa,CAAe;QAC5B,mBAAc,GAAd,cAAc,CAAQ;QACtB,UAAK,GAAL,KAAK,CAAuB;QAC5B,YAAO,GAAP,OAAO,CAAa;QACpB,kCAA6B,GAA7B,6BAA6B,CAA+B;QAEpE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAA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,EAAE;YAC7B,YAAY,GAAG,EAAE,KAAK,EAAE,CAAC;SAC1B;aAAM;YACL,YAAY,GAAG,KAAK,CAAC;SACtB;QAED,MAAM,iBAAiB,GAAG,6CAA6C,CAAC;QACxE,IAAI,cAAc,EAAE;YAClB,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YACxD,qDAAqD;YACrD,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;YACnE,YAAY,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC;SACxC;QAED,MAAM,OAAO,qBAAQ,IAAI,CAAC,OAAO,CAAE,CAAC;QACpC,OAAO,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAE9C,OAAO,IAAI,gBAAgB,CACzB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,cAAc,EACnB,YAAY,EACZ,uBAAuB,EACvB,OAAO,CACR,CAAC;IACJ,CAAC;;AApcc,wCAAM,GAAG,uCAAuC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport PriorityQueue from \"priorityqueuejs\";\nimport semaphore from \"semaphore\";\nimport { ClientContext } from \"../ClientContext\";\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\nimport { StatusCodes, SubStatusCodes } from \"../common/statusCodes\";\nimport { FeedOptions, Response } from \"../request\";\nimport { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse\";\nimport { QueryRange } from \"../routing/QueryRange\";\nimport { SmartRoutingMapProvider } from \"../routing/smartRoutingMapProvider\";\nimport { CosmosHeaders } from \"./CosmosHeaders\";\nimport { DocumentProducer } from \"./documentProducer\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { getInitialHeader, mergeHeaders } from \"./headerUtils\";\nimport { SqlQuerySpec } from \"./SqlQuerySpec\";\n\n/** @hidden */\nconst logger: AzureLogger = createClientLogger(\"parallelQueryExecutionContextBase\");\n\n/** @hidden */\nexport enum ParallelQueryExecutionContextBaseStates {\n started = \"started\",\n inProgress = \"inProgress\",\n ended = \"ended\",\n}\n\n/** @hidden */\nexport abstract class ParallelQueryExecutionContextBase implements ExecutionContext {\n private err: any;\n private state: any;\n private static STATES = ParallelQueryExecutionContextBaseStates;\n private routingProvider: SmartRoutingMapProvider;\n protected sortOrders: any;\n private requestContinuation: any;\n private respHeaders: CosmosHeaders;\n private orderByPQ: PriorityQueue;\n private sem: any;\n private waitingForInternalExecutionContexts: number;\n /**\n * Provides the ParallelQueryExecutionContextBase.\n * This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from.\n *\n * When handling a parallelized query, it instantiates one instance of\n * DocumentProcuder per target partition key range and aggregates the result of each.\n *\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - The Collection Link\n * @param options - Represents the feed options.\n * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo\n * @hidden\n */\n constructor(\n private clientContext: ClientContext,\n private collectionLink: string,\n private query: string | SqlQuerySpec,\n private options: FeedOptions,\n private partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo\n ) {\n this.clientContext = clientContext;\n this.collectionLink = collectionLink;\n this.query = query;\n this.options = options;\n this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;\n\n this.err = undefined;\n this.state = ParallelQueryExecutionContextBase.STATES.started;\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n this.sortOrders = this.partitionedQueryExecutionInfo.queryInfo.orderBy;\n\n this.requestContinuation = options ? options.continuationToken || options.continuation : null;\n // response headers of undergoing operation\n this.respHeaders = getInitialHeader();\n\n // Make priority queue for documentProducers\n // The comparator is supplied by the derived class\n this.orderByPQ = new PriorityQueue(\n (a: DocumentProducer, b: DocumentProducer) => this.documentProducerComparator(b, a)\n );\n // Creating the documentProducers\n this.sem = semaphore(1);\n // Creating callback for semaphore\n // TODO: Code smell\n const createDocumentProducersAndFillUpPriorityQueueFunc = async (): Promise => {\n // ensure the lock is released after finishing up\n try {\n const targetPartitionRanges = await this._onTargetPartitionRanges();\n this.waitingForInternalExecutionContexts = targetPartitionRanges.length;\n\n const maxDegreeOfParallelism =\n options.maxDegreeOfParallelism === undefined || options.maxDegreeOfParallelism < 1\n ? targetPartitionRanges.length\n : Math.min(options.maxDegreeOfParallelism, targetPartitionRanges.length);\n\n logger.info(\n \"Query starting against \" +\n targetPartitionRanges.length +\n \" ranges with parallelism of \" +\n maxDegreeOfParallelism\n );\n\n const parallelismSem = semaphore(maxDegreeOfParallelism);\n let filteredPartitionKeyRanges = [];\n // The document producers generated from filteredPartitionKeyRanges\n const targetPartitionQueryExecutionContextList: DocumentProducer[] = [];\n\n if (this.requestContinuation) {\n throw new Error(\"Continuation tokens are not yet supported for cross partition queries\");\n } else {\n filteredPartitionKeyRanges = targetPartitionRanges;\n }\n\n // Create one documentProducer for each partitionTargetRange\n filteredPartitionKeyRanges.forEach((partitionTargetRange: any) => {\n // TODO: any partitionTargetRange\n // no async callback\n targetPartitionQueryExecutionContextList.push(\n this._createTargetPartitionQueryExecutionContext(partitionTargetRange)\n );\n });\n\n // Fill up our priority queue with documentProducers\n targetPartitionQueryExecutionContextList.forEach((documentProducer): void => {\n // has async callback\n const throttledFunc = async (): Promise => {\n try {\n const { result: document, headers } = await documentProducer.current();\n this._mergeWithActiveResponseHeaders(headers);\n if (document === undefined) {\n // no results on this one\n return;\n }\n // if there are matching results in the target ex range add it to the priority queue\n try {\n this.orderByPQ.enq(documentProducer);\n } catch (e: any) {\n this.err = e;\n }\n } catch (err: any) {\n this._mergeWithActiveResponseHeaders(err.headers);\n this.err = err;\n } finally {\n parallelismSem.leave();\n this._decrementInitiationLock();\n }\n };\n parallelismSem.take(throttledFunc);\n });\n } catch (err: any) {\n this.err = err;\n // release the lock\n this.sem.leave();\n return;\n }\n };\n this.sem.take(createDocumentProducersAndFillUpPriorityQueueFunc);\n }\n\n protected abstract documentProducerComparator(\n dp1: DocumentProducer,\n dp2: DocumentProducer\n ): number;\n\n private _decrementInitiationLock(): void {\n // decrements waitingForInternalExecutionContexts\n // if waitingForInternalExecutionContexts reaches 0 releases the semaphore and changes the state\n this.waitingForInternalExecutionContexts = this.waitingForInternalExecutionContexts - 1;\n if (this.waitingForInternalExecutionContexts === 0) {\n this.sem.leave();\n if (this.orderByPQ.size() === 0) {\n this.state = ParallelQueryExecutionContextBase.STATES.inProgress;\n }\n }\n }\n\n private _mergeWithActiveResponseHeaders(headers: CosmosHeaders): void {\n mergeHeaders(this.respHeaders, headers);\n }\n\n private _getAndResetActiveResponseHeaders(): CosmosHeaders {\n const ret = this.respHeaders;\n this.respHeaders = getInitialHeader();\n return ret;\n }\n\n private async _onTargetPartitionRanges(): Promise {\n // invokes the callback when the target partition ranges are ready\n const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges;\n const queryRanges = parsedRanges.map((item) => QueryRange.parseFromDict(item));\n return this.routingProvider.getOverlappingRanges(this.collectionLink, queryRanges);\n }\n\n /**\n * Gets the replacement ranges for a partitionkeyrange that has been split\n */\n private async _getReplacementPartitionKeyRanges(\n documentProducer: DocumentProducer\n ): Promise {\n const partitionKeyRange = documentProducer.targetPartitionKeyRange;\n // Download the new routing map\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n // Get the queryRange that relates to this partitionKeyRange\n const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange);\n return this.routingProvider.getOverlappingRanges(this.collectionLink, [queryRange]);\n }\n\n // TODO: P0 Code smell - can barely tell what this is doing\n /**\n * Removes the current document producer from the priqueue,\n * replaces that document producer with child document producers,\n * then reexecutes the originFunction with the corrrected executionContext\n */\n private async _repairExecutionContext(originFunction: any): Promise {\n // TODO: any\n // Get the replacement ranges\n // Removing the invalid documentProducer from the orderByPQ\n const parentDocumentProducer = this.orderByPQ.deq();\n try {\n const replacementPartitionKeyRanges: any[] = await this._getReplacementPartitionKeyRanges(\n parentDocumentProducer\n );\n const replacementDocumentProducers: DocumentProducer[] = [];\n // Create the replacement documentProducers\n replacementPartitionKeyRanges.forEach((partitionKeyRange) => {\n // Create replacment document producers with the parent's continuationToken\n const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(\n partitionKeyRange,\n parentDocumentProducer.continuationToken\n );\n replacementDocumentProducers.push(replacementDocumentProducer);\n });\n // We need to check if the documentProducers even has anything left to fetch from before enqueing them\n const checkAndEnqueueDocumentProducer = async (\n documentProducerToCheck: DocumentProducer,\n checkNextDocumentProducerCallback: any\n ): Promise => {\n try {\n const { result: afterItem } = await documentProducerToCheck.current();\n if (afterItem === undefined) {\n // no more results left in this document producer, so we don't enqueue it\n } else {\n // Safe to put document producer back in the queue\n this.orderByPQ.enq(documentProducerToCheck);\n }\n\n await checkNextDocumentProducerCallback();\n } catch (err: any) {\n this.err = err;\n return;\n }\n };\n const checkAndEnqueueDocumentProducers = async (rdp: DocumentProducer[]): Promise => {\n if (rdp.length > 0) {\n // We still have a replacementDocumentProducer to check\n const replacementDocumentProducer = rdp.shift();\n await checkAndEnqueueDocumentProducer(replacementDocumentProducer, async () => {\n await checkAndEnqueueDocumentProducers(rdp);\n });\n } else {\n // reexecutes the originFunction with the corrrected executionContext\n return originFunction();\n }\n };\n // Invoke the recursive function to get the ball rolling\n await checkAndEnqueueDocumentProducers(replacementDocumentProducers);\n } catch (err: any) {\n this.err = err;\n throw err;\n }\n }\n\n private static _needPartitionKeyRangeCacheRefresh(error: any): boolean {\n // TODO: any error\n return (\n error.code === StatusCodes.Gone &&\n \"substatus\" in error &&\n error[\"substatus\"] === SubStatusCodes.PartitionKeyRangeGone\n );\n }\n\n /**\n * Checks to see if the executionContext needs to be repaired.\n * if so it repairs the execution context and executes the ifCallback,\n * else it continues with the current execution context and executes the elseCallback\n */\n private async _repairExecutionContextIfNeeded(ifCallback: any, elseCallback: any): Promise {\n const documentProducer = this.orderByPQ.peek();\n // Check if split happened\n try {\n await documentProducer.current();\n elseCallback();\n } catch (err: any) {\n if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {\n // Split has happened so we need to repair execution context before continueing\n return this._repairExecutionContext(ifCallback);\n } else {\n // Something actually bad happened ...\n this.err = err;\n throw err;\n }\n }\n }\n\n /**\n * Fetches the next element in the ParallelQueryExecutionContextBase.\n */\n public async nextItem(): Promise> {\n if (this.err) {\n // if there is a prior error return error\n throw this.err;\n }\n return new Promise>((resolve, reject) => {\n this.sem.take(() => {\n // NOTE: lock must be released before invoking quitting\n if (this.err) {\n // release the lock before invoking callback\n this.sem.leave();\n // if there is a prior error return error\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n if (this.orderByPQ.size() === 0) {\n // there is no more results\n this.state = ParallelQueryExecutionContextBase.STATES.ended;\n // release the lock before invoking callback\n this.sem.leave();\n return resolve({\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n }\n\n const ifCallback = (): void => {\n // Release the semaphore to avoid deadlock\n this.sem.leave();\n // Reexcute the function\n return resolve(this.nextItem());\n };\n const elseCallback = async (): Promise => {\n let documentProducer: DocumentProducer;\n try {\n documentProducer = this.orderByPQ.deq();\n } catch (e: any) {\n // if comparing elements of the priority queue throws exception\n // set that error and return error\n this.err = e;\n // release the lock before invoking callback\n this.sem.leave();\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n let item: any;\n let headers: CosmosHeaders;\n try {\n const response = await documentProducer.nextItem();\n item = response.result;\n headers = response.headers;\n this._mergeWithActiveResponseHeaders(headers);\n if (item === undefined) {\n // this should never happen\n // because the documentProducer already has buffered an item\n // assert item !== undefined\n this.err = new Error(\n `Extracted DocumentProducer from the priority queue \\\n doesn't have any buffered item!`\n );\n // release the lock before invoking callback\n this.sem.leave();\n return resolve({\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n }\n } catch (err: any) {\n this.err = new Error(\n `Extracted DocumentProducer from the priority queue fails to get the \\\n buffered item. Due to ${JSON.stringify(err)}`\n );\n this.err.headers = this._getAndResetActiveResponseHeaders();\n // release the lock before invoking callback\n this.sem.leave();\n reject(this.err);\n return;\n }\n\n // we need to put back the document producer to the queue if it has more elements.\n // the lock will be released after we know document producer must be put back in the queue or not\n try {\n const { result: afterItem, headers: otherHeaders } = await documentProducer.current();\n this._mergeWithActiveResponseHeaders(otherHeaders);\n if (afterItem === undefined) {\n // no more results is left in this document producer\n } else {\n try {\n const headItem = documentProducer.fetchResults[0];\n if (typeof headItem === \"undefined\") {\n throw new Error(\n \"Extracted DocumentProducer from PQ is invalid state with no result!\"\n );\n }\n this.orderByPQ.enq(documentProducer);\n } catch (e: any) {\n // if comparing elements in priority queue throws exception\n // set error\n this.err = e;\n }\n }\n } catch (err: any) {\n if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {\n // We want the document producer enqueued\n // So that later parts of the code can repair the execution context\n this.orderByPQ.enq(documentProducer);\n } else {\n // Something actually bad happened\n this.err = err;\n reject(this.err);\n }\n } finally {\n // release the lock before returning\n this.sem.leave();\n }\n // invoke the callback on the item\n return resolve({\n result: item,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n };\n this._repairExecutionContextIfNeeded(ifCallback, elseCallback).catch(reject);\n });\n });\n }\n\n /**\n * Determine if there are still remaining resources to processs based on the value of the continuation\n * token or the elements remaining on the current batch in the QueryIterator.\n * @returns true if there is other elements to process in the ParallelQueryExecutionContextBase.\n */\n public hasMoreResults(): boolean {\n return !(\n this.state === ParallelQueryExecutionContextBase.STATES.ended || this.err !== undefined\n );\n }\n\n /**\n * Creates document producers\n */\n private _createTargetPartitionQueryExecutionContext(\n partitionKeyTargetRange: any,\n continuationToken?: any\n ): DocumentProducer {\n // TODO: any\n // creates target partition range Query Execution Context\n let rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery;\n let sqlQuerySpec: SqlQuerySpec;\n const query = this.query;\n if (typeof query === \"string\") {\n sqlQuerySpec = { query };\n } else {\n sqlQuerySpec = query;\n }\n\n const formatPlaceHolder = \"{documentdb-formattableorderbyquery-filter}\";\n if (rewrittenQuery) {\n sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec));\n // We hardcode the formattable filter to true for now\n rewrittenQuery = rewrittenQuery.replace(formatPlaceHolder, \"true\");\n sqlQuerySpec[\"query\"] = rewrittenQuery;\n }\n\n const options = { ...this.options };\n options.continuationToken = continuationToken;\n\n return new DocumentProducer(\n this.clientContext,\n this.collectionLink,\n sqlQuerySpec,\n partitionKeyTargetRange,\n options\n );\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.d.ts deleted file mode 100644 index be726a7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ClientContext } from "../ClientContext"; -import { Response, FeedOptions } from "../request"; -import { PartitionedQueryExecutionInfo } from "../request/ErrorResponse"; -import { ExecutionContext } from "./ExecutionContext"; -import { SqlQuerySpec } from "./SqlQuerySpec"; -/** @hidden */ -export declare class PipelinedQueryExecutionContext implements ExecutionContext { - private clientContext; - private collectionLink; - private query; - private options; - private partitionedQueryExecutionInfo; - private fetchBuffer; - private fetchMoreRespHeaders; - private endpoint; - private pageSize; - private static DEFAULT_PAGE_SIZE; - constructor(clientContext: ClientContext, collectionLink: string, query: string | SqlQuerySpec, options: FeedOptions, partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo); - nextItem(): Promise>; - hasMoreResults(): boolean; - fetchMore(): Promise>; - private _fetchMoreImplementation; -} -//# sourceMappingURL=pipelinedQueryExecutionContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map deleted file mode 100644 index fccd513..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipelinedQueryExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/pipelinedQueryExecutionContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAOzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,cAAc;AACd,qBAAa,8BAA+B,YAAW,gBAAgB;IAOnE,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,6BAA6B;IAVvC,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,oBAAoB,CAAgB;IAC5C,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAM;gBAE5B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,GAAG,YAAY,EAC5B,OAAO,EAAE,WAAW,EACpB,6BAA6B,EAAE,6BAA6B;IAuEzD,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAKxC,cAAc,IAAI,OAAO;IAInB,SAAS,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAYlC,wBAAwB;CAuCvC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.js deleted file mode 100644 index dc3594f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.js +++ /dev/null @@ -1,127 +0,0 @@ -import { OffsetLimitEndpointComponent } from "./EndpointComponent/OffsetLimitEndpointComponent"; -import { OrderByEndpointComponent } from "./EndpointComponent/OrderByEndpointComponent"; -import { OrderedDistinctEndpointComponent } from "./EndpointComponent/OrderedDistinctEndpointComponent"; -import { UnorderedDistinctEndpointComponent } from "./EndpointComponent/UnorderedDistinctEndpointComponent"; -import { GroupByEndpointComponent } from "./EndpointComponent/GroupByEndpointComponent"; -import { getInitialHeader, mergeHeaders } from "./headerUtils"; -import { OrderByQueryExecutionContext } from "./orderByQueryExecutionContext"; -import { ParallelQueryExecutionContext } from "./parallelQueryExecutionContext"; -import { GroupByValueEndpointComponent } from "./EndpointComponent/GroupByValueEndpointComponent"; -/** @hidden */ -export class PipelinedQueryExecutionContext { - constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo) { - this.clientContext = clientContext; - this.collectionLink = collectionLink; - this.query = query; - this.options = options; - this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo; - this.endpoint = null; - this.pageSize = options["maxItemCount"]; - if (this.pageSize === undefined) { - this.pageSize = PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE; - } - // Pick between parallel vs order by execution context - const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy; - if (Array.isArray(sortOrders) && sortOrders.length > 0) { - // Need to wrap orderby execution context in endpoint component, since the data is nested as a \ - // "payload" property. - this.endpoint = new OrderByEndpointComponent(new OrderByQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo)); - } - else { - this.endpoint = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo); - } - if (Object.keys(partitionedQueryExecutionInfo.queryInfo.groupByAliasToAggregateType).length > 0 || - partitionedQueryExecutionInfo.queryInfo.aggregates.length > 0 || - partitionedQueryExecutionInfo.queryInfo.groupByExpressions.length > 0) { - if (partitionedQueryExecutionInfo.queryInfo.hasSelectValue) { - this.endpoint = new GroupByValueEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo); - } - else { - this.endpoint = new GroupByEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo); - } - } - // If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N - const top = partitionedQueryExecutionInfo.queryInfo.top; - if (typeof top === "number") { - this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top); - } - // If offset+limit then add that to the pipeline - const limit = partitionedQueryExecutionInfo.queryInfo.limit; - const offset = partitionedQueryExecutionInfo.queryInfo.offset; - if (typeof limit === "number" && typeof offset === "number") { - this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit); - } - // If distinct then add that to the pipeline - const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType; - if (distinctType === "Ordered") { - this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint); - } - if (distinctType === "Unordered") { - this.endpoint = new UnorderedDistinctEndpointComponent(this.endpoint); - } - } - async nextItem() { - return this.endpoint.nextItem(); - } - // Removed callback here beacuse it wouldn't have ever worked... - hasMoreResults() { - return this.endpoint.hasMoreResults(); - } - async fetchMore() { - // if the wrapped endpoint has different implementation for fetchMore use that - // otherwise use the default implementation - if (typeof this.endpoint.fetchMore === "function") { - return this.endpoint.fetchMore(); - } - else { - this.fetchBuffer = []; - this.fetchMoreRespHeaders = getInitialHeader(); - return this._fetchMoreImplementation(); - } - } - async _fetchMoreImplementation() { - try { - const { result: item, headers } = await this.endpoint.nextItem(); - mergeHeaders(this.fetchMoreRespHeaders, headers); - if (item === undefined) { - // no more results - if (this.fetchBuffer.length === 0) { - return { - result: undefined, - headers: this.fetchMoreRespHeaders, - }; - } - else { - // Just give what we have - const temp = this.fetchBuffer; - this.fetchBuffer = []; - return { result: temp, headers: this.fetchMoreRespHeaders }; - } - } - else { - // append the result - this.fetchBuffer.push(item); - if (this.fetchBuffer.length >= this.pageSize) { - // fetched enough results - const temp = this.fetchBuffer.slice(0, this.pageSize); - this.fetchBuffer = this.fetchBuffer.splice(this.pageSize); - return { result: temp, headers: this.fetchMoreRespHeaders }; - } - else { - // recursively fetch more - // TODO: is recursion a good idea? - return this._fetchMoreImplementation(); - } - } - } - catch (err) { - mergeHeaders(this.fetchMoreRespHeaders, err.headers); - err.headers = this.fetchMoreRespHeaders; - if (err) { - throw err; - } - } - } -} -PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE = 10; -//# sourceMappingURL=pipelinedQueryExecutionContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.js.map deleted file mode 100644 index a9d7843..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryExecutionContext/pipelinedQueryExecutionContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipelinedQueryExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/pipelinedQueryExecutionContext.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AACxG,OAAO,EAAE,kCAAkC,EAAE,MAAM,wDAAwD,CAAC;AAC5G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,gBAAg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L,yBAAyB;oBACzB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;oBAC9B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;oBACtB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;iBAC7D;aACF;iBAAM;gBACL,oBAAoB;gBACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE;oBAC5C,yBAAyB;oBACzB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;oBACtD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC1D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;iBAC7D;qBAAM;oBACL,yBAAyB;oBACzB,kCAAkC;oBAClC,OAAO,IAAI,CAAC,wBAAwB,EAAE,CAAC;iBACxC;aACF;SACF;QAAC,OAAO,GAAQ,EAAE;YACjB,YAAY,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;YACrD,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC;YACxC,IAAI,GAAG,EAAE;gBACP,MAAM,GAAG,CAAC;aACX;SACF;IACH,CAAC;;AAxIc,gDAAiB,GAAG,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../ClientContext\";\nimport { Response, FeedOptions } from \"../request\";\nimport { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse\";\nimport { CosmosHeaders } from \"./CosmosHeaders\";\nimport { OffsetLimitEndpointComponent } from \"./EndpointComponent/OffsetLimitEndpointComponent\";\nimport { OrderByEndpointComponent } from \"./EndpointComponent/OrderByEndpointComponent\";\nimport { OrderedDistinctEndpointComponent } from \"./EndpointComponent/OrderedDistinctEndpointComponent\";\nimport { UnorderedDistinctEndpointComponent } from \"./EndpointComponent/UnorderedDistinctEndpointComponent\";\nimport { GroupByEndpointComponent } from \"./EndpointComponent/GroupByEndpointComponent\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { getInitialHeader, mergeHeaders } from \"./headerUtils\";\nimport { OrderByQueryExecutionContext } from \"./orderByQueryExecutionContext\";\nimport { ParallelQueryExecutionContext } from \"./parallelQueryExecutionContext\";\nimport { GroupByValueEndpointComponent } from \"./EndpointComponent/GroupByValueEndpointComponent\";\nimport { SqlQuerySpec } from \"./SqlQuerySpec\";\n\n/** @hidden */\nexport class PipelinedQueryExecutionContext implements ExecutionContext {\n private fetchBuffer: any[];\n private fetchMoreRespHeaders: CosmosHeaders;\n private endpoint: ExecutionContext;\n private pageSize: number;\n private static DEFAULT_PAGE_SIZE = 10;\n constructor(\n private clientContext: ClientContext,\n private collectionLink: string,\n private query: string | SqlQuerySpec,\n private options: FeedOptions,\n private partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo\n ) {\n this.endpoint = null;\n this.pageSize = options[\"maxItemCount\"];\n if (this.pageSize === undefined) {\n this.pageSize = PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE;\n }\n\n // Pick between parallel vs order by execution context\n const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy;\n if (Array.isArray(sortOrders) && sortOrders.length > 0) {\n // Need to wrap orderby execution context in endpoint component, since the data is nested as a \\\n // \"payload\" property.\n this.endpoint = new OrderByEndpointComponent(\n new OrderByQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo\n )\n );\n } else {\n this.endpoint = new ParallelQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo\n );\n }\n if (\n Object.keys(partitionedQueryExecutionInfo.queryInfo.groupByAliasToAggregateType).length > 0 ||\n partitionedQueryExecutionInfo.queryInfo.aggregates.length > 0 ||\n partitionedQueryExecutionInfo.queryInfo.groupByExpressions.length > 0\n ) {\n if (partitionedQueryExecutionInfo.queryInfo.hasSelectValue) {\n this.endpoint = new GroupByValueEndpointComponent(\n this.endpoint,\n partitionedQueryExecutionInfo.queryInfo\n );\n } else {\n this.endpoint = new GroupByEndpointComponent(\n this.endpoint,\n partitionedQueryExecutionInfo.queryInfo\n );\n }\n }\n // If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N\n const top = partitionedQueryExecutionInfo.queryInfo.top;\n if (typeof top === \"number\") {\n this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top);\n }\n\n // If offset+limit then add that to the pipeline\n const limit = partitionedQueryExecutionInfo.queryInfo.limit;\n const offset = partitionedQueryExecutionInfo.queryInfo.offset;\n if (typeof limit === \"number\" && typeof offset === \"number\") {\n this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit);\n }\n\n // If distinct then add that to the pipeline\n const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;\n if (distinctType === \"Ordered\") {\n this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint);\n }\n if (distinctType === \"Unordered\") {\n this.endpoint = new UnorderedDistinctEndpointComponent(this.endpoint);\n }\n }\n\n public async nextItem(): Promise> {\n return this.endpoint.nextItem();\n }\n\n // Removed callback here beacuse it wouldn't have ever worked...\n public hasMoreResults(): boolean {\n return this.endpoint.hasMoreResults();\n }\n\n public async fetchMore(): Promise> {\n // if the wrapped endpoint has different implementation for fetchMore use that\n // otherwise use the default implementation\n if (typeof this.endpoint.fetchMore === \"function\") {\n return this.endpoint.fetchMore();\n } else {\n this.fetchBuffer = [];\n this.fetchMoreRespHeaders = getInitialHeader();\n return this._fetchMoreImplementation();\n }\n }\n\n private async _fetchMoreImplementation(): Promise> {\n try {\n const { result: item, headers } = await this.endpoint.nextItem();\n mergeHeaders(this.fetchMoreRespHeaders, headers);\n if (item === undefined) {\n // no more results\n if (this.fetchBuffer.length === 0) {\n return {\n result: undefined,\n headers: this.fetchMoreRespHeaders,\n };\n } else {\n // Just give what we have\n const temp = this.fetchBuffer;\n this.fetchBuffer = [];\n return { result: temp, headers: this.fetchMoreRespHeaders };\n }\n } else {\n // append the result\n this.fetchBuffer.push(item);\n if (this.fetchBuffer.length >= this.pageSize) {\n // fetched enough results\n const temp = this.fetchBuffer.slice(0, this.pageSize);\n this.fetchBuffer = this.fetchBuffer.splice(this.pageSize);\n return { result: temp, headers: this.fetchMoreRespHeaders };\n } else {\n // recursively fetch more\n // TODO: is recursion a good idea?\n return this._fetchMoreImplementation();\n }\n }\n } catch (err: any) {\n mergeHeaders(this.fetchMoreRespHeaders, err.headers);\n err.headers = this.fetchMoreRespHeaders;\n if (err) {\n throw err;\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.d.ts deleted file mode 100644 index 1d9b1e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/// -import { ClientContext } from "./ClientContext"; -import { ResourceType } from "./common"; -import { FetchFunctionCallback, SqlQuerySpec } from "./queryExecutionContext"; -import { FeedOptions } from "./request/FeedOptions"; -import { FeedResponse } from "./request/FeedResponse"; -/** - * Represents a QueryIterator Object, an implementation of feed or query response that enables - * traversal and iterating over the response - * in the Azure Cosmos DB database service. - */ -export declare class QueryIterator { - private clientContext; - private query; - private options; - private fetchFunctions; - private resourceLink?; - private resourceType?; - private fetchAllTempResources; - private fetchAllLastResHeaders; - private queryExecutionContext; - private queryPlanPromise; - private isInitialized; - /** - * @hidden - */ - constructor(clientContext: ClientContext, query: SqlQuerySpec | string, options: FeedOptions, fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[], resourceLink?: string, resourceType?: ResourceType); - /** - * Gets an async iterator that will yield results until completion. - * - * NOTE: AsyncIterators are a very new feature and you might need to - * use polyfils/etc. in order to use them in your code. - * - * If you're using TypeScript, you can use the following polyfill as long - * as you target ES6 or higher and are running on Node 6 or higher. - * - * ```typescript - * if (!Symbol || !Symbol.asyncIterator) { - * (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); - * } - * ``` - * - * @example Iterate over all databases - * ```typescript - * for await(const { resources: db } of client.databases.readAll().getAsyncIterator()) { - * console.log(`Got ${db} from AsyncIterator`); - * } - * ``` - */ - getAsyncIterator(): AsyncIterable>; - /** - * Determine if there are still remaining resources to processs based on the value of the continuation token or the - * elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the QueryIterator. - */ - hasMoreResults(): boolean; - /** - * Fetch all pages for the query and return a single FeedResponse. - */ - fetchAll(): Promise>; - /** - * Retrieve the next batch from the feed. - * - * This may or may not fetch more pages from the backend depending on your settings - * and the type of query. Aggregate queries will generally fetch all backend pages - * before returning the first batch of responses. - */ - fetchNext(): Promise>; - /** - * Reset the QueryIterator to the beginning and clear all the resources inside it - */ - reset(): void; - private toArrayImplementation; - private createPipelinedExecutionContext; - private fetchQueryPlan; - private needsQueryPlan; - private initPromise; - private init; - private _init; - private handleSplitError; -} -//# sourceMappingURL=queryIterator.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.d.ts.map deleted file mode 100644 index 4932280..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryIterator.d.ts","sourceRoot":"","sources":["../../src/queryIterator.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,aAAa,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B,OAAO,CAAC,WAAW,CAAgB;YACrB,IAAI;YASJ,KAAK;IAOnB,OAAO,CAAC,gBAAgB;CAYzB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.js deleted file mode 100644 index 03238d2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.js +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { __asyncGenerator, __await } from "tslib"; -import { getPathFromLink, ResourceType, StatusCodes } from "./common"; -import { DefaultQueryExecutionContext, getInitialHeader, mergeHeaders, PipelinedQueryExecutionContext, } from "./queryExecutionContext"; -import { FeedResponse } from "./request/FeedResponse"; -/** - * Represents a QueryIterator Object, an implementation of feed or query response that enables - * traversal and iterating over the response - * in the Azure Cosmos DB database service. - */ -export class QueryIterator { - /** - * @hidden - */ - constructor(clientContext, query, options, fetchFunctions, resourceLink, resourceType) { - this.clientContext = clientContext; - this.query = query; - this.options = options; - this.fetchFunctions = fetchFunctions; - this.resourceLink = resourceLink; - this.resourceType = resourceType; - this.query = query; - this.fetchFunctions = fetchFunctions; - this.options = options || {}; - this.resourceLink = resourceLink; - this.fetchAllLastResHeaders = getInitialHeader(); - this.reset(); - this.isInitialized = false; - } - /** - * Gets an async iterator that will yield results until completion. - * - * NOTE: AsyncIterators are a very new feature and you might need to - * use polyfils/etc. in order to use them in your code. - * - * If you're using TypeScript, you can use the following polyfill as long - * as you target ES6 or higher and are running on Node 6 or higher. - * - * ```typescript - * if (!Symbol || !Symbol.asyncIterator) { - * (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); - * } - * ``` - * - * @example Iterate over all databases - * ```typescript - * for await(const { resources: db } of client.databases.readAll().getAsyncIterator()) { - * console.log(`Got ${db} from AsyncIterator`); - * } - * ``` - */ - getAsyncIterator() { - return __asyncGenerator(this, arguments, function* getAsyncIterator_1() { - this.reset(); - this.queryPlanPromise = this.fetchQueryPlan(); - while (this.queryExecutionContext.hasMoreResults()) { - let response; - try { - response = yield __await(this.queryExecutionContext.fetchMore()); - } - catch (error) { - if (this.needsQueryPlan(error)) { - yield __await(this.createPipelinedExecutionContext()); - try { - response = yield __await(this.queryExecutionContext.fetchMore()); - } - catch (queryError) { - this.handleSplitError(queryError); - } - } - else { - throw error; - } - } - const feedResponse = new FeedResponse(response.result, response.headers, this.queryExecutionContext.hasMoreResults()); - if (response.result !== undefined) { - yield yield __await(feedResponse); - } - } - }); - } - /** - * Determine if there are still remaining resources to processs based on the value of the continuation token or the - * elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the QueryIterator. - */ - hasMoreResults() { - return this.queryExecutionContext.hasMoreResults(); - } - /** - * Fetch all pages for the query and return a single FeedResponse. - */ - async fetchAll() { - this.reset(); - this.fetchAllTempResources = []; - let response; - try { - response = await this.toArrayImplementation(); - } - catch (error) { - this.handleSplitError(error); - } - return response; - } - /** - * Retrieve the next batch from the feed. - * - * This may or may not fetch more pages from the backend depending on your settings - * and the type of query. Aggregate queries will generally fetch all backend pages - * before returning the first batch of responses. - */ - async fetchNext() { - this.queryPlanPromise = this.fetchQueryPlan(); - if (!this.isInitialized) { - await this.init(); - } - let response; - try { - response = await this.queryExecutionContext.fetchMore(); - } - catch (error) { - if (this.needsQueryPlan(error)) { - await this.createPipelinedExecutionContext(); - try { - response = await this.queryExecutionContext.fetchMore(); - } - catch (queryError) { - this.handleSplitError(queryError); - } - } - else { - throw error; - } - } - return new FeedResponse(response.result, response.headers, this.queryExecutionContext.hasMoreResults()); - } - /** - * Reset the QueryIterator to the beginning and clear all the resources inside it - */ - reset() { - this.queryPlanPromise = undefined; - this.queryExecutionContext = new DefaultQueryExecutionContext(this.options, this.fetchFunctions); - } - async toArrayImplementation() { - this.queryPlanPromise = this.fetchQueryPlan(); - if (!this.isInitialized) { - await this.init(); - } - while (this.queryExecutionContext.hasMoreResults()) { - let response; - try { - response = await this.queryExecutionContext.nextItem(); - } - catch (error) { - if (this.needsQueryPlan(error)) { - await this.createPipelinedExecutionContext(); - response = await this.queryExecutionContext.nextItem(); - } - else { - throw error; - } - } - const { result, headers } = response; - // concatenate the results and fetch more - mergeHeaders(this.fetchAllLastResHeaders, headers); - if (result !== undefined) { - this.fetchAllTempResources.push(result); - } - } - return new FeedResponse(this.fetchAllTempResources, this.fetchAllLastResHeaders, this.queryExecutionContext.hasMoreResults()); - } - async createPipelinedExecutionContext() { - const queryPlanResponse = await this.queryPlanPromise; - // We always coerce queryPlanPromise to resolved. So if it errored, we need to manually inspect the resolved value - if (queryPlanResponse instanceof Error) { - throw queryPlanResponse; - } - const queryPlan = queryPlanResponse.result; - const queryInfo = queryPlan.queryInfo; - if (queryInfo.aggregates.length > 0 && queryInfo.hasSelectValue === false) { - throw new Error("Aggregate queries must use the VALUE keyword"); - } - this.queryExecutionContext = new PipelinedQueryExecutionContext(this.clientContext, this.resourceLink, this.query, this.options, queryPlan); - } - async fetchQueryPlan() { - if (!this.queryPlanPromise && this.resourceType === ResourceType.item) { - return this.clientContext - .getQueryPlan(getPathFromLink(this.resourceLink) + "/docs", ResourceType.item, this.resourceLink, this.query, this.options) - .catch((error) => error); // Without this catch, node reports an unhandled rejection. So we stash the promise as resolved even if it errored. - } - return this.queryPlanPromise; - } - needsQueryPlan(error) { - var _a; - if (((_a = error.body) === null || _a === void 0 ? void 0 : _a.additionalErrorInfo) || - error.message.includes("Cross partition query only supports")) { - return error.code === StatusCodes.BadRequest && this.resourceType === ResourceType.item; - } - else { - throw error; - } - } - async init() { - if (this.isInitialized === true) { - return; - } - if (this.initPromise === undefined) { - this.initPromise = this._init(); - } - return this.initPromise; - } - async _init() { - if (this.options.forceQueryPlan === true && this.resourceType === ResourceType.item) { - await this.createPipelinedExecutionContext(); - } - this.isInitialized = true; - } - handleSplitError(err) { - if (err.code === 410) { - const error = new Error("Encountered partition split and could not recover. This request is retryable"); - error.code = 503; - error.originalError = err; - throw error; - } - else { - throw err; - } - } -} -//# sourceMappingURL=queryIterator.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.js.map deleted file mode 100644 index b876cbc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryIterator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryIterator.js","sourceRoot":"","sources":["../../src/queryIterator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAKlC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAEL,4BAA4B,EAG5B,gBAAgB,EAChB,YAAY,EACZ,8BAA8B,GAE/B,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,OAAO,aAAa;IAMxB;;OAEG;IACH,YACU,aAA4B,EAC5B,KAA4B,EAC5B,OAAoB,EACpB,cAA+D,EAC/D,YAAqB,EACrB,YAA2B;QAL3B,kBAAa,GAAb,aAAa,CAAe;QAC5B,UAAK,GAAL,KAAK,CAAuB;QAC5B,YAAO,GAAP,OAAO,CAAa;QACpB,mBAAc,GAAd,cAAc,CAAiD;QAC/D,iBAAY,GAAZ,YAAY,CAAS;QACrB,iBAAY,GAAZ,YAAY,CAAe;QAEnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,sBAAsB,GAAG,gBAAgB,EAAE,CAAC;QACjD,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,aAAa,GA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KAAK,EAAE,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACO,KAAK,CAAC,KAAK;QACjB,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,KAAK,IAAI,IAAI,IAAI,CAAC,YAAY,KAAK,YAAY,CAAC,IAAI,EAAE;YACnF,MAAM,IAAI,CAAC,+BAA+B,EAAE,CAAC;SAC9C;QACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAEO,gBAAgB,CAAC,GAAQ;QAC/B,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;YACpB,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,8EAA8E,CACxE,CAAC;YACT,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC;YACjB,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;YAC1B,MAAM,KAAK,CAAC;SACb;aAAM;YACL,MAAM,GAAG,CAAC;SACX;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// \n\nimport { ClientContext } from \"./ClientContext\";\nimport { getPathFromLink, ResourceType, StatusCodes } from \"./common\";\nimport {\n CosmosHeaders,\n DefaultQueryExecutionContext,\n ExecutionContext,\n FetchFunctionCallback,\n getInitialHeader,\n mergeHeaders,\n PipelinedQueryExecutionContext,\n SqlQuerySpec,\n} from \"./queryExecutionContext\";\nimport { Response } from \"./request\";\nimport { ErrorResponse, PartitionedQueryExecutionInfo } from \"./request/ErrorResponse\";\nimport { FeedOptions } from \"./request/FeedOptions\";\nimport { FeedResponse } from \"./request/FeedResponse\";\n\n/**\n * Represents a QueryIterator Object, an implementation of feed or query response that enables\n * traversal and iterating over the response\n * in the Azure Cosmos DB database service.\n */\nexport class QueryIterator {\n private fetchAllTempResources: T[]; // TODO\n private fetchAllLastResHeaders: CosmosHeaders;\n private queryExecutionContext: ExecutionContext;\n private queryPlanPromise: Promise>;\n private isInitialized: boolean;\n /**\n * @hidden\n */\n constructor(\n private clientContext: ClientContext,\n private query: SqlQuerySpec | string,\n private options: FeedOptions,\n private fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[],\n private resourceLink?: string,\n private resourceType?: ResourceType\n ) {\n this.query = query;\n this.fetchFunctions = fetchFunctions;\n this.options = options || {};\n this.resourceLink = resourceLink;\n this.fetchAllLastResHeaders = getInitialHeader();\n this.reset();\n this.isInitialized = false;\n }\n\n /**\n * Gets an async iterator that will yield results until completion.\n *\n * NOTE: AsyncIterators are a very new feature and you might need to\n * use polyfils/etc. in order to use them in your code.\n *\n * If you're using TypeScript, you can use the following polyfill as long\n * as you target ES6 or higher and are running on Node 6 or higher.\n *\n * ```typescript\n * if (!Symbol || !Symbol.asyncIterator) {\n * (Symbol as any).asyncIterator = Symbol.for(\"Symbol.asyncIterator\");\n * }\n * ```\n *\n * @example Iterate over all databases\n * ```typescript\n * for await(const { resources: db } of client.databases.readAll().getAsyncIterator()) {\n * console.log(`Got ${db} from AsyncIterator`);\n * }\n * ```\n */\n public async *getAsyncIterator(): AsyncIterable> {\n this.reset();\n this.queryPlanPromise = this.fetchQueryPlan();\n while (this.queryExecutionContext.hasMoreResults()) {\n let response: Response;\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (error: any) {\n if (this.needsQueryPlan(error)) {\n await this.createPipelinedExecutionContext();\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (queryError: any) {\n this.handleSplitError(queryError);\n }\n } else {\n throw error;\n }\n }\n const feedResponse = new FeedResponse(\n response.result,\n response.headers,\n this.queryExecutionContext.hasMoreResults()\n );\n if (response.result !== undefined) {\n yield feedResponse;\n }\n }\n }\n\n /**\n * Determine if there are still remaining resources to processs based on the value of the continuation token or the\n * elements remaining on the current batch in the QueryIterator.\n * @returns true if there is other elements to process in the QueryIterator.\n */\n public hasMoreResults(): boolean {\n return this.queryExecutionContext.hasMoreResults();\n }\n\n /**\n * Fetch all pages for the query and return a single FeedResponse.\n */\n\n public async fetchAll(): Promise> {\n this.reset();\n this.fetchAllTempResources = [];\n let response: FeedResponse;\n try {\n response = await this.toArrayImplementation();\n } catch (error: any) {\n this.handleSplitError(error);\n }\n return response;\n }\n\n /**\n * Retrieve the next batch from the feed.\n *\n * This may or may not fetch more pages from the backend depending on your settings\n * and the type of query. Aggregate queries will generally fetch all backend pages\n * before returning the first batch of responses.\n */\n public async fetchNext(): Promise> {\n this.queryPlanPromise = this.fetchQueryPlan();\n if (!this.isInitialized) {\n await this.init();\n }\n\n let response: Response;\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (error: any) {\n if (this.needsQueryPlan(error)) {\n await this.createPipelinedExecutionContext();\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (queryError: any) {\n this.handleSplitError(queryError);\n }\n } else {\n throw error;\n }\n }\n return new FeedResponse(\n response.result,\n response.headers,\n this.queryExecutionContext.hasMoreResults()\n );\n }\n\n /**\n * Reset the QueryIterator to the beginning and clear all the resources inside it\n */\n public reset(): void {\n this.queryPlanPromise = undefined;\n this.queryExecutionContext = new DefaultQueryExecutionContext(\n this.options,\n this.fetchFunctions\n );\n }\n\n private async toArrayImplementation(): Promise> {\n this.queryPlanPromise = this.fetchQueryPlan();\n if (!this.isInitialized) {\n await this.init();\n }\n while (this.queryExecutionContext.hasMoreResults()) {\n let response: Response;\n try {\n response = await this.queryExecutionContext.nextItem();\n } catch (error: any) {\n if (this.needsQueryPlan(error)) {\n await this.createPipelinedExecutionContext();\n response = await this.queryExecutionContext.nextItem();\n } else {\n throw error;\n }\n }\n const { result, headers } = response;\n // concatenate the results and fetch more\n mergeHeaders(this.fetchAllLastResHeaders, headers);\n\n if (result !== undefined) {\n this.fetchAllTempResources.push(result);\n }\n }\n return new FeedResponse(\n this.fetchAllTempResources,\n this.fetchAllLastResHeaders,\n this.queryExecutionContext.hasMoreResults()\n );\n }\n\n private async createPipelinedExecutionContext(): Promise {\n const queryPlanResponse = await this.queryPlanPromise;\n\n // We always coerce queryPlanPromise to resolved. So if it errored, we need to manually inspect the resolved value\n if (queryPlanResponse instanceof Error) {\n throw queryPlanResponse;\n }\n\n const queryPlan = queryPlanResponse.result;\n const queryInfo = queryPlan.queryInfo;\n if (queryInfo.aggregates.length > 0 && queryInfo.hasSelectValue === false) {\n throw new Error(\"Aggregate queries must use the VALUE keyword\");\n }\n this.queryExecutionContext = new PipelinedQueryExecutionContext(\n this.clientContext,\n this.resourceLink,\n this.query,\n this.options,\n queryPlan\n );\n }\n\n private async fetchQueryPlan(): Promise {\n if (!this.queryPlanPromise && this.resourceType === ResourceType.item) {\n return this.clientContext\n .getQueryPlan(\n getPathFromLink(this.resourceLink) + \"/docs\",\n ResourceType.item,\n this.resourceLink,\n this.query,\n this.options\n )\n .catch((error: any) => error); // Without this catch, node reports an unhandled rejection. So we stash the promise as resolved even if it errored.\n }\n return this.queryPlanPromise;\n }\n\n private needsQueryPlan(error: ErrorResponse): error is ErrorResponse {\n if (\n error.body?.additionalErrorInfo ||\n error.message.includes(\"Cross partition query only supports\")\n ) {\n return error.code === StatusCodes.BadRequest && this.resourceType === ResourceType.item;\n } else {\n throw error;\n }\n }\n\n private initPromise: Promise;\n private async init(): Promise {\n if (this.isInitialized === true) {\n return;\n }\n if (this.initPromise === undefined) {\n this.initPromise = this._init();\n }\n return this.initPromise;\n }\n private async _init(): Promise {\n if (this.options.forceQueryPlan === true && this.resourceType === ResourceType.item) {\n await this.createPipelinedExecutionContext();\n }\n this.isInitialized = true;\n }\n\n private handleSplitError(err: any): void {\n if (err.code === 410) {\n const error = new Error(\n \"Encountered partition split and could not recover. This request is retryable\"\n ) as any;\n error.code = 503;\n error.originalError = err;\n throw error;\n } else {\n throw err;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.d.ts deleted file mode 100644 index c7c5c9d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare class ClientSideMetrics { - readonly requestCharge: number; - constructor(requestCharge: number); - /** - * Adds one or more ClientSideMetrics to a copy of this instance and returns the result. - */ - add(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics; - static readonly zero: ClientSideMetrics; - static createFromArray(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics; -} -//# sourceMappingURL=clientSideMetrics.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.d.ts.map deleted file mode 100644 index 6fae010..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clientSideMetrics.d.ts","sourceRoot":"","sources":["../../../src/queryMetrics/clientSideMetrics.ts"],"names":[],"mappings":"AAGA,qBAAa,iBAAiB;aACA,aAAa,EAAE,MAAM;gBAArB,aAAa,EAAE,MAAM;IAEjD;;OAEG;IACI,GAAG,CAAC,GAAG,sBAAsB,EAAE,iBAAiB,EAAE,GAAG,iBAAiB;IAa7E,gBAAuB,IAAI,oBAA4B;WAEzC,eAAe,CAAC,GAAG,sBAAsB,EAAE,iBAAiB,EAAE,GAAG,iBAAiB;CAOjG"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.js deleted file mode 100644 index 97c0bf8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export class ClientSideMetrics { - constructor(requestCharge) { - this.requestCharge = requestCharge; - } - /** - * Adds one or more ClientSideMetrics to a copy of this instance and returns the result. - */ - add(...clientSideMetricsArray) { - let requestCharge = this.requestCharge; - for (const clientSideMetrics of clientSideMetricsArray) { - if (clientSideMetrics == null) { - throw new Error("clientSideMetrics has null or undefined item(s)"); - } - requestCharge += clientSideMetrics.requestCharge; - } - return new ClientSideMetrics(requestCharge); - } - static createFromArray(...clientSideMetricsArray) { - if (clientSideMetricsArray == null) { - throw new Error("clientSideMetricsArray is null or undefined item(s)"); - } - return this.zero.add(...clientSideMetricsArray); - } -} -ClientSideMetrics.zero = new ClientSideMetrics(0); -//# sourceMappingURL=clientSideMetrics.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.js.map deleted file mode 100644 index 1c40cd0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/clientSideMetrics.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clientSideMetrics.js","sourceRoot":"","sources":["../../../src/queryMetrics/clientSideMetrics.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,OAAO,iBAAiB;IAC5B,YAA4B,aAAqB;QAArB,kBAAa,GAAb,aAAa,CAAQ;IAAG,CAAC;IAErD;;OAEG;IACI,GAAG,CAAC,GAAG,sBAA2C;QACvD,IAAI,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACvC,KAAK,MAAM,iBAAiB,IAAI,sBAAsB,EAAE;YACtD,IAAI,iBAAiB,IAAI,IAAI,EAAE;gBAC7B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;aACpE;YAED,aAAa,IAAI,iBAAiB,CAAC,aAAa,CAAC;SAClD;QAED,OAAO,IAAI,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC9C,CAAC;IAIM,MAAM,CAAC,eAAe,CAAC,GAAG,sBAA2C;QAC1E,IAAI,sBAAsB,IAAI,IAAI,EAAE;YAClC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SACxE;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,sBAAsB,CAAC,CAAC;IAClD,CAAC;;AARsB,sBAAI,GAAG,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport class ClientSideMetrics {\n constructor(public readonly requestCharge: number) {}\n\n /**\n * Adds one or more ClientSideMetrics to a copy of this instance and returns the result.\n */\n public add(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics {\n let requestCharge = this.requestCharge;\n for (const clientSideMetrics of clientSideMetricsArray) {\n if (clientSideMetrics == null) {\n throw new Error(\"clientSideMetrics has null or undefined item(s)\");\n }\n\n requestCharge += clientSideMetrics.requestCharge;\n }\n\n return new ClientSideMetrics(requestCharge);\n }\n\n public static readonly zero = new ClientSideMetrics(0);\n\n public static createFromArray(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics {\n if (clientSideMetricsArray == null) {\n throw new Error(\"clientSideMetricsArray is null or undefined item(s)\");\n }\n\n return this.zero.add(...clientSideMetricsArray);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.d.ts deleted file mode 100644 index 8181ce4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { ClientSideMetrics } from "./clientSideMetrics"; -export { QueryMetrics } from "./queryMetrics"; -export { default as QueryMetricsConstants } from "./queryMetricsConstants"; -export { QueryPreparationTimes } from "./queryPreparationTime"; -export { RuntimeExecutionTimes } from "./runtimeExecutionTimes"; -export { TimeSpan } from "./timeSpan"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.d.ts.map deleted file mode 100644 index b1d4fb4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/queryMetrics/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.js deleted file mode 100644 index da0ec5c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { ClientSideMetrics } from "./clientSideMetrics"; -export { QueryMetrics } from "./queryMetrics"; -export { default as QueryMetricsConstants } from "./queryMetricsConstants"; -export { QueryPreparationTimes } from "./queryPreparationTime"; -export { RuntimeExecutionTimes } from "./runtimeExecutionTimes"; -export { TimeSpan } from "./timeSpan"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.js.map deleted file mode 100644 index aa84acf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/queryMetrics/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { ClientSideMetrics } from \"./clientSideMetrics\";\nexport { QueryMetrics } from \"./queryMetrics\";\nexport { default as QueryMetricsConstants } from \"./queryMetricsConstants\";\nexport { QueryPreparationTimes } from \"./queryPreparationTime\";\nexport { RuntimeExecutionTimes } from \"./runtimeExecutionTimes\";\nexport { TimeSpan } from \"./timeSpan\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.d.ts deleted file mode 100644 index b2fd504..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { ClientSideMetrics } from "./clientSideMetrics"; -import { QueryPreparationTimes } from "./queryPreparationTime"; -import { RuntimeExecutionTimes } from "./runtimeExecutionTimes"; -import { TimeSpan } from "./timeSpan"; -export declare class QueryMetrics { - readonly retrievedDocumentCount: number; - readonly retrievedDocumentSize: number; - readonly outputDocumentCount: number; - readonly outputDocumentSize: number; - readonly indexHitDocumentCount: number; - readonly totalQueryExecutionTime: TimeSpan; - readonly queryPreparationTimes: QueryPreparationTimes; - readonly indexLookupTime: TimeSpan; - readonly documentLoadTime: TimeSpan; - readonly vmExecutionTime: TimeSpan; - readonly runtimeExecutionTimes: RuntimeExecutionTimes; - readonly documentWriteTime: TimeSpan; - readonly clientSideMetrics: ClientSideMetrics; - constructor(retrievedDocumentCount: number, retrievedDocumentSize: number, outputDocumentCount: number, outputDocumentSize: number, indexHitDocumentCount: number, totalQueryExecutionTime: TimeSpan, queryPreparationTimes: QueryPreparationTimes, indexLookupTime: TimeSpan, documentLoadTime: TimeSpan, vmExecutionTime: TimeSpan, runtimeExecutionTimes: RuntimeExecutionTimes, documentWriteTime: TimeSpan, clientSideMetrics: ClientSideMetrics); - /** - * Gets the IndexHitRatio - * @hidden - */ - get indexHitRatio(): number; - /** - * returns a new QueryMetrics instance that is the addition of this and the arguments. - */ - add(queryMetricsArray: QueryMetrics[]): QueryMetrics; - /** - * Output the QueryMetrics as a delimited string. - * @hidden - */ - toDelimitedString(): string; - static readonly zero: QueryMetrics; - /** - * Returns a new instance of the QueryMetrics class that is the aggregation of an array of query metrics. - */ - static createFromArray(queryMetricsArray: QueryMetrics[]): QueryMetrics; - /** - * Returns a new instance of the QueryMetrics class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string, clientSideMetrics?: ClientSideMetrics): QueryMetrics; -} -//# sourceMappingURL=queryMetrics.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.d.ts.map deleted file mode 100644 index 5768e82..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist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OAGG;IACI,iBAAiB,IAAI,MAAM;IAgDlC,gBAAuB,IAAI,eAczB;IAEF;;OAEG;WACW,eAAe,CAAC,iBAAiB,EAAE,YAAY,EAAE,GAAG,YAAY;IAQ9E;;OAEG;WACW,yBAAyB,CACrC,eAAe,EAAE,MAAM,EACvB,iBAAiB,CAAC,EAAE,iBAAiB,GACpC,YAAY;CA6BhB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.js deleted file mode 100644 index 6b85717..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.js +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { ClientSideMetrics } from "./clientSideMetrics"; -import QueryMetricsConstants from "./queryMetricsConstants"; -import { parseDelimitedString, timeSpanFromMetrics } from "./queryMetricsUtils"; -import { QueryPreparationTimes } from "./queryPreparationTime"; -import { RuntimeExecutionTimes } from "./runtimeExecutionTimes"; -import { TimeSpan } from "./timeSpan"; -export class QueryMetrics { - constructor(retrievedDocumentCount, retrievedDocumentSize, outputDocumentCount, outputDocumentSize, indexHitDocumentCount, totalQueryExecutionTime, queryPreparationTimes, indexLookupTime, documentLoadTime, vmExecutionTime, runtimeExecutionTimes, documentWriteTime, clientSideMetrics) { - this.retrievedDocumentCount = retrievedDocumentCount; - this.retrievedDocumentSize = retrievedDocumentSize; - this.outputDocumentCount = outputDocumentCount; - this.outputDocumentSize = outputDocumentSize; - this.indexHitDocumentCount = indexHitDocumentCount; - this.totalQueryExecutionTime = totalQueryExecutionTime; - this.queryPreparationTimes = queryPreparationTimes; - this.indexLookupTime = indexLookupTime; - this.documentLoadTime = documentLoadTime; - this.vmExecutionTime = vmExecutionTime; - this.runtimeExecutionTimes = runtimeExecutionTimes; - this.documentWriteTime = documentWriteTime; - this.clientSideMetrics = clientSideMetrics; - } - /** - * Gets the IndexHitRatio - * @hidden - */ - get indexHitRatio() { - return this.retrievedDocumentCount === 0 - ? 1 - : this.indexHitDocumentCount / this.retrievedDocumentCount; - } - /** - * returns a new QueryMetrics instance that is the addition of this and the arguments. - */ - add(queryMetricsArray) { - let retrievedDocumentCount = 0; - let retrievedDocumentSize = 0; - let outputDocumentCount = 0; - let outputDocumentSize = 0; - let indexHitDocumentCount = 0; - let totalQueryExecutionTime = TimeSpan.zero; - const queryPreparationTimesArray = []; - let indexLookupTime = TimeSpan.zero; - let documentLoadTime = TimeSpan.zero; - let vmExecutionTime = TimeSpan.zero; - const runtimeExecutionTimesArray = []; - let documentWriteTime = TimeSpan.zero; - const clientSideQueryMetricsArray = []; - queryMetricsArray.push(this); - for (const queryMetrics of queryMetricsArray) { - if (queryMetrics) { - retrievedDocumentCount += queryMetrics.retrievedDocumentCount; - retrievedDocumentSize += queryMetrics.retrievedDocumentSize; - outputDocumentCount += queryMetrics.outputDocumentCount; - outputDocumentSize += queryMetrics.outputDocumentSize; - indexHitDocumentCount += queryMetrics.indexHitDocumentCount; - totalQueryExecutionTime = totalQueryExecutionTime.add(queryMetrics.totalQueryExecutionTime); - queryPreparationTimesArray.push(queryMetrics.queryPreparationTimes); - indexLookupTime = indexLookupTime.add(queryMetrics.indexLookupTime); - documentLoadTime = documentLoadTime.add(queryMetrics.documentLoadTime); - vmExecutionTime = vmExecutionTime.add(queryMetrics.vmExecutionTime); - runtimeExecutionTimesArray.push(queryMetrics.runtimeExecutionTimes); - documentWriteTime = documentWriteTime.add(queryMetrics.documentWriteTime); - clientSideQueryMetricsArray.push(queryMetrics.clientSideMetrics); - } - } - return new QueryMetrics(retrievedDocumentCount, retrievedDocumentSize, outputDocumentCount, outputDocumentSize, indexHitDocumentCount, totalQueryExecutionTime, QueryPreparationTimes.createFromArray(queryPreparationTimesArray), indexLookupTime, documentLoadTime, vmExecutionTime, RuntimeExecutionTimes.createFromArray(runtimeExecutionTimesArray), documentWriteTime, ClientSideMetrics.createFromArray(...clientSideQueryMetricsArray)); - } - /** - * Output the QueryMetrics as a delimited string. - * @hidden - */ - toDelimitedString() { - return (QueryMetricsConstants.RetrievedDocumentCount + - "=" + - this.retrievedDocumentCount + - ";" + - QueryMetricsConstants.RetrievedDocumentSize + - "=" + - this.retrievedDocumentSize + - ";" + - QueryMetricsConstants.OutputDocumentCount + - "=" + - this.outputDocumentCount + - ";" + - QueryMetricsConstants.OutputDocumentSize + - "=" + - this.outputDocumentSize + - ";" + - QueryMetricsConstants.IndexHitRatio + - "=" + - this.indexHitRatio + - ";" + - QueryMetricsConstants.TotalQueryExecutionTimeInMs + - "=" + - this.totalQueryExecutionTime.totalMilliseconds() + - ";" + - this.queryPreparationTimes.toDelimitedString() + - ";" + - QueryMetricsConstants.IndexLookupTimeInMs + - "=" + - this.indexLookupTime.totalMilliseconds() + - ";" + - QueryMetricsConstants.DocumentLoadTimeInMs + - "=" + - this.documentLoadTime.totalMilliseconds() + - ";" + - QueryMetricsConstants.VMExecutionTimeInMs + - "=" + - this.vmExecutionTime.totalMilliseconds() + - ";" + - this.runtimeExecutionTimes.toDelimitedString() + - ";" + - QueryMetricsConstants.DocumentWriteTimeInMs + - "=" + - this.documentWriteTime.totalMilliseconds()); - } - /** - * Returns a new instance of the QueryMetrics class that is the aggregation of an array of query metrics. - */ - static createFromArray(queryMetricsArray) { - if (!queryMetricsArray) { - throw new Error("queryMetricsArray is null or undefined item(s)"); - } - return QueryMetrics.zero.add(queryMetricsArray); - } - /** - * Returns a new instance of the QueryMetrics class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString, clientSideMetrics) { - const metrics = parseDelimitedString(delimitedString); - const indexHitRatio = metrics[QueryMetricsConstants.IndexHitRatio] || 0; - const retrievedDocumentCount = metrics[QueryMetricsConstants.RetrievedDocumentCount] || 0; - const indexHitCount = indexHitRatio * retrievedDocumentCount; - const outputDocumentCount = metrics[QueryMetricsConstants.OutputDocumentCount] || 0; - const outputDocumentSize = metrics[QueryMetricsConstants.OutputDocumentSize] || 0; - const retrievedDocumentSize = metrics[QueryMetricsConstants.RetrievedDocumentSize] || 0; - const totalQueryExecutionTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.TotalQueryExecutionTimeInMs); - return new QueryMetrics(retrievedDocumentCount, retrievedDocumentSize, outputDocumentCount, outputDocumentSize, indexHitCount, totalQueryExecutionTime, QueryPreparationTimes.createFromDelimitedString(delimitedString), timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentLoadTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs), RuntimeExecutionTimes.createFromDelimitedString(delimitedString), timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentWriteTimeInMs), clientSideMetrics || ClientSideMetrics.zero); - } -} -QueryMetrics.zero = new QueryMetrics(0, 0, 0, 0, 0, TimeSpan.zero, QueryPreparationTimes.zero, TimeSpan.zero, TimeSpan.zero, TimeSpan.zero, RuntimeExecutionTimes.zero, TimeSpan.zero, ClientSideMetrics.zero); -//# sourceMappingURL=queryMetrics.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.js.map deleted file mode 100644 index 51469a5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetrics.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryMetrics.js","sourceRoot":"","sources":["../../../src/queryMetrics/queryMetrics.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qB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O,IAAI,YAAY,CACrB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,qBAAqB,CAAC,yBAAyB,CAAC,eAAe,CAAC,EAChE,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACvE,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,EACxE,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACvE,qBAAqB,CAAC,yBAAyB,CAAC,eAAe,CAAC,EAChE,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,EACzE,iBAAiB,IAAI,iBAAiB,CAAC,IAAI,CAC5C,CAAC;IACJ,CAAC;;AA7DsB,iBAAI,GAAG,IAAI,YAAY,CAC5C,CAAC,EACD,CAAC,EACD,CAAC,EACD,CAAC,EACD,CAAC,EACD,QAAQ,CAAC,IAAI,EACb,qBAAqB,CAAC,IAAI,EAC1B,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,IAAI,EACb,qBAAqB,CAAC,IAAI,EAC1B,QAAQ,CAAC,IAAI,EACb,iBAAiB,CAAC,IAAI,CACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientSideMetrics } from \"./clientSideMetrics\";\nimport QueryMetricsConstants from \"./queryMetricsConstants\";\nimport { parseDelimitedString, timeSpanFromMetrics } from \"./queryMetricsUtils\";\nimport { QueryPreparationTimes } from \"./queryPreparationTime\";\nimport { RuntimeExecutionTimes } from \"./runtimeExecutionTimes\";\nimport { TimeSpan } from \"./timeSpan\";\n\nexport class QueryMetrics {\n constructor(\n public readonly retrievedDocumentCount: number,\n public readonly retrievedDocumentSize: number,\n public readonly outputDocumentCount: number,\n public readonly outputDocumentSize: number,\n public readonly indexHitDocumentCount: number,\n public readonly totalQueryExecutionTime: TimeSpan,\n public readonly queryPreparationTimes: QueryPreparationTimes,\n public readonly indexLookupTime: TimeSpan,\n public readonly documentLoadTime: TimeSpan,\n public readonly vmExecutionTime: TimeSpan,\n public readonly runtimeExecutionTimes: RuntimeExecutionTimes,\n public readonly documentWriteTime: TimeSpan,\n public readonly clientSideMetrics: ClientSideMetrics\n ) {}\n\n /**\n * Gets the IndexHitRatio\n * @hidden\n */\n public get indexHitRatio(): number {\n return this.retrievedDocumentCount === 0\n ? 1\n : this.indexHitDocumentCount / this.retrievedDocumentCount;\n }\n\n /**\n * returns a new QueryMetrics instance that is the addition of this and the arguments.\n */\n public add(queryMetricsArray: QueryMetrics[]): QueryMetrics {\n let retrievedDocumentCount = 0;\n let retrievedDocumentSize = 0;\n let outputDocumentCount = 0;\n let outputDocumentSize = 0;\n let indexHitDocumentCount = 0;\n let totalQueryExecutionTime = TimeSpan.zero;\n const queryPreparationTimesArray = [];\n let indexLookupTime = TimeSpan.zero;\n let documentLoadTime = TimeSpan.zero;\n let vmExecutionTime = TimeSpan.zero;\n const runtimeExecutionTimesArray = [];\n let documentWriteTime = TimeSpan.zero;\n const clientSideQueryMetricsArray = [];\n\n queryMetricsArray.push(this);\n\n for (const queryMetrics of queryMetricsArray) {\n if (queryMetrics) {\n retrievedDocumentCount += queryMetrics.retrievedDocumentCount;\n retrievedDocumentSize += queryMetrics.retrievedDocumentSize;\n outputDocumentCount += queryMetrics.outputDocumentCount;\n outputDocumentSize += queryMetrics.outputDocumentSize;\n indexHitDocumentCount += queryMetrics.indexHitDocumentCount;\n totalQueryExecutionTime = totalQueryExecutionTime.add(queryMetrics.totalQueryExecutionTime);\n queryPreparationTimesArray.push(queryMetrics.queryPreparationTimes);\n indexLookupTime = indexLookupTime.add(queryMetrics.indexLookupTime);\n documentLoadTime = documentLoadTime.add(queryMetrics.documentLoadTime);\n vmExecutionTime = vmExecutionTime.add(queryMetrics.vmExecutionTime);\n runtimeExecutionTimesArray.push(queryMetrics.runtimeExecutionTimes);\n documentWriteTime = documentWriteTime.add(queryMetrics.documentWriteTime);\n clientSideQueryMetricsArray.push(queryMetrics.clientSideMetrics);\n }\n }\n\n return new QueryMetrics(\n retrievedDocumentCount,\n retrievedDocumentSize,\n outputDocumentCount,\n outputDocumentSize,\n indexHitDocumentCount,\n totalQueryExecutionTime,\n QueryPreparationTimes.createFromArray(queryPreparationTimesArray),\n indexLookupTime,\n documentLoadTime,\n vmExecutionTime,\n RuntimeExecutionTimes.createFromArray(runtimeExecutionTimesArray),\n documentWriteTime,\n ClientSideMetrics.createFromArray(...clientSideQueryMetricsArray)\n );\n }\n\n /**\n * Output the QueryMetrics as a delimited string.\n * @hidden\n */\n public toDelimitedString(): string {\n return (\n QueryMetricsConstants.RetrievedDocumentCount +\n \"=\" +\n this.retrievedDocumentCount +\n \";\" +\n QueryMetricsConstants.RetrievedDocumentSize +\n \"=\" +\n this.retrievedDocumentSize +\n \";\" +\n QueryMetricsConstants.OutputDocumentCount +\n \"=\" +\n this.outputDocumentCount +\n \";\" +\n QueryMetricsConstants.OutputDocumentSize +\n \"=\" +\n this.outputDocumentSize +\n \";\" +\n QueryMetricsConstants.IndexHitRatio +\n \"=\" +\n this.indexHitRatio +\n \";\" +\n QueryMetricsConstants.TotalQueryExecutionTimeInMs +\n \"=\" +\n this.totalQueryExecutionTime.totalMilliseconds() +\n \";\" +\n this.queryPreparationTimes.toDelimitedString() +\n \";\" +\n QueryMetricsConstants.IndexLookupTimeInMs +\n \"=\" +\n this.indexLookupTime.totalMilliseconds() +\n \";\" +\n QueryMetricsConstants.DocumentLoadTimeInMs +\n \"=\" +\n this.documentLoadTime.totalMilliseconds() +\n \";\" +\n QueryMetricsConstants.VMExecutionTimeInMs +\n \"=\" +\n this.vmExecutionTime.totalMilliseconds() +\n \";\" +\n this.runtimeExecutionTimes.toDelimitedString() +\n \";\" +\n QueryMetricsConstants.DocumentWriteTimeInMs +\n \"=\" +\n this.documentWriteTime.totalMilliseconds()\n );\n }\n\n public static readonly zero = new QueryMetrics(\n 0,\n 0,\n 0,\n 0,\n 0,\n TimeSpan.zero,\n QueryPreparationTimes.zero,\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero,\n RuntimeExecutionTimes.zero,\n TimeSpan.zero,\n ClientSideMetrics.zero\n );\n\n /**\n * Returns a new instance of the QueryMetrics class that is the aggregation of an array of query metrics.\n */\n public static createFromArray(queryMetricsArray: QueryMetrics[]): QueryMetrics {\n if (!queryMetricsArray) {\n throw new Error(\"queryMetricsArray is null or undefined item(s)\");\n }\n\n return QueryMetrics.zero.add(queryMetricsArray);\n }\n\n /**\n * Returns a new instance of the QueryMetrics class this is deserialized from a delimited string.\n */\n public static createFromDelimitedString(\n delimitedString: string,\n clientSideMetrics?: ClientSideMetrics\n ): QueryMetrics {\n const metrics = parseDelimitedString(delimitedString);\n\n const indexHitRatio = metrics[QueryMetricsConstants.IndexHitRatio] || 0;\n const retrievedDocumentCount = metrics[QueryMetricsConstants.RetrievedDocumentCount] || 0;\n const indexHitCount = indexHitRatio * retrievedDocumentCount;\n const outputDocumentCount = metrics[QueryMetricsConstants.OutputDocumentCount] || 0;\n const outputDocumentSize = metrics[QueryMetricsConstants.OutputDocumentSize] || 0;\n const retrievedDocumentSize = metrics[QueryMetricsConstants.RetrievedDocumentSize] || 0;\n const totalQueryExecutionTime = timeSpanFromMetrics(\n metrics,\n QueryMetricsConstants.TotalQueryExecutionTimeInMs\n );\n return new QueryMetrics(\n retrievedDocumentCount,\n retrievedDocumentSize,\n outputDocumentCount,\n outputDocumentSize,\n indexHitCount,\n totalQueryExecutionTime,\n QueryPreparationTimes.createFromDelimitedString(delimitedString),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentLoadTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs),\n RuntimeExecutionTimes.createFromDelimitedString(delimitedString),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentWriteTimeInMs),\n clientSideMetrics || ClientSideMetrics.zero\n );\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.d.ts deleted file mode 100644 index 5dacb17..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -declare const _default: { - RetrievedDocumentCount: string; - RetrievedDocumentSize: string; - OutputDocumentCount: string; - OutputDocumentSize: string; - IndexHitRatio: string; - IndexHitDocumentCount: string; - TotalQueryExecutionTimeInMs: string; - QueryCompileTimeInMs: string; - LogicalPlanBuildTimeInMs: string; - PhysicalPlanBuildTimeInMs: string; - QueryOptimizationTimeInMs: string; - IndexLookupTimeInMs: string; - DocumentLoadTimeInMs: string; - VMExecutionTimeInMs: string; - DocumentWriteTimeInMs: string; - QueryEngineTimes: string; - SystemFunctionExecuteTimeInMs: string; - UserDefinedFunctionExecutionTimeInMs: string; - RetrievedDocumentCountText: string; - RetrievedDocumentSizeText: string; - OutputDocumentCountText: string; - OutputDocumentSizeText: string; - IndexUtilizationText: string; - TotalQueryExecutionTimeText: string; - QueryPreparationTimesText: string; - QueryCompileTimeText: string; - LogicalPlanBuildTimeText: string; - PhysicalPlanBuildTimeText: string; - QueryOptimizationTimeText: string; - QueryEngineTimesText: string; - IndexLookupTimeText: string; - DocumentLoadTimeText: string; - WriteOutputTimeText: string; - RuntimeExecutionTimesText: string; - TotalExecutionTimeText: string; - SystemFunctionExecuteTimeText: string; - UserDefinedFunctionExecutionTimeText: string; - ClientSideQueryMetricsText: string; - RetriesText: string; - RequestChargeText: string; - FetchExecutionRangesText: string; - SchedulingMetricsText: string; -}; -export default _default; -//# sourceMappingURL=queryMetricsConstants.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.d.ts.map deleted file mode 100644 index ac033a5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryMetricsConstants.d.ts","sourceRoot":"","sources":["../../../src/queryMetrics/queryMetricsConstants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBA4DE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.js deleted file mode 100644 index 2fc3c05..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export default { - // QueryMetrics - RetrievedDocumentCount: "retrievedDocumentCount", - RetrievedDocumentSize: "retrievedDocumentSize", - OutputDocumentCount: "outputDocumentCount", - OutputDocumentSize: "outputDocumentSize", - IndexHitRatio: "indexUtilizationRatio", - IndexHitDocumentCount: "indexHitDocumentCount", - TotalQueryExecutionTimeInMs: "totalExecutionTimeInMs", - // QueryPreparationTimes - QueryCompileTimeInMs: "queryCompileTimeInMs", - LogicalPlanBuildTimeInMs: "queryLogicalPlanBuildTimeInMs", - PhysicalPlanBuildTimeInMs: "queryPhysicalPlanBuildTimeInMs", - QueryOptimizationTimeInMs: "queryOptimizationTimeInMs", - // QueryTimes - IndexLookupTimeInMs: "indexLookupTimeInMs", - DocumentLoadTimeInMs: "documentLoadTimeInMs", - VMExecutionTimeInMs: "VMExecutionTimeInMs", - DocumentWriteTimeInMs: "writeOutputTimeInMs", - // RuntimeExecutionTimes - QueryEngineTimes: "queryEngineTimes", - SystemFunctionExecuteTimeInMs: "systemFunctionExecuteTimeInMs", - UserDefinedFunctionExecutionTimeInMs: "userFunctionExecuteTimeInMs", - // QueryMetrics Text - RetrievedDocumentCountText: "Retrieved Document Count", - RetrievedDocumentSizeText: "Retrieved Document Size", - OutputDocumentCountText: "Output Document Count", - OutputDocumentSizeText: "Output Document Size", - IndexUtilizationText: "Index Utilization", - TotalQueryExecutionTimeText: "Total Query Execution Time", - // QueryPreparationTimes Text - QueryPreparationTimesText: "Query Preparation Times", - QueryCompileTimeText: "Query Compilation Time", - LogicalPlanBuildTimeText: "Logical Plan Build Time", - PhysicalPlanBuildTimeText: "Physical Plan Build Time", - QueryOptimizationTimeText: "Query Optimization Time", - // QueryTimes Text - QueryEngineTimesText: "Query Engine Times", - IndexLookupTimeText: "Index Lookup Time", - DocumentLoadTimeText: "Document Load Time", - WriteOutputTimeText: "Document Write Time", - // RuntimeExecutionTimes Text - RuntimeExecutionTimesText: "Runtime Execution Times", - TotalExecutionTimeText: "Query Engine Execution Time", - SystemFunctionExecuteTimeText: "System Function Execution Time", - UserDefinedFunctionExecutionTimeText: "User-defined Function Execution Time", - // ClientSideQueryMetrics Text - ClientSideQueryMetricsText: "Client Side Metrics", - RetriesText: "Retry Count", - RequestChargeText: "Request Charge", - FetchExecutionRangesText: "Partition Execution Timeline", - SchedulingMetricsText: "Scheduling Metrics", -}; -//# sourceMappingURL=queryMetricsConstants.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.js.map deleted file mode 100644 index 25a5875..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsConstants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryMetricsConstants.js","sourceRoot":"","sources":["../../../src/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B,EAAE,gCAAgC;IAC/D,oCAAoC,EAAE,sCAAsC;IAE5E,8BAA8B;IAC9B,0BAA0B,EAAE,qBAAqB;IACjD,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,gBAAgB;IACnC,wBAAwB,EAAE,8BAA8B;IACxD,qBAAqB,EAAE,oBAAoB;CAC5C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport default {\n // QueryMetrics\n RetrievedDocumentCount: \"retrievedDocumentCount\",\n RetrievedDocumentSize: \"retrievedDocumentSize\",\n OutputDocumentCount: \"outputDocumentCount\",\n OutputDocumentSize: \"outputDocumentSize\",\n IndexHitRatio: \"indexUtilizationRatio\",\n IndexHitDocumentCount: \"indexHitDocumentCount\",\n TotalQueryExecutionTimeInMs: \"totalExecutionTimeInMs\",\n\n // QueryPreparationTimes\n QueryCompileTimeInMs: \"queryCompileTimeInMs\",\n LogicalPlanBuildTimeInMs: \"queryLogicalPlanBuildTimeInMs\",\n PhysicalPlanBuildTimeInMs: \"queryPhysicalPlanBuildTimeInMs\",\n QueryOptimizationTimeInMs: \"queryOptimizationTimeInMs\",\n\n // QueryTimes\n IndexLookupTimeInMs: \"indexLookupTimeInMs\",\n DocumentLoadTimeInMs: \"documentLoadTimeInMs\",\n VMExecutionTimeInMs: \"VMExecutionTimeInMs\",\n DocumentWriteTimeInMs: \"writeOutputTimeInMs\",\n\n // RuntimeExecutionTimes\n QueryEngineTimes: \"queryEngineTimes\",\n SystemFunctionExecuteTimeInMs: \"systemFunctionExecuteTimeInMs\",\n UserDefinedFunctionExecutionTimeInMs: \"userFunctionExecuteTimeInMs\",\n\n // QueryMetrics Text\n RetrievedDocumentCountText: \"Retrieved Document Count\",\n RetrievedDocumentSizeText: \"Retrieved Document Size\",\n OutputDocumentCountText: \"Output Document Count\",\n OutputDocumentSizeText: \"Output Document Size\",\n IndexUtilizationText: \"Index Utilization\",\n TotalQueryExecutionTimeText: \"Total Query Execution Time\",\n\n // QueryPreparationTimes Text\n QueryPreparationTimesText: \"Query Preparation Times\",\n QueryCompileTimeText: \"Query Compilation Time\",\n LogicalPlanBuildTimeText: \"Logical Plan Build Time\",\n PhysicalPlanBuildTimeText: \"Physical Plan Build Time\",\n QueryOptimizationTimeText: \"Query Optimization Time\",\n\n // QueryTimes Text\n QueryEngineTimesText: \"Query Engine Times\",\n IndexLookupTimeText: \"Index Lookup Time\",\n DocumentLoadTimeText: \"Document Load Time\",\n WriteOutputTimeText: \"Document Write Time\",\n\n // RuntimeExecutionTimes Text\n RuntimeExecutionTimesText: \"Runtime Execution Times\",\n TotalExecutionTimeText: \"Query Engine Execution Time\",\n SystemFunctionExecuteTimeText: \"System Function Execution Time\",\n UserDefinedFunctionExecutionTimeText: \"User-defined Function Execution Time\",\n\n // ClientSideQueryMetrics Text\n ClientSideQueryMetricsText: \"Client Side Metrics\",\n RetriesText: \"Retry Count\",\n RequestChargeText: \"Request Charge\",\n FetchExecutionRangesText: \"Partition Execution Timeline\",\n SchedulingMetricsText: \"Scheduling Metrics\",\n};\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.d.ts deleted file mode 100644 index 0afbe46..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TimeSpan } from "./timeSpan"; -/** - * @hidden - */ -export declare function parseDelimitedString(delimitedString: string): { - [key: string]: any; -}; -/** - * @hidden - */ -export declare function timeSpanFromMetrics(metrics: { - [key: string]: any; -}, key: string): TimeSpan; -/** - * @hidden - */ -export declare function isNumeric(input: unknown): boolean; -//# sourceMappingURL=queryMetricsUtils.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.d.ts.map deleted file mode 100644 index bd2554a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryMetricsUtils.d.ts","sourceRoot":"","sources":["../../../src/queryMetrics/queryMetricsUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,GAAG;IAC7D,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAsBA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAC/B,GAAG,EAAE,MAAM,GACV,QAAQ,CAMV;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEjD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.js deleted file mode 100644 index 61157fc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { TimeSpan } from "./timeSpan"; -/** - * @hidden - */ -export function parseDelimitedString(delimitedString) { - if (delimitedString == null) { - throw new Error("delimitedString is null or undefined"); - } - const metrics = {}; - const headerAttributes = delimitedString.split(";"); - for (const attribute of headerAttributes) { - const attributeKeyValue = attribute.split("="); - if (attributeKeyValue.length !== 2) { - throw new Error("recieved a malformed delimited string"); - } - const attributeKey = attributeKeyValue[0]; - const attributeValue = parseFloat(attributeKeyValue[1]); - metrics[attributeKey] = attributeValue; - } - return metrics; -} -/** - * @hidden - */ -export function timeSpanFromMetrics(metrics /* TODO: any */, key) { - if (key in metrics) { - return TimeSpan.fromMilliseconds(metrics[key]); - } - return TimeSpan.zero; -} -/** - * @hidden - */ -export function isNumeric(input) { - return !isNaN(parseFloat(input)) && isFinite(input); -} -//# sourceMappingURL=queryMetricsUtils.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.js.map deleted file mode 100644 index cc69e3d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryMetricsUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryMetricsUtils.js","sourceRoot":"","sources":["../../../src/queryMetrics/queryMetricsUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,eAAuB;IAG1D,IAAI,eAAe,IAAI,IAAI,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IAED,MAAM,OAAO,GAA2B,EAAE,CAAC;IAE3C,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpD,KAAK,MAAM,SAAS,IAAI,gBAAgB,EAAE;QACxC,MAAM,iBAAiB,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE/C,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;YAClC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;SAC1D;QAED,MAAM,YAAY,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,OAAO,CAAC,YAAY,CAAC,GAAG,cAAc,CAAC;KACxC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAA+B,CAAC,eAAe,EAC/C,GAAW;IAEX,IAAI,GAAG,IAAI,OAAO,EAAE;QAClB,OAAO,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;KAChD;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAe,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAe,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { TimeSpan } from \"./timeSpan\";\n\n/**\n * @hidden\n */\nexport function parseDelimitedString(delimitedString: string): {\n [key: string]: any;\n} {\n if (delimitedString == null) {\n throw new Error(\"delimitedString is null or undefined\");\n }\n\n const metrics: { [key: string]: any } = {};\n\n const headerAttributes = delimitedString.split(\";\");\n for (const attribute of headerAttributes) {\n const attributeKeyValue = attribute.split(\"=\");\n\n if (attributeKeyValue.length !== 2) {\n throw new Error(\"recieved a malformed delimited string\");\n }\n\n const attributeKey = attributeKeyValue[0];\n const attributeValue = parseFloat(attributeKeyValue[1]);\n\n metrics[attributeKey] = attributeValue;\n }\n\n return metrics;\n}\n\n/**\n * @hidden\n */\nexport function timeSpanFromMetrics(\n metrics: { [key: string]: any } /* TODO: any */,\n key: string\n): TimeSpan {\n if (key in metrics) {\n return TimeSpan.fromMilliseconds(metrics[key]);\n }\n\n return TimeSpan.zero;\n}\n\n/**\n * @hidden\n */\nexport function isNumeric(input: unknown): boolean {\n return !isNaN(parseFloat(input as string)) && isFinite(input as number);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.d.ts deleted file mode 100644 index 834990f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { TimeSpan } from "./timeSpan"; -export declare class QueryPreparationTimes { - readonly queryCompilationTime: TimeSpan; - readonly logicalPlanBuildTime: TimeSpan; - readonly physicalPlanBuildTime: TimeSpan; - readonly queryOptimizationTime: TimeSpan; - constructor(queryCompilationTime: TimeSpan, logicalPlanBuildTime: TimeSpan, physicalPlanBuildTime: TimeSpan, queryOptimizationTime: TimeSpan); - /** - * returns a new QueryPreparationTimes instance that is the addition of this and the arguments. - */ - add(...queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes; - /** - * Output the QueryPreparationTimes as a delimited string. - */ - toDelimitedString(): string; - static readonly zero: QueryPreparationTimes; - /** - * Returns a new instance of the QueryPreparationTimes class that is the - * aggregation of an array of QueryPreparationTimes. - */ - static createFromArray(queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes; - /** - * Returns a new instance of the QueryPreparationTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string): QueryPreparationTimes; -} -//# sourceMappingURL=queryPreparationTime.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.d.ts.map deleted file mode 100644 index 1ed3b00..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryPreparationTime.d.ts","sourceRoot":"","sources":["../../../src/queryMetrics/queryPreparationTime.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,qBAAqB;aAEd,oBAAoB,EAAE,QAAQ;aAC9B,oBAAoB,EAAE,QAAQ;aAC9B,qBAAqB,EAAE,QAAQ;aAC/B,qBAAqB,EAAE,QAAQ;gBAH/B,oBAAoB,EAAE,QAAQ,EAC9B,oBAAoB,EAAE,QAAQ,EAC9B,qBAAqB,EAAE,QAAQ,EAC/B,qBAAqB,EAAE,QAAQ;IAGjD;;OAEG;IACI,GAAG,CAAC,GAAG,0BAA0B,EAAE,qBAAqB,EAAE,GAAG,qBAAqB;IA6BzF;;OAEG;IACI,iBAAiB,IAAI,MAAM;IAiBlC,gBAAuB,IAAI,wBAKzB;IAEF;;;OAGG;WACW,eAAe,CAC3B,0BAA0B,EAAE,qBAAqB,EAAE,GAClD,qBAAqB;IAQxB;;OAEG;WACW,yBAAyB,CAAC,eAAe,EAAE,MAAM,GAAG,qBAAqB;CAUxF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.js deleted file mode 100644 index 6a3616d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import QueryMetricsConstants from "./queryMetricsConstants"; -import { parseDelimitedString, timeSpanFromMetrics } from "./queryMetricsUtils"; -import { TimeSpan } from "./timeSpan"; -export class QueryPreparationTimes { - constructor(queryCompilationTime, logicalPlanBuildTime, physicalPlanBuildTime, queryOptimizationTime) { - this.queryCompilationTime = queryCompilationTime; - this.logicalPlanBuildTime = logicalPlanBuildTime; - this.physicalPlanBuildTime = physicalPlanBuildTime; - this.queryOptimizationTime = queryOptimizationTime; - } - /** - * returns a new QueryPreparationTimes instance that is the addition of this and the arguments. - */ - add(...queryPreparationTimesArray) { - let queryCompilationTime = this.queryCompilationTime; - let logicalPlanBuildTime = this.logicalPlanBuildTime; - let physicalPlanBuildTime = this.physicalPlanBuildTime; - let queryOptimizationTime = this.queryOptimizationTime; - for (const queryPreparationTimes of queryPreparationTimesArray) { - if (queryPreparationTimes == null) { - throw new Error("queryPreparationTimesArray has null or undefined item(s)"); - } - queryCompilationTime = queryCompilationTime.add(queryPreparationTimes.queryCompilationTime); - logicalPlanBuildTime = logicalPlanBuildTime.add(queryPreparationTimes.logicalPlanBuildTime); - physicalPlanBuildTime = physicalPlanBuildTime.add(queryPreparationTimes.physicalPlanBuildTime); - queryOptimizationTime = queryOptimizationTime.add(queryPreparationTimes.queryOptimizationTime); - } - return new QueryPreparationTimes(queryCompilationTime, logicalPlanBuildTime, physicalPlanBuildTime, queryOptimizationTime); - } - /** - * Output the QueryPreparationTimes as a delimited string. - */ - toDelimitedString() { - return (`${QueryMetricsConstants.QueryCompileTimeInMs}=${this.queryCompilationTime.totalMilliseconds()};` + - `${QueryMetricsConstants.LogicalPlanBuildTimeInMs}=${this.logicalPlanBuildTime.totalMilliseconds()};` + - `${QueryMetricsConstants.PhysicalPlanBuildTimeInMs}=${this.physicalPlanBuildTime.totalMilliseconds()};` + - `${QueryMetricsConstants.QueryOptimizationTimeInMs}=${this.queryOptimizationTime.totalMilliseconds()}`); - } - /** - * Returns a new instance of the QueryPreparationTimes class that is the - * aggregation of an array of QueryPreparationTimes. - */ - static createFromArray(queryPreparationTimesArray) { - if (queryPreparationTimesArray == null) { - throw new Error("queryPreparationTimesArray is null or undefined item(s)"); - } - return QueryPreparationTimes.zero.add(...queryPreparationTimesArray); - } - /** - * Returns a new instance of the QueryPreparationTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString) { - const metrics = parseDelimitedString(delimitedString); - return new QueryPreparationTimes(timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryCompileTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.LogicalPlanBuildTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.PhysicalPlanBuildTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryOptimizationTimeInMs)); - } -} -QueryPreparationTimes.zero = new QueryPreparationTimes(TimeSpan.zero, TimeSpan.zero, TimeSpan.zero, TimeSpan.zero); -//# sourceMappingURL=queryPreparationTime.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.js.map deleted file mode 100644 index 676c2f1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/queryPreparationTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queryPreparationTime.js","sourceRoot":"","sources":["../../../src/queryMetrics/queryPreparationTime.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,OAAO,qBAAqB;IAChC,YACkB,oBAA8B,EAC9B,oBAA8B,EAC9B,qBAA+B,EAC/B,qBAA+B;QAH/B,yBAAoB,GAApB,oBAAoB,CAAU;QAC9B,yBAAoB,GAApB,oBAAoB,CAAU;QAC9B,0BAAqB,GAArB,qBAAqB,CAAU;QAC/B,0BAAqB,GAArB,qBAAqB,CAAU;IAC9C,CAAC;IAEJ;;OAEG;IACI,GAAG,CAAC,GAAG,0BAAmD;QAC/D,IAAI,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QACrD,IAAI,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;QACrD,IAAI,qBAAqB,G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OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,0BAA0B,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,yBAAyB,CAAC,eAAuB;QAC7D,MAAM,OAAO,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC;QAEtD,OAAO,IAAI,qBAAqB,CAC9B,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,EACxE,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,EAC5E,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,EAC7E,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,CAC9E,CAAC;IACJ,CAAC;;AAjCsB,0BAAI,GAAG,IAAI,qBAAqB,CACrD,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,IAAI,CACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport QueryMetricsConstants from \"./queryMetricsConstants\";\nimport { parseDelimitedString, timeSpanFromMetrics } from \"./queryMetricsUtils\";\nimport { TimeSpan } from \"./timeSpan\";\n\nexport class QueryPreparationTimes {\n constructor(\n public readonly queryCompilationTime: TimeSpan,\n public readonly logicalPlanBuildTime: TimeSpan,\n public readonly physicalPlanBuildTime: TimeSpan,\n public readonly queryOptimizationTime: TimeSpan\n ) {}\n\n /**\n * returns a new QueryPreparationTimes instance that is the addition of this and the arguments.\n */\n public add(...queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes {\n let queryCompilationTime = this.queryCompilationTime;\n let logicalPlanBuildTime = this.logicalPlanBuildTime;\n let physicalPlanBuildTime = this.physicalPlanBuildTime;\n let queryOptimizationTime = this.queryOptimizationTime;\n\n for (const queryPreparationTimes of queryPreparationTimesArray) {\n if (queryPreparationTimes == null) {\n throw new Error(\"queryPreparationTimesArray has null or undefined item(s)\");\n }\n\n queryCompilationTime = queryCompilationTime.add(queryPreparationTimes.queryCompilationTime);\n logicalPlanBuildTime = logicalPlanBuildTime.add(queryPreparationTimes.logicalPlanBuildTime);\n physicalPlanBuildTime = physicalPlanBuildTime.add(\n queryPreparationTimes.physicalPlanBuildTime\n );\n queryOptimizationTime = queryOptimizationTime.add(\n queryPreparationTimes.queryOptimizationTime\n );\n }\n\n return new QueryPreparationTimes(\n queryCompilationTime,\n logicalPlanBuildTime,\n physicalPlanBuildTime,\n queryOptimizationTime\n );\n }\n\n /**\n * Output the QueryPreparationTimes as a delimited string.\n */\n public toDelimitedString(): string {\n return (\n `${\n QueryMetricsConstants.QueryCompileTimeInMs\n }=${this.queryCompilationTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.LogicalPlanBuildTimeInMs\n }=${this.logicalPlanBuildTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.PhysicalPlanBuildTimeInMs\n }=${this.physicalPlanBuildTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.QueryOptimizationTimeInMs\n }=${this.queryOptimizationTime.totalMilliseconds()}`\n );\n }\n\n public static readonly zero = new QueryPreparationTimes(\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero\n );\n\n /**\n * Returns a new instance of the QueryPreparationTimes class that is the\n * aggregation of an array of QueryPreparationTimes.\n */\n public static createFromArray(\n queryPreparationTimesArray: QueryPreparationTimes[]\n ): QueryPreparationTimes {\n if (queryPreparationTimesArray == null) {\n throw new Error(\"queryPreparationTimesArray is null or undefined item(s)\");\n }\n\n return QueryPreparationTimes.zero.add(...queryPreparationTimesArray);\n }\n\n /**\n * Returns a new instance of the QueryPreparationTimes class this is deserialized from a delimited string.\n */\n public static createFromDelimitedString(delimitedString: string): QueryPreparationTimes {\n const metrics = parseDelimitedString(delimitedString);\n\n return new QueryPreparationTimes(\n timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryCompileTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.LogicalPlanBuildTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.PhysicalPlanBuildTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryOptimizationTimeInMs)\n );\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.d.ts deleted file mode 100644 index a864ac7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { TimeSpan } from "./timeSpan"; -export declare class RuntimeExecutionTimes { - readonly queryEngineExecutionTime: TimeSpan; - readonly systemFunctionExecutionTime: TimeSpan; - readonly userDefinedFunctionExecutionTime: TimeSpan; - constructor(queryEngineExecutionTime: TimeSpan, systemFunctionExecutionTime: TimeSpan, userDefinedFunctionExecutionTime: TimeSpan); - /** - * returns a new RuntimeExecutionTimes instance that is the addition of this and the arguments. - */ - add(...runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes; - /** - * Output the RuntimeExecutionTimes as a delimited string. - */ - toDelimitedString(): string; - static readonly zero: RuntimeExecutionTimes; - /** - * Returns a new instance of the RuntimeExecutionTimes class that is - * the aggregation of an array of RuntimeExecutionTimes. - */ - static createFromArray(runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes; - /** - * Returns a new instance of the RuntimeExecutionTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string): RuntimeExecutionTimes; -} -//# sourceMappingURL=runtimeExecutionTimes.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.d.ts.map deleted file mode 100644 index a06f62f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runtimeExecutionTimes.d.ts","sourceRoot":"","sources":["../../../src/queryMetrics/runtimeExecutionTimes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,qBAAqB;aAEd,wBAAwB,EAAE,QAAQ;aAClC,2BAA2B,EAAE,QAAQ;aACrC,gCAAgC,EAAE,QAAQ;gBAF1C,wBAAwB,EAAE,QAAQ,EAClC,2BAA2B,EAAE,QAAQ,EACrC,gCAAgC,EAAE,QAAQ;IAG5D;;OAEG;IACI,GAAG,CAAC,GAAG,0BAA0B,EAAE,qBAAqB,EAAE,GAAG,qBAAqB;IA4BzF;;OAEG;IACI,iBAAiB,IAAI,MAAM;IAWlC,gBAAuB,IAAI,wBAIzB;IAEF;;;OAGG;WACW,eAAe,CAC3B,0BAA0B,EAAE,qBAAqB,EAAE,GAClD,qBAAqB;IAQxB;;OAEG;WACW,yBAAyB,CAAC,eAAe,EAAE,MAAM,GAAG,qBAAqB;CAyBxF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.js deleted file mode 100644 index 3f2d9c6..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import QueryMetricsConstants from "./queryMetricsConstants"; -import { parseDelimitedString, timeSpanFromMetrics } from "./queryMetricsUtils"; -import { TimeSpan } from "./timeSpan"; -export class RuntimeExecutionTimes { - constructor(queryEngineExecutionTime, systemFunctionExecutionTime, userDefinedFunctionExecutionTime) { - this.queryEngineExecutionTime = queryEngineExecutionTime; - this.systemFunctionExecutionTime = systemFunctionExecutionTime; - this.userDefinedFunctionExecutionTime = userDefinedFunctionExecutionTime; - } - /** - * returns a new RuntimeExecutionTimes instance that is the addition of this and the arguments. - */ - add(...runtimeExecutionTimesArray) { - let queryEngineExecutionTime = this.queryEngineExecutionTime; - let systemFunctionExecutionTime = this.systemFunctionExecutionTime; - let userDefinedFunctionExecutionTime = this.userDefinedFunctionExecutionTime; - for (const runtimeExecutionTimes of runtimeExecutionTimesArray) { - if (runtimeExecutionTimes == null) { - throw new Error("runtimeExecutionTimes has null or undefined item(s)"); - } - queryEngineExecutionTime = queryEngineExecutionTime.add(runtimeExecutionTimes.queryEngineExecutionTime); - systemFunctionExecutionTime = systemFunctionExecutionTime.add(runtimeExecutionTimes.systemFunctionExecutionTime); - userDefinedFunctionExecutionTime = userDefinedFunctionExecutionTime.add(runtimeExecutionTimes.userDefinedFunctionExecutionTime); - } - return new RuntimeExecutionTimes(queryEngineExecutionTime, systemFunctionExecutionTime, userDefinedFunctionExecutionTime); - } - /** - * Output the RuntimeExecutionTimes as a delimited string. - */ - toDelimitedString() { - return (`${QueryMetricsConstants.SystemFunctionExecuteTimeInMs}=${this.systemFunctionExecutionTime.totalMilliseconds()};` + - `${QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs}=${this.userDefinedFunctionExecutionTime.totalMilliseconds()}`); - } - /** - * Returns a new instance of the RuntimeExecutionTimes class that is - * the aggregation of an array of RuntimeExecutionTimes. - */ - static createFromArray(runtimeExecutionTimesArray) { - if (runtimeExecutionTimesArray == null) { - throw new Error("runtimeExecutionTimesArray is null or undefined item(s)"); - } - return RuntimeExecutionTimes.zero.add(...runtimeExecutionTimesArray); - } - /** - * Returns a new instance of the RuntimeExecutionTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString) { - const metrics = parseDelimitedString(delimitedString); - const vmExecutionTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs); - const indexLookupTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs); - const documentLoadTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentLoadTimeInMs); - const documentWriteTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentWriteTimeInMs); - let queryEngineExecutionTime = TimeSpan.zero; - queryEngineExecutionTime = queryEngineExecutionTime.add(vmExecutionTime); - queryEngineExecutionTime = queryEngineExecutionTime.subtract(indexLookupTime); - queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentLoadTime); - queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentWriteTime); - return new RuntimeExecutionTimes(queryEngineExecutionTime, timeSpanFromMetrics(metrics, QueryMetricsConstants.SystemFunctionExecuteTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs)); - } -} -RuntimeExecutionTimes.zero = new RuntimeExecutionTimes(TimeSpan.zero, TimeSpan.zero, TimeSpan.zero); -//# sourceMappingURL=runtimeExecutionTimes.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.js.map deleted file mode 100644 index 96c7b72..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/runtimeExecutionTimes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runtimeExecutionTimes.js","sourceRoot":"","sources":["../../../src/queryMetrics/runtimeExecutionTimes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,QAAQ,E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AAI,CACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport QueryMetricsConstants from \"./queryMetricsConstants\";\nimport { parseDelimitedString, timeSpanFromMetrics } from \"./queryMetricsUtils\";\nimport { TimeSpan } from \"./timeSpan\";\n\nexport class RuntimeExecutionTimes {\n constructor(\n public readonly queryEngineExecutionTime: TimeSpan,\n public readonly systemFunctionExecutionTime: TimeSpan,\n public readonly userDefinedFunctionExecutionTime: TimeSpan\n ) {}\n\n /**\n * returns a new RuntimeExecutionTimes instance that is the addition of this and the arguments.\n */\n public add(...runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes {\n let queryEngineExecutionTime = this.queryEngineExecutionTime;\n let systemFunctionExecutionTime = this.systemFunctionExecutionTime;\n let userDefinedFunctionExecutionTime = this.userDefinedFunctionExecutionTime;\n\n for (const runtimeExecutionTimes of runtimeExecutionTimesArray) {\n if (runtimeExecutionTimes == null) {\n throw new Error(\"runtimeExecutionTimes has null or undefined item(s)\");\n }\n\n queryEngineExecutionTime = queryEngineExecutionTime.add(\n runtimeExecutionTimes.queryEngineExecutionTime\n );\n systemFunctionExecutionTime = systemFunctionExecutionTime.add(\n runtimeExecutionTimes.systemFunctionExecutionTime\n );\n userDefinedFunctionExecutionTime = userDefinedFunctionExecutionTime.add(\n runtimeExecutionTimes.userDefinedFunctionExecutionTime\n );\n }\n\n return new RuntimeExecutionTimes(\n queryEngineExecutionTime,\n systemFunctionExecutionTime,\n userDefinedFunctionExecutionTime\n );\n }\n\n /**\n * Output the RuntimeExecutionTimes as a delimited string.\n */\n public toDelimitedString(): string {\n return (\n `${\n QueryMetricsConstants.SystemFunctionExecuteTimeInMs\n }=${this.systemFunctionExecutionTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs\n }=${this.userDefinedFunctionExecutionTime.totalMilliseconds()}`\n );\n }\n\n public static readonly zero = new RuntimeExecutionTimes(\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero\n );\n\n /**\n * Returns a new instance of the RuntimeExecutionTimes class that is\n * the aggregation of an array of RuntimeExecutionTimes.\n */\n public static createFromArray(\n runtimeExecutionTimesArray: RuntimeExecutionTimes[]\n ): RuntimeExecutionTimes {\n if (runtimeExecutionTimesArray == null) {\n throw new Error(\"runtimeExecutionTimesArray is null or undefined item(s)\");\n }\n\n return RuntimeExecutionTimes.zero.add(...runtimeExecutionTimesArray);\n }\n\n /**\n * Returns a new instance of the RuntimeExecutionTimes class this is deserialized from a delimited string.\n */\n public static createFromDelimitedString(delimitedString: string): RuntimeExecutionTimes {\n const metrics = parseDelimitedString(delimitedString);\n\n const vmExecutionTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs);\n const indexLookupTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs);\n const documentLoadTime = timeSpanFromMetrics(\n metrics,\n QueryMetricsConstants.DocumentLoadTimeInMs\n );\n const documentWriteTime = timeSpanFromMetrics(\n metrics,\n QueryMetricsConstants.DocumentWriteTimeInMs\n );\n\n let queryEngineExecutionTime = TimeSpan.zero;\n queryEngineExecutionTime = queryEngineExecutionTime.add(vmExecutionTime);\n queryEngineExecutionTime = queryEngineExecutionTime.subtract(indexLookupTime);\n queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentLoadTime);\n queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentWriteTime);\n return new RuntimeExecutionTimes(\n queryEngineExecutionTime,\n timeSpanFromMetrics(metrics, QueryMetricsConstants.SystemFunctionExecuteTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs)\n );\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.d.ts deleted file mode 100644 index 22da0c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Represents a time interval. - * - * @param days - Number of days. - * @param hours - Number of hours. - * @param minutes - Number of minutes. - * @param seconds - Number of seconds. - * @param milliseconds - Number of milliseconds. - * @hidden - */ -export declare class TimeSpan { - protected _ticks: number; - constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number); - /** - * Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance. - * @param ts - The time interval to add. - */ - add(ts: TimeSpan): TimeSpan; - /** - * Returns a new TimeSpan object whose value is the difference of the specified TimeSpan object and this instance. - * @param ts - The time interval to subtract. - */ - subtract(ts: TimeSpan): TimeSpan; - /** - * Compares this instance to a specified object and returns an integer that indicates whether this - * instance is shorter than, equal to, or longer than the specified object. - * @param value - The time interval to add. - */ - compareTo(value: TimeSpan): 1 | -1 | 0; - /** - * Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object. - */ - duration(): TimeSpan; - /** - * Returns a value indicating whether this instance is equal to a specified object. - * @param value - The time interval to check for equality. - */ - equals(value: TimeSpan): boolean; - /** - * Returns a new TimeSpan object whose value is the negated value of this instance. - * @param value - The time interval to check for equality. - */ - negate(): TimeSpan; - days(): number; - hours(): number; - milliseconds(): number; - seconds(): number; - ticks(): number; - totalDays(): number; - totalHours(): number; - totalMilliseconds(): number; - totalMinutes(): number; - totalSeconds(): number; - static fromTicks(value: number): TimeSpan; - static readonly zero: TimeSpan; - static readonly maxValue: TimeSpan; - static readonly minValue: TimeSpan; - static isTimeSpan(timespan: TimeSpan): number; - static additionDoesOverflow(a: number, b: number): boolean; - static subtractionDoesUnderflow(a: number, b: number): boolean; - static compare(t1: TimeSpan, t2: TimeSpan): 1 | 0 | -1; - static interval(value: number, scale: number): TimeSpan; - static fromMilliseconds(value: number): TimeSpan; - static fromSeconds(value: number): TimeSpan; - static fromMinutes(value: number): TimeSpan; - static fromHours(value: number): TimeSpan; - static fromDays(value: number): TimeSpan; -} -//# sourceMappingURL=timeSpan.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.d.ts.map deleted file mode 100644 index d7ca6e9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeSpan.d.ts","sourceRoot":"","sources":["../../../src/queryMetrics/timeSpan.ts"],"names":[],"mappings":"AA8CA;;;;;;;;;GASG;AACH,qBAAa,QAAQ;IACnB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBACb,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IA+B/F;;;OAGG;IACI,GAAG,CAAC,EAAE,EAAE,QAAQ,GAAG,QAAQ;IASlC;;;OAGG;IACI,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,QAAQ;IASvC;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;IAY7C;;OAEG;IACI,QAAQ,IAAI,QAAQ;IAI3B;;;OAGG;IACI,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAQvC;;;OAGG;IACI,MAAM,IAAI,QAAQ;IAIlB,IAAI,IAAI,MAAM;IAId,KAAK,IAAI,MAAM;IAIf,YAAY,IAAI,MAAM;IAItB,OAAO,IAAI,MAAM;IAIjB,KAAK,IAAI,MAAM;IAIf,SAAS,IAAI,MAAM;IAGnB,UAAU,IAAI,MAAM;IAIpB,iBAAiB,IAAI,MAAM;IAI3B,YAAY,IAAI,MAAM;IAItB,YAAY,IAAI,MAAM;WAIf,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ;IAMhD,gBAAuB,IAAI,WAA+B;IAC1D,gBAAuB,QAAQ,WAA+C;IAC9E,gBAAuB,QAAQ,WAA+C;WAEhE,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;WAItC,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO;WAKnD,wBAAwB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO;WAKvD,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;WAU/C,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ;WAahD,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ;WAIzC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ;WAIpC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ;WAIpC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ;WAIlC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ;CAGhD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.js deleted file mode 100644 index c702d7d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.js +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// Ported this implementation to javascript: -// https://referencesource.microsoft.com/#mscorlib/system/timespan.cs,83e476c1ae112117 -/** @hidden */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const ticksPerMillisecond = 10000; -/** @hidden */ -const millisecondsPerTick = 1.0 / ticksPerMillisecond; -/** @hidden */ -const ticksPerSecond = ticksPerMillisecond * 1000; // 10,000,000 -/** @hidden */ -const secondsPerTick = 1.0 / ticksPerSecond; // 0.0001 -/** @hidden */ -const ticksPerMinute = ticksPerSecond * 60; // 600,000,000 -/** @hidden */ -const minutesPerTick = 1.0 / ticksPerMinute; // 1.6666666666667e-9 -/** @hidden */ -const ticksPerHour = ticksPerMinute * 60; // 36,000,000,000 -/** @hidden */ -const hoursPerTick = 1.0 / ticksPerHour; // 2.77777777777777778e-11 -/** @hidden */ -const ticksPerDay = ticksPerHour * 24; // 864,000,000,000 -/** @hidden */ -const daysPerTick = 1.0 / ticksPerDay; // 1.1574074074074074074e-12 -/** @hidden */ -const millisPerSecond = 1000; -/** @hidden */ -const millisPerMinute = millisPerSecond * 60; // 60,000 -/** @hidden */ -const millisPerHour = millisPerMinute * 60; // 3,600,000 -/** @hidden */ -const millisPerDay = millisPerHour * 24; // 86,400,000 -/** @hidden */ -const maxMilliSeconds = Number.MAX_SAFE_INTEGER / ticksPerMillisecond; -/** @hidden */ -const minMilliSeconds = Number.MIN_SAFE_INTEGER / ticksPerMillisecond; -/** - * Represents a time interval. - * - * @param days - Number of days. - * @param hours - Number of hours. - * @param minutes - Number of minutes. - * @param seconds - Number of seconds. - * @param milliseconds - Number of milliseconds. - * @hidden - */ -export class TimeSpan { - constructor(days, hours, minutes, seconds, milliseconds) { - // Constructor - if (!Number.isInteger(days)) { - throw new Error("days is not an integer"); - } - if (!Number.isInteger(hours)) { - throw new Error("hours is not an integer"); - } - if (!Number.isInteger(minutes)) { - throw new Error("minutes is not an integer"); - } - if (!Number.isInteger(seconds)) { - throw new Error("seconds is not an integer"); - } - if (!Number.isInteger(milliseconds)) { - throw new Error("milliseconds is not an integer"); - } - const totalMilliSeconds = (days * 3600 * 24 + hours * 3600 + minutes * 60 + seconds) * 1000 + milliseconds; - if (totalMilliSeconds > maxMilliSeconds || totalMilliSeconds < minMilliSeconds) { - throw new Error("Total number of milliseconds was either too large or too small"); - } - this._ticks = totalMilliSeconds * ticksPerMillisecond; - } - /** - * Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance. - * @param ts - The time interval to add. - */ - add(ts) { - if (TimeSpan.additionDoesOverflow(this._ticks, ts._ticks)) { - throw new Error("Adding the two timestamps causes an overflow."); - } - const results = this._ticks + ts._ticks; - return TimeSpan.fromTicks(results); - } - /** - * Returns a new TimeSpan object whose value is the difference of the specified TimeSpan object and this instance. - * @param ts - The time interval to subtract. - */ - subtract(ts) { - if (TimeSpan.subtractionDoesUnderflow(this._ticks, ts._ticks)) { - throw new Error("Subtracting the two timestamps causes an underflow."); - } - const results = this._ticks - ts._ticks; - return TimeSpan.fromTicks(results); - } - /** - * Compares this instance to a specified object and returns an integer that indicates whether this - * instance is shorter than, equal to, or longer than the specified object. - * @param value - The time interval to add. - */ - compareTo(value) { - if (value == null) { - return 1; - } - if (!TimeSpan.isTimeSpan(value)) { - throw new Error("Argument must be a TimeSpan object"); - } - return TimeSpan.compare(this, value); - } - /** - * Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object. - */ - duration() { - return TimeSpan.fromTicks(this._ticks >= 0 ? this._ticks : -this._ticks); - } - /** - * Returns a value indicating whether this instance is equal to a specified object. - * @param value - The time interval to check for equality. - */ - equals(value) { - if (TimeSpan.isTimeSpan(value)) { - return this._ticks === value._ticks; - } - return false; - } - /** - * Returns a new TimeSpan object whose value is the negated value of this instance. - * @param value - The time interval to check for equality. - */ - negate() { - return TimeSpan.fromTicks(-this._ticks); - } - days() { - return Math.floor(this._ticks / ticksPerDay); - } - hours() { - return Math.floor(this._ticks / ticksPerHour); - } - milliseconds() { - return Math.floor(this._ticks / ticksPerMillisecond); - } - seconds() { - return Math.floor(this._ticks / ticksPerSecond); - } - ticks() { - return this._ticks; - } - totalDays() { - return this._ticks * daysPerTick; - } - totalHours() { - return this._ticks * hoursPerTick; - } - totalMilliseconds() { - return this._ticks * millisecondsPerTick; - } - totalMinutes() { - return this._ticks * minutesPerTick; - } - totalSeconds() { - return this._ticks * secondsPerTick; - } - static fromTicks(value) { - const timeSpan = new TimeSpan(0, 0, 0, 0, 0); - timeSpan._ticks = value; - return timeSpan; - } - static isTimeSpan(timespan) { - return timespan._ticks; - } - static additionDoesOverflow(a, b) { - const c = a + b; - return a !== c - b || b !== c - a; - } - static subtractionDoesUnderflow(a, b) { - const c = a - b; - return a !== c + b || b !== a - c; - } - static compare(t1, t2) { - if (t1._ticks > t2._ticks) { - return 1; - } - if (t1._ticks < t2._ticks) { - return -1; - } - return 0; - } - static interval(value, scale) { - if (isNaN(value)) { - throw new Error("value must be a number"); - } - const milliseconds = value * scale; - if (milliseconds > maxMilliSeconds || milliseconds < minMilliSeconds) { - throw new Error("timespan too long"); - } - return TimeSpan.fromTicks(Math.floor(milliseconds * ticksPerMillisecond)); - } - static fromMilliseconds(value) { - return TimeSpan.interval(value, 1); - } - static fromSeconds(value) { - return TimeSpan.interval(value, millisPerSecond); - } - static fromMinutes(value) { - return TimeSpan.interval(value, millisPerMinute); - } - static fromHours(value) { - return TimeSpan.interval(value, millisPerHour); - } - static fromDays(value) { - return TimeSpan.interval(value, millisPerDay); - } -} -TimeSpan.zero = new TimeSpan(0, 0, 0, 0, 0); -TimeSpan.maxValue = TimeSpan.fromTicks(Number.MAX_SAFE_INTEGER); -TimeSpan.minValue = TimeSpan.fromTicks(Number.MIN_SAFE_INTEGER); -//# sourceMappingURL=timeSpan.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.js.map deleted file mode 100644 index c188230..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/queryMetrics/timeSpan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeSpan.js","sourceRoot":"","sources":["../../../src/queryMetrics/timeSpan.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC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AM,CAAC,WAAW,CAAC,KAAa;QACrC,OAAO,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACnD,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa;QACnC,OAAO,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACjD,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,KAAa;QAClC,OAAO,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAChD,CAAC;;AA3DsB,aAAI,GAAG,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACnC,iBAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACvD,iBAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// Ported this implementation to javascript:\n// https://referencesource.microsoft.com/#mscorlib/system/timespan.cs,83e476c1ae112117\n/** @hidden */\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst ticksPerMillisecond = 10000;\n/** @hidden */\nconst millisecondsPerTick = 1.0 / ticksPerMillisecond;\n\n/** @hidden */\nconst ticksPerSecond = ticksPerMillisecond * 1000; // 10,000,000\n/** @hidden */\nconst secondsPerTick = 1.0 / ticksPerSecond; // 0.0001\n\n/** @hidden */\nconst ticksPerMinute = ticksPerSecond * 60; // 600,000,000\n/** @hidden */\nconst minutesPerTick = 1.0 / ticksPerMinute; // 1.6666666666667e-9\n\n/** @hidden */\nconst ticksPerHour = ticksPerMinute * 60; // 36,000,000,000\n/** @hidden */\nconst hoursPerTick = 1.0 / ticksPerHour; // 2.77777777777777778e-11\n\n/** @hidden */\nconst ticksPerDay = ticksPerHour * 24; // 864,000,000,000\n/** @hidden */\nconst daysPerTick = 1.0 / ticksPerDay; // 1.1574074074074074074e-12\n\n/** @hidden */\nconst millisPerSecond = 1000;\n/** @hidden */\nconst millisPerMinute = millisPerSecond * 60; // 60,000\n/** @hidden */\nconst millisPerHour = millisPerMinute * 60; // 3,600,000\n/** @hidden */\nconst millisPerDay = millisPerHour * 24; // 86,400,000\n\n/** @hidden */\nconst maxMilliSeconds = Number.MAX_SAFE_INTEGER / ticksPerMillisecond;\n/** @hidden */\nconst minMilliSeconds = Number.MIN_SAFE_INTEGER / ticksPerMillisecond;\n\n/**\n * Represents a time interval.\n *\n * @param days - Number of days.\n * @param hours - Number of hours.\n * @param minutes - Number of minutes.\n * @param seconds - Number of seconds.\n * @param milliseconds - Number of milliseconds.\n * @hidden\n */\nexport class TimeSpan {\n protected _ticks: number;\n constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number) {\n // Constructor\n if (!Number.isInteger(days)) {\n throw new Error(\"days is not an integer\");\n }\n\n if (!Number.isInteger(hours)) {\n throw new Error(\"hours is not an integer\");\n }\n\n if (!Number.isInteger(minutes)) {\n throw new Error(\"minutes is not an integer\");\n }\n\n if (!Number.isInteger(seconds)) {\n throw new Error(\"seconds is not an integer\");\n }\n\n if (!Number.isInteger(milliseconds)) {\n throw new Error(\"milliseconds is not an integer\");\n }\n\n const totalMilliSeconds =\n (days * 3600 * 24 + hours * 3600 + minutes * 60 + seconds) * 1000 + milliseconds;\n if (totalMilliSeconds > maxMilliSeconds || totalMilliSeconds < minMilliSeconds) {\n throw new Error(\"Total number of milliseconds was either too large or too small\");\n }\n\n this._ticks = totalMilliSeconds * ticksPerMillisecond;\n }\n\n /**\n * Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.\n * @param ts - The time interval to add.\n */\n public add(ts: TimeSpan): TimeSpan {\n if (TimeSpan.additionDoesOverflow(this._ticks, ts._ticks)) {\n throw new Error(\"Adding the two timestamps causes an overflow.\");\n }\n\n const results = this._ticks + ts._ticks;\n return TimeSpan.fromTicks(results);\n }\n\n /**\n * Returns a new TimeSpan object whose value is the difference of the specified TimeSpan object and this instance.\n * @param ts - The time interval to subtract.\n */\n public subtract(ts: TimeSpan): TimeSpan {\n if (TimeSpan.subtractionDoesUnderflow(this._ticks, ts._ticks)) {\n throw new Error(\"Subtracting the two timestamps causes an underflow.\");\n }\n\n const results = this._ticks - ts._ticks;\n return TimeSpan.fromTicks(results);\n }\n\n /**\n * Compares this instance to a specified object and returns an integer that indicates whether this\n * instance is shorter than, equal to, or longer than the specified object.\n * @param value - The time interval to add.\n */\n public compareTo(value: TimeSpan): 1 | -1 | 0 {\n if (value == null) {\n return 1;\n }\n\n if (!TimeSpan.isTimeSpan(value)) {\n throw new Error(\"Argument must be a TimeSpan object\");\n }\n\n return TimeSpan.compare(this, value);\n }\n\n /**\n * Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.\n */\n public duration(): TimeSpan {\n return TimeSpan.fromTicks(this._ticks >= 0 ? this._ticks : -this._ticks);\n }\n\n /**\n * Returns a value indicating whether this instance is equal to a specified object.\n * @param value - The time interval to check for equality.\n */\n public equals(value: TimeSpan): boolean {\n if (TimeSpan.isTimeSpan(value)) {\n return this._ticks === value._ticks;\n }\n\n return false;\n }\n\n /**\n * Returns a new TimeSpan object whose value is the negated value of this instance.\n * @param value - The time interval to check for equality.\n */\n public negate(): TimeSpan {\n return TimeSpan.fromTicks(-this._ticks);\n }\n\n public days(): number {\n return Math.floor(this._ticks / ticksPerDay);\n }\n\n public hours(): number {\n return Math.floor(this._ticks / ticksPerHour);\n }\n\n public milliseconds(): number {\n return Math.floor(this._ticks / ticksPerMillisecond);\n }\n\n public seconds(): number {\n return Math.floor(this._ticks / ticksPerSecond);\n }\n\n public ticks(): number {\n return this._ticks;\n }\n\n public totalDays(): number {\n return this._ticks * daysPerTick;\n }\n public totalHours(): number {\n return this._ticks * hoursPerTick;\n }\n\n public totalMilliseconds(): number {\n return this._ticks * millisecondsPerTick;\n }\n\n public totalMinutes(): number {\n return this._ticks * minutesPerTick;\n }\n\n public totalSeconds(): number {\n return this._ticks * secondsPerTick;\n }\n\n public static fromTicks(value: number): TimeSpan {\n const timeSpan = new TimeSpan(0, 0, 0, 0, 0);\n timeSpan._ticks = value;\n return timeSpan;\n }\n\n public static readonly zero = new TimeSpan(0, 0, 0, 0, 0);\n public static readonly maxValue = TimeSpan.fromTicks(Number.MAX_SAFE_INTEGER);\n public static readonly minValue = TimeSpan.fromTicks(Number.MIN_SAFE_INTEGER);\n\n public static isTimeSpan(timespan: TimeSpan): number {\n return timespan._ticks;\n }\n\n public static additionDoesOverflow(a: number, b: number): boolean {\n const c = a + b;\n return a !== c - b || b !== c - a;\n }\n\n public static subtractionDoesUnderflow(a: number, b: number): boolean {\n const c = a - b;\n return a !== c + b || b !== a - c;\n }\n\n public static compare(t1: TimeSpan, t2: TimeSpan): 1 | 0 | -1 {\n if (t1._ticks > t2._ticks) {\n return 1;\n }\n if (t1._ticks < t2._ticks) {\n return -1;\n }\n return 0;\n }\n\n public static interval(value: number, scale: number): TimeSpan {\n if (isNaN(value)) {\n throw new Error(\"value must be a number\");\n }\n\n const milliseconds = value * scale;\n if (milliseconds > maxMilliSeconds || milliseconds < minMilliSeconds) {\n throw new Error(\"timespan too long\");\n }\n\n return TimeSpan.fromTicks(Math.floor(milliseconds * ticksPerMillisecond));\n }\n\n public static fromMilliseconds(value: number): TimeSpan {\n return TimeSpan.interval(value, 1);\n }\n\n public static fromSeconds(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerSecond);\n }\n\n public static fromMinutes(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerMinute);\n }\n\n public static fromHours(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerHour);\n }\n\n public static fromDays(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerDay);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.d.ts deleted file mode 100644 index d8fe539..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { CosmosHeaders } from "../index"; -export interface ErrorBody { - code: string; - message: string; - /** - * @hidden - */ - additionalErrorInfo?: PartitionedQueryExecutionInfo; -} -/** - * @hidden - */ -export interface PartitionedQueryExecutionInfo { - partitionedQueryExecutionInfoVersion: number; - queryInfo: QueryInfo; - queryRanges: QueryRange[]; -} -/** - * @hidden - */ -export interface QueryRange { - min: string; - max: string; - isMinInclusive: boolean; - isMaxInclusive: boolean; -} -/** - * @hidden - */ -export interface QueryInfo { - top?: any; - orderBy?: any[]; - orderByExpressions?: any[]; - offset?: number; - limit?: number; - aggregates?: AggregateType[]; - groupByExpressions?: GroupByExpressions; - groupByAliasToAggregateType: GroupByAliasToAggregateType; - rewrittenQuery?: any; - distinctType: string; - hasSelectValue: boolean; -} -export declare type GroupByExpressions = string[]; -export declare type AggregateType = "Average" | "Count" | "Max" | "Min" | "Sum"; -export interface GroupByAliasToAggregateType { - [key: string]: AggregateType; -} -export declare class ErrorResponse extends Error { - code?: number; - substatus?: number; - body?: ErrorBody; - headers?: CosmosHeaders; - activityId?: string; - retryAfterInMs?: number; - retryAfterInMilliseconds?: number; - [key: string]: any; -} -//# sourceMappingURL=ErrorResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.d.ts.map deleted file mode 100644 index 6505721..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ErrorResponse.d.ts","sourceRoot":"","sources":["../../../src/request/ErrorResponse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAA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ACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.js deleted file mode 100644 index 3ebcf0c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.js +++ /dev/null @@ -1,3 +0,0 @@ -export class ErrorResponse extends Error { -} -//# sourceMappingURL=ErrorResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.js.map deleted file mode 100644 index 4e5e86d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ErrorResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../../../src/request/ErrorResponse.ts"],"names":[],"mappings":"AAyDA,MAAM,OAAO,aAAc,SAAQ,KAAK;CASvC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../index\";\n\nexport interface ErrorBody {\n code: string;\n message: string;\n /**\n * @hidden\n */\n additionalErrorInfo?: PartitionedQueryExecutionInfo;\n}\n\n/**\n * @hidden\n */\nexport interface PartitionedQueryExecutionInfo {\n partitionedQueryExecutionInfoVersion: number;\n queryInfo: QueryInfo;\n queryRanges: QueryRange[];\n}\n\n/**\n * @hidden\n */\nexport interface QueryRange {\n min: string;\n max: string;\n isMinInclusive: boolean;\n isMaxInclusive: boolean;\n}\n\n/**\n * @hidden\n */\nexport interface QueryInfo {\n top?: any;\n orderBy?: any[];\n orderByExpressions?: any[];\n offset?: number;\n limit?: number;\n aggregates?: AggregateType[];\n groupByExpressions?: GroupByExpressions;\n groupByAliasToAggregateType: GroupByAliasToAggregateType;\n rewrittenQuery?: any;\n distinctType: string;\n hasSelectValue: boolean;\n}\n\nexport type GroupByExpressions = string[];\n\nexport type AggregateType = \"Average\" | \"Count\" | \"Max\" | \"Min\" | \"Sum\";\n\nexport interface GroupByAliasToAggregateType {\n [key: string]: AggregateType;\n}\n\nexport class ErrorResponse extends Error {\n code?: number;\n substatus?: number;\n body?: ErrorBody;\n headers?: CosmosHeaders;\n activityId?: string;\n retryAfterInMs?: number;\n retryAfterInMilliseconds?: number;\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.d.ts deleted file mode 100644 index 2c66073..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { SharedOptions } from "./SharedOptions"; -/** - * The feed options and query methods. - */ -export interface FeedOptions extends SharedOptions { - /** Opaque token for continuing the enumeration. Default: undefined - * @deprecated Use continuationToken instead. - */ - continuation?: string; - /** Opaque token for continuing the enumeration. Default: undefined */ - continuationToken?: string; - /** - * Limits the size of the continuation token in the response. Default: undefined - * - * Continuation Tokens contain optional data that can be removed from the serialization before writing it out to a header. - * By default we are capping this to 1kb to avoid long headers (Node.js has a global header size limit). - * A user may set this field to allow for longer headers, which can help the backend optimize query execution." - */ - continuationTokenLimitInKB?: number; - /** - * Allow scan on the queries which couldn't be served as indexing was opted out on the requested paths. Default: false - * - * In general, it is best to avoid using this setting. Scans are relatively expensive and take a long time to serve. - */ - enableScanInQuery?: boolean; - /** - * The maximum number of concurrent operations that run client side during parallel query execution in the - * Azure Cosmos DB database service. Negative values make the system automatically decides the number of - * concurrent operations to run. Default: 0 (no parallelism) - */ - maxDegreeOfParallelism?: number; - /** - * Max number of items to be returned in the enumeration operation. Default: undefined (server will defined payload) - * - * Expirimenting with this value can usually result in the biggest performance changes to the query. - * - * The smaller the item count, the faster the first result will be delivered (for non-aggregates). For larger amounts, - * it will take longer to serve the request, but you'll usually get better throughput for large queries (i.e. if you need 1000 items - * before you can do any other actions, set `maxItemCount` to 1000. If you can start doing work after the first 100, set `maxItemCount` to 100.) - */ - maxItemCount?: number; - /** - * Note: consider using changeFeed instead. - * - * Indicates a change feed request. Must be set to "Incremental feed", or omitted otherwise. Default: false - */ - useIncrementalFeed?: boolean; - /** Conditions Associated with the request. */ - accessCondition?: { - /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */ - type: string; - /** Conditional HTTP method header value (the _etag field from the last version you read). */ - condition: string; - }; - /** - * Enable returning query metrics in response headers. Default: false - * - * Used for debugging slow or expensive queries. Also increases response size and if you're using a low max header size in Node.js, - * you can run into issues faster. - */ - populateQueryMetrics?: boolean; - /** - * Enable buffering additional items during queries. Default: false - * - * This will buffer an additional page at a time (multiplied by maxDegreeOfParallelism) from the server in the background. - * This improves latency by fetching pages before they are needed by the client. If you're draining all of the results from the - * server, like `.fetchAll`, you should usually enable this. If you're only fetching one page at a time via continuation token, - * you should avoid this. If you're draining more than one page, but not the entire result set, it may help improve latency, but - * it will increase the total amount of RU/s use to serve the entire query (as some pages will be fetched more than once). - */ - bufferItems?: boolean; - /** - * This setting forces the query to use a query plan. Default: false - * - * Note: this will disable continuation token support, even for single partition queries. - * - * For queries like aggregates and most cross partition queries, this happens anyway. - * However, since the library doesn't know what type of query it is until we get back the first response, - * some optimization can't happen until later. - * - * If this setting is enabled, it will force query plan for the query, which will save some network requests - * and ensure parallelism can happen. Useful for when you know you're doing cross-partition or aggregate queries. - */ - forceQueryPlan?: boolean; - /** Limits the query to a specific partition key. Default: undefined - * - * Scoping a query to a single partition can be accomplished two ways: - * - * `container.items.query('SELECT * from c', { partitionKey: "foo" }).toArray()` - * `container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray()` - * - * The former is useful when the query body is out of your control - * but you still want to restrict it to a single partition. Example: an end user specified query. - */ - partitionKey?: any; -} -//# sourceMappingURL=FeedOptions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.d.ts.map deleted file mode 100644 index a595574..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FeedOptions.d.ts","sourceRoot":"","sources":["../../../src/request/FeedOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,8CAA8C;IAC9C,eAAe,CAAC,EAAE;QAChB,oEAAoE;QACpE,IAAI,EAAE,MAAM,CAAC;QACb,6FAA6F;QAC7F,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.js deleted file mode 100644 index d6962a0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=FeedOptions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.js.map deleted file mode 100644 index d3757e5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FeedOptions.js","sourceRoot":"","sources":["../../../src/request/FeedOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { SharedOptions } from \"./SharedOptions\";\n\n/**\n * The feed options and query methods.\n */\nexport interface FeedOptions extends SharedOptions {\n /** Opaque token for continuing the enumeration. Default: undefined\n * @deprecated Use continuationToken instead.\n */\n continuation?: string;\n /** Opaque token for continuing the enumeration. Default: undefined */\n continuationToken?: string;\n /**\n * Limits the size of the continuation token in the response. Default: undefined\n *\n * Continuation Tokens contain optional data that can be removed from the serialization before writing it out to a header.\n * By default we are capping this to 1kb to avoid long headers (Node.js has a global header size limit).\n * A user may set this field to allow for longer headers, which can help the backend optimize query execution.\"\n */\n continuationTokenLimitInKB?: number;\n /**\n * Allow scan on the queries which couldn't be served as indexing was opted out on the requested paths. Default: false\n *\n * In general, it is best to avoid using this setting. Scans are relatively expensive and take a long time to serve.\n */\n enableScanInQuery?: boolean;\n /**\n * The maximum number of concurrent operations that run client side during parallel query execution in the\n * Azure Cosmos DB database service. Negative values make the system automatically decides the number of\n * concurrent operations to run. Default: 0 (no parallelism)\n */\n maxDegreeOfParallelism?: number;\n /**\n * Max number of items to be returned in the enumeration operation. Default: undefined (server will defined payload)\n *\n * Expirimenting with this value can usually result in the biggest performance changes to the query.\n *\n * The smaller the item count, the faster the first result will be delivered (for non-aggregates). For larger amounts,\n * it will take longer to serve the request, but you'll usually get better throughput for large queries (i.e. if you need 1000 items\n * before you can do any other actions, set `maxItemCount` to 1000. If you can start doing work after the first 100, set `maxItemCount` to 100.)\n */\n maxItemCount?: number;\n /**\n * Note: consider using changeFeed instead.\n *\n * Indicates a change feed request. Must be set to \"Incremental feed\", or omitted otherwise. Default: false\n */\n useIncrementalFeed?: boolean;\n /** Conditions Associated with the request. */\n accessCondition?: {\n /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */\n type: string;\n /** Conditional HTTP method header value (the _etag field from the last version you read). */\n condition: string;\n };\n /**\n * Enable returning query metrics in response headers. Default: false\n *\n * Used for debugging slow or expensive queries. Also increases response size and if you're using a low max header size in Node.js,\n * you can run into issues faster.\n */\n populateQueryMetrics?: boolean;\n /**\n * Enable buffering additional items during queries. Default: false\n *\n * This will buffer an additional page at a time (multiplied by maxDegreeOfParallelism) from the server in the background.\n * This improves latency by fetching pages before they are needed by the client. If you're draining all of the results from the\n * server, like `.fetchAll`, you should usually enable this. If you're only fetching one page at a time via continuation token,\n * you should avoid this. If you're draining more than one page, but not the entire result set, it may help improve latency, but\n * it will increase the total amount of RU/s use to serve the entire query (as some pages will be fetched more than once).\n */\n bufferItems?: boolean;\n /**\n * This setting forces the query to use a query plan. Default: false\n *\n * Note: this will disable continuation token support, even for single partition queries.\n *\n * For queries like aggregates and most cross partition queries, this happens anyway.\n * However, since the library doesn't know what type of query it is until we get back the first response,\n * some optimization can't happen until later.\n *\n * If this setting is enabled, it will force query plan for the query, which will save some network requests\n * and ensure parallelism can happen. Useful for when you know you're doing cross-partition or aggregate queries.\n */\n forceQueryPlan?: boolean;\n /** Limits the query to a specific partition key. Default: undefined\n *\n * Scoping a query to a single partition can be accomplished two ways:\n *\n * `container.items.query('SELECT * from c', { partitionKey: \"foo\" }).toArray()`\n * `container.items.query('SELECT * from c WHERE c.yourPartitionKey = \"foo\"').toArray()`\n *\n * The former is useful when the query body is out of your control\n * but you still want to restrict it to a single partition. Example: an end user specified query.\n */\n partitionKey?: any;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.d.ts deleted file mode 100644 index 7e40a63..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { CosmosHeaders } from "../queryExecutionContext"; -export declare class FeedResponse { - readonly resources: TResource[]; - private readonly headers; - readonly hasMoreResults: boolean; - constructor(resources: TResource[], headers: CosmosHeaders, hasMoreResults: boolean); - get continuation(): string; - get continuationToken(): string; - get queryMetrics(): string; - get requestCharge(): number; - get activityId(): string; -} -//# sourceMappingURL=FeedResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.d.ts.map deleted file mode 100644 index d0a2294..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FeedResponse.d.ts","sourceRoot":"","sources":["../../../src/request/FeedResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,qBAAa,YAAY,CAAC,SAAS;aAEf,SAAS,EAAE,SAAS,EAAE;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO;aACR,cAAc,EAAE,OAAO;gBAFvB,SAAS,EAAE,SAAS,EAAE,EACrB,OAAO,EAAE,aAAa,EACvB,cAAc,EAAE,OAAO;IAEzC,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,iBAAiB,IAAI,MAAM,CAErC;IACD,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,IAAW,UAAU,IAAI,MAAM,CAE9B;CACF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.js deleted file mode 100644 index 6f8a23e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "../common"; -export class FeedResponse { - constructor(resources, headers, hasMoreResults) { - this.resources = resources; - this.headers = headers; - this.hasMoreResults = hasMoreResults; - } - get continuation() { - return this.continuationToken; - } - get continuationToken() { - return this.headers[Constants.HttpHeaders.Continuation]; - } - get queryMetrics() { - return this.headers[Constants.HttpHeaders.QueryMetrics]; - } - get requestCharge() { - return this.headers[Constants.HttpHeaders.RequestCharge]; - } - get activityId() { - return this.headers[Constants.HttpHeaders.ActivityId]; - } -} -//# sourceMappingURL=FeedResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.js.map deleted file mode 100644 index fe720e5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/FeedResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FeedResponse.js","sourceRoot":"","sources":["../../../src/request/FeedResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,MAAM,OAAO,YAAY;IACvB,YACkB,SAAsB,EACrB,OAAsB,EACvB,cAAuB;QAFvB,cAAS,GAAT,SAAS,CAAa;QACrB,YAAO,GAAP,OAAO,CAAe;QACvB,mBAAc,GAAd,cAAc,CAAS;IACtC,CAAC;IACJ,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IACD,IAAW,iBAAiB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC1D,CAAC;IACD,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC1D,CAAC;IACD,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IAC3D,CAAC;IACD,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACxD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\n\nexport class FeedResponse {\n constructor(\n public readonly resources: TResource[],\n private readonly headers: CosmosHeaders,\n public readonly hasMoreResults: boolean\n ) {}\n public get continuation(): string {\n return this.continuationToken;\n }\n public get continuationToken(): string {\n return this.headers[Constants.HttpHeaders.Continuation];\n }\n public get queryMetrics(): string {\n return this.headers[Constants.HttpHeaders.QueryMetrics];\n }\n public get requestCharge(): number {\n return this.headers[Constants.HttpHeaders.RequestCharge];\n }\n public get activityId(): string {\n return this.headers[Constants.HttpHeaders.ActivityId];\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.d.ts deleted file mode 100644 index d85cacc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { ClientContext } from "../ClientContext"; -import { HTTPMethod, OperationType, ResourceType } from "../common"; -import { Agent } from "../CosmosClientOptions"; -import { ConnectionPolicy, PartitionKey } from "../documents"; -import { GlobalEndpointManager } from "../globalEndpointManager"; -import { PluginConfig } from "../plugins/Plugin"; -import { CosmosHeaders } from "../queryExecutionContext/CosmosHeaders"; -import { FeedOptions } from "./FeedOptions"; -import { RequestOptions } from "./RequestOptions"; -import { Pipeline } from "@azure/core-rest-pipeline"; -/** - * @hidden - */ -export interface RequestContext { - path?: string; - operationType?: OperationType; - client?: ClientContext; - retryCount?: number; - resourceType?: ResourceType; - resourceId?: string; - globalEndpointManager: GlobalEndpointManager; - connectionPolicy: ConnectionPolicy; - requestAgent: Agent; - body?: any; - headers?: CosmosHeaders; - endpoint?: string; - method: HTTPMethod; - partitionKeyRangeId?: string; - options: FeedOptions | RequestOptions; - plugins: PluginConfig[]; - partitionKey?: PartitionKey; - pipeline?: Pipeline; -} -//# sourceMappingURL=RequestContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.d.ts.map deleted file mode 100644 index 26ea28b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../../../src/request/RequestContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,KAAK,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC;IACtC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.js deleted file mode 100644 index 452fc9e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=RequestContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.js.map deleted file mode 100644 index 0ace71c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestContext.js","sourceRoot":"","sources":["../../../src/request/RequestContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../ClientContext\";\nimport { HTTPMethod, OperationType, ResourceType } from \"../common\";\nimport { Agent } from \"../CosmosClientOptions\";\nimport { ConnectionPolicy, PartitionKey } from \"../documents\";\nimport { GlobalEndpointManager } from \"../globalEndpointManager\";\nimport { PluginConfig } from \"../plugins/Plugin\";\nimport { CosmosHeaders } from \"../queryExecutionContext/CosmosHeaders\";\nimport { FeedOptions } from \"./FeedOptions\";\nimport { RequestOptions } from \"./RequestOptions\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\n\n/**\n * @hidden\n */\nexport interface RequestContext {\n path?: string;\n operationType?: OperationType;\n client?: ClientContext;\n retryCount?: number;\n resourceType?: ResourceType;\n resourceId?: string;\n globalEndpointManager: GlobalEndpointManager;\n connectionPolicy: ConnectionPolicy;\n requestAgent: Agent;\n body?: any;\n headers?: CosmosHeaders;\n endpoint?: string;\n method: HTTPMethod;\n partitionKeyRangeId?: string;\n options: FeedOptions | RequestOptions;\n plugins: PluginConfig[];\n partitionKey?: PartitionKey;\n pipeline?: Pipeline;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.d.ts deleted file mode 100644 index 1b4bc2a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { RequestContext } from "./RequestContext"; -import { Response as CosmosResponse } from "./Response"; -/** - * @hidden - */ -declare function request(requestContext: RequestContext): Promise>; -export declare const RequestHandler: { - request: typeof request; -}; -export {}; -//# sourceMappingURL=RequestHandler.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.d.ts.map deleted file mode 100644 index c139fe9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestHandler.d.ts","sourceRoot":"","sources":["../../../src/request/RequestHandler.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,YAAY,CAAC;AA0IxD;;GAEG;AACH,iBAAe,OAAO,CAAC,CAAC,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAYpF;AAED,eAAO,MAAM,cAAc;;CAE1B,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.js deleted file mode 100644 index 859e13a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.js +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { AbortController } from "node-abort-controller"; -import { createPipelineRequest, createHttpHeaders, } from "@azure/core-rest-pipeline"; -import { trimSlashes } from "../common"; -import { Constants } from "../common/constants"; -import { executePlugins, PluginOn } from "../plugins/Plugin"; -import * as RetryUtility from "../retry/retryUtility"; -import { defaultHttpAgent, defaultHttpsAgent } from "./defaultAgent"; -import { ErrorResponse } from "./ErrorResponse"; -import { bodyFromData } from "./request"; -import { TimeoutError } from "./TimeoutError"; -import { getCachedDefaultHttpClient } from "../utils/cachedClient"; -import { createClientLogger } from "@azure/logger"; -const logger = createClientLogger("RequestHandler"); -async function executeRequest(requestContext) { - return executePlugins(requestContext, httpRequest, PluginOn.request); -} -/** - * @hidden - */ -async function httpRequest(requestContext) { - const controller = new AbortController(); - const signal = controller.signal; - // Wrap users passed abort events and call our own internal abort() - const userSignal = requestContext.options && requestContext.options.abortSignal; - if (userSignal) { - if (userSignal.aborted) { - controller.abort(); - } - else { - userSignal.addEventListener("abort", () => { - controller.abort(); - }); - } - } - const timeout = setTimeout(() => { - controller.abort(); - }, requestContext.connectionPolicy.requestTimeout); - let response; - if (requestContext.body) { - requestContext.body = bodyFromData(requestContext.body); - } - const httpsClient = getCachedDefaultHttpClient(); - const url = trimSlashes(requestContext.endpoint) + requestContext.path; - const reqHeaders = createHttpHeaders(requestContext.headers); - const pipelineRequest = createPipelineRequest({ - url, - headers: reqHeaders, - method: requestContext.method, - abortSignal: signal, - body: requestContext.body, - }); - if (requestContext.requestAgent) { - pipelineRequest.agent = requestContext.requestAgent; - } - else { - const parsedUrl = new URL(url); - pipelineRequest.agent = parsedUrl.protocol === "http" ? defaultHttpAgent : defaultHttpsAgent; - } - try { - if (requestContext.pipeline) { - response = await requestContext.pipeline.sendRequest(httpsClient, pipelineRequest); - } - else { - response = await httpsClient.sendRequest(pipelineRequest); - } - } - catch (error) { - if (error.name === "AbortError") { - // If the user passed signal caused the abort, cancel the timeout and rethrow the error - if (userSignal && userSignal.aborted === true) { - clearTimeout(timeout); - throw error; - } - // If the user didn't cancel, it must be an abort we called due to timeout - throw new TimeoutError(`Timeout Error! Request took more than ${requestContext.connectionPolicy.requestTimeout} ms`); - } - throw error; - } - clearTimeout(timeout); - const result = response.status === 204 || response.status === 304 || response.bodyAsText === "" - ? null - : JSON.parse(response.bodyAsText); - const headers = response.headers.toJSON(); - const substatus = headers[Constants.HttpHeaders.SubStatus] - ? parseInt(headers[Constants.HttpHeaders.SubStatus], 10) - : undefined; - if (response.status >= 400) { - const errorResponse = new ErrorResponse(result.message); - logger.warning(response.status + - " " + - requestContext.endpoint + - " " + - requestContext.path + - " " + - result.message); - errorResponse.code = response.status; - errorResponse.body = result; - errorResponse.headers = headers; - if (Constants.HttpHeaders.ActivityId in headers) { - errorResponse.activityId = headers[Constants.HttpHeaders.ActivityId]; - } - if (Constants.HttpHeaders.SubStatus in headers) { - errorResponse.substatus = substatus; - } - if (Constants.HttpHeaders.RetryAfterInMs in headers) { - errorResponse.retryAfterInMs = parseInt(headers[Constants.HttpHeaders.RetryAfterInMs], 10); - Object.defineProperty(errorResponse, "retryAfterInMilliseconds", { - get: () => { - return errorResponse.retryAfterInMs; - }, - }); - } - throw errorResponse; - } - return { - headers, - result, - code: response.status, - substatus, - }; -} -/** - * @hidden - */ -async function request(requestContext) { - if (requestContext.body) { - requestContext.body = bodyFromData(requestContext.body); - if (!requestContext.body) { - throw new Error("parameter data must be a javascript object, string, or Buffer"); - } - } - return RetryUtility.execute({ - requestContext, - executeRequest, - }); -} -export const RequestHandler = { - request, -}; -//# sourceMappingURL=RequestHandler.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.js.map deleted file mode 100644 index e02800a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestHandler.js","sourceRoot":"","sources":["../../../src/request/RequestHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,e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AG;IAC5B,OAAO;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortController } from \"node-abort-controller\";\nimport {\n createPipelineRequest,\n createHttpHeaders,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { trimSlashes } from \"../common\";\nimport { Constants } from \"../common/constants\";\nimport { executePlugins, PluginOn } from \"../plugins/Plugin\";\nimport * as RetryUtility from \"../retry/retryUtility\";\nimport { defaultHttpAgent, defaultHttpsAgent } from \"./defaultAgent\";\nimport { ErrorResponse } from \"./ErrorResponse\";\nimport { bodyFromData } from \"./request\";\nimport { RequestContext } from \"./RequestContext\";\nimport { Response as CosmosResponse } from \"./Response\";\nimport { TimeoutError } from \"./TimeoutError\";\nimport { getCachedDefaultHttpClient } from \"../utils/cachedClient\";\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\n\nconst logger: AzureLogger = createClientLogger(\"RequestHandler\");\n\nasync function executeRequest(requestContext: RequestContext): Promise> {\n return executePlugins(requestContext, httpRequest, PluginOn.request);\n}\n\n/**\n * @hidden\n */\nasync function httpRequest(requestContext: RequestContext): Promise<{\n headers: any;\n result: any;\n code: number;\n substatus: number;\n}> {\n const controller = new AbortController();\n const signal = controller.signal;\n\n // Wrap users passed abort events and call our own internal abort()\n const userSignal = requestContext.options && requestContext.options.abortSignal;\n if (userSignal) {\n if (userSignal.aborted) {\n controller.abort();\n } else {\n userSignal.addEventListener(\"abort\", () => {\n controller.abort();\n });\n }\n }\n\n const timeout = setTimeout(() => {\n controller.abort();\n }, requestContext.connectionPolicy.requestTimeout);\n\n let response: PipelineResponse;\n\n if (requestContext.body) {\n requestContext.body = bodyFromData(requestContext.body);\n }\n\n const httpsClient = getCachedDefaultHttpClient();\n const url = trimSlashes(requestContext.endpoint) + requestContext.path;\n const reqHeaders = createHttpHeaders(requestContext.headers as any);\n const pipelineRequest = createPipelineRequest({\n url,\n headers: reqHeaders,\n method: requestContext.method,\n abortSignal: signal,\n body: requestContext.body,\n });\n if (requestContext.requestAgent) {\n pipelineRequest.agent = requestContext.requestAgent;\n } else {\n const parsedUrl = new URL(url);\n pipelineRequest.agent = parsedUrl.protocol === \"http\" ? defaultHttpAgent : defaultHttpsAgent;\n }\n\n try {\n if (requestContext.pipeline) {\n response = await requestContext.pipeline.sendRequest(httpsClient, pipelineRequest);\n } else {\n response = await httpsClient.sendRequest(pipelineRequest);\n }\n } catch (error: any) {\n if (error.name === \"AbortError\") {\n // If the user passed signal caused the abort, cancel the timeout and rethrow the error\n if (userSignal && userSignal.aborted === true) {\n clearTimeout(timeout);\n throw error;\n }\n // If the user didn't cancel, it must be an abort we called due to timeout\n throw new TimeoutError(\n `Timeout Error! Request took more than ${requestContext.connectionPolicy.requestTimeout} ms`\n );\n }\n throw error;\n }\n\n clearTimeout(timeout);\n const result =\n response.status === 204 || response.status === 304 || response.bodyAsText === \"\"\n ? null\n : JSON.parse(response.bodyAsText);\n const headers = response.headers.toJSON();\n\n const substatus = headers[Constants.HttpHeaders.SubStatus]\n ? parseInt(headers[Constants.HttpHeaders.SubStatus], 10)\n : undefined;\n\n if (response.status >= 400) {\n const errorResponse: ErrorResponse = new ErrorResponse(result.message);\n\n logger.warning(\n response.status +\n \" \" +\n requestContext.endpoint +\n \" \" +\n requestContext.path +\n \" \" +\n result.message\n );\n\n errorResponse.code = response.status;\n errorResponse.body = result;\n errorResponse.headers = headers;\n\n if (Constants.HttpHeaders.ActivityId in headers) {\n errorResponse.activityId = headers[Constants.HttpHeaders.ActivityId];\n }\n\n if (Constants.HttpHeaders.SubStatus in headers) {\n errorResponse.substatus = substatus;\n }\n\n if (Constants.HttpHeaders.RetryAfterInMs in headers) {\n errorResponse.retryAfterInMs = parseInt(headers[Constants.HttpHeaders.RetryAfterInMs], 10);\n Object.defineProperty(errorResponse, \"retryAfterInMilliseconds\", {\n get: () => {\n return errorResponse.retryAfterInMs;\n },\n });\n }\n\n throw errorResponse;\n }\n return {\n headers,\n result,\n code: response.status,\n substatus,\n };\n}\n\n/**\n * @hidden\n */\nasync function request(requestContext: RequestContext): Promise> {\n if (requestContext.body) {\n requestContext.body = bodyFromData(requestContext.body);\n if (!requestContext.body) {\n throw new Error(\"parameter data must be a javascript object, string, or Buffer\");\n }\n }\n\n return RetryUtility.execute({\n requestContext,\n executeRequest,\n });\n}\n\nexport const RequestHandler = {\n request,\n};\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.d.ts deleted file mode 100644 index 31f76d5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { SharedOptions } from ".."; -/** - * Options that can be specified for a requested issued to the Azure Cosmos DB servers.= - */ -export interface RequestOptions extends SharedOptions { - /** Conditions Associated with the request. */ - accessCondition?: { - /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */ - type: string; - /** Conditional HTTP method header value (the _etag field from the last version you read). */ - condition: string; - }; - /** Consistency level required by the client. */ - consistencyLevel?: string; - /** - * DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity - * to serve the request if regular provisioned RUs/second is exhausted. - */ - disableRUPerMinuteUsage?: boolean; - /** Enables or disables logging in JavaScript stored procedures. */ - enableScriptLogging?: boolean; - /** Specifies indexing directives (index, do not index .. etc). */ - indexingDirective?: string; - /** The offer throughput provisioned for a container in measurement of Requests-per-Unit. */ - offerThroughput?: number; - /** - * Offer type when creating document containers. - * - * This option is only valid when creating a document container. - */ - offerType?: string; - /** Enables/disables getting document container quota related stats for document container read requests. */ - populateQuotaInfo?: boolean; - /** Indicates what is the post trigger to be invoked after the operation. */ - postTriggerInclude?: string | string[]; - /** Indicates what is the pre trigger to be invoked before the operation. */ - preTriggerInclude?: string | string[]; - /** Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions). */ - resourceTokenExpirySeconds?: number; - /** (Advanced use case) The url to connect to. */ - urlConnection?: string; - /** Disable automatic id generation (will cause creates to fail if id isn't on the definition) */ - disableAutomaticIdGeneration?: boolean; -} -//# sourceMappingURL=RequestOptions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.d.ts.map deleted file mode 100644 index fc4756d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestOptions.d.ts","sourceRoot":"","sources":["../../../src/request/RequestOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,8CAA8C;IAC9C,eAAe,CAAC,EAAE;QAChB,oEAAoE;QACpE,IAAI,EAAE,MAAM,CAAC;QACb,6FAA6F;QAC7F,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4FAA4F;IAC5F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4GAA4G;IAC5G,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvC,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtC,4HAA4H;IAC5H,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iGAAiG;IACjG,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.js deleted file mode 100644 index 09d38bf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=RequestOptions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.js.map deleted file mode 100644 index 77cd9e0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/RequestOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestOptions.js","sourceRoot":"","sources":["../../../src/request/RequestOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { SharedOptions } from \"..\";\n\n/**\n * Options that can be specified for a requested issued to the Azure Cosmos DB servers.=\n */\nexport interface RequestOptions extends SharedOptions {\n /** Conditions Associated with the request. */\n accessCondition?: {\n /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */\n type: string;\n /** Conditional HTTP method header value (the _etag field from the last version you read). */\n condition: string;\n };\n /** Consistency level required by the client. */\n consistencyLevel?: string;\n /**\n * DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity\n * to serve the request if regular provisioned RUs/second is exhausted.\n */\n disableRUPerMinuteUsage?: boolean;\n /** Enables or disables logging in JavaScript stored procedures. */\n enableScriptLogging?: boolean;\n /** Specifies indexing directives (index, do not index .. etc). */\n indexingDirective?: string;\n /** The offer throughput provisioned for a container in measurement of Requests-per-Unit. */\n offerThroughput?: number;\n /**\n * Offer type when creating document containers.\n *\n * This option is only valid when creating a document container.\n */\n offerType?: string;\n /** Enables/disables getting document container quota related stats for document container read requests. */\n populateQuotaInfo?: boolean;\n /** Indicates what is the post trigger to be invoked after the operation. */\n postTriggerInclude?: string | string[];\n /** Indicates what is the pre trigger to be invoked before the operation. */\n preTriggerInclude?: string | string[];\n /** Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions). */\n resourceTokenExpirySeconds?: number;\n /** (Advanced use case) The url to connect to. */\n urlConnection?: string;\n /** Disable automatic id generation (will cause creates to fail if id isn't on the definition) */\n disableAutomaticIdGeneration?: boolean;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.d.ts deleted file mode 100644 index 6324b68..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { CosmosHeaders } from "../queryExecutionContext/CosmosHeaders"; -import { StatusCode, SubStatusCode } from "./StatusCodes"; -export declare class ResourceResponse { - readonly resource: TResource | undefined; - readonly headers: CosmosHeaders; - readonly statusCode: StatusCode; - readonly substatus?: SubStatusCode; - constructor(resource: TResource | undefined, headers: CosmosHeaders, statusCode: StatusCode, substatus?: SubStatusCode); - get requestCharge(): number; - get activityId(): string; - get etag(): string; -} -//# sourceMappingURL=ResourceResponse.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.d.ts.map deleted file mode 100644 index b4044c5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResourceResponse.d.ts","sourceRoot":"","sources":["../../../src/request/ResourceResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE1D,qBAAa,gBAAgB,CAAC,SAAS;aAEnB,QAAQ,EAAE,SAAS,GAAG,SAAS;aAC/B,OAAO,EAAE,aAAa;aACtB,UAAU,EAAE,UAAU;aACtB,SAAS,CAAC,EAAE,aAAa;gBAHzB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAC/B,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,UAAU,EACtB,SAAS,CAAC,EAAE,aAAa;IAE3C,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,IAAW,UAAU,IAAI,MAAM,CAE9B;IACD,IAAW,IAAI,IAAI,MAAM,CAExB;CACF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.js deleted file mode 100644 index f1e4dc0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "../common"; -export class ResourceResponse { - constructor(resource, headers, statusCode, substatus) { - this.resource = resource; - this.headers = headers; - this.statusCode = statusCode; - this.substatus = substatus; - } - get requestCharge() { - return Number(this.headers[Constants.HttpHeaders.RequestCharge]) || 0; - } - get activityId() { - return this.headers[Constants.HttpHeaders.ActivityId]; - } - get etag() { - return this.headers[Constants.HttpHeaders.ETag]; - } -} -//# sourceMappingURL=ResourceResponse.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.js.map deleted file mode 100644 index abd8daa..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/ResourceResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResourceResponse.js","sourceRoot":"","sources":["../../../src/request/ResourceResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC,MAAM,OAAO,gBAAgB;IAC3B,YACkB,QAA+B,EAC/B,OAAsB,EACtB,UAAsB,EACtB,SAAyB;QAHzB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,YAAO,GAAP,OAAO,CAAe;QACtB,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAgB;IACxC,CAAC;IACJ,IAAW,aAAa;QACtB,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC;IACD,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAW,CAAC;IAClE,CAAC;IACD,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAW,CAAC;IAC5D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext/CosmosHeaders\";\nimport { StatusCode, SubStatusCode } from \"./StatusCodes\";\n\nexport class ResourceResponse {\n constructor(\n public readonly resource: TResource | undefined,\n public readonly headers: CosmosHeaders,\n public readonly statusCode: StatusCode,\n public readonly substatus?: SubStatusCode\n ) {}\n public get requestCharge(): number {\n return Number(this.headers[Constants.HttpHeaders.RequestCharge]) || 0;\n }\n public get activityId(): string {\n return this.headers[Constants.HttpHeaders.ActivityId] as string;\n }\n public get etag(): string {\n return this.headers[Constants.HttpHeaders.ETag] as string;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.d.ts deleted file mode 100644 index 680fc2f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CosmosHeaders } from "../index"; -/** - * @hidden - */ -export interface Response { - headers: CosmosHeaders; - result?: T; - code?: number; - substatus?: number; -} -//# sourceMappingURL=Response.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.d.ts.map deleted file mode 100644 index c8b47a8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Response.d.ts","sourceRoot":"","sources":["../../../src/request/Response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.js deleted file mode 100644 index d099adb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Response.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.js.map deleted file mode 100644 index fde7024..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/Response.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../src/request/Response.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../index\";\n\n/**\n * @hidden\n */\nexport interface Response {\n headers: CosmosHeaders;\n result?: T;\n code?: number;\n substatus?: number;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.d.ts deleted file mode 100644 index 40951f9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/// -import { CosmosHeaders } from "../index"; -import { AbortSignal } from "node-abort-controller"; -/** - * Options that can be specified for a requested issued to the Azure Cosmos DB servers.= - */ -export interface SharedOptions { - /** Enables/disables getting document container quota related stats for document container read requests. */ - sessionToken?: string; - /** (Advanced use case) Initial headers to start with when sending requests to Cosmos */ - initialHeaders?: CosmosHeaders; - /** - * abortSignal to pass to all underlying network requests created by this method call. See https://developer.mozilla.org/en-US/docs/Web/API/AbortController - * @example Cancel a read request - * ```typescript - * const controller = new AbortController() - * const {result: item} = await items.query('SELECT * from c', { abortSignal: controller.signal}); - * controller.abort() - * ``` - */ - abortSignal?: AbortSignal; - /** - * Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the {@link - * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL} or {@link com.azure.cosmos.ConsistencyLevel#SESSION}, responses from the - * integrated cache are guaranteed to be no staler than value indicated by this maxIntegratedCacheStaleness. When the - * consistency level is not set, this property is ignored. - * - *

Default value is null

- * - *

Cache Staleness is supported in milliseconds granularity. Anything smaller than milliseconds will be ignored.

- */ - maxIntegratedCacheStalenessInMs?: number; -} -//# sourceMappingURL=SharedOptions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.d.ts.map deleted file mode 100644 index 7f1dbb1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SharedOptions.d.ts","sourceRoot":"","sources":["../../../src/request/SharedOptions.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,4GAA4G;IAC5G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;OASG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.js deleted file mode 100644 index d202925..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=SharedOptions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.js.map deleted file mode 100644 index ec41d62..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/SharedOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SharedOptions.js","sourceRoot":"","sources":["../../../src/request/SharedOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// \nimport { CosmosHeaders } from \"../index\";\nimport { AbortSignal } from \"node-abort-controller\";\n\n/**\n * Options that can be specified for a requested issued to the Azure Cosmos DB servers.=\n */\nexport interface SharedOptions {\n /** Enables/disables getting document container quota related stats for document container read requests. */\n sessionToken?: string;\n /** (Advanced use case) Initial headers to start with when sending requests to Cosmos */\n initialHeaders?: CosmosHeaders;\n /**\n * abortSignal to pass to all underlying network requests created by this method call. See https://developer.mozilla.org/en-US/docs/Web/API/AbortController\n * @example Cancel a read request\n * ```typescript\n * const controller = new AbortController()\n * const {result: item} = await items.query('SELECT * from c', { abortSignal: controller.signal});\n * controller.abort()\n * ```\n */\n abortSignal?: AbortSignal;\n /**\n * Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the {@link\n * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL} or {@link com.azure.cosmos.ConsistencyLevel#SESSION}, responses from the\n * integrated cache are guaranteed to be no staler than value indicated by this maxIntegratedCacheStaleness. When the\n * consistency level is not set, this property is ignored.\n *\n *

Default value is null

\n *\n *

Cache Staleness is supported in milliseconds granularity. Anything smaller than milliseconds will be ignored.

\n */\n maxIntegratedCacheStalenessInMs?: number;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.d.ts deleted file mode 100644 index 226cde3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @hidden - */ -export declare type StatusCode = number; -/** - * @hidden - */ -export declare type SubStatusCode = number; -//# sourceMappingURL=StatusCodes.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.d.ts.map deleted file mode 100644 index 2dfaec8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StatusCodes.d.ts","sourceRoot":"","sources":["../../../src/request/StatusCodes.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,UAAU,GAAG,MAAM,CAAC;AAChC;;GAEG;AACH,oBAAY,aAAa,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.js deleted file mode 100644 index d8bafb1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export {}; -//# sourceMappingURL=StatusCodes.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.js.map deleted file mode 100644 index c2ccb6d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/StatusCodes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StatusCodes.js","sourceRoot":"","sources":["../../../src/request/StatusCodes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * @hidden\n */\nexport type StatusCode = number;\n/**\n * @hidden\n */\nexport type SubStatusCode = number;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.d.ts deleted file mode 100644 index a637179..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @hidden - */ -export declare const TimeoutErrorCode = "TimeoutError"; -export declare class TimeoutError extends Error { - readonly code: string; - constructor(message?: string); -} -//# sourceMappingURL=TimeoutError.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.d.ts.map deleted file mode 100644 index 24d0c9a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimeoutError.d.ts","sourceRoot":"","sources":["../../../src/request/TimeoutError.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAE/C,qBAAa,YAAa,SAAQ,KAAK;IACrC,SAAgB,IAAI,EAAE,MAAM,CAAoB;gBACpC,OAAO,GAAE,MAAwB;CAI9C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.js deleted file mode 100644 index 59d69a1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * @hidden - */ -export const TimeoutErrorCode = "TimeoutError"; -export class TimeoutError extends Error { - constructor(message = "Timeout Error") { - super(message); - this.code = TimeoutErrorCode; - this.name = TimeoutErrorCode; - } -} -//# sourceMappingURL=TimeoutError.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.js.map deleted file mode 100644 index b9934d2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/TimeoutError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimeoutError.js","sourceRoot":"","sources":["../../../src/request/TimeoutError.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE/C,MAAM,OAAO,YAAa,SAAQ,KAAK;IAErC,YAAY,UAAkB,eAAe;QAC3C,KAAK,CAAC,OAAO,CAAC,CAAC;QAFD,SAAI,GAAW,gBAAgB,CAAC;QAG9C,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * @hidden\n */\nexport const TimeoutErrorCode = \"TimeoutError\";\n\nexport class TimeoutError extends Error {\n public readonly code: string = TimeoutErrorCode;\n constructor(message: string = \"Timeout Error\") {\n super(message);\n this.name = TimeoutErrorCode;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.d.ts deleted file mode 100644 index 78046f5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// -import { Agent } from "http"; -/** - * @hidden - */ -export declare let defaultHttpAgent: Agent; -/** - * @hidden - */ -export declare let defaultHttpsAgent: Agent; -//# sourceMappingURL=defaultAgent.browser.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.d.ts.map deleted file mode 100644 index af924a8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultAgent.browser.d.ts","sourceRoot":"","sources":["../../../src/request/defaultAgent.browser.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B;;GAEG;AACH,eAAO,IAAI,gBAAgB,EAAE,KAAK,CAAC;AACnC;;GAEG;AACH,eAAO,IAAI,iBAAiB,EAAE,KAAK,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.js deleted file mode 100644 index 50fd69a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @hidden - */ -export let defaultHttpAgent; -/** - * @hidden - */ -export let defaultHttpsAgent; -//# sourceMappingURL=defaultAgent.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.js.map deleted file mode 100644 index 8f5b375..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultAgent.browser.js","sourceRoot":"","sources":["../../../src/request/defaultAgent.browser.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAI,gBAAuB,CAAC;AACnC;;GAEG;AACH,MAAM,CAAC,IAAI,iBAAwB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Agent } from \"http\";\n/**\n * @hidden\n */\nexport let defaultHttpAgent: Agent;\n/**\n * @hidden\n */\nexport let defaultHttpsAgent: Agent;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.d.ts deleted file mode 100644 index 84f9dce..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import { Agent } from "http"; -/** - * @hidden - */ -export declare let defaultHttpsAgent: Agent; -//# sourceMappingURL=defaultAgent.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.d.ts.map deleted file mode 100644 index dd0cfb0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultAgent.d.ts","sourceRoot":"","sources":["../../../src/request/defaultAgent.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B;;GAEG;AACH,eAAO,IAAI,iBAAiB,EAAE,KAAK,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.js deleted file mode 100644 index e7d4ae2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @hidden - */ -export let defaultHttpsAgent; -const https = require("https"); // eslint-disable-line @typescript-eslint/no-require-imports -const tls = require("tls"); // eslint-disable-line @typescript-eslint/no-require-imports -// minVersion only available in Node 10+ -if (tls.DEFAULT_MIN_VERSION) { - defaultHttpsAgent = new https.Agent({ - keepAlive: true, - minVersion: "TLSv1.2", - }); -} -else { - // Remove when Node 8 support has been dropped - defaultHttpsAgent = new https.Agent({ - keepAlive: true, - secureProtocol: "TLSv1_2_method", - }); -} -const http = require("http"); // eslint-disable-line @typescript-eslint/no-require-imports -/** - * @internal - */ -export const defaultHttpAgent = new http.Agent({ - keepAlive: true, -}); -//# sourceMappingURL=defaultAgent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.js.map deleted file mode 100644 index b403aa7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/defaultAgent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultAgent.js","sourceRoot":"","sources":["../../../src/request/defaultAgent.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,CAAC,IAAI,iBAAwB,CAAC;AAEpC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,4DAA4D;AAC5F,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,4DAA4D;AAExF,wCAAwC;AACxC,IAAI,GAAG,CAAC,mBAAmB,EAAE;IAC3B,iBAAiB,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC;QAClC,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,SAAS;KACtB,CAAC,CAAC;CACJ;KAAM;IACL,8CAA8C;IAC9C,iBAAiB,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC;QAClC,SAAS,EAAE,IAAI;QACf,cAAc,EAAE,gBAAgB;KACjC,CAAC,CAAC;CACJ;AACD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,4DAA4D;AAC1F;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAU,IAAI,IAAI,CAAC,KAAK,CAAC;IACpD,SAAS,EAAE,IAAI;CAChB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Agent } from \"http\";\n\n/**\n * @hidden\n */\nexport let defaultHttpsAgent: Agent;\n\nconst https = require(\"https\"); // eslint-disable-line @typescript-eslint/no-require-imports\nconst tls = require(\"tls\"); // eslint-disable-line @typescript-eslint/no-require-imports\n\n// minVersion only available in Node 10+\nif (tls.DEFAULT_MIN_VERSION) {\n defaultHttpsAgent = new https.Agent({\n keepAlive: true,\n minVersion: \"TLSv1.2\",\n });\n} else {\n // Remove when Node 8 support has been dropped\n defaultHttpsAgent = new https.Agent({\n keepAlive: true,\n secureProtocol: \"TLSv1_2_method\",\n });\n}\nconst http = require(\"http\"); // eslint-disable-line @typescript-eslint/no-require-imports\n/**\n * @internal\n */\nexport const defaultHttpAgent: Agent = new http.Agent({\n keepAlive: true,\n});\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.d.ts deleted file mode 100644 index 2cb00b4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export { ErrorResponse, ErrorBody, PartitionedQueryExecutionInfo, QueryInfo, QueryRange, AggregateType, GroupByExpressions, GroupByAliasToAggregateType, } from "./ErrorResponse"; -export { FeedOptions } from "./FeedOptions"; -export { RequestOptions } from "./RequestOptions"; -export { Response } from "./Response"; -export { ResourceResponse } from "./ResourceResponse"; -export { SharedOptions } from "./SharedOptions"; -export { StatusCode, SubStatusCode } from "./StatusCodes"; -export { FeedResponse } from "./FeedResponse"; -export { RequestContext } from "./RequestContext"; -export { TimeoutError } from "./TimeoutError"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.d.ts.map deleted file mode 100644 index 10550df..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/request/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,SAAS,EACT,6BAA6B,EAC7B,SAAS,EACT,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.js deleted file mode 100644 index 2f89639..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export { ErrorResponse, } from "./ErrorResponse"; -export { ResourceResponse } from "./ResourceResponse"; -export { FeedResponse } from "./FeedResponse"; -export { TimeoutError } from "./TimeoutError"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.js.map deleted file mode 100644 index 8e5b58b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/request/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EACL,aAAa,GAQd,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport {\n ErrorResponse,\n ErrorBody,\n PartitionedQueryExecutionInfo,\n QueryInfo,\n QueryRange,\n AggregateType,\n GroupByExpressions,\n GroupByAliasToAggregateType,\n} from \"./ErrorResponse\";\nexport { FeedOptions } from \"./FeedOptions\";\nexport { RequestOptions } from \"./RequestOptions\";\nexport { Response } from \"./Response\";\nexport { ResourceResponse } from \"./ResourceResponse\";\nexport { SharedOptions } from \"./SharedOptions\";\nexport { StatusCode, SubStatusCode } from \"./StatusCodes\";\nexport { FeedResponse } from \"./FeedResponse\";\nexport { RequestContext } from \"./RequestContext\";\nexport { TimeoutError } from \"./TimeoutError\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.d.ts deleted file mode 100644 index 106b92b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/// -import { HTTPMethod, ResourceType } from "../common"; -import { CosmosClientOptions } from "../CosmosClientOptions"; -import { PartitionKey } from "../documents"; -import { CosmosHeaders } from "../queryExecutionContext"; -import { FeedOptions, RequestOptions } from "./index"; -/** @hidden */ -export declare function bodyFromData(data: Buffer | string | Record): string; -/** - * @hidden - */ -interface GetHeadersOptions { - clientOptions: CosmosClientOptions; - defaultHeaders: CosmosHeaders; - verb: HTTPMethod; - path: string; - resourceId: string; - resourceType: ResourceType; - options: RequestOptions & FeedOptions; - partitionKeyRangeId?: string; - useMultipleWriteLocations?: boolean; - partitionKey?: PartitionKey; -} -/** - * @hidden - */ -export declare function getHeaders({ clientOptions, defaultHeaders, verb, path, resourceId, resourceType, options, partitionKeyRangeId, useMultipleWriteLocations, partitionKey, }: GetHeadersOptions): Promise; -export {}; -//# sourceMappingURL=request.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.d.ts.map deleted file mode 100644 index 1eca712..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/request/request.ts"],"names":[],"mappings":";AAGA,OAAO,EAAa,UAAU,EAAkC,YAAY,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAetD,cAAc;AACd,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAKpF;AAED;;GAEG;AACH,UAAU,iBAAiB;IACzB,aAAa,EAAE,mBAAmB,CAAC;IACnC,cAAc,EAAE,aAAa,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,cAAc,GAAG,WAAW,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAID;;GAEG;AACH,wBAAsB,UAAU,CAAC,EAC/B,aAAa,EACb,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,OAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,GACb,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CAqJ5C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.js deleted file mode 100644 index 2d05a17..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.js +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { setAuthorizationHeader } from "../auth"; -import { Constants, HTTPMethod, jsonStringifyAndEscapeNonASCII, ResourceType } from "../common"; -import { defaultLogger } from "../common/logger"; -// ---------------------------------------------------------------------------- -// Utility methods -// -/** @hidden */ -function javaScriptFriendlyJSONStringify(s) { - // two line terminators (Line separator and Paragraph separator) are not needed to be escaped in JSON - // but are needed to be escaped in JavaScript. - return JSON.stringify(s) - .replace(/\u2028/g, "\\u2028") - .replace(/\u2029/g, "\\u2029"); -} -/** @hidden */ -export function bodyFromData(data) { - if (typeof data === "object") { - return javaScriptFriendlyJSONStringify(data); - } - return data; -} -const JsonContentType = "application/json"; -/** - * @hidden - */ -export async function getHeaders({ clientOptions, defaultHeaders, verb, path, resourceId, resourceType, options = {}, partitionKeyRangeId, useMultipleWriteLocations, partitionKey, }) { - const headers = Object.assign({ [Constants.HttpHeaders.ResponseContinuationTokenLimitInKB]: 1, [Constants.HttpHeaders.EnableCrossPartitionQuery]: true }, defaultHeaders); - if (useMultipleWriteLocations) { - headers[Constants.HttpHeaders.ALLOW_MULTIPLE_WRITES] = true; - } - if (options.continuationTokenLimitInKB) { - headers[Constants.HttpHeaders.ResponseContinuationTokenLimitInKB] = - options.continuationTokenLimitInKB; - } - if (options.continuationToken) { - headers[Constants.HttpHeaders.Continuation] = options.continuationToken; - } - else if (options.continuation) { - headers[Constants.HttpHeaders.Continuation] = options.continuation; - } - if (options.preTriggerInclude) { - headers[Constants.HttpHeaders.PreTriggerInclude] = - options.preTriggerInclude.constructor === Array - ? options.preTriggerInclude.join(",") - : options.preTriggerInclude; - } - if (options.postTriggerInclude) { - headers[Constants.HttpHeaders.PostTriggerInclude] = - options.postTriggerInclude.constructor === Array - ? options.postTriggerInclude.join(",") - : options.postTriggerInclude; - } - if (options.offerType) { - headers[Constants.HttpHeaders.OfferType] = options.offerType; - } - if (options.offerThroughput) { - headers[Constants.HttpHeaders.OfferThroughput] = options.offerThroughput; - } - if (options.maxItemCount) { - headers[Constants.HttpHeaders.PageSize] = options.maxItemCount; - } - if (options.accessCondition) { - if (options.accessCondition.type === "IfMatch") { - headers[Constants.HttpHeaders.IfMatch] = options.accessCondition.condition; - } - else { - headers[Constants.HttpHeaders.IfNoneMatch] = options.accessCondition.condition; - } - } - if (options.useIncrementalFeed) { - headers[Constants.HttpHeaders.A_IM] = "Incremental Feed"; - } - if (options.indexingDirective) { - headers[Constants.HttpHeaders.IndexingDirective] = options.indexingDirective; - } - if (options.consistencyLevel) { - headers[Constants.HttpHeaders.ConsistencyLevel] = options.consistencyLevel; - } - if (options.maxIntegratedCacheStalenessInMs && resourceType === ResourceType.item) { - if (typeof options.maxIntegratedCacheStalenessInMs === "number") { - headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] = - options.maxIntegratedCacheStalenessInMs.toString(); - } - else { - defaultLogger.error(`RangeError: maxIntegratedCacheStalenessInMs "${options.maxIntegratedCacheStalenessInMs}" is not a valid parameter.`); - headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] = "null"; - } - } - if (options.resourceTokenExpirySeconds) { - headers[Constants.HttpHeaders.ResourceTokenExpiry] = options.resourceTokenExpirySeconds; - } - if (options.sessionToken) { - headers[Constants.HttpHeaders.SessionToken] = options.sessionToken; - } - if (options.enableScanInQuery) { - headers[Constants.HttpHeaders.EnableScanInQuery] = options.enableScanInQuery; - } - if (options.populateQuotaInfo) { - headers[Constants.HttpHeaders.PopulateQuotaInfo] = options.populateQuotaInfo; - } - if (options.populateQueryMetrics) { - headers[Constants.HttpHeaders.PopulateQueryMetrics] = options.populateQueryMetrics; - } - if (options.maxDegreeOfParallelism !== undefined) { - headers[Constants.HttpHeaders.ParallelizeCrossPartitionQuery] = true; - } - if (options.populateQuotaInfo) { - headers[Constants.HttpHeaders.PopulateQuotaInfo] = true; - } - if (partitionKey !== undefined && !headers[Constants.HttpHeaders.PartitionKey]) { - if (partitionKey === null || !Array.isArray(partitionKey)) { - partitionKey = [partitionKey]; - } - headers[Constants.HttpHeaders.PartitionKey] = jsonStringifyAndEscapeNonASCII(partitionKey); - } - if (clientOptions.key || clientOptions.tokenProvider) { - headers[Constants.HttpHeaders.XDate] = new Date().toUTCString(); - } - if (verb === HTTPMethod.post || verb === HTTPMethod.put) { - if (!headers[Constants.HttpHeaders.ContentType]) { - headers[Constants.HttpHeaders.ContentType] = JsonContentType; - } - } - if (!headers[Constants.HttpHeaders.Accept]) { - headers[Constants.HttpHeaders.Accept] = JsonContentType; - } - if (partitionKeyRangeId !== undefined) { - headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId; - } - if (options.enableScriptLogging) { - headers[Constants.HttpHeaders.EnableScriptLogging] = options.enableScriptLogging; - } - if (options.disableRUPerMinuteUsage) { - headers[Constants.HttpHeaders.DisableRUPerMinuteUsage] = true; - } - if (clientOptions.key || - clientOptions.resourceTokens || - clientOptions.tokenProvider || - clientOptions.permissionFeed) { - await setAuthorizationHeader(clientOptions, verb, path, resourceId, resourceType, headers); - } - return headers; -} -//# sourceMappingURL=request.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.js.map deleted file mode 100644 index f0dc300..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/request/request.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/request/request.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,8BAA8B,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAKhG,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,+EAA+E;AAC/E,kBAAkB;AAClB,EAAE;AAEF,cAAc;AACd,SAAS,+BAA+B,CAAC,CAAU;IACjD,qGAAqG;IACrG,8CAA8C;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;SAC7B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AACnC,CAAC;AAED,cAAc;AACd,MAAM,UAAU,YAAY,CAAC,IAA+C;IAC1E,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,+BAA+B,CAAC,IAAI,CAAC,CAAC;KAC9C;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAkBD,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAC/B,aAAa,EACb,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,OAAO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AC;KAC/D;IAED,IACE,aAAa,CAAC,GAAG;QACjB,aAAa,CAAC,cAAc;QAC5B,aAAa,CAAC,aAAa;QAC3B,aAAa,CAAC,cAAc,EAC5B;QACA,MAAM,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;KAC5F;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { setAuthorizationHeader } from \"../auth\";\nimport { Constants, HTTPMethod, jsonStringifyAndEscapeNonASCII, ResourceType } from \"../common\";\nimport { CosmosClientOptions } from \"../CosmosClientOptions\";\nimport { PartitionKey } from \"../documents\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\nimport { FeedOptions, RequestOptions } from \"./index\";\nimport { defaultLogger } from \"../common/logger\";\n// ----------------------------------------------------------------------------\n// Utility methods\n//\n\n/** @hidden */\nfunction javaScriptFriendlyJSONStringify(s: unknown): string {\n // two line terminators (Line separator and Paragraph separator) are not needed to be escaped in JSON\n // but are needed to be escaped in JavaScript.\n return JSON.stringify(s)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\n\n/** @hidden */\nexport function bodyFromData(data: Buffer | string | Record): string {\n if (typeof data === \"object\") {\n return javaScriptFriendlyJSONStringify(data);\n }\n return data;\n}\n\n/**\n * @hidden\n */\ninterface GetHeadersOptions {\n clientOptions: CosmosClientOptions;\n defaultHeaders: CosmosHeaders;\n verb: HTTPMethod;\n path: string;\n resourceId: string;\n resourceType: ResourceType;\n options: RequestOptions & FeedOptions;\n partitionKeyRangeId?: string;\n useMultipleWriteLocations?: boolean;\n partitionKey?: PartitionKey;\n}\n\nconst JsonContentType = \"application/json\";\n\n/**\n * @hidden\n */\nexport async function getHeaders({\n clientOptions,\n defaultHeaders,\n verb,\n path,\n resourceId,\n resourceType,\n options = {},\n partitionKeyRangeId,\n useMultipleWriteLocations,\n partitionKey,\n}: GetHeadersOptions): Promise {\n const headers: CosmosHeaders = {\n [Constants.HttpHeaders.ResponseContinuationTokenLimitInKB]: 1,\n [Constants.HttpHeaders.EnableCrossPartitionQuery]: true,\n ...defaultHeaders,\n };\n\n if (useMultipleWriteLocations) {\n headers[Constants.HttpHeaders.ALLOW_MULTIPLE_WRITES] = true;\n }\n\n if (options.continuationTokenLimitInKB) {\n headers[Constants.HttpHeaders.ResponseContinuationTokenLimitInKB] =\n options.continuationTokenLimitInKB;\n }\n if (options.continuationToken) {\n headers[Constants.HttpHeaders.Continuation] = options.continuationToken;\n } else if (options.continuation) {\n headers[Constants.HttpHeaders.Continuation] = options.continuation;\n }\n\n if (options.preTriggerInclude) {\n headers[Constants.HttpHeaders.PreTriggerInclude] =\n options.preTriggerInclude.constructor === Array\n ? (options.preTriggerInclude as string[]).join(\",\")\n : (options.preTriggerInclude as string);\n }\n\n if (options.postTriggerInclude) {\n headers[Constants.HttpHeaders.PostTriggerInclude] =\n options.postTriggerInclude.constructor === Array\n ? (options.postTriggerInclude as string[]).join(\",\")\n : (options.postTriggerInclude as string);\n }\n\n if (options.offerType) {\n headers[Constants.HttpHeaders.OfferType] = options.offerType;\n }\n\n if (options.offerThroughput) {\n headers[Constants.HttpHeaders.OfferThroughput] = options.offerThroughput;\n }\n\n if (options.maxItemCount) {\n headers[Constants.HttpHeaders.PageSize] = options.maxItemCount;\n }\n\n if (options.accessCondition) {\n if (options.accessCondition.type === \"IfMatch\") {\n headers[Constants.HttpHeaders.IfMatch] = options.accessCondition.condition;\n } else {\n headers[Constants.HttpHeaders.IfNoneMatch] = options.accessCondition.condition;\n }\n }\n\n if (options.useIncrementalFeed) {\n headers[Constants.HttpHeaders.A_IM] = \"Incremental Feed\";\n }\n\n if (options.indexingDirective) {\n headers[Constants.HttpHeaders.IndexingDirective] = options.indexingDirective;\n }\n\n if (options.consistencyLevel) {\n headers[Constants.HttpHeaders.ConsistencyLevel] = options.consistencyLevel;\n }\n\n if (options.maxIntegratedCacheStalenessInMs && resourceType === ResourceType.item) {\n if (typeof options.maxIntegratedCacheStalenessInMs === \"number\") {\n headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] =\n options.maxIntegratedCacheStalenessInMs.toString();\n } else {\n defaultLogger.error(\n `RangeError: maxIntegratedCacheStalenessInMs \"${options.maxIntegratedCacheStalenessInMs}\" is not a valid parameter.`\n );\n headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] = \"null\";\n }\n }\n\n if (options.resourceTokenExpirySeconds) {\n headers[Constants.HttpHeaders.ResourceTokenExpiry] = options.resourceTokenExpirySeconds;\n }\n\n if (options.sessionToken) {\n headers[Constants.HttpHeaders.SessionToken] = options.sessionToken;\n }\n\n if (options.enableScanInQuery) {\n headers[Constants.HttpHeaders.EnableScanInQuery] = options.enableScanInQuery;\n }\n\n if (options.populateQuotaInfo) {\n headers[Constants.HttpHeaders.PopulateQuotaInfo] = options.populateQuotaInfo;\n }\n\n if (options.populateQueryMetrics) {\n headers[Constants.HttpHeaders.PopulateQueryMetrics] = options.populateQueryMetrics;\n }\n\n if (options.maxDegreeOfParallelism !== undefined) {\n headers[Constants.HttpHeaders.ParallelizeCrossPartitionQuery] = true;\n }\n\n if (options.populateQuotaInfo) {\n headers[Constants.HttpHeaders.PopulateQuotaInfo] = true;\n }\n\n if (partitionKey !== undefined && !headers[Constants.HttpHeaders.PartitionKey]) {\n if (partitionKey === null || !Array.isArray(partitionKey)) {\n partitionKey = [partitionKey as string];\n }\n headers[Constants.HttpHeaders.PartitionKey] = jsonStringifyAndEscapeNonASCII(partitionKey);\n }\n\n if (clientOptions.key || clientOptions.tokenProvider) {\n headers[Constants.HttpHeaders.XDate] = new Date().toUTCString();\n }\n\n if (verb === HTTPMethod.post || verb === HTTPMethod.put) {\n if (!headers[Constants.HttpHeaders.ContentType]) {\n headers[Constants.HttpHeaders.ContentType] = JsonContentType;\n }\n }\n\n if (!headers[Constants.HttpHeaders.Accept]) {\n headers[Constants.HttpHeaders.Accept] = JsonContentType;\n }\n\n if (partitionKeyRangeId !== undefined) {\n headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId;\n }\n\n if (options.enableScriptLogging) {\n headers[Constants.HttpHeaders.EnableScriptLogging] = options.enableScriptLogging;\n }\n\n if (options.disableRUPerMinuteUsage) {\n headers[Constants.HttpHeaders.DisableRUPerMinuteUsage] = true;\n }\n\n if (\n clientOptions.key ||\n clientOptions.resourceTokens ||\n clientOptions.tokenProvider ||\n clientOptions.permissionFeed\n ) {\n await setAuthorizationHeader(clientOptions, verb, path, resourceId, resourceType, headers);\n }\n return headers;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.d.ts deleted file mode 100644 index 1711d66..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RetryContext { - retryCount: number; - retryRequestOnPreferredLocations?: boolean; - clearSessionTokenNotAvailable?: boolean; -} -//# sourceMappingURL=RetryContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.d.ts.map deleted file mode 100644 index 87d929a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryContext.d.ts","sourceRoot":"","sources":["../../../src/retry/RetryContext.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.js deleted file mode 100644 index 6e9b0dc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=RetryContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.js.map deleted file mode 100644 index a0f7b23..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryContext.js","sourceRoot":"","sources":["../../../src/retry/RetryContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport interface RetryContext {\n retryCount: number;\n retryRequestOnPreferredLocations?: boolean;\n clearSessionTokenNotAvailable?: boolean;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.d.ts deleted file mode 100644 index a88d5b3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ErrorResponse } from "../request"; -import { RetryContext } from "./RetryContext"; -/** - * @hidden - */ -export interface RetryPolicy { - retryAfterInMs: number; - shouldRetry: (errorResponse: ErrorResponse, retryContext?: RetryContext, locationEndpoint?: string) => Promise; -} -//# sourceMappingURL=RetryPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.d.ts.map deleted file mode 100644 index bb67d20..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryPolicy.d.ts","sourceRoot":"","sources":["../../../src/retry/RetryPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,CACX,aAAa,EAAE,aAAa,EAC5B,YAAY,CAAC,EAAE,YAAY,EAC3B,gBAAgB,CAAC,EAAE,MAAM,KACtB,OAAO,CAAC,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;CAC3C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.js deleted file mode 100644 index 618329a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=RetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.js.map deleted file mode 100644 index 0fba3c7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/RetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RetryPolicy.js","sourceRoot":"","sources":["../../../src/retry/RetryPolicy.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ErrorResponse } from \"../request\";\nimport { RetryContext } from \"./RetryContext\";\n\n/**\n * @hidden\n */\nexport interface RetryPolicy {\n retryAfterInMs: number;\n shouldRetry: (\n errorResponse: ErrorResponse,\n retryContext?: RetryContext,\n locationEndpoint?: string\n ) => Promise;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.d.ts deleted file mode 100644 index fee70bc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { OperationType } from "../common"; -import { ErrorResponse } from "../request"; -import { RetryPolicy } from "./RetryPolicy"; -/** - * This class implements the default connection retry policy for requests. - * @hidden - */ -export declare class DefaultRetryPolicy implements RetryPolicy { - private operationType; - private maxTries; - private currentRetryAttemptCount; - retryAfterInMs: number; - constructor(operationType: OperationType); - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - shouldRetry(err: ErrorResponse): Promise; -} -//# sourceMappingURL=defaultRetryPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.d.ts.map deleted file mode 100644 index c9d7c05..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultRetryPolicy.d.ts","sourceRoot":"","sources":["../../../src/retry/defaultRetryPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAqH5C;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,WAAW;IAKxC,OAAO,CAAC,aAAa;IAJjC,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,wBAAwB,CAAa;IACtC,cAAc,EAAE,MAAM,CAAQ;gBAEjB,aAAa,EAAE,aAAa;IAChD;;;OAGG;IACU,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;CAY/D"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.js deleted file mode 100644 index 0e04506..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.js +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { OperationType } from "../common"; -import { TimeoutErrorCode } from "../request/TimeoutError"; -/** - * @hidden - */ -// Windows Socket Error Codes -const WindowsInterruptedFunctionCall = 10004; -/** - * @hidden - */ -const WindowsFileHandleNotValid = 10009; -/** - * @hidden - */ -const WindowsPermissionDenied = 10013; -/** - * @hidden - */ -const WindowsBadAddress = 10014; -/** - * @hidden - */ -const WindowsInvalidArgumnet = 10022; -/** - * @hidden - */ -const WindowsResourceTemporarilyUnavailable = 10035; -/** - * @hidden - */ -const WindowsOperationNowInProgress = 10036; -/** - * @hidden - */ -const WindowsAddressAlreadyInUse = 10048; -/** - * @hidden - */ -const WindowsConnectionResetByPeer = 10054; -/** - * @hidden - */ -const WindowsCannotSendAfterSocketShutdown = 10058; -/** - * @hidden - */ -const WindowsConnectionTimedOut = 10060; -/** - * @hidden - */ -const WindowsConnectionRefused = 10061; -/** - * @hidden - */ -const WindowsNameTooLong = 10063; -/** - * @hidden - */ -const WindowsHostIsDown = 10064; -/** - * @hidden - */ -const WindowsNoRouteTohost = 10065; -/** - * @hidden - */ -// Linux Error Codes -/** - * @hidden - */ -const LinuxConnectionReset = "ECONNRESET"; -// Node Error Codes -/** - * @hidden - */ -const BrokenPipe = "EPIPE"; -/** - * @hidden - */ -const CONNECTION_ERROR_CODES = [ - WindowsInterruptedFunctionCall, - WindowsFileHandleNotValid, - WindowsPermissionDenied, - WindowsBadAddress, - WindowsInvalidArgumnet, - WindowsResourceTemporarilyUnavailable, - WindowsOperationNowInProgress, - WindowsAddressAlreadyInUse, - WindowsConnectionResetByPeer, - WindowsCannotSendAfterSocketShutdown, - WindowsConnectionTimedOut, - WindowsConnectionRefused, - WindowsNameTooLong, - WindowsHostIsDown, - WindowsNoRouteTohost, - LinuxConnectionReset, - TimeoutErrorCode, - BrokenPipe, -]; -/** - * @hidden - */ -function needsRetry(operationType, code) { - if ((operationType === OperationType.Read || operationType === OperationType.Query) && - CONNECTION_ERROR_CODES.indexOf(code) !== -1) { - return true; - } - else { - return false; - } -} -/** - * This class implements the default connection retry policy for requests. - * @hidden - */ -export class DefaultRetryPolicy { - constructor(operationType) { - this.operationType = operationType; - this.maxTries = 10; - this.currentRetryAttemptCount = 0; - this.retryAfterInMs = 1000; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - async shouldRetry(err) { - if (err) { - if (this.currentRetryAttemptCount < this.maxTries && - needsRetry(this.operationType, err.code)) { - this.currentRetryAttemptCount++; - return true; - } - } - return false; - } -} -//# sourceMappingURL=defaultRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.js.map deleted file mode 100644 index a9e1807..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/defaultRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultRetryPolicy.js","sourceRoot":"","sources":["../../../src/retry/defaultRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAA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IACxB,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,gBAAgB;IAChB,UAAU;CACX,CAAC;AAEF;;GAEG;AACH,SAAS,UAAU,CAAC,aAA4B,EAAE,IAAqB;IACrE,IACE,CAAC,aAAa,KAAK,aAAa,CAAC,IAAI,IAAI,aAAa,KAAK,aAAa,CAAC,KAAK,CAAC;QAC/E,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAC3C;QACA,OAAO,IAAI,CAAC;KACb;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAK7B,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAJxC,aAAQ,GAAW,EAAE,CAAC;QACtB,6BAAwB,GAAW,CAAC,CAAC;QACtC,mBAAc,GAAW,IAAI,CAAC;IAEc,CAAC;IACpD;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,GAAkB;QACzC,IAAI,GAAG,EAAE;YACP,IACE,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,QAAQ;gBAC7C,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,EACxC;gBACA,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAChC,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType } from \"../common\";\nimport { ErrorResponse } from \"../request\";\nimport { TimeoutErrorCode } from \"../request/TimeoutError\";\nimport { RetryPolicy } from \"./RetryPolicy\";\n\n/**\n * @hidden\n */\n// Windows Socket Error Codes\nconst WindowsInterruptedFunctionCall = 10004;\n/**\n * @hidden\n */\nconst WindowsFileHandleNotValid = 10009;\n/**\n * @hidden\n */\nconst WindowsPermissionDenied = 10013;\n/**\n * @hidden\n */\nconst WindowsBadAddress = 10014;\n/**\n * @hidden\n */\nconst WindowsInvalidArgumnet = 10022;\n/**\n * @hidden\n */\nconst WindowsResourceTemporarilyUnavailable = 10035;\n/**\n * @hidden\n */\nconst WindowsOperationNowInProgress = 10036;\n/**\n * @hidden\n */\nconst WindowsAddressAlreadyInUse = 10048;\n/**\n * @hidden\n */\nconst WindowsConnectionResetByPeer = 10054;\n/**\n * @hidden\n */\nconst WindowsCannotSendAfterSocketShutdown = 10058;\n/**\n * @hidden\n */\nconst WindowsConnectionTimedOut = 10060;\n/**\n * @hidden\n */\nconst WindowsConnectionRefused = 10061;\n/**\n * @hidden\n */\nconst WindowsNameTooLong = 10063;\n/**\n * @hidden\n */\nconst WindowsHostIsDown = 10064;\n/**\n * @hidden\n */\nconst WindowsNoRouteTohost = 10065;\n/**\n * @hidden\n */\n\n// Linux Error Codes\n/**\n * @hidden\n */\nconst LinuxConnectionReset = \"ECONNRESET\";\n\n// Node Error Codes\n/**\n * @hidden\n */\nconst BrokenPipe = \"EPIPE\";\n\n/**\n * @hidden\n */\nconst CONNECTION_ERROR_CODES = [\n WindowsInterruptedFunctionCall,\n WindowsFileHandleNotValid,\n WindowsPermissionDenied,\n WindowsBadAddress,\n WindowsInvalidArgumnet,\n WindowsResourceTemporarilyUnavailable,\n WindowsOperationNowInProgress,\n WindowsAddressAlreadyInUse,\n WindowsConnectionResetByPeer,\n WindowsCannotSendAfterSocketShutdown,\n WindowsConnectionTimedOut,\n WindowsConnectionRefused,\n WindowsNameTooLong,\n WindowsHostIsDown,\n WindowsNoRouteTohost,\n LinuxConnectionReset,\n TimeoutErrorCode,\n BrokenPipe,\n];\n\n/**\n * @hidden\n */\nfunction needsRetry(operationType: OperationType, code: number | string): boolean {\n if (\n (operationType === OperationType.Read || operationType === OperationType.Query) &&\n CONNECTION_ERROR_CODES.indexOf(code) !== -1\n ) {\n return true;\n } else {\n return false;\n }\n}\n\n/**\n * This class implements the default connection retry policy for requests.\n * @hidden\n */\nexport class DefaultRetryPolicy implements RetryPolicy {\n private maxTries: number = 10;\n private currentRetryAttemptCount: number = 0;\n public retryAfterInMs: number = 1000;\n\n constructor(private operationType: OperationType) {}\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n */\n public async shouldRetry(err: ErrorResponse): Promise {\n if (err) {\n if (\n this.currentRetryAttemptCount < this.maxTries &&\n needsRetry(this.operationType, err.code)\n ) {\n this.currentRetryAttemptCount++;\n return true;\n }\n }\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.d.ts deleted file mode 100644 index dcaae4a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { OperationType } from "../common"; -import { GlobalEndpointManager } from "../globalEndpointManager"; -import { ErrorResponse } from "../request"; -import { RetryContext } from "./RetryContext"; -import { RetryPolicy } from "./RetryPolicy"; -/** - * This class implements the retry policy for endpoint discovery. - * @hidden - */ -export declare class EndpointDiscoveryRetryPolicy implements RetryPolicy { - private globalEndpointManager; - private operationType; - /** Current retry attempt count. */ - currentRetryAttemptCount: number; - /** Retry interval in milliseconds. */ - retryAfterInMs: number; - /** Max number of retry attempts to perform. */ - private maxTries; - private static readonly maxTries; - private static readonly retryAfterInMs; - /** - * @param globalEndpointManager - The GlobalEndpointManager instance. - */ - constructor(globalEndpointManager: GlobalEndpointManager, operationType: OperationType); - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - shouldRetry(err: ErrorResponse, retryContext?: RetryContext, locationEndpoint?: string): Promise; -} -//# sourceMappingURL=endpointDiscoveryRetryPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.d.ts.map deleted file mode 100644 index 99697db..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endpointDiscoveryRetryPolicy.d.ts","sourceRoot":"","sources":["../../../src/retry/endpointDiscoveryRetryPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,qBAAa,4BAA6B,YAAW,WAAW;IAe5D,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,aAAa;IAfvB,mCAAmC;IAC5B,wBAAwB,EAAE,MAAM,CAAC;IACxC,sCAAsC;IAC/B,cAAc,EAAE,MAAM,CAAC;IAE9B,+CAA+C;IAC/C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAO;IACvC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAQ;IAE9C;;OAEG;gBAEO,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,aAAa;IAOtC;;;OAGG;IACU,WAAW,CACtB,GAAG,EAAE,aAAa,EAClB,YAAY,CAAC,EAAE,YAAY,EAC3B,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;CA+BxC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.js deleted file mode 100644 index 63e57f9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.js +++ /dev/null @@ -1,49 +0,0 @@ -import { isReadRequest } from "../common/helper"; -/** - * This class implements the retry policy for endpoint discovery. - * @hidden - */ -export class EndpointDiscoveryRetryPolicy { - /** - * @param globalEndpointManager - The GlobalEndpointManager instance. - */ - constructor(globalEndpointManager, operationType) { - this.globalEndpointManager = globalEndpointManager; - this.operationType = operationType; - this.maxTries = EndpointDiscoveryRetryPolicy.maxTries; - this.currentRetryAttemptCount = 0; - this.retryAfterInMs = EndpointDiscoveryRetryPolicy.retryAfterInMs; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - async shouldRetry(err, retryContext, locationEndpoint) { - if (!err) { - return false; - } - if (!retryContext || !locationEndpoint) { - return false; - } - if (!this.globalEndpointManager.enableEndpointDiscovery) { - return false; - } - if (this.currentRetryAttemptCount >= this.maxTries) { - return false; - } - this.currentRetryAttemptCount++; - if (isReadRequest(this.operationType)) { - await this.globalEndpointManager.markCurrentLocationUnavailableForRead(locationEndpoint); - } - else { - await this.globalEndpointManager.markCurrentLocationUnavailableForWrite(locationEndpoint); - } - retryContext.retryCount = this.currentRetryAttemptCount; - retryContext.clearSessionTokenNotAvailable = false; - retryContext.retryRequestOnPreferredLocations = false; - return true; - } -} -EndpointDiscoveryRetryPolicy.maxTries = 120; // TODO: Constant? -EndpointDiscoveryRetryPolicy.retryAfterInMs = 1000; -//# sourceMappingURL=endpointDiscoveryRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.js.map deleted file mode 100644 index e2b281f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/endpointDiscoveryRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endpointDiscoveryRetryPolicy.js","sourceRoot":"","sources":["../../../src/retry/endpointDiscoveryRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD;;;GAGG;AACH,MAAM,OAAO,4BAA4B;IAWvC;;OAEG;IACH,YACU,qBAA4C,EAC5C,aAA4B;QAD5B,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAEpC,IAAI,CAAC,QAAQ,GAAG,4BAA4B,CAAC,QAAQ,CAAC;QACtD,IAAI,CAAC,wBAAwB,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,cAAc,GAAG,4BAA4B,CAAC,cAAc,CAAC;IACpE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,WAAW,CACtB,GAAkB,EAClB,YAA2B,EAC3B,gBAAyB;QAEzB,IAAI,CAAC,GAAG,EAAE;YACR,OAAO,KAAK,CAAC;SACd;QAED,IAAI,CAAC,YAAY,IAAI,CAAC,gBAAgB,EAAE;YACtC,OAAO,KAAK,CAAC;SACd;QAED,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,uBAAuB,EAAE;YACvD,OAAO,KAAK,CAAC;SACd;QAED,IAAI,IAAI,CAAC,wBAAwB,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClD,OAAO,KAAK,CAAC;SACd;QAED,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAEhC,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;YACrC,MAAM,IAAI,CAAC,qBAAqB,CAAC,qCAAqC,CAAC,gBAAgB,CAAC,CAAC;SAC1F;aAAM;YACL,MAAM,IAAI,CAAC,qBAAqB,CAAC,sCAAsC,CAAC,gBAAgB,CAAC,CAAC;SAC3F;QAED,YAAY,CAAC,UAAU,GAAG,IAAI,CAAC,wBAAwB,CAAC;QACxD,YAAY,CAAC,6BAA6B,GAAG,KAAK,CAAC;QACnD,YAAY,CAAC,gCAAgC,GAAG,KAAK,CAAC;QAEtD,OAAO,IAAI,CAAC;IACd,CAAC;;AArDuB,qCAAQ,GAAG,GAAG,CAAC,CAAC,kBAAkB;AAClC,2CAAc,GAAG,IAAI,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType } from \"../common\";\nimport { isReadRequest } from \"../common/helper\";\nimport { GlobalEndpointManager } from \"../globalEndpointManager\";\nimport { ErrorResponse } from \"../request\";\nimport { RetryContext } from \"./RetryContext\";\nimport { RetryPolicy } from \"./RetryPolicy\";\n\n/**\n * This class implements the retry policy for endpoint discovery.\n * @hidden\n */\nexport class EndpointDiscoveryRetryPolicy implements RetryPolicy {\n /** Current retry attempt count. */\n public currentRetryAttemptCount: number;\n /** Retry interval in milliseconds. */\n public retryAfterInMs: number;\n\n /** Max number of retry attempts to perform. */\n private maxTries: number;\n private static readonly maxTries = 120; // TODO: Constant?\n private static readonly retryAfterInMs = 1000;\n\n /**\n * @param globalEndpointManager - The GlobalEndpointManager instance.\n */\n constructor(\n private globalEndpointManager: GlobalEndpointManager,\n private operationType: OperationType\n ) {\n this.maxTries = EndpointDiscoveryRetryPolicy.maxTries;\n this.currentRetryAttemptCount = 0;\n this.retryAfterInMs = EndpointDiscoveryRetryPolicy.retryAfterInMs;\n }\n\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n */\n public async shouldRetry(\n err: ErrorResponse,\n retryContext?: RetryContext,\n locationEndpoint?: string\n ): Promise {\n if (!err) {\n return false;\n }\n\n if (!retryContext || !locationEndpoint) {\n return false;\n }\n\n if (!this.globalEndpointManager.enableEndpointDiscovery) {\n return false;\n }\n\n if (this.currentRetryAttemptCount >= this.maxTries) {\n return false;\n }\n\n this.currentRetryAttemptCount++;\n\n if (isReadRequest(this.operationType)) {\n await this.globalEndpointManager.markCurrentLocationUnavailableForRead(locationEndpoint);\n } else {\n await this.globalEndpointManager.markCurrentLocationUnavailableForWrite(locationEndpoint);\n }\n\n retryContext.retryCount = this.currentRetryAttemptCount;\n retryContext.clearSessionTokenNotAvailable = false;\n retryContext.retryRequestOnPreferredLocations = false;\n\n return true;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.d.ts deleted file mode 100644 index d55d870..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./retryOptions"; -export * from "./endpointDiscoveryRetryPolicy"; -export * from "./resourceThrottleRetryPolicy"; -export * from "./sessionRetryPolicy"; -export * from "./retryUtility"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.d.ts.map deleted file mode 100644 index 2f0e6fa..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/retry/index.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.js deleted file mode 100644 index d92e9a0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export * from "./retryOptions"; -export * from "./endpointDiscoveryRetryPolicy"; -export * from "./resourceThrottleRetryPolicy"; -export * from "./sessionRetryPolicy"; -export * from "./retryUtility"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.js.map deleted file mode 100644 index 77e6f5c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/retry/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./retryOptions\";\nexport * from \"./endpointDiscoveryRetryPolicy\";\nexport * from \"./resourceThrottleRetryPolicy\";\nexport * from \"./sessionRetryPolicy\";\nexport * from \"./retryUtility\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.d.ts deleted file mode 100644 index 490084e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ErrorResponse } from "../request"; -/** - * This class implements the resource throttle retry policy for requests. - * @hidden - */ -export declare class ResourceThrottleRetryPolicy { - private maxTries; - private fixedRetryIntervalInMs; - /** Current retry attempt count. */ - currentRetryAttemptCount: number; - /** Cummulative wait time in milliseconds for a request while the retries are happening. */ - cummulativeWaitTimeinMs: number; - /** Retry interval in milliseconds to wait before the next request will be sent. */ - retryAfterInMs: number; - /** Max wait time in milliseconds to wait for a request while the retries are happening. */ - private timeoutInMs; - /** - * @param maxTries - Max number of retries to be performed for a request. - * @param fixedRetryIntervalInMs - Fixed retry interval in milliseconds to wait between each - * retry ignoring the retryAfter returned as part of the response. - * @param timeoutInSeconds - Max wait time in seconds to wait for a request while the - * retries are happening. - */ - constructor(maxTries?: number, fixedRetryIntervalInMs?: number, timeoutInSeconds?: number); - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - shouldRetry(err: ErrorResponse): Promise; -} -//# sourceMappingURL=resourceThrottleRetryPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.d.ts.map deleted file mode 100644 index d4650b7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resourceThrottleRetryPolicy.d.ts","sourceRoot":"","sources":["../../../src/retry/resourceThrottleRetryPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;GAGG;AACH,qBAAa,2BAA2B;IAkBpC,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,sBAAsB;IAlBhC,mCAAmC;IAC5B,wBAAwB,EAAE,MAAM,CAAK;IAC5C,2FAA2F;IACpF,uBAAuB,EAAE,MAAM,CAAK;IAC3C,mFAAmF;IAC5E,cAAc,EAAE,MAAM,CAAK;IAElC,2FAA2F;IAC3F,OAAO,CAAC,WAAW,CAAS;IAC5B;;;;;;OAMG;gBAEO,QAAQ,GAAE,MAAU,EACpB,sBAAsB,GAAE,MAAU,EAC1C,gBAAgB,GAAE,MAAW;IAM/B;;;OAGG;IACU,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;CAqB/D"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.js deleted file mode 100644 index 5000e14..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This class implements the resource throttle retry policy for requests. - * @hidden - */ -export class ResourceThrottleRetryPolicy { - /** - * @param maxTries - Max number of retries to be performed for a request. - * @param fixedRetryIntervalInMs - Fixed retry interval in milliseconds to wait between each - * retry ignoring the retryAfter returned as part of the response. - * @param timeoutInSeconds - Max wait time in seconds to wait for a request while the - * retries are happening. - */ - constructor(maxTries = 9, fixedRetryIntervalInMs = 0, timeoutInSeconds = 30) { - this.maxTries = maxTries; - this.fixedRetryIntervalInMs = fixedRetryIntervalInMs; - /** Current retry attempt count. */ - this.currentRetryAttemptCount = 0; - /** Cummulative wait time in milliseconds for a request while the retries are happening. */ - this.cummulativeWaitTimeinMs = 0; - /** Retry interval in milliseconds to wait before the next request will be sent. */ - this.retryAfterInMs = 0; - this.timeoutInMs = timeoutInSeconds * 1000; - this.currentRetryAttemptCount = 0; - this.cummulativeWaitTimeinMs = 0; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - async shouldRetry(err) { - // TODO: any custom error object - if (err) { - if (this.currentRetryAttemptCount < this.maxTries) { - this.currentRetryAttemptCount++; - this.retryAfterInMs = 0; - if (this.fixedRetryIntervalInMs) { - this.retryAfterInMs = this.fixedRetryIntervalInMs; - } - else if (err.retryAfterInMs) { - this.retryAfterInMs = err.retryAfterInMs; - } - if (this.cummulativeWaitTimeinMs < this.timeoutInMs) { - this.cummulativeWaitTimeinMs += this.retryAfterInMs; - return true; - } - } - } - return false; - } -} -//# sourceMappingURL=resourceThrottleRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.js.map deleted file mode 100644 index 3652f70..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/resourceThrottleRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resourceThrottleRetryPolicy.js","sourceRoot":"","sources":["../../../src/retry/resourceThrottleRetryPolicy.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IAUtC;;;;;;OAMG;IACH,YACU,WAAmB,CAAC,EACpB,yBAAiC,CAAC,EAC1C,mBAA2B,EAAE;QAFrB,aAAQ,GAAR,QAAQ,CAAY;QACpB,2BAAsB,GAAtB,sBAAsB,CAAY;QAlB5C,mCAAmC;QAC5B,6BAAwB,GAAW,CAAC,CAAC;QAC5C,2FAA2F;QACpF,4BAAuB,GAAW,CAAC,CAAC;QAC3C,mFAAmF;QAC5E,mBAAc,GAAW,CAAC,CAAC;QAgBhC,IAAI,CAAC,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAAC;QAC3C,IAAI,CAAC,wBAAwB,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,uBAAuB,GAAG,CAAC,CAAC;IACnC,CAAC;IACD;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,GAAkB;QACzC,gCAAgC;QAChC,IAAI,GAAG,EAAE;YACP,IAAI,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,QAAQ,EAAE;gBACjD,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAChC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;gBAExB,IAAI,IAAI,CAAC,sBAAsB,EAAE;oBAC/B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,sBAAsB,CAAC;iBACnD;qBAAM,IAAI,GAAG,CAAC,cAAc,EAAE;oBAC7B,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;iBAC1C;gBAED,IAAI,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE;oBACnD,IAAI,CAAC,uBAAuB,IAAI,IAAI,CAAC,cAAc,CAAC;oBACpD,OAAO,IAAI,CAAC;iBACb;aACF;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ErrorResponse } from \"../request\";\n\n/**\n * This class implements the resource throttle retry policy for requests.\n * @hidden\n */\nexport class ResourceThrottleRetryPolicy {\n /** Current retry attempt count. */\n public currentRetryAttemptCount: number = 0;\n /** Cummulative wait time in milliseconds for a request while the retries are happening. */\n public cummulativeWaitTimeinMs: number = 0;\n /** Retry interval in milliseconds to wait before the next request will be sent. */\n public retryAfterInMs: number = 0;\n\n /** Max wait time in milliseconds to wait for a request while the retries are happening. */\n private timeoutInMs: number;\n /**\n * @param maxTries - Max number of retries to be performed for a request.\n * @param fixedRetryIntervalInMs - Fixed retry interval in milliseconds to wait between each\n * retry ignoring the retryAfter returned as part of the response.\n * @param timeoutInSeconds - Max wait time in seconds to wait for a request while the\n * retries are happening.\n */\n constructor(\n private maxTries: number = 9,\n private fixedRetryIntervalInMs: number = 0,\n timeoutInSeconds: number = 30\n ) {\n this.timeoutInMs = timeoutInSeconds * 1000;\n this.currentRetryAttemptCount = 0;\n this.cummulativeWaitTimeinMs = 0;\n }\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n */\n public async shouldRetry(err: ErrorResponse): Promise {\n // TODO: any custom error object\n if (err) {\n if (this.currentRetryAttemptCount < this.maxTries) {\n this.currentRetryAttemptCount++;\n this.retryAfterInMs = 0;\n\n if (this.fixedRetryIntervalInMs) {\n this.retryAfterInMs = this.fixedRetryIntervalInMs;\n } else if (err.retryAfterInMs) {\n this.retryAfterInMs = err.retryAfterInMs;\n }\n\n if (this.cummulativeWaitTimeinMs < this.timeoutInMs) {\n this.cummulativeWaitTimeinMs += this.retryAfterInMs;\n return true;\n }\n }\n }\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.d.ts deleted file mode 100644 index 87df0ab..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Represents the Retry policy assocated with throttled requests in the Azure Cosmos DB database service. - */ -export interface RetryOptions { - /** Max number of retries to be performed for a request. Default value 9. */ - maxRetryAttemptCount: number; - /** Fixed retry interval in milliseconds to wait between each retry ignoring the retryAfter returned as part of the response. */ - fixedRetryIntervalInMilliseconds: number; - /** Max wait time in seconds to wait for a request while the retries are happening. Default value 30 seconds. */ - maxWaitTimeInSeconds: number; -} -//# sourceMappingURL=retryOptions.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.d.ts.map deleted file mode 100644 index 2da9e0f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryOptions.d.ts","sourceRoot":"","sources":["../../../src/retry/retryOptions.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gIAAgI;IAChI,gCAAgC,EAAE,MAAM,CAAC;IACzC,gHAAgH;IAChH,oBAAoB,EAAE,MAAM,CAAC;CAC9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.js deleted file mode 100644 index 5b8f771..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=retryOptions.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.js.map deleted file mode 100644 index 719a307..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryOptions.js","sourceRoot":"","sources":["../../../src/retry/retryOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Represents the Retry policy assocated with throttled requests in the Azure Cosmos DB database service.\n */\nexport interface RetryOptions {\n /** Max number of retries to be performed for a request. Default value 9. */\n maxRetryAttemptCount: number;\n /** Fixed retry interval in milliseconds to wait between each retry ignoring the retryAfter returned as part of the response. */\n fixedRetryIntervalInMilliseconds: number;\n /** Max wait time in seconds to wait for a request while the retries are happening. Default value 30 seconds. */\n maxWaitTimeInSeconds: number;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.d.ts deleted file mode 100644 index ee21371..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Response } from "../request"; -import { RequestContext } from "../request/RequestContext"; -import { DefaultRetryPolicy } from "./defaultRetryPolicy"; -import { EndpointDiscoveryRetryPolicy } from "./endpointDiscoveryRetryPolicy"; -import { ResourceThrottleRetryPolicy } from "./resourceThrottleRetryPolicy"; -import { RetryContext } from "./RetryContext"; -import { SessionRetryPolicy } from "./sessionRetryPolicy"; -/** - * @hidden - */ -interface ExecuteArgs { - retryContext?: RetryContext; - retryPolicies?: RetryPolicies; - requestContext: RequestContext; - executeRequest: (requestContext: RequestContext) => Promise>; -} -/** - * @hidden - */ -interface RetryPolicies { - endpointDiscoveryRetryPolicy: EndpointDiscoveryRetryPolicy; - resourceThrottleRetryPolicy: ResourceThrottleRetryPolicy; - sessionReadRetryPolicy: SessionRetryPolicy; - defaultRetryPolicy: DefaultRetryPolicy; -} -/** - * @hidden - */ -export declare function execute({ retryContext, retryPolicies, requestContext, executeRequest, }: ExecuteArgs): Promise>; -export {}; -//# sourceMappingURL=retryUtility.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.d.ts.map deleted file mode 100644 index 33d8594..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryUtility.d.ts","sourceRoot":"","sources":["../../../src/retry/retryUtility.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5E;AAED;;GAEG;AACH,UAAU,aAAa;IACrB,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,sBAAsB,EAAE,kBAAkB,CAAC;IAC3C,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAgC,EAChC,aAAa,EACb,cAAc,EACd,cAAc,GACf,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAkFtC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.js deleted file mode 100644 index 105af37..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "../common/constants"; -import { sleep } from "../common/helper"; -import { StatusCodes, SubStatusCodes } from "../common/statusCodes"; -import { DefaultRetryPolicy } from "./defaultRetryPolicy"; -import { EndpointDiscoveryRetryPolicy } from "./endpointDiscoveryRetryPolicy"; -import { ResourceThrottleRetryPolicy } from "./resourceThrottleRetryPolicy"; -import { SessionRetryPolicy } from "./sessionRetryPolicy"; -/** - * @hidden - */ -export async function execute({ retryContext = { retryCount: 0 }, retryPolicies, requestContext, executeRequest, }) { - // TODO: any response - if (!retryPolicies) { - retryPolicies = { - endpointDiscoveryRetryPolicy: new EndpointDiscoveryRetryPolicy(requestContext.globalEndpointManager, requestContext.operationType), - resourceThrottleRetryPolicy: new ResourceThrottleRetryPolicy(requestContext.connectionPolicy.retryOptions.maxRetryAttemptCount, requestContext.connectionPolicy.retryOptions.fixedRetryIntervalInMilliseconds, requestContext.connectionPolicy.retryOptions.maxWaitTimeInSeconds), - sessionReadRetryPolicy: new SessionRetryPolicy(requestContext.globalEndpointManager, requestContext.resourceType, requestContext.operationType, requestContext.connectionPolicy), - defaultRetryPolicy: new DefaultRetryPolicy(requestContext.operationType), - }; - } - if (retryContext && retryContext.clearSessionTokenNotAvailable) { - requestContext.client.clearSessionToken(requestContext.path); - delete requestContext.headers["x-ms-session-token"]; - } - requestContext.endpoint = await requestContext.globalEndpointManager.resolveServiceEndpoint(requestContext.resourceType, requestContext.operationType); - try { - const response = await executeRequest(requestContext); - response.headers[Constants.ThrottleRetryCount] = - retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount; - response.headers[Constants.ThrottleRetryWaitTimeInMs] = - retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs; - return response; - } - catch (err) { - // TODO: any error - let retryPolicy = null; - const headers = err.headers || {}; - if (err.code === StatusCodes.ENOTFOUND || - err.code === "REQUEST_SEND_ERROR" || - (err.code === StatusCodes.Forbidden && - (err.substatus === SubStatusCodes.DatabaseAccountNotFound || - err.substatus === SubStatusCodes.WriteForbidden))) { - retryPolicy = retryPolicies.endpointDiscoveryRetryPolicy; - } - else if (err.code === StatusCodes.TooManyRequests) { - retryPolicy = retryPolicies.resourceThrottleRetryPolicy; - } - else if (err.code === StatusCodes.NotFound && - err.substatus === SubStatusCodes.ReadSessionNotAvailable) { - retryPolicy = retryPolicies.sessionReadRetryPolicy; - } - else { - retryPolicy = retryPolicies.defaultRetryPolicy; - } - const results = await retryPolicy.shouldRetry(err, retryContext, requestContext.endpoint); - if (!results) { - headers[Constants.ThrottleRetryCount] = - retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount; - headers[Constants.ThrottleRetryWaitTimeInMs] = - retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs; - err.headers = Object.assign(Object.assign({}, err.headers), headers); - throw err; - } - else { - requestContext.retryCount++; - const newUrl = results[1]; // TODO: any hack - if (newUrl !== undefined) { - requestContext.endpoint = newUrl; - } - await sleep(retryPolicy.retryAfterInMs); - return execute({ - executeRequest, - requestContext, - retryContext, - retryPolicies, - }); - } - } -} -//# sourceMappingURL=retryUtility.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.js.map deleted file mode 100644 index a44a280..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/retryUtility.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryUtility.js","sourceRoot":"","sources":["../../../src/retry/retryUtility.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAsB1D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,YAAY,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,EAChC,aAAa,EACb,cAAc,EACd,cAAc,GACF;IACZ,qBAAqB;IACrB,IAAI,CAAC,aAAa,EAAE;QAClB,aAAa,GAAG;YACd,4BAA4B,EAAE,IAAI,4BAA4B,CAC5D,cAAc,CAAC,qBAAqB,EACpC,cAAc,CAAC,aAAa,CAC7B;YACD,2BAA2B,EAAE,IAAI,2BA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AC,WAAW,CAAC,cAAc,CAAC,CAAC;YACxC,OAAO,OAAO,CAAC;gBACb,cAAc;gBACd,cAAc;gBACd,YAAY;gBACZ,aAAa;aACd,CAAC,CAAC;SACJ;KACF;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common/constants\";\nimport { sleep } from \"../common/helper\";\nimport { StatusCodes, SubStatusCodes } from \"../common/statusCodes\";\nimport { Response } from \"../request\";\nimport { RequestContext } from \"../request/RequestContext\";\nimport { DefaultRetryPolicy } from \"./defaultRetryPolicy\";\nimport { EndpointDiscoveryRetryPolicy } from \"./endpointDiscoveryRetryPolicy\";\nimport { ResourceThrottleRetryPolicy } from \"./resourceThrottleRetryPolicy\";\nimport { RetryContext } from \"./RetryContext\";\nimport { RetryPolicy } from \"./RetryPolicy\";\nimport { SessionRetryPolicy } from \"./sessionRetryPolicy\";\n\n/**\n * @hidden\n */\ninterface ExecuteArgs {\n retryContext?: RetryContext;\n retryPolicies?: RetryPolicies;\n requestContext: RequestContext;\n executeRequest: (requestContext: RequestContext) => Promise>;\n}\n\n/**\n * @hidden\n */\ninterface RetryPolicies {\n endpointDiscoveryRetryPolicy: EndpointDiscoveryRetryPolicy;\n resourceThrottleRetryPolicy: ResourceThrottleRetryPolicy;\n sessionReadRetryPolicy: SessionRetryPolicy;\n defaultRetryPolicy: DefaultRetryPolicy;\n}\n\n/**\n * @hidden\n */\nexport async function execute({\n retryContext = { retryCount: 0 },\n retryPolicies,\n requestContext,\n executeRequest,\n}: ExecuteArgs): Promise> {\n // TODO: any response\n if (!retryPolicies) {\n retryPolicies = {\n endpointDiscoveryRetryPolicy: new EndpointDiscoveryRetryPolicy(\n requestContext.globalEndpointManager,\n requestContext.operationType\n ),\n resourceThrottleRetryPolicy: new ResourceThrottleRetryPolicy(\n requestContext.connectionPolicy.retryOptions.maxRetryAttemptCount,\n requestContext.connectionPolicy.retryOptions.fixedRetryIntervalInMilliseconds,\n requestContext.connectionPolicy.retryOptions.maxWaitTimeInSeconds\n ),\n sessionReadRetryPolicy: new SessionRetryPolicy(\n requestContext.globalEndpointManager,\n requestContext.resourceType,\n requestContext.operationType,\n requestContext.connectionPolicy\n ),\n defaultRetryPolicy: new DefaultRetryPolicy(requestContext.operationType),\n };\n }\n if (retryContext && retryContext.clearSessionTokenNotAvailable) {\n requestContext.client.clearSessionToken(requestContext.path);\n delete requestContext.headers[\"x-ms-session-token\"];\n }\n requestContext.endpoint = await requestContext.globalEndpointManager.resolveServiceEndpoint(\n requestContext.resourceType,\n requestContext.operationType\n );\n try {\n const response = await executeRequest(requestContext);\n response.headers[Constants.ThrottleRetryCount] =\n retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount;\n response.headers[Constants.ThrottleRetryWaitTimeInMs] =\n retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs;\n return response;\n } catch (err: any) {\n // TODO: any error\n let retryPolicy: RetryPolicy = null;\n const headers = err.headers || {};\n if (\n err.code === StatusCodes.ENOTFOUND ||\n err.code === \"REQUEST_SEND_ERROR\" ||\n (err.code === StatusCodes.Forbidden &&\n (err.substatus === SubStatusCodes.DatabaseAccountNotFound ||\n err.substatus === SubStatusCodes.WriteForbidden))\n ) {\n retryPolicy = retryPolicies.endpointDiscoveryRetryPolicy;\n } else if (err.code === StatusCodes.TooManyRequests) {\n retryPolicy = retryPolicies.resourceThrottleRetryPolicy;\n } else if (\n err.code === StatusCodes.NotFound &&\n err.substatus === SubStatusCodes.ReadSessionNotAvailable\n ) {\n retryPolicy = retryPolicies.sessionReadRetryPolicy;\n } else {\n retryPolicy = retryPolicies.defaultRetryPolicy;\n }\n const results = await retryPolicy.shouldRetry(err, retryContext, requestContext.endpoint);\n if (!results) {\n headers[Constants.ThrottleRetryCount] =\n retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount;\n headers[Constants.ThrottleRetryWaitTimeInMs] =\n retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs;\n err.headers = { ...err.headers, ...headers };\n throw err;\n } else {\n requestContext.retryCount++;\n const newUrl = (results as any)[1]; // TODO: any hack\n if (newUrl !== undefined) {\n requestContext.endpoint = newUrl;\n }\n await sleep(retryPolicy.retryAfterInMs);\n return execute({\n executeRequest,\n requestContext,\n retryContext,\n retryPolicies,\n });\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.d.ts deleted file mode 100644 index d566ec0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { OperationType, ResourceType } from "../common"; -import { ConnectionPolicy } from "../documents"; -import { GlobalEndpointManager } from "../globalEndpointManager"; -import { ErrorResponse } from "../request"; -import { RetryContext } from "./RetryContext"; -import { RetryPolicy } from "./RetryPolicy"; -/** - * This class implements the retry policy for session consistent reads. - * @hidden - */ -export declare class SessionRetryPolicy implements RetryPolicy { - private globalEndpointManager; - private resourceType; - private operationType; - private connectionPolicy; - /** Current retry attempt count. */ - currentRetryAttemptCount: number; - /** Retry interval in milliseconds. */ - retryAfterInMs: number; - /** - * @param globalEndpointManager - The GlobalEndpointManager instance. - */ - constructor(globalEndpointManager: GlobalEndpointManager, resourceType: ResourceType, operationType: OperationType, connectionPolicy: ConnectionPolicy); - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - * @param callback - The callback function which takes bool argument which specifies whether the request - * will be retried or not. - */ - shouldRetry(err: ErrorResponse, retryContext?: RetryContext): Promise; -} -//# sourceMappingURL=sessionRetryPolicy.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.d.ts.map deleted file mode 100644 index 93be8e4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sessionRetryPolicy.d.ts","sourceRoot":"","sources":["../../../src/retry/sessionRetryPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,WAAW;IAUlD,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,gBAAgB;IAZ1B,mCAAmC;IAC5B,wBAAwB,SAAK;IACpC,sCAAsC;IAC/B,cAAc,SAAK;IAE1B;;OAEG;gBAEO,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB;IAG5C;;;;;OAKG;IACU,WAAW,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CA0C5F"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.js deleted file mode 100644 index ecec177..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { isReadRequest } from "../common"; -/** - * This class implements the retry policy for session consistent reads. - * @hidden - */ -export class SessionRetryPolicy { - /** - * @param globalEndpointManager - The GlobalEndpointManager instance. - */ - constructor(globalEndpointManager, resourceType, operationType, connectionPolicy) { - this.globalEndpointManager = globalEndpointManager; - this.resourceType = resourceType; - this.operationType = operationType; - this.connectionPolicy = connectionPolicy; - /** Current retry attempt count. */ - this.currentRetryAttemptCount = 0; - /** Retry interval in milliseconds. */ - this.retryAfterInMs = 0; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - * @param callback - The callback function which takes bool argument which specifies whether the request - * will be retried or not. - */ - async shouldRetry(err, retryContext) { - if (!err) { - return false; - } - if (!retryContext) { - return false; - } - if (!this.connectionPolicy.enableEndpointDiscovery) { - return false; - } - if (this.globalEndpointManager.canUseMultipleWriteLocations(this.resourceType, this.operationType)) { - // If we can write to multiple locations, we should against every write endpoint until we succeed - const endpoints = isReadRequest(this.operationType) - ? await this.globalEndpointManager.getReadEndpoints() - : await this.globalEndpointManager.getWriteEndpoints(); - if (this.currentRetryAttemptCount > endpoints.length) { - return false; - } - else { - this.currentRetryAttemptCount++; - retryContext.retryCount++; - retryContext.retryRequestOnPreferredLocations = this.currentRetryAttemptCount > 1; - retryContext.clearSessionTokenNotAvailable = - this.currentRetryAttemptCount === endpoints.length; - return true; - } - } - else { - if (this.currentRetryAttemptCount > 1) { - return false; - } - else { - this.currentRetryAttemptCount++; - retryContext.retryCount++; - retryContext.retryRequestOnPreferredLocations = false; // Forces all operations to primary write endpoint - retryContext.clearSessionTokenNotAvailable = true; - return true; - } - } - } -} -//# sourceMappingURL=sessionRetryPolicy.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.js.map deleted file mode 100644 index 18f5c83..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/retry/sessionRetryPolicy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sessionRetryPolicy.js","sourceRoot":"","sources":["../../../src/retry/sessionRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAA+B,MAAM,WAAW,CAAC;AAOvE;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAM7B;;OAEG;IACH,YACU,qBAA4C,EAC5C,YAA0B,EAC1B,aAA4B,EAC5B,gBAAkC;QAHlC,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAZ5C,mCAAmC;QAC5B,6BAAwB,GAAG,CAAC,CAAC;QACpC,sCAAsC;QAC/B,mBAAc,GAAG,CAAC,CAAC;IAUvB,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,WAAW,CAAC,GAAkB,EAAE,YAA2B;QACtE,IAAI,CAAC,GAAG,EAAE;YACR,OAAO,KAAK,CAAC;SACd;QAED,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO,KAAK,CAAC;SACd;QAED,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,EAAE;YAClD,OAAO,KAAK,CAAC;SACd;QAED,IACE,IAAI,CAAC,qBAAqB,CAAC,4BAA4B,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,EAC9F;YACA,iGAAiG;YACjG,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC;gBACjD,CAAC,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,gBAAgB,EAAE;gBACrD,CAAC,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;YACzD,IAAI,IAAI,CAAC,wBAAwB,GAAG,SAAS,CAAC,MAAM,EAAE;gBACpD,OAAO,KAAK,CAAC;aACd;iBAAM;gBACL,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAChC,YAAY,CAAC,UAAU,EAAE,CAAC;gBAC1B,YAAY,CAAC,gCAAgC,GAAG,IAAI,CAAC,wBAAwB,GAAG,CAAC,CAAC;gBAClF,YAAY,CAAC,6BAA6B;oBACxC,IAAI,CAAC,wBAAwB,KAAK,SAAS,CAAC,MAAM,CAAC;gBACrD,OAAO,IAAI,CAAC;aACb;SACF;aAAM;YACL,IAAI,IAAI,CAAC,wBAAwB,GAAG,CAAC,EAAE;gBACrC,OAAO,KAAK,CAAC;aACd;iBAAM;gBACL,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAChC,YAAY,CAAC,UAAU,EAAE,CAAC;gBAC1B,YAAY,CAAC,gCAAgC,GAAG,KAAK,CAAC,CAAC,kDAAkD;gBACzG,YAAY,CAAC,6BAA6B,GAAG,IAAI,CAAC;gBAClD,OAAO,IAAI,CAAC;aACb;SACF;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isReadRequest, OperationType, ResourceType } from \"../common\";\nimport { ConnectionPolicy } from \"../documents\";\nimport { GlobalEndpointManager } from \"../globalEndpointManager\";\nimport { ErrorResponse } from \"../request\";\nimport { RetryContext } from \"./RetryContext\";\nimport { RetryPolicy } from \"./RetryPolicy\";\n\n/**\n * This class implements the retry policy for session consistent reads.\n * @hidden\n */\nexport class SessionRetryPolicy implements RetryPolicy {\n /** Current retry attempt count. */\n public currentRetryAttemptCount = 0;\n /** Retry interval in milliseconds. */\n public retryAfterInMs = 0;\n\n /**\n * @param globalEndpointManager - The GlobalEndpointManager instance.\n */\n constructor(\n private globalEndpointManager: GlobalEndpointManager,\n private resourceType: ResourceType,\n private operationType: OperationType,\n private connectionPolicy: ConnectionPolicy\n ) {}\n\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n * @param callback - The callback function which takes bool argument which specifies whether the request\n * will be retried or not.\n */\n public async shouldRetry(err: ErrorResponse, retryContext?: RetryContext): Promise {\n if (!err) {\n return false;\n }\n\n if (!retryContext) {\n return false;\n }\n\n if (!this.connectionPolicy.enableEndpointDiscovery) {\n return false;\n }\n\n if (\n this.globalEndpointManager.canUseMultipleWriteLocations(this.resourceType, this.operationType)\n ) {\n // If we can write to multiple locations, we should against every write endpoint until we succeed\n const endpoints = isReadRequest(this.operationType)\n ? await this.globalEndpointManager.getReadEndpoints()\n : await this.globalEndpointManager.getWriteEndpoints();\n if (this.currentRetryAttemptCount > endpoints.length) {\n return false;\n } else {\n this.currentRetryAttemptCount++;\n retryContext.retryCount++;\n retryContext.retryRequestOnPreferredLocations = this.currentRetryAttemptCount > 1;\n retryContext.clearSessionTokenNotAvailable =\n this.currentRetryAttemptCount === endpoints.length;\n return true;\n }\n } else {\n if (this.currentRetryAttemptCount > 1) {\n return false;\n } else {\n this.currentRetryAttemptCount++;\n retryContext.retryCount++;\n retryContext.retryRequestOnPreferredLocations = false; // Forces all operations to primary write endpoint\n retryContext.clearSessionTokenNotAvailable = true;\n return true;\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.d.ts deleted file mode 100644 index 9f964b5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { InMemoryCollectionRoutingMap } from "./inMemoryCollectionRoutingMap"; -/** @hidden */ -export declare function createCompleteRoutingMap(partitionKeyRangeInfoTuppleList: any[]): InMemoryCollectionRoutingMap; -//# sourceMappingURL=CollectionRoutingMapFactory.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.d.ts.map deleted file mode 100644 index 1889325..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CollectionRoutingMapFactory.d.ts","sourceRoot":"","sources":["../../../src/routing/CollectionRoutingMapFactory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAiB9E,cAAc;AACd,wBAAgB,wBAAwB,CACtC,+BAA+B,EAAE,GAAG,EAAE,GACrC,4BAA4B,CAqB9B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.js deleted file mode 100644 index 6138cbc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants } from "../common/constants"; -import { InMemoryCollectionRoutingMap } from "./inMemoryCollectionRoutingMap"; -/** - * @hidden - */ -function compareRanges(a, b) { - const aVal = a[0][Constants.PartitionKeyRange.MinInclusive]; - const bVal = b[0][Constants.PartitionKeyRange.MinInclusive]; - if (aVal > bVal) { - return 1; - } - if (aVal < bVal) { - return -1; - } - return 0; -} -/** @hidden */ -export function createCompleteRoutingMap(partitionKeyRangeInfoTuppleList) { - const rangeById = {}; // TODO: any - const rangeByInfo = {}; // TODO: any - let sortedRanges = []; - // the for loop doesn't invoke any async callback - for (const r of partitionKeyRangeInfoTuppleList) { - rangeById[r[0][Constants.PartitionKeyRange.Id]] = r; - rangeByInfo[r[1]] = r[0]; - sortedRanges.push(r); - } - sortedRanges = sortedRanges.sort(compareRanges); - const partitionKeyOrderedRange = sortedRanges.map((r) => r[0]); - const orderedPartitionInfo = sortedRanges.map((r) => r[1]); - if (!isCompleteSetOfRange(partitionKeyOrderedRange)) { - return undefined; - } - return new InMemoryCollectionRoutingMap(partitionKeyOrderedRange, orderedPartitionInfo); -} -/** - * @hidden - */ -function isCompleteSetOfRange(partitionKeyOrderedRange) { - // TODO: any - let isComplete = false; - if (partitionKeyOrderedRange.length > 0) { - const firstRange = partitionKeyOrderedRange[0]; - const lastRange = partitionKeyOrderedRange[partitionKeyOrderedRange.length - 1]; - isComplete = - firstRange[Constants.PartitionKeyRange.MinInclusive] === - Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey; - isComplete = - isComplete && - lastRange[Constants.PartitionKeyRange.MaxExclusive] === - Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey; - for (let i = 1; i < partitionKeyOrderedRange.length; i++) { - const previousRange = partitionKeyOrderedRange[i - 1]; - const currentRange = partitionKeyOrderedRange[i]; - isComplete = - isComplete && - previousRange[Constants.PartitionKeyRange.MaxExclusive] === - currentRange[Constants.PartitionKeyRange.MinInclusive]; - if (!isComplete) { - if (previousRange[Constants.PartitionKeyRange.MaxExclusive] > - currentRange[Constants.PartitionKeyRange.MinInclusive]) { - throw Error("Ranges overlap"); - } - break; - } - } - } - return isComplete; -} -//# sourceMappingURL=CollectionRoutingMapFactory.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.js.map deleted file mode 100644 index 39b39b1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/CollectionRoutingMapFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CollectionRoutingMapFactory.js","sourceRoot":"","sources":["../../../src/routing/CollectionRoutingMapFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC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AC,YAAY,CAAC;oBACvD,YAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,YAAY,CAAC,EACtD;oBACA,MAAM,KAAK,CAAC,gBAAgB,CAAC,CAAC;iBAC/B;gBACD,MAAM;aACP;SACF;KACF;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common/constants\";\nimport { InMemoryCollectionRoutingMap } from \"./inMemoryCollectionRoutingMap\";\n\n/**\n * @hidden\n */\nfunction compareRanges(a: any, b: any): 0 | 1 | -1 {\n const aVal = a[0][Constants.PartitionKeyRange.MinInclusive];\n const bVal = b[0][Constants.PartitionKeyRange.MinInclusive];\n if (aVal > bVal) {\n return 1;\n }\n if (aVal < bVal) {\n return -1;\n }\n return 0;\n}\n\n/** @hidden */\nexport function createCompleteRoutingMap(\n partitionKeyRangeInfoTuppleList: any[]\n): InMemoryCollectionRoutingMap {\n const rangeById: any = {}; // TODO: any\n const rangeByInfo: any = {}; // TODO: any\n\n let sortedRanges = [];\n\n // the for loop doesn't invoke any async callback\n for (const r of partitionKeyRangeInfoTuppleList) {\n rangeById[r[0][Constants.PartitionKeyRange.Id]] = r;\n rangeByInfo[r[1]] = r[0];\n sortedRanges.push(r);\n }\n\n sortedRanges = sortedRanges.sort(compareRanges);\n const partitionKeyOrderedRange = sortedRanges.map((r) => r[0]);\n const orderedPartitionInfo = sortedRanges.map((r) => r[1]);\n\n if (!isCompleteSetOfRange(partitionKeyOrderedRange)) {\n return undefined;\n }\n return new InMemoryCollectionRoutingMap(partitionKeyOrderedRange, orderedPartitionInfo);\n}\n\n/**\n * @hidden\n */\nfunction isCompleteSetOfRange(partitionKeyOrderedRange: any): boolean {\n // TODO: any\n let isComplete = false;\n if (partitionKeyOrderedRange.length > 0) {\n const firstRange = partitionKeyOrderedRange[0];\n const lastRange = partitionKeyOrderedRange[partitionKeyOrderedRange.length - 1];\n isComplete =\n firstRange[Constants.PartitionKeyRange.MinInclusive] ===\n Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey;\n isComplete =\n isComplete &&\n lastRange[Constants.PartitionKeyRange.MaxExclusive] ===\n Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey;\n\n for (let i = 1; i < partitionKeyOrderedRange.length; i++) {\n const previousRange = partitionKeyOrderedRange[i - 1];\n const currentRange = partitionKeyOrderedRange[i];\n isComplete =\n isComplete &&\n previousRange[Constants.PartitionKeyRange.MaxExclusive] ===\n currentRange[Constants.PartitionKeyRange.MinInclusive];\n\n if (!isComplete) {\n if (\n previousRange[Constants.PartitionKeyRange.MaxExclusive] >\n currentRange[Constants.PartitionKeyRange.MinInclusive]\n ) {\n throw Error(\"Ranges overlap\");\n }\n break;\n }\n }\n }\n return isComplete;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.d.ts deleted file mode 100644 index 2d34e84..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { PartitionKeyRange } from "../client/Container/PartitionKeyRange"; -import { QueryRange as ResponseQueryRange } from "../request/ErrorResponse"; -/** @hidden */ -export declare class QueryRange { - min: string; - max: string; - isMinInclusive: boolean; - isMaxInclusive: boolean; - /** - * Represents a QueryRange. - * - * @param rangeMin - min - * @param rangeMin - max - * @param isMinInclusive - isMinInclusive - * @param isMaxInclusive - isMaxInclusive - * @hidden - */ - constructor(rangeMin: string, rangeMax: string, isMinInclusive: boolean, isMaxInclusive: boolean); - overlaps(other: QueryRange): boolean; - isFullRange(): boolean; - isEmpty(): boolean; - /** - * Parse a QueryRange from a partitionKeyRange - * @returns QueryRange - * @hidden - */ - static parsePartitionKeyRange(partitionKeyRange: PartitionKeyRange): QueryRange; - /** - * Parse a QueryRange from a dictionary - * @returns QueryRange - * @hidden - */ - static parseFromDict(queryRangeDict: ResponseQueryRange): QueryRange; -} -//# sourceMappingURL=QueryRange.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.d.ts.map deleted file mode 100644 index 4be1a86..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueryRange.d.ts","sourceRoot":"","sources":["../../../src/routing/QueryRange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE5E,cAAc;AACd,qBAAa,UAAU;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IAE/B;;;;;;;;OAQG;gBAED,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,OAAO,EACvB,cAAc,EAAE,OAAO;IAOlB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;IAsBpC,WAAW,IAAI,OAAO;IAStB,OAAO,IAAI,OAAO;IAGzB;;;;OAIG;WACW,sBAAsB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,UAAU;IAQtF;;;;OAIG;WACW,aAAa,CAAC,cAAc,EAAE,kBAAkB,GAAG,UAAU;CAQ5E"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.js deleted file mode 100644 index 7daa2d2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Constants } from "../common"; -/** @hidden */ -export class QueryRange { - /** - * Represents a QueryRange. - * - * @param rangeMin - min - * @param rangeMin - max - * @param isMinInclusive - isMinInclusive - * @param isMaxInclusive - isMaxInclusive - * @hidden - */ - constructor(rangeMin, rangeMax, isMinInclusive, isMaxInclusive) { - this.min = rangeMin; - this.max = rangeMax; - this.isMinInclusive = isMinInclusive; - this.isMaxInclusive = isMaxInclusive; - } - overlaps(other) { - const range1 = this; // eslint-disable-line @typescript-eslint/no-this-alias - const range2 = other; - if (range1 === undefined || range2 === undefined) { - return false; - } - if (range1.isEmpty() || range2.isEmpty()) { - return false; - } - if (range1.min <= range2.max || range2.min <= range1.max) { - if ((range1.min === range2.max && !(range1.isMinInclusive && range2.isMaxInclusive)) || - (range2.min === range1.max && !(range2.isMinInclusive && range1.isMaxInclusive))) { - return false; - } - return true; - } - return false; - } - isFullRange() { - return (this.min === Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey && - this.max === Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey && - this.isMinInclusive === true && - this.isMaxInclusive === false); - } - isEmpty() { - return !(this.isMinInclusive && this.isMaxInclusive) && this.min === this.max; - } - /** - * Parse a QueryRange from a partitionKeyRange - * @returns QueryRange - * @hidden - */ - static parsePartitionKeyRange(partitionKeyRange) { - return new QueryRange(partitionKeyRange[Constants.PartitionKeyRange.MinInclusive], partitionKeyRange[Constants.PartitionKeyRange.MaxExclusive], true, false); - } - /** - * Parse a QueryRange from a dictionary - * @returns QueryRange - * @hidden - */ - static parseFromDict(queryRangeDict) { - return new QueryRange(queryRangeDict.min, queryRangeDict.max, queryRangeDict.isMinInclusive, queryRangeDict.isMaxInclusive); - } -} -//# sourceMappingURL=QueryRange.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.js.map deleted file mode 100644 index 0c3833a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/QueryRange.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueryRange.js","sourceRoot":"","sources":["../../../src/routing/QueryRange.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,cAAc;AACd,MAAM,OAAO,UAAU;IAMrB;;;;;;;;OAQG;IACH,YACE,QAAgB,EAChB,QAAgB,EAChB,cAAuB,EACvB,cAAuB;QAEvB,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;QACpB,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;QACpB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IACM,QAAQ,CAAC,KAAiB;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,uDAAuD;QAC5E,MAAM,MAAM,GAAG,KAAK,CAAC;QACrB,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE;YAChD,OAAO,KAAK,CAAC;SACd;QACD,IAAI,MAAM,CAAC,OAAO,EAAE,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE;YACxC,OAAO,KAAK,CAAC;SACd;QAED,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE;YACxD,IACE,CAAC,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC;gBAChF,CAAC,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,EAChF;gBACA,OAAO,KAAK,CAAC;aACd;YACD,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,WAAW;QAChB,OAAO,CACL,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC,8BAA8B,CAAC,qCAAqC;YAC3F,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC,8BAA8B,CAAC,qCAAqC;YAC3F,IAAI,CAAC,cAAc,KAAK,IAAI;YAC5B,IAAI,CAAC,cAAc,KAAK,KAAK,CAC9B,CAAC;IACJ,CAAC;IAEM,OAAO;QACZ,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC;IAChF,CAAC;IACD;;;;OAIG;IACI,MAAM,CAAC,sBAAsB,CAAC,iBAAoC;QACvE,OAAO,IAAI,UAAU,CACnB,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,CAAC,YAAY,CAAC,EAC3D,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,CAAC,YAAY,CAAC,EAC3D,IAAI,EACJ,KAAK,CACN,CAAC;IACJ,CAAC;IACD;;;;OAIG;IACI,MAAM,CAAC,aAAa,CAAC,cAAkC;QAC5D,OAAO,IAAI,UAAU,CACnB,cAAc,CAAC,GAAG,EAClB,cAAc,CAAC,GAAG,EAClB,cAAc,CAAC,cAAc,EAC7B,cAAc,CAAC,cAAc,CAC9B,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyRange } from \"../client/Container/PartitionKeyRange\";\nimport { Constants } from \"../common\";\nimport { QueryRange as ResponseQueryRange } from \"../request/ErrorResponse\";\n\n/** @hidden */\nexport class QueryRange {\n public min: string;\n public max: string;\n public isMinInclusive: boolean;\n public isMaxInclusive: boolean;\n\n /**\n * Represents a QueryRange.\n *\n * @param rangeMin - min\n * @param rangeMin - max\n * @param isMinInclusive - isMinInclusive\n * @param isMaxInclusive - isMaxInclusive\n * @hidden\n */\n constructor(\n rangeMin: string,\n rangeMax: string,\n isMinInclusive: boolean,\n isMaxInclusive: boolean\n ) {\n this.min = rangeMin;\n this.max = rangeMax;\n this.isMinInclusive = isMinInclusive;\n this.isMaxInclusive = isMaxInclusive;\n }\n public overlaps(other: QueryRange): boolean {\n const range1 = this; // eslint-disable-line @typescript-eslint/no-this-alias\n const range2 = other;\n if (range1 === undefined || range2 === undefined) {\n return false;\n }\n if (range1.isEmpty() || range2.isEmpty()) {\n return false;\n }\n\n if (range1.min <= range2.max || range2.min <= range1.max) {\n if (\n (range1.min === range2.max && !(range1.isMinInclusive && range2.isMaxInclusive)) ||\n (range2.min === range1.max && !(range2.isMinInclusive && range1.isMaxInclusive))\n ) {\n return false;\n }\n return true;\n }\n return false;\n }\n\n public isFullRange(): boolean {\n return (\n this.min === Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey &&\n this.max === Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey &&\n this.isMinInclusive === true &&\n this.isMaxInclusive === false\n );\n }\n\n public isEmpty(): boolean {\n return !(this.isMinInclusive && this.isMaxInclusive) && this.min === this.max;\n }\n /**\n * Parse a QueryRange from a partitionKeyRange\n * @returns QueryRange\n * @hidden\n */\n public static parsePartitionKeyRange(partitionKeyRange: PartitionKeyRange): QueryRange {\n return new QueryRange(\n partitionKeyRange[Constants.PartitionKeyRange.MinInclusive],\n partitionKeyRange[Constants.PartitionKeyRange.MaxExclusive],\n true,\n false\n );\n }\n /**\n * Parse a QueryRange from a dictionary\n * @returns QueryRange\n * @hidden\n */\n public static parseFromDict(queryRangeDict: ResponseQueryRange): QueryRange {\n return new QueryRange(\n queryRangeDict.min,\n queryRangeDict.max,\n queryRangeDict.isMinInclusive,\n queryRangeDict.isMaxInclusive\n );\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.d.ts deleted file mode 100644 index c5f0ece..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { PartitionKeyRange } from "../client"; -import { QueryRange } from "./QueryRange"; -/** @hidden */ -export declare class InMemoryCollectionRoutingMap { - private orderedPartitionKeyRanges; - private orderedRanges; - orderedPartitionInfo: unknown; - /** - * Represents a InMemoryCollectionRoutingMap Object, - * Stores partition key ranges in an efficient way with some additional information and provides - * convenience methods for working with set of ranges. - */ - constructor(orderedPartitionKeyRanges: PartitionKeyRange[], orderedPartitionInfo: unknown); - getOrderedParitionKeyRanges(): PartitionKeyRange[]; - getOverlappingRanges(providedQueryRanges: QueryRange | QueryRange[]): PartitionKeyRange[]; -} -//# sourceMappingURL=inMemoryCollectionRoutingMap.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.d.ts.map deleted file mode 100644 index 27317eb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inMemoryCollectionRoutingMap.d.ts","sourceRoot":"","sources":["../../../src/routing/inMemoryCollectionRoutingMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,qBAAa,4BAA4B;IACvC,OAAO,CAAC,yBAAyB,CAAsB;IACvD,OAAO,CAAC,aAAa,CAAe;IAE7B,oBAAoB,EAAE,OAAO,CAAC;IAErC;;;;OAIG;gBACS,yBAAyB,EAAE,iBAAiB,EAAE,EAAE,oBAAoB,EAAE,OAAO;IAYlF,2BAA2B,IAAI,iBAAiB,EAAE;IAIlD,oBAAoB,CAAC,mBAAmB,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,iBAAiB,EAAE;CA+EjG"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.js deleted file mode 100644 index a618a12..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.js +++ /dev/null @@ -1,81 +0,0 @@ -import { Constants } from "../common"; -import { QueryRange } from "./QueryRange"; -/** @hidden */ -export class InMemoryCollectionRoutingMap { - /** - * Represents a InMemoryCollectionRoutingMap Object, - * Stores partition key ranges in an efficient way with some additional information and provides - * convenience methods for working with set of ranges. - */ - constructor(orderedPartitionKeyRanges, orderedPartitionInfo) { - this.orderedPartitionKeyRanges = orderedPartitionKeyRanges; - this.orderedRanges = orderedPartitionKeyRanges.map((pkr) => { - return new QueryRange(pkr[Constants.PartitionKeyRange.MinInclusive], pkr[Constants.PartitionKeyRange.MaxExclusive], true, false); - }); - this.orderedPartitionInfo = orderedPartitionInfo; - } - getOrderedParitionKeyRanges() { - return this.orderedPartitionKeyRanges; - } - getOverlappingRanges(providedQueryRanges) { - // TODO This code has all kinds of smells. Multiple iterations and sorts just to grab overlapping ranges - // stfaul attempted to bring it down to one for-loop and failed - const pqr = Array.isArray(providedQueryRanges) - ? providedQueryRanges - : [providedQueryRanges]; - const minToPartitionRange = {}; // TODO: any - // this for loop doesn't invoke any async callback - for (const queryRange of pqr) { - if (queryRange.isEmpty()) { - continue; - } - if (queryRange.isFullRange()) { - return this.orderedPartitionKeyRanges; - } - const minIndex = this.orderedRanges.findIndex((range) => { - if (queryRange.min > range.min && queryRange.min < range.max) { - return true; - } - if (queryRange.min === range.min) { - return true; - } - if (queryRange.min === range.max) { - return true; - } - }); - if (minIndex < 0) { - throw new Error("error in collection routing map, queried value is less than the start range."); - } - // Start at the end and work backwards - let maxIndex; - for (let i = this.orderedRanges.length - 1; i >= 0; i--) { - const range = this.orderedRanges[i]; - if (queryRange.max > range.min && queryRange.max < range.max) { - maxIndex = i; - break; - } - if (queryRange.max === range.min) { - maxIndex = i; - break; - } - if (queryRange.max === range.max) { - maxIndex = i; - break; - } - } - if (maxIndex > this.orderedRanges.length) { - throw new Error("error in collection routing map, queried value is greater than the end range."); - } - for (let j = minIndex; j < maxIndex + 1; j++) { - if (queryRange.overlaps(this.orderedRanges[j])) { - minToPartitionRange[this.orderedPartitionKeyRanges[j][Constants.PartitionKeyRange.MinInclusive]] = this.orderedPartitionKeyRanges[j]; - } - } - } - const overlappingPartitionKeyRanges = Object.keys(minToPartitionRange).map((k) => minToPartitionRange[k]); - return overlappingPartitionKeyRanges.sort((a, b) => { - return a[Constants.PartitionKeyRange.MinInclusive].localeCompare(b[Constants.PartitionKeyRange.MinInclusive]); - }); - } -} -//# sourceMappingURL=inMemoryCollectionRoutingMap.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.js.map deleted file mode 100644 index 9b0f78c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/inMemoryCollectionRoutingMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inMemoryCollectionRoutingMap.js","sourceRoot":"","sources":["../../../src/routing/inMemoryCollectionRoutingMap.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,MAAM,OAAO,4BAA4B;IAMv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AAC,iBAAiB,CAAC,YAAY,CAAC,CAC5E,GAAG,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;iBACvC;aACF;SACF;QAED,MAAM,6BAA6B,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,GAAG,CACxE,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAC9B,CAAC;QAEF,OAAO,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACjD,OAAO,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,aAAa,CAC9D,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAC5C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyRange } from \"../client\";\nimport { Constants } from \"../common\";\nimport { QueryRange } from \"./QueryRange\";\n\n/** @hidden */\nexport class InMemoryCollectionRoutingMap {\n private orderedPartitionKeyRanges: PartitionKeyRange[];\n private orderedRanges: QueryRange[];\n // TODO: chrande made this public, even though it is implementation detail for a test\n public orderedPartitionInfo: unknown;\n\n /**\n * Represents a InMemoryCollectionRoutingMap Object,\n * Stores partition key ranges in an efficient way with some additional information and provides\n * convenience methods for working with set of ranges.\n */\n constructor(orderedPartitionKeyRanges: PartitionKeyRange[], orderedPartitionInfo: unknown) {\n this.orderedPartitionKeyRanges = orderedPartitionKeyRanges;\n this.orderedRanges = orderedPartitionKeyRanges.map((pkr) => {\n return new QueryRange(\n pkr[Constants.PartitionKeyRange.MinInclusive],\n pkr[Constants.PartitionKeyRange.MaxExclusive],\n true,\n false\n );\n });\n this.orderedPartitionInfo = orderedPartitionInfo;\n }\n public getOrderedParitionKeyRanges(): PartitionKeyRange[] {\n return this.orderedPartitionKeyRanges;\n }\n\n public getOverlappingRanges(providedQueryRanges: QueryRange | QueryRange[]): PartitionKeyRange[] {\n // TODO This code has all kinds of smells. Multiple iterations and sorts just to grab overlapping ranges\n // stfaul attempted to bring it down to one for-loop and failed\n const pqr: QueryRange[] = Array.isArray(providedQueryRanges)\n ? providedQueryRanges\n : [providedQueryRanges];\n const minToPartitionRange: any = {}; // TODO: any\n\n // this for loop doesn't invoke any async callback\n for (const queryRange of pqr) {\n if (queryRange.isEmpty()) {\n continue;\n }\n\n if (queryRange.isFullRange()) {\n return this.orderedPartitionKeyRanges;\n }\n\n const minIndex = this.orderedRanges.findIndex((range) => {\n if (queryRange.min > range.min && queryRange.min < range.max) {\n return true;\n }\n if (queryRange.min === range.min) {\n return true;\n }\n if (queryRange.min === range.max) {\n return true;\n }\n });\n\n if (minIndex < 0) {\n throw new Error(\n \"error in collection routing map, queried value is less than the start range.\"\n );\n }\n\n // Start at the end and work backwards\n let maxIndex: number;\n for (let i = this.orderedRanges.length - 1; i >= 0; i--) {\n const range = this.orderedRanges[i];\n if (queryRange.max > range.min && queryRange.max < range.max) {\n maxIndex = i;\n break;\n }\n if (queryRange.max === range.min) {\n maxIndex = i;\n break;\n }\n if (queryRange.max === range.max) {\n maxIndex = i;\n break;\n }\n }\n\n if (maxIndex > this.orderedRanges.length) {\n throw new Error(\n \"error in collection routing map, queried value is greater than the end range.\"\n );\n }\n\n for (let j = minIndex; j < maxIndex + 1; j++) {\n if (queryRange.overlaps(this.orderedRanges[j])) {\n minToPartitionRange[\n this.orderedPartitionKeyRanges[j][Constants.PartitionKeyRange.MinInclusive]\n ] = this.orderedPartitionKeyRanges[j];\n }\n }\n }\n\n const overlappingPartitionKeyRanges = Object.keys(minToPartitionRange).map(\n (k) => minToPartitionRange[k]\n );\n\n return overlappingPartitionKeyRanges.sort((a, b) => {\n return a[Constants.PartitionKeyRange.MinInclusive].localeCompare(\n b[Constants.PartitionKeyRange.MinInclusive]\n );\n });\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.d.ts deleted file mode 100644 index 3365d94..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./QueryRange"; -export * from "./inMemoryCollectionRoutingMap"; -export * from "./partitionKeyRangeCache"; -export * from "./smartRoutingMapProvider"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.d.ts.map deleted file mode 100644 index ec7fb39..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routing/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.js deleted file mode 100644 index 0b368f5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export * from "./QueryRange"; -export * from "./inMemoryCollectionRoutingMap"; -export * from "./partitionKeyRangeCache"; -export * from "./smartRoutingMapProvider"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.js.map deleted file mode 100644 index 1e1206f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/routing/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./QueryRange\";\nexport * from \"./inMemoryCollectionRoutingMap\";\nexport * from \"./partitionKeyRangeCache\";\nexport * from \"./smartRoutingMapProvider\";\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.d.ts deleted file mode 100644 index c01397a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { PartitionKeyRange } from "../client/Container/PartitionKeyRange"; -import { ClientContext } from "../ClientContext"; -import { InMemoryCollectionRoutingMap } from "./inMemoryCollectionRoutingMap"; -import { QueryRange } from "./QueryRange"; -/** @hidden */ -export declare class PartitionKeyRangeCache { - private clientContext; - private collectionRoutingMapByCollectionId; - constructor(clientContext: ClientContext); - /** - * Finds or Instantiates the requested Collection Routing Map - * @param collectionLink - Requested collectionLink - * @hidden - */ - onCollectionRoutingMap(collectionLink: string): Promise; - /** - * Given the query ranges and a collection, invokes the callback on the list of overlapping partition key ranges - * @hidden - */ - getOverlappingRanges(collectionLink: string, queryRange: QueryRange): Promise; - private requestCollectionRoutingMap; -} -//# sourceMappingURL=partitionKeyRangeCache.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.d.ts.map deleted file mode 100644 index 9eedff8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partitionKeyRangeCache.d.ts","sourceRoot":"","sources":["../../../src/routing/partitionKeyRangeCache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,qBAAa,sBAAsB;IAKrB,OAAO,CAAC,aAAa;IAJjC,OAAO,CAAC,kCAAkC,CAExC;gBAEkB,aAAa,EAAE,aAAa;IAGhD;;;;OAIG;IACU,sBAAsB,CACjC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,4BAA4B,CAAC;IASxC;;;OAGG;IACU,oBAAoB,CAC/B,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAKjB,2BAA2B;CAQ1C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.js deleted file mode 100644 index 8758398..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.js +++ /dev/null @@ -1,37 +0,0 @@ -import { getIdFromLink } from "../common/helper"; -import { createCompleteRoutingMap } from "./CollectionRoutingMapFactory"; -/** @hidden */ -export class PartitionKeyRangeCache { - constructor(clientContext) { - this.clientContext = clientContext; - this.collectionRoutingMapByCollectionId = {}; - } - /** - * Finds or Instantiates the requested Collection Routing Map - * @param collectionLink - Requested collectionLink - * @hidden - */ - async onCollectionRoutingMap(collectionLink) { - const collectionId = getIdFromLink(collectionLink); - if (this.collectionRoutingMapByCollectionId[collectionId] === undefined) { - this.collectionRoutingMapByCollectionId[collectionId] = - this.requestCollectionRoutingMap(collectionLink); - } - return this.collectionRoutingMapByCollectionId[collectionId]; - } - /** - * Given the query ranges and a collection, invokes the callback on the list of overlapping partition key ranges - * @hidden - */ - async getOverlappingRanges(collectionLink, queryRange) { - const crm = await this.onCollectionRoutingMap(collectionLink); - return crm.getOverlappingRanges(queryRange); - } - async requestCollectionRoutingMap(collectionLink) { - const { resources } = await this.clientContext - .queryPartitionKeyRanges(collectionLink) - .fetchAll(); - return createCompleteRoutingMap(resources.map((r) => [r, true])); - } -} -//# sourceMappingURL=partitionKeyRangeCache.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.js.map deleted file mode 100644 index 5ef4b12..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/partitionKeyRangeCache.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partitionKeyRangeCache.js","sourceRoot":"","sources":["../../../src/routing/partitionKeyRangeCache.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAIzE,cAAc;AACd,MAAM,OAAO,sBAAsB;IAKjC,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAC9C,IAAI,CAAC,kCAAkC,GAAG,EAAE,CAAC;IAC/C,CAAC;IACD;;;;OAIG;IACI,KAAK,CAAC,sBAAsB,CACjC,cAAsB;QAEtB,MAAM,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;QACnD,IAAI,IAAI,CAAC,kCAAkC,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE;YACvE,IAAI,CAAC,kCAAkC,CAAC,YAAY,CAAC;gBACnD,IAAI,CAAC,2BAA2B,CAAC,cAAc,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,CAAC,kCAAkC,CAAC,YAAY,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,oBAAoB,CAC/B,cAAsB,EACtB,UAAsB;QAEtB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;QAC9D,OAAO,GAAG,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,2BAA2B,CACvC,cAAsB;QAEtB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa;aAC3C,uBAAuB,CAAC,cAAc,CAAC;aACvC,QAAQ,EAAE,CAAC;QACd,OAAO,wBAAwB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyRange } from \"../client/Container/PartitionKeyRange\";\nimport { ClientContext } from \"../ClientContext\";\nimport { getIdFromLink } from \"../common/helper\";\nimport { createCompleteRoutingMap } from \"./CollectionRoutingMapFactory\";\nimport { InMemoryCollectionRoutingMap } from \"./inMemoryCollectionRoutingMap\";\nimport { QueryRange } from \"./QueryRange\";\n\n/** @hidden */\nexport class PartitionKeyRangeCache {\n private collectionRoutingMapByCollectionId: {\n [key: string]: Promise;\n };\n\n constructor(private clientContext: ClientContext) {\n this.collectionRoutingMapByCollectionId = {};\n }\n /**\n * Finds or Instantiates the requested Collection Routing Map\n * @param collectionLink - Requested collectionLink\n * @hidden\n */\n public async onCollectionRoutingMap(\n collectionLink: string\n ): Promise {\n const collectionId = getIdFromLink(collectionLink);\n if (this.collectionRoutingMapByCollectionId[collectionId] === undefined) {\n this.collectionRoutingMapByCollectionId[collectionId] =\n this.requestCollectionRoutingMap(collectionLink);\n }\n return this.collectionRoutingMapByCollectionId[collectionId];\n }\n\n /**\n * Given the query ranges and a collection, invokes the callback on the list of overlapping partition key ranges\n * @hidden\n */\n public async getOverlappingRanges(\n collectionLink: string,\n queryRange: QueryRange\n ): Promise {\n const crm = await this.onCollectionRoutingMap(collectionLink);\n return crm.getOverlappingRanges(queryRange);\n }\n\n private async requestCollectionRoutingMap(\n collectionLink: string\n ): Promise {\n const { resources } = await this.clientContext\n .queryPartitionKeyRanges(collectionLink)\n .fetchAll();\n return createCompleteRoutingMap(resources.map((r) => [r, true]));\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.d.ts deleted file mode 100644 index a957ef9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ClientContext } from "../ClientContext"; -import { QueryRange } from "./QueryRange"; -/** @hidden */ -export declare const PARITIONKEYRANGE: import("../common/constants").PartitionKeyRangePropertiesNames; -/** @hidden */ -export declare class SmartRoutingMapProvider { - private partitionKeyRangeCache; - constructor(clientContext: ClientContext); - private static _secondRangeIsAfterFirstRange; - private static _isSortedAndNonOverlapping; - private static _stringMax; - private static _stringCompare; - private static _subtractRange; - /** - * Given the sorted ranges and a collection, invokes the callback on the list of overlapping partition key ranges - * @param callback - Function execute on the overlapping partition key ranges result, - * takes two parameters error, partition key ranges - * @hidden - */ - getOverlappingRanges(collectionLink: string, sortedRanges: QueryRange[]): Promise; -} -//# sourceMappingURL=smartRoutingMapProvider.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.d.ts.map deleted file mode 100644 index 4fcdfda..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"smartRoutingMapProvider.d.ts","sourceRoot":"","sources":["../../../src/routing/smartRoutingMapProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc;AACd,eAAO,MAAM,gBAAgB,gEAA8B,CAAC;AAE5D,cAAc;AACd,qBAAa,uBAAuB;IAClC,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,aAAa,EAAE,aAAa;IAGxC,OAAO,CAAC,MAAM,CAAC,6BAA6B;IAsB5C,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAWzC,OAAO,CAAC,MAAM,CAAC,UAAU;IAIzB,OAAO,CAAC,MAAM,CAAC,cAAc;IAI7B,OAAO,CAAC,MAAM,CAAC,cAAc;IAM7B;;;;;OAKG;IACU,oBAAoB,CAC/B,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,UAAU,EAAE,GACzB,OAAO,CAAC,GAAG,EAAE,CAAC;CAgFlB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.js deleted file mode 100644 index 605549d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.js +++ /dev/null @@ -1,116 +0,0 @@ -import { Constants } from "../common/constants"; -import { PartitionKeyRangeCache } from "./partitionKeyRangeCache"; -import { QueryRange } from "./QueryRange"; -/** @hidden */ -export const PARITIONKEYRANGE = Constants.PartitionKeyRange; -/** @hidden */ -export class SmartRoutingMapProvider { - constructor(clientContext) { - this.partitionKeyRangeCache = new PartitionKeyRangeCache(clientContext); - } - static _secondRangeIsAfterFirstRange(range1, range2) { - if (typeof range1.max === "undefined") { - throw new Error("range1 must have max"); - } - if (typeof range2.min === "undefined") { - throw new Error("range2 must have min"); - } - if (range1.max > range2.min) { - // r.min < #previous_r.max - return false; - } - else { - if (range1.max === range2.min && range1.isMaxInclusive && range2.isMinInclusive) { - // the inclusive ending endpoint of previous_r is the same as the inclusive beginning endpoint of r - // they share a point - return false; - } - return true; - } - } - static _isSortedAndNonOverlapping(ranges) { - for (let idx = 1; idx < ranges.length; idx++) { - const previousR = ranges[idx - 1]; - const r = ranges[idx]; - if (!this._secondRangeIsAfterFirstRange(previousR, r)) { - return false; - } - } - return true; - } - static _stringMax(a, b) { - return a >= b ? a : b; - } - static _stringCompare(a, b) { - return a === b ? 0 : a > b ? 1 : -1; - } - static _subtractRange(r, partitionKeyRange) { - const left = this._stringMax(partitionKeyRange[PARITIONKEYRANGE.MaxExclusive], r.min); - const leftInclusive = this._stringCompare(left, r.min) === 0 ? r.isMinInclusive : false; - return new QueryRange(left, r.max, leftInclusive, r.isMaxInclusive); - } - /** - * Given the sorted ranges and a collection, invokes the callback on the list of overlapping partition key ranges - * @param callback - Function execute on the overlapping partition key ranges result, - * takes two parameters error, partition key ranges - * @hidden - */ - async getOverlappingRanges(collectionLink, sortedRanges) { - // validate if the list is non- overlapping and sorted TODO: any PartitionKeyRanges - if (!SmartRoutingMapProvider._isSortedAndNonOverlapping(sortedRanges)) { - throw new Error("the list of ranges is not a non-overlapping sorted ranges"); - } - let partitionKeyRanges = []; // TODO: any ParitionKeyRanges - if (sortedRanges.length === 0) { - return partitionKeyRanges; - } - const collectionRoutingMap = await this.partitionKeyRangeCache.onCollectionRoutingMap(collectionLink); - let index = 0; - let currentProvidedRange = sortedRanges[index]; - for (;;) { - if (currentProvidedRange.isEmpty()) { - // skip and go to the next item - if (++index >= sortedRanges.length) { - return partitionKeyRanges; - } - currentProvidedRange = sortedRanges[index]; - continue; - } - let queryRange; - if (partitionKeyRanges.length > 0) { - queryRange = SmartRoutingMapProvider._subtractRange(currentProvidedRange, partitionKeyRanges[partitionKeyRanges.length - 1]); - } - else { - queryRange = currentProvidedRange; - } - const overlappingRanges = collectionRoutingMap.getOverlappingRanges(queryRange); - if (overlappingRanges.length <= 0) { - throw new Error(`error: returned overlapping ranges for queryRange ${queryRange} is empty`); - } - partitionKeyRanges = partitionKeyRanges.concat(overlappingRanges); - const lastKnownTargetRange = QueryRange.parsePartitionKeyRange(partitionKeyRanges[partitionKeyRanges.length - 1]); - if (!lastKnownTargetRange) { - throw new Error("expected lastKnowTargetRange to be truthy"); - } - // the overlapping ranges must contain the requested range - if (SmartRoutingMapProvider._stringCompare(currentProvidedRange.max, lastKnownTargetRange.max) > - 0) { - throw new Error(`error: returned overlapping ranges ${overlappingRanges} \ - does not contain the requested range ${queryRange}`); - } - // the current range is contained in partitionKeyRanges just move forward - if (++index >= sortedRanges.length) { - return partitionKeyRanges; - } - currentProvidedRange = sortedRanges[index]; - while (SmartRoutingMapProvider._stringCompare(currentProvidedRange.max, lastKnownTargetRange.max) <= 0) { - // the current range is covered too.just move forward - if (++index >= sortedRanges.length) { - return partitionKeyRanges; - } - currentProvidedRange = sortedRanges[index]; - } - } - } -} -//# sourceMappingURL=smartRoutingMapProvider.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.js.map deleted file mode 100644 index 68fe4d9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/routing/smartRoutingMapProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"smartRoutingMapProvider.js","sourceRoot":"","sources":["../../../src/routing/smartRoutingMapProvider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAA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C,GAAG,EAAE,oBAAoB,CAAC,GAAG,CAAC;gBAC1F,CAAC,EACD;gBACA,MAAM,IAAI,KAAK,CAAC,sCAAsC,iBAAiB;+CAChC,UAAU,EAAE,CAAC,CAAC;aACtD;YAED,yEAAyE;YACzE,IAAI,EAAE,KAAK,IAAI,YAAY,CAAC,MAAM,EAAE;gBAClC,OAAO,kBAAkB,CAAC;aAC3B;YACD,oBAAoB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;YAE3C,OACE,uBAAuB,CAAC,cAAc,CACpC,oBAAoB,CAAC,GAAG,EACxB,oBAAoB,CAAC,GAAG,CACzB,IAAI,CAAC,EACN;gBACA,qDAAqD;gBACrD,IAAI,EAAE,KAAK,IAAI,YAAY,CAAC,MAAM,EAAE;oBAClC,OAAO,kBAAkB,CAAC;iBAC3B;gBACD,oBAAoB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;aAC5C;SACF;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../ClientContext\";\nimport { Constants } from \"../common/constants\";\nimport { PartitionKeyRangeCache } from \"./partitionKeyRangeCache\";\nimport { QueryRange } from \"./QueryRange\";\n\n/** @hidden */\nexport const PARITIONKEYRANGE = Constants.PartitionKeyRange;\n\n/** @hidden */\nexport class SmartRoutingMapProvider {\n private partitionKeyRangeCache: PartitionKeyRangeCache;\n\n constructor(clientContext: ClientContext) {\n this.partitionKeyRangeCache = new PartitionKeyRangeCache(clientContext);\n }\n private static _secondRangeIsAfterFirstRange(range1: QueryRange, range2: QueryRange): boolean {\n if (typeof range1.max === \"undefined\") {\n throw new Error(\"range1 must have max\");\n }\n\n if (typeof range2.min === \"undefined\") {\n throw new Error(\"range2 must have min\");\n }\n\n if (range1.max > range2.min) {\n // r.min < #previous_r.max\n return false;\n } else {\n if (range1.max === range2.min && range1.isMaxInclusive && range2.isMinInclusive) {\n // the inclusive ending endpoint of previous_r is the same as the inclusive beginning endpoint of r\n // they share a point\n return false;\n }\n return true;\n }\n }\n\n private static _isSortedAndNonOverlapping(ranges: QueryRange[]): boolean {\n for (let idx = 1; idx < ranges.length; idx++) {\n const previousR = ranges[idx - 1];\n const r = ranges[idx];\n if (!this._secondRangeIsAfterFirstRange(previousR, r)) {\n return false;\n }\n }\n return true;\n }\n\n private static _stringMax(a: string, b: string): string {\n return a >= b ? a : b;\n }\n\n private static _stringCompare(a: string, b: string): 1 | 0 | -1 {\n return a === b ? 0 : a > b ? 1 : -1;\n }\n\n private static _subtractRange(r: QueryRange, partitionKeyRange: any): QueryRange {\n const left = this._stringMax(partitionKeyRange[PARITIONKEYRANGE.MaxExclusive], r.min);\n const leftInclusive = this._stringCompare(left, r.min) === 0 ? r.isMinInclusive : false;\n return new QueryRange(left, r.max, leftInclusive, r.isMaxInclusive);\n }\n\n /**\n * Given the sorted ranges and a collection, invokes the callback on the list of overlapping partition key ranges\n * @param callback - Function execute on the overlapping partition key ranges result,\n * takes two parameters error, partition key ranges\n * @hidden\n */\n public async getOverlappingRanges(\n collectionLink: string,\n sortedRanges: QueryRange[]\n ): Promise {\n // validate if the list is non- overlapping and sorted TODO: any PartitionKeyRanges\n if (!SmartRoutingMapProvider._isSortedAndNonOverlapping(sortedRanges)) {\n throw new Error(\"the list of ranges is not a non-overlapping sorted ranges\");\n }\n\n let partitionKeyRanges: any[] = []; // TODO: any ParitionKeyRanges\n\n if (sortedRanges.length === 0) {\n return partitionKeyRanges;\n }\n\n const collectionRoutingMap = await this.partitionKeyRangeCache.onCollectionRoutingMap(\n collectionLink\n );\n\n let index = 0;\n let currentProvidedRange = sortedRanges[index];\n for (;;) {\n if (currentProvidedRange.isEmpty()) {\n // skip and go to the next item\n if (++index >= sortedRanges.length) {\n return partitionKeyRanges;\n }\n currentProvidedRange = sortedRanges[index];\n continue;\n }\n\n let queryRange;\n if (partitionKeyRanges.length > 0) {\n queryRange = SmartRoutingMapProvider._subtractRange(\n currentProvidedRange,\n partitionKeyRanges[partitionKeyRanges.length - 1]\n );\n } else {\n queryRange = currentProvidedRange;\n }\n\n const overlappingRanges = collectionRoutingMap.getOverlappingRanges(queryRange);\n if (overlappingRanges.length <= 0) {\n throw new Error(`error: returned overlapping ranges for queryRange ${queryRange} is empty`);\n }\n partitionKeyRanges = partitionKeyRanges.concat(overlappingRanges);\n\n const lastKnownTargetRange = QueryRange.parsePartitionKeyRange(\n partitionKeyRanges[partitionKeyRanges.length - 1]\n );\n if (!lastKnownTargetRange) {\n throw new Error(\"expected lastKnowTargetRange to be truthy\");\n }\n // the overlapping ranges must contain the requested range\n\n if (\n SmartRoutingMapProvider._stringCompare(currentProvidedRange.max, lastKnownTargetRange.max) >\n 0\n ) {\n throw new Error(`error: returned overlapping ranges ${overlappingRanges} \\\n does not contain the requested range ${queryRange}`);\n }\n\n // the current range is contained in partitionKeyRanges just move forward\n if (++index >= sortedRanges.length) {\n return partitionKeyRanges;\n }\n currentProvidedRange = sortedRanges[index];\n\n while (\n SmartRoutingMapProvider._stringCompare(\n currentProvidedRange.max,\n lastKnownTargetRange.max\n ) <= 0\n ) {\n // the current range is covered too.just move forward\n if (++index >= sortedRanges.length) {\n return partitionKeyRanges;\n }\n currentProvidedRange = sortedRanges[index];\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.d.ts deleted file mode 100644 index 67d7802..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { OperationType, ResourceType } from "../common"; -/** - * @hidden - */ -export interface SessionContext { - resourceId?: string; - resourceAddress?: string; - resourceType?: ResourceType; - isNameBased?: boolean; - operationType?: OperationType; -} -//# sourceMappingURL=SessionContext.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.d.ts.map deleted file mode 100644 index ec636be..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SessionContext.d.ts","sourceRoot":"","sources":["../../../src/session/SessionContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.js deleted file mode 100644 index 1facdae..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=SessionContext.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.js.map deleted file mode 100644 index 2ff8725..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/SessionContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SessionContext.js","sourceRoot":"","sources":["../../../src/session/SessionContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType, ResourceType } from \"../common\";\n\n/**\n * @hidden\n */\nexport interface SessionContext {\n resourceId?: string;\n resourceAddress?: string;\n resourceType?: ResourceType;\n isNameBased?: boolean;\n operationType?: OperationType;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.d.ts deleted file mode 100644 index 6476744..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Models vector clock bases session token. Session token has the following format: - * `{Version}#{GlobalLSN}#{RegionId1}={LocalLsn1}#{RegionId2}={LocalLsn2}....#{RegionIdN}={LocalLsnN}` - * 'Version' captures the configuration number of the partition which returned this session token. - * 'Version' is incremented everytime topology of the partition is updated (say due to Add/Remove/Failover). - * - * The choice of separators '#' and '=' is important. Separators ';' and ',' are used to delimit - * per-partitionKeyRange session token - * @hidden - * - */ -export declare class VectorSessionToken { - private readonly version; - private readonly globalLsn; - private readonly localLsnByregion; - private readonly sessionToken?; - private static readonly SEGMENT_SEPARATOR; - private static readonly REGION_PROGRESS_SEPARATOR; - constructor(version: number, globalLsn: number, localLsnByregion: Map, sessionToken?: string); - static create(sessionToken: string): VectorSessionToken | null; - equals(other: VectorSessionToken): boolean; - merge(other: VectorSessionToken): VectorSessionToken; - toString(): string | undefined; - private areRegionProgressEqual; -} -//# sourceMappingURL=VectorSessionToken.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.d.ts.map deleted file mode 100644 index 13faed1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VectorSessionToken.d.ts","sourceRoot":"","sources":["../../../src/session/VectorSessionToken.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,qBAAa,kBAAkB;IAK3B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAPhC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAO;IAChD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAO;gBAGrC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,YAAY,CAAC,EAAE,MAAM;WAgB1B,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI;IAwC9D,MAAM,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO;IAQ1C,KAAK,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB;IAyCpD,QAAQ,IAAI,MAAM,GAAG,SAAS;IAIrC,OAAO,CAAC,sBAAsB;CAc/B"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.js deleted file mode 100644 index 3af287b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.js +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Models vector clock bases session token. Session token has the following format: - * `{Version}#{GlobalLSN}#{RegionId1}={LocalLsn1}#{RegionId2}={LocalLsn2}....#{RegionIdN}={LocalLsnN}` - * 'Version' captures the configuration number of the partition which returned this session token. - * 'Version' is incremented everytime topology of the partition is updated (say due to Add/Remove/Failover). - * - * The choice of separators '#' and '=' is important. Separators ';' and ',' are used to delimit - * per-partitionKeyRange session token - * @hidden - * - */ -export class VectorSessionToken { - constructor(version, globalLsn, localLsnByregion, sessionToken) { - this.version = version; - this.globalLsn = globalLsn; - this.localLsnByregion = localLsnByregion; - this.sessionToken = sessionToken; - if (!this.sessionToken) { - const regionAndLocalLsn = []; - for (const [key, value] of this.localLsnByregion.entries()) { - regionAndLocalLsn.push(`${key}${VectorSessionToken.REGION_PROGRESS_SEPARATOR}${value}`); - } - const regionProgress = regionAndLocalLsn.join(VectorSessionToken.SEGMENT_SEPARATOR); - if (regionProgress === "") { - this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}`; - } - else { - this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}${VectorSessionToken.SEGMENT_SEPARATOR}${regionProgress}`; - } - } - } - static create(sessionToken) { - const [versionStr, globalLsnStr, ...regionSegments] = sessionToken.split(VectorSessionToken.SEGMENT_SEPARATOR); - const version = parseInt(versionStr, 10); - const globalLsn = parseFloat(globalLsnStr); - if (typeof version !== "number" || typeof globalLsn !== "number") { - return null; - } - const lsnByRegion = new Map(); - for (const regionSegment of regionSegments) { - const [regionIdStr, localLsnStr] = regionSegment.split(VectorSessionToken.REGION_PROGRESS_SEPARATOR); - if (!regionIdStr || !localLsnStr) { - return null; - } - const regionId = parseInt(regionIdStr, 10); - let localLsn; - try { - localLsn = localLsnStr; - } - catch (err) { - // TODO: log error - return null; - } - if (typeof regionId !== "number") { - return null; - } - lsnByRegion.set(regionId, localLsn); - } - return new VectorSessionToken(version, globalLsn, lsnByRegion, sessionToken); - } - equals(other) { - return !other - ? false - : this.version === other.version && - this.globalLsn === other.globalLsn && - this.areRegionProgressEqual(other.localLsnByregion); - } - merge(other) { - if (other == null) { - throw new Error("other (Vector Session Token) must not be null"); - } - if (this.version === other.version && - this.localLsnByregion.size !== other.localLsnByregion.size) { - throw new Error(`Compared session tokens ${this.sessionToken} and ${other.sessionToken} have unexpected regions`); - } - const [higherVersionSessionToken, lowerVersionSessionToken] = this.version < other.version ? [other, this] : [this, other]; - const highestLocalLsnByRegion = new Map(); - for (const [regionId, highLocalLsn] of higherVersionSessionToken.localLsnByregion.entries()) { - const lowLocalLsn = lowerVersionSessionToken.localLsnByregion.get(regionId); - if (lowLocalLsn) { - highestLocalLsnByRegion.set(regionId, max(highLocalLsn, lowLocalLsn)); - } - else if (this.version === other.version) { - throw new Error(`Compared session tokens have unexpected regions. Session 1: ${this.sessionToken} - Session 2: ${this.sessionToken}`); - } - else { - highestLocalLsnByRegion.set(regionId, highLocalLsn); - } - } - return new VectorSessionToken(Math.max(this.version, other.version), Math.max(this.globalLsn, other.globalLsn), highestLocalLsnByRegion); - } - toString() { - return this.sessionToken; - } - areRegionProgressEqual(other) { - if (this.localLsnByregion.size !== other.size) { - return false; - } - for (const [regionId, localLsn] of this.localLsnByregion.entries()) { - const otherLocalLsn = other.get(regionId); - if (localLsn !== otherLocalLsn) { - return false; - } - } - return true; - } -} -VectorSessionToken.SEGMENT_SEPARATOR = "#"; -VectorSessionToken.REGION_PROGRESS_SEPARATOR = "="; -/** - * @hidden - */ -function max(int1, int2) { - // NOTE: This only works for positive numbers - if (int1.length === int2.length) { - return int1 > int2 ? int1 : int2; - } - else if (int1.length > int2.length) { - return int1; - } - else { - return int2; - } -} -//# sourceMappingURL=VectorSessionToken.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.js.map deleted file mode 100644 index cdf5a17..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/VectorSessionToken.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VectorSessionToken.js","sourceRoot":"","sources":["../../../src/session/VectorSessionToken.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,kBAAkB;IAI7B,YACmB,OAAe,EACf,SAAiB,EACjB,gBAAqC,EACrC,YAAqB;QAHrB,Y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EO,sBAAsB,CAAC,KAA0B;QACvD,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE;YAC7C,OAAO,KAAK,CAAC;SACd;QAED,KAAK,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE;YAClE,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAE1C,IAAI,QAAQ,KAAK,aAAa,EAAE;gBAC9B,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAjIuB,oCAAiB,GAAG,GAAG,CAAC;AACxB,4CAAyB,GAAG,GAAG,CAAC;AAmI1D;;GAEG;AACH,SAAS,GAAG,CAAC,IAAY,EAAE,IAAY;IACrC,6CAA6C;IAC7C,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE;QAC/B,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;KAClC;SAAM,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;QACpC,OAAO,IAAI,CAAC;KACb;SAAM;QACL,OAAO,IAAI,CAAC;KACb;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Models vector clock bases session token. Session token has the following format:\n * `{Version}#{GlobalLSN}#{RegionId1}={LocalLsn1}#{RegionId2}={LocalLsn2}....#{RegionIdN}={LocalLsnN}`\n * 'Version' captures the configuration number of the partition which returned this session token.\n * 'Version' is incremented everytime topology of the partition is updated (say due to Add/Remove/Failover).\n *\n * The choice of separators '#' and '=' is important. Separators ';' and ',' are used to delimit\n * per-partitionKeyRange session token\n * @hidden\n *\n */\nexport class VectorSessionToken {\n private static readonly SEGMENT_SEPARATOR = \"#\";\n private static readonly REGION_PROGRESS_SEPARATOR = \"=\";\n\n constructor(\n private readonly version: number,\n private readonly globalLsn: number,\n private readonly localLsnByregion: Map,\n private readonly sessionToken?: string\n ) {\n if (!this.sessionToken) {\n const regionAndLocalLsn = [];\n for (const [key, value] of this.localLsnByregion.entries()) {\n regionAndLocalLsn.push(`${key}${VectorSessionToken.REGION_PROGRESS_SEPARATOR}${value}`);\n }\n const regionProgress = regionAndLocalLsn.join(VectorSessionToken.SEGMENT_SEPARATOR);\n if (regionProgress === \"\") {\n this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}`;\n } else {\n this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}${VectorSessionToken.SEGMENT_SEPARATOR}${regionProgress}`;\n }\n }\n }\n\n public static create(sessionToken: string): VectorSessionToken | null {\n const [versionStr, globalLsnStr, ...regionSegments] = sessionToken.split(\n VectorSessionToken.SEGMENT_SEPARATOR\n );\n\n const version = parseInt(versionStr, 10);\n const globalLsn = parseFloat(globalLsnStr);\n\n if (typeof version !== \"number\" || typeof globalLsn !== \"number\") {\n return null;\n }\n\n const lsnByRegion = new Map();\n for (const regionSegment of regionSegments) {\n const [regionIdStr, localLsnStr] = regionSegment.split(\n VectorSessionToken.REGION_PROGRESS_SEPARATOR\n );\n\n if (!regionIdStr || !localLsnStr) {\n return null;\n }\n\n const regionId = parseInt(regionIdStr, 10);\n let localLsn: string;\n try {\n localLsn = localLsnStr;\n } catch (err: any) {\n // TODO: log error\n return null;\n }\n if (typeof regionId !== \"number\") {\n return null;\n }\n\n lsnByRegion.set(regionId, localLsn);\n }\n\n return new VectorSessionToken(version, globalLsn, lsnByRegion, sessionToken);\n }\n\n public equals(other: VectorSessionToken): boolean {\n return !other\n ? false\n : this.version === other.version &&\n this.globalLsn === other.globalLsn &&\n this.areRegionProgressEqual(other.localLsnByregion);\n }\n\n public merge(other: VectorSessionToken): VectorSessionToken {\n if (other == null) {\n throw new Error(\"other (Vector Session Token) must not be null\");\n }\n\n if (\n this.version === other.version &&\n this.localLsnByregion.size !== other.localLsnByregion.size\n ) {\n throw new Error(\n `Compared session tokens ${this.sessionToken} and ${other.sessionToken} have unexpected regions`\n );\n }\n\n const [higherVersionSessionToken, lowerVersionSessionToken]: [\n VectorSessionToken,\n VectorSessionToken\n ] = this.version < other.version ? [other, this] : [this, other];\n\n const highestLocalLsnByRegion = new Map();\n\n for (const [regionId, highLocalLsn] of higherVersionSessionToken.localLsnByregion.entries()) {\n const lowLocalLsn = lowerVersionSessionToken.localLsnByregion.get(regionId);\n if (lowLocalLsn) {\n highestLocalLsnByRegion.set(regionId, max(highLocalLsn, lowLocalLsn));\n } else if (this.version === other.version) {\n throw new Error(\n `Compared session tokens have unexpected regions. Session 1: ${this.sessionToken} - Session 2: ${this.sessionToken}`\n );\n } else {\n highestLocalLsnByRegion.set(regionId, highLocalLsn);\n }\n }\n\n return new VectorSessionToken(\n Math.max(this.version, other.version),\n Math.max(this.globalLsn, other.globalLsn),\n highestLocalLsnByRegion\n );\n }\n\n public toString(): string | undefined {\n return this.sessionToken;\n }\n\n private areRegionProgressEqual(other: Map): boolean {\n if (this.localLsnByregion.size !== other.size) {\n return false;\n }\n\n for (const [regionId, localLsn] of this.localLsnByregion.entries()) {\n const otherLocalLsn = other.get(regionId);\n\n if (localLsn !== otherLocalLsn) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * @hidden\n */\nfunction max(int1: string, int2: string): string {\n // NOTE: This only works for positive numbers\n if (int1.length === int2.length) {\n return int1 > int2 ? int1 : int2;\n } else if (int1.length > int2.length) {\n return int1;\n } else {\n return int2;\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.d.ts deleted file mode 100644 index 20afddd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CosmosHeaders } from "../queryExecutionContext"; -import { SessionContext } from "./SessionContext"; -import { VectorSessionToken } from "./VectorSessionToken"; -/** @hidden */ -export declare class SessionContainer { - private collectionNameToCollectionResourceId; - private collectionResourceIdToSessionTokens; - private static readonly EMPTY_SESSION_TOKEN; - private static readonly SESSION_TOKEN_SEPARATOR; - private static readonly SESSION_TOKEN_PARTITION_SPLITTER; - constructor(collectionNameToCollectionResourceId?: Map, collectionResourceIdToSessionTokens?: Map>); - get(request: SessionContext): string; - remove(request: SessionContext): void; - set(request: SessionContext, resHeaders: CosmosHeaders): void; - private validateOwnerID; - private getPartitionKeyRangeIdToTokenMap; - private static getCombinedSessionTokenString; - private static compareAndSetToken; - private static isReadingFromMaster; - private getContainerName; -} -//# sourceMappingURL=sessionContainer.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.d.ts.map deleted file mode 100644 index c7165e0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sessionContainer.d.ts","sourceRoot":"","sources":["../../../src/session/sessionContainer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,cAAc;AACd,qBAAa,gBAAgB;IAKzB,OAAO,CAAC,oCAAoC;IAC5C,OAAO,CAAC,mCAAmC;IAL7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAM;IACjD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAO;IACtD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gCAAgC,CAAO;gBAErD,oCAAoC,sBAA4B,EAChE,mCAAmC,+CAAqD;IAG3F,GAAG,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM;IASpC,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAarC,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,GAAG,IAAI;IAsCpE,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,gCAAgC;IAaxC,OAAO,CAAC,MAAM,CAAC,6BAA6B;IAgB5C,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAyBjC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAqBlC,OAAO,CAAC,gBAAgB;CAQzB"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.js deleted file mode 100644 index 202b837..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.js +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import atob from "../utils/atob"; -import { Constants, getContainerLink, OperationType, trimSlashes } from "../common"; -import { VectorSessionToken } from "./VectorSessionToken"; -/** @hidden */ -export class SessionContainer { - constructor(collectionNameToCollectionResourceId = new Map(), collectionResourceIdToSessionTokens = new Map()) { - this.collectionNameToCollectionResourceId = collectionNameToCollectionResourceId; - this.collectionResourceIdToSessionTokens = collectionResourceIdToSessionTokens; - } - get(request) { - if (!request) { - throw new Error("request cannot be null"); - } - const collectionName = getContainerLink(trimSlashes(request.resourceAddress)); - const rangeIdToTokenMap = this.getPartitionKeyRangeIdToTokenMap(collectionName); - return SessionContainer.getCombinedSessionTokenString(rangeIdToTokenMap); - } - remove(request) { - let collectionResourceId; - const resourceAddress = trimSlashes(request.resourceAddress); - const collectionName = getContainerLink(resourceAddress); - if (collectionName) { - collectionResourceId = this.collectionNameToCollectionResourceId.get(collectionName); - this.collectionNameToCollectionResourceId.delete(collectionName); - } - if (collectionResourceId !== undefined) { - this.collectionResourceIdToSessionTokens.delete(collectionResourceId); - } - } - set(request, resHeaders) { - // TODO: we check the master logic a few different places. Might not need it. - if (!resHeaders || - SessionContainer.isReadingFromMaster(request.resourceType, request.operationType)) { - return; - } - const sessionTokenString = resHeaders[Constants.HttpHeaders.SessionToken]; - if (!sessionTokenString) { - return; - } - const containerName = this.getContainerName(request, resHeaders); - const ownerId = !request.isNameBased - ? request.resourceId - : resHeaders[Constants.HttpHeaders.OwnerId] || request.resourceId; - if (!ownerId) { - return; - } - if (containerName && this.validateOwnerID(ownerId)) { - if (!this.collectionResourceIdToSessionTokens.has(ownerId)) { - this.collectionResourceIdToSessionTokens.set(ownerId, new Map()); - } - if (!this.collectionNameToCollectionResourceId.has(containerName)) { - this.collectionNameToCollectionResourceId.set(containerName, ownerId); - } - const containerSessionContainer = this.collectionResourceIdToSessionTokens.get(ownerId); - SessionContainer.compareAndSetToken(sessionTokenString, containerSessionContainer); - } - } - validateOwnerID(ownerId) { - // If ownerId contains exactly 8 bytes it represents a unique database+collection identifier. Otherwise it represents another resource - // The first 4 bytes are the database. The last 4 bytes are the collection. - // Cosmos rids potentially contain "-" which is an invalid character in the browser atob implementation - // See https://en.wikipedia.org/wiki/Base64#Filenames - return atob(ownerId.replace(/-/g, "/")).length === 8; - } - getPartitionKeyRangeIdToTokenMap(collectionName) { - let rangeIdToTokenMap = null; - if (collectionName && this.collectionNameToCollectionResourceId.has(collectionName)) { - rangeIdToTokenMap = this.collectionResourceIdToSessionTokens.get(this.collectionNameToCollectionResourceId.get(collectionName)); - } - return rangeIdToTokenMap; - } - static getCombinedSessionTokenString(tokens) { - if (!tokens || tokens.size === 0) { - return SessionContainer.EMPTY_SESSION_TOKEN; - } - let result = ""; - for (const [range, token] of tokens.entries()) { - result += - range + - SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER + - token.toString() + - SessionContainer.SESSION_TOKEN_SEPARATOR; - } - return result.slice(0, -1); - } - static compareAndSetToken(newTokenString, containerSessionTokens) { - if (!newTokenString) { - return; - } - const partitionsParts = newTokenString.split(SessionContainer.SESSION_TOKEN_SEPARATOR); - for (const partitionPart of partitionsParts) { - const newTokenParts = partitionPart.split(SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER); - if (newTokenParts.length !== 2) { - return; - } - const range = newTokenParts[0]; - const newToken = VectorSessionToken.create(newTokenParts[1]); - const tokenForRange = !containerSessionTokens.get(range) - ? newToken - : containerSessionTokens.get(range).merge(newToken); - containerSessionTokens.set(range, tokenForRange); - } - } - // TODO: have a assert if the type doesn't mastch known types - static isReadingFromMaster(resourceType, operationType) { - if (resourceType === Constants.Path.OffersPathSegment || - resourceType === Constants.Path.DatabasesPathSegment || - resourceType === Constants.Path.UsersPathSegment || - resourceType === Constants.Path.PermissionsPathSegment || - resourceType === Constants.Path.TopologyPathSegment || - resourceType === Constants.Path.DatabaseAccountPathSegment || - resourceType === Constants.Path.PartitionKeyRangesPathSegment || - (resourceType === Constants.Path.CollectionsPathSegment && - operationType === OperationType.Query)) { - return true; - } - return false; - } - getContainerName(request, headers) { - let ownerFullName = headers[Constants.HttpHeaders.OwnerFullName]; - if (!ownerFullName) { - ownerFullName = trimSlashes(request.resourceAddress); - } - return getContainerLink(ownerFullName); - } -} -SessionContainer.EMPTY_SESSION_TOKEN = ""; -SessionContainer.SESSION_TOKEN_SEPARATOR = ","; -SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER = ":"; -//# sourceMappingURL=sessionContainer.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.js.map deleted file mode 100644 index 5a665b3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/session/sessionContainer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sessionContainer.js","sourceRoot":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,CAAC,aAAa,CAAC,CAAC;QACjE,IAAI,CAAC,aAAa,EAAE;YAClB,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;SACtD;QAED,OAAO,gBAAgB,CAAC,aAAuB,CAAC,CAAC;IACnD,CAAC;;AA9JuB,oCAAmB,GAAG,EAAE,CAAC;AACzB,wCAAuB,GAAG,GAAG,CAAC;AAC9B,iDAAgC,GAAG,GAAG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport atob from \"../utils/atob\";\nimport { Constants, getContainerLink, OperationType, ResourceType, trimSlashes } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\nimport { SessionContext } from \"./SessionContext\";\nimport { VectorSessionToken } from \"./VectorSessionToken\";\n\n/** @hidden */\nexport class SessionContainer {\n private static readonly EMPTY_SESSION_TOKEN = \"\";\n private static readonly SESSION_TOKEN_SEPARATOR = \",\";\n private static readonly SESSION_TOKEN_PARTITION_SPLITTER = \":\";\n constructor(\n private collectionNameToCollectionResourceId = new Map(),\n private collectionResourceIdToSessionTokens = new Map>()\n ) {}\n\n public get(request: SessionContext): string {\n if (!request) {\n throw new Error(\"request cannot be null\");\n }\n const collectionName = getContainerLink(trimSlashes(request.resourceAddress));\n const rangeIdToTokenMap = this.getPartitionKeyRangeIdToTokenMap(collectionName);\n return SessionContainer.getCombinedSessionTokenString(rangeIdToTokenMap);\n }\n\n public remove(request: SessionContext): void {\n let collectionResourceId: string;\n const resourceAddress = trimSlashes(request.resourceAddress);\n const collectionName = getContainerLink(resourceAddress);\n if (collectionName) {\n collectionResourceId = this.collectionNameToCollectionResourceId.get(collectionName);\n this.collectionNameToCollectionResourceId.delete(collectionName);\n }\n if (collectionResourceId !== undefined) {\n this.collectionResourceIdToSessionTokens.delete(collectionResourceId);\n }\n }\n\n public set(request: SessionContext, resHeaders: CosmosHeaders): void {\n // TODO: we check the master logic a few different places. Might not need it.\n if (\n !resHeaders ||\n SessionContainer.isReadingFromMaster(request.resourceType, request.operationType)\n ) {\n return;\n }\n\n const sessionTokenString = resHeaders[Constants.HttpHeaders.SessionToken];\n if (!sessionTokenString) {\n return;\n }\n\n const containerName = this.getContainerName(request, resHeaders);\n\n const ownerId = !request.isNameBased\n ? request.resourceId\n : resHeaders[Constants.HttpHeaders.OwnerId] || request.resourceId;\n\n if (!ownerId) {\n return;\n }\n\n if (containerName && this.validateOwnerID(ownerId)) {\n if (!this.collectionResourceIdToSessionTokens.has(ownerId)) {\n this.collectionResourceIdToSessionTokens.set(ownerId, new Map());\n }\n\n if (!this.collectionNameToCollectionResourceId.has(containerName)) {\n this.collectionNameToCollectionResourceId.set(containerName, ownerId);\n }\n\n const containerSessionContainer = this.collectionResourceIdToSessionTokens.get(ownerId);\n SessionContainer.compareAndSetToken(sessionTokenString, containerSessionContainer);\n }\n }\n\n private validateOwnerID(ownerId: string): boolean {\n // If ownerId contains exactly 8 bytes it represents a unique database+collection identifier. Otherwise it represents another resource\n // The first 4 bytes are the database. The last 4 bytes are the collection.\n // Cosmos rids potentially contain \"-\" which is an invalid character in the browser atob implementation\n // See https://en.wikipedia.org/wiki/Base64#Filenames\n return atob(ownerId.replace(/-/g, \"/\")).length === 8;\n }\n\n private getPartitionKeyRangeIdToTokenMap(\n collectionName: string\n ): Map {\n let rangeIdToTokenMap: Map = null;\n if (collectionName && this.collectionNameToCollectionResourceId.has(collectionName)) {\n rangeIdToTokenMap = this.collectionResourceIdToSessionTokens.get(\n this.collectionNameToCollectionResourceId.get(collectionName)\n );\n }\n\n return rangeIdToTokenMap;\n }\n\n private static getCombinedSessionTokenString(tokens: Map): string {\n if (!tokens || tokens.size === 0) {\n return SessionContainer.EMPTY_SESSION_TOKEN;\n }\n\n let result = \"\";\n for (const [range, token] of tokens.entries()) {\n result +=\n range +\n SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER +\n token.toString() +\n SessionContainer.SESSION_TOKEN_SEPARATOR;\n }\n return result.slice(0, -1);\n }\n\n private static compareAndSetToken(\n newTokenString: string,\n containerSessionTokens: Map\n ): void {\n if (!newTokenString) {\n return;\n }\n\n const partitionsParts = newTokenString.split(SessionContainer.SESSION_TOKEN_SEPARATOR);\n for (const partitionPart of partitionsParts) {\n const newTokenParts = partitionPart.split(SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER);\n if (newTokenParts.length !== 2) {\n return;\n }\n\n const range = newTokenParts[0];\n const newToken = VectorSessionToken.create(newTokenParts[1]);\n const tokenForRange = !containerSessionTokens.get(range)\n ? newToken\n : containerSessionTokens.get(range).merge(newToken);\n containerSessionTokens.set(range, tokenForRange);\n }\n }\n\n // TODO: have a assert if the type doesn't mastch known types\n private static isReadingFromMaster(\n resourceType: ResourceType,\n operationType: OperationType\n ): boolean {\n if (\n resourceType === Constants.Path.OffersPathSegment ||\n resourceType === Constants.Path.DatabasesPathSegment ||\n resourceType === Constants.Path.UsersPathSegment ||\n resourceType === Constants.Path.PermissionsPathSegment ||\n resourceType === Constants.Path.TopologyPathSegment ||\n resourceType === Constants.Path.DatabaseAccountPathSegment ||\n resourceType === Constants.Path.PartitionKeyRangesPathSegment ||\n (resourceType === Constants.Path.CollectionsPathSegment &&\n operationType === OperationType.Query)\n ) {\n return true;\n }\n\n return false;\n }\n\n private getContainerName(request: SessionContext, headers: CosmosHeaders): string {\n let ownerFullName = headers[Constants.HttpHeaders.OwnerFullName];\n if (!ownerFullName) {\n ownerFullName = trimSlashes(request.resourceAddress);\n }\n\n return getContainerLink(ownerFullName as string);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.d.ts deleted file mode 100644 index d8e78e7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { SasTokenProperties } from "../client/SasToken/SasTokenProperties"; -/** - * Experimental internal only - * Generates the payload representing the permission configuration for the sas token. - */ -export declare function createAuthorizationSasToken(masterKey: string, sasTokenProperties: SasTokenProperties): Promise; -/** - * @hidden - */ -export declare function utcsecondsSinceEpoch(date: Date): number; -//# sourceMappingURL=SasToken.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.d.ts.map deleted file mode 100644 index 08c5f77..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SasToken.d.ts","sourceRoot":"","sources":["../../../src/utils/SasToken.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAK3E;;;GAGG;AAEH,wBAAsB,2BAA2B,CAC/C,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,MAAM,CAAC,CAmIjB;AACD;;GAEG;AAEH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.js deleted file mode 100644 index 5d8c011..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.js +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { Constants, CosmosKeyType, SasTokenPermissionKind } from "../common"; -import { encodeUTF8 } from "./encode"; -import { hmac } from "./hmac"; -/** - * Experimental internal only - * Generates the payload representing the permission configuration for the sas token. - */ -export async function createAuthorizationSasToken(masterKey, sasTokenProperties) { - let resourcePrefixPath = ""; - if (typeof sasTokenProperties.databaseName === "string" && - sasTokenProperties.databaseName !== "") { - resourcePrefixPath += `/${Constants.Path.DatabasesPathSegment}/${sasTokenProperties.databaseName}`; - } - if (typeof sasTokenProperties.containerName === "string" && - sasTokenProperties.containerName !== "") { - if (sasTokenProperties.databaseName === "") { - throw new Error(`illegalArgumentException : ${sasTokenProperties.databaseName} \ - is an invalid database name`); - } - resourcePrefixPath += `/${Constants.Path.CollectionsPathSegment}/${sasTokenProperties.containerName}`; - } - if (typeof sasTokenProperties.resourceName === "string" && - sasTokenProperties.resourceName !== "") { - if (sasTokenProperties.containerName === "") { - throw new Error(`illegalArgumentException : ${sasTokenProperties.containerName} \ - is an invalid container name`); - } - switch (sasTokenProperties.resourceKind) { - case "ITEM": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.DocumentsPathSegment}`; - break; - case "STORED_PROCEDURE": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.StoredProceduresPathSegment}`; - break; - case "USER_DEFINED_FUNCTION": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.UserDefinedFunctionsPathSegment}`; - break; - case "TRIGGER": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.TriggersPathSegment}`; - break; - default: - throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \ - is an invalid resource kind`); - break; - } - resourcePrefixPath += `${Constants.Path.Root}${sasTokenProperties.resourceName}${Constants.Path.Root}`; - } - sasTokenProperties.resourcePath = resourcePrefixPath.toString(); - let partitionRanges = ""; - if (sasTokenProperties.partitionKeyValueRanges !== undefined && - sasTokenProperties.partitionKeyValueRanges.length > 0) { - if (typeof sasTokenProperties.resourceKind !== "string" && - sasTokenProperties.resourceKind !== "ITEM") { - throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \ - is an invalid partition key value range`); - } - sasTokenProperties.partitionKeyValueRanges.forEach((range) => { - partitionRanges += `${encodeUTF8(range)},`; - }); - } - if (sasTokenProperties.controlPlaneReaderScope === 0) { - sasTokenProperties.controlPlaneReaderScope += SasTokenPermissionKind.ContainerReadAny; - sasTokenProperties.controlPlaneWriterScope += SasTokenPermissionKind.ContainerReadAny; - } - if (sasTokenProperties.dataPlaneReaderScope === 0 && - sasTokenProperties.dataPlaneWriterScope === 0) { - sasTokenProperties.dataPlaneReaderScope = SasTokenPermissionKind.ContainerFullAccess; - sasTokenProperties.dataPlaneWriterScope = SasTokenPermissionKind.ContainerFullAccess; - } - if (typeof sasTokenProperties.keyType !== "number" || - typeof sasTokenProperties.keyType === undefined) { - switch (sasTokenProperties.keyType) { - case CosmosKeyType.PrimaryMaster: - sasTokenProperties.keyType = 1; - break; - case CosmosKeyType.SecondaryMaster: - sasTokenProperties.keyType = 2; - break; - case CosmosKeyType.PrimaryReadOnly: - sasTokenProperties.keyType = 3; - break; - case CosmosKeyType.SecondaryReadOnly: - sasTokenProperties.keyType = 4; - break; - default: - throw new Error(`illegalArgumentException : ${sasTokenProperties.keyType} \ - is an invalid key type`); - break; - } - } - const payload = sasTokenProperties.user + - "\n" + - sasTokenProperties.userTag + - "\n" + - sasTokenProperties.resourcePath + - "\n" + - partitionRanges + - "\n" + - utcsecondsSinceEpoch(sasTokenProperties.startTime).toString(16) + - "\n" + - utcsecondsSinceEpoch(sasTokenProperties.expiryTime).toString(16) + - "\n" + - sasTokenProperties.keyType + - "\n" + - sasTokenProperties.controlPlaneReaderScope.toString(16) + - "\n" + - sasTokenProperties.controlPlaneWriterScope.toString(16) + - "\n" + - sasTokenProperties.dataPlaneReaderScope.toString(16) + - "\n" + - sasTokenProperties.dataPlaneWriterScope.toString(16) + - "\n"; - const signedPayload = await hmac(masterKey, Buffer.from(payload).toString("base64")); - return "type=sas&ver=1.0&sig=" + signedPayload + ";" + Buffer.from(payload).toString("base64"); -} -/** - * @hidden - */ -// TODO: utcMilllisecondsSinceEpoch -export function utcsecondsSinceEpoch(date) { - return Math.round(date.getTime() / 1000); -} -//# sourceMappingURL=SasToken.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.js.map deleted file mode 100644 index 96c6aae..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/SasToken.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SasToken.js","sourceRoot":"","sources":["../../../src/utils/SasToken.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AAEH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,SAAiB,EACjB,kBAAsC;IAEtC,IAAI,kBAAkB,GAAG,EAAE,CAAC;IAC5B,IACE,OAAO,kBAAkB,CAAC,YAAY,KAAK,QAAQ;QACnD,kBAAkB,CAAC,YAAY,KAAK,EAAE,EACtC;QACA,kBAAkB,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,oBAAoB,IAAI,kBAAkB,CAAC,YAAY,EAAE,CAAC;KACpG;IAED,IACE,OAAO,kBAAkB,CAAC,aAAa,KAAK,QAAQ;QACpD,kBAAkB,CAAC,aAAa,KAAK,EAAE,EACvC;QACA,IAAI,kBAAkB,CAAC,YAAY,KAAK,EAAE,EAAE;YAC1C,MAAM,IAAI,KAAK,CAAC,8BAA8B,kBAAkB,CAAC,YAAY;sDAC7B,CAAC,CAAC;SACnD;QACD,kBAAkB,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,sBAAsB,IAAI,kBAAkB,CAAC,aAAa,EAAE,CAAC;KACvG;IAED,IACE,OAAO,kBAAkB,CAAC,YAAY,KAAK,QAAQ;QACnD,kBAAkB,CAAC,YAAY,KAAK,EAAE,EACtC;QACA,IAAI,kBAAkB,CAAC,aAAa,KAAK,EAAE,EAAE;YAC3C,MA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AC3C,MAAM;SACT;KACF;IAED,MAAM,OAAO,GACX,kBAAkB,CAAC,IAAI;QACvB,IAAI;QACJ,kBAAkB,CAAC,OAAO;QAC1B,IAAI;QACJ,kBAAkB,CAAC,YAAY;QAC/B,IAAI;QACJ,eAAe;QACf,IAAI;QACJ,oBAAoB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/D,IAAI;QACJ,oBAAoB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChE,IAAI;QACJ,kBAAkB,CAAC,OAAO;QAC1B,IAAI;QACJ,kBAAkB,CAAC,uBAAuB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvD,IAAI;QACJ,kBAAkB,CAAC,uBAAuB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvD,IAAI;QACJ,kBAAkB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,IAAI;QACJ,kBAAkB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,IAAI,CAAC;IAEP,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrF,OAAO,uBAAuB,GAAG,aAAa,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjG,CAAC;AACD;;GAEG;AACH,mCAAmC;AACnC,MAAM,UAAU,oBAAoB,CAAC,IAAU;IAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SasTokenProperties } from \"../client/SasToken/SasTokenProperties\";\nimport { Constants, CosmosKeyType, SasTokenPermissionKind } from \"../common\";\nimport { encodeUTF8 } from \"./encode\";\nimport { hmac } from \"./hmac\";\n\n/**\n * Experimental internal only\n * Generates the payload representing the permission configuration for the sas token.\n */\n\nexport async function createAuthorizationSasToken(\n masterKey: string,\n sasTokenProperties: SasTokenProperties\n): Promise {\n let resourcePrefixPath = \"\";\n if (\n typeof sasTokenProperties.databaseName === \"string\" &&\n sasTokenProperties.databaseName !== \"\"\n ) {\n resourcePrefixPath += `/${Constants.Path.DatabasesPathSegment}/${sasTokenProperties.databaseName}`;\n }\n\n if (\n typeof sasTokenProperties.containerName === \"string\" &&\n sasTokenProperties.containerName !== \"\"\n ) {\n if (sasTokenProperties.databaseName === \"\") {\n throw new Error(`illegalArgumentException : ${sasTokenProperties.databaseName} \\\n is an invalid database name`);\n }\n resourcePrefixPath += `/${Constants.Path.CollectionsPathSegment}/${sasTokenProperties.containerName}`;\n }\n\n if (\n typeof sasTokenProperties.resourceName === \"string\" &&\n sasTokenProperties.resourceName !== \"\"\n ) {\n if (sasTokenProperties.containerName === \"\") {\n throw new Error(`illegalArgumentException : ${sasTokenProperties.containerName} \\\n is an invalid container name`);\n }\n switch (sasTokenProperties.resourceKind) {\n case \"ITEM\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.DocumentsPathSegment}`;\n break;\n case \"STORED_PROCEDURE\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.StoredProceduresPathSegment}`;\n break;\n case \"USER_DEFINED_FUNCTION\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.UserDefinedFunctionsPathSegment}`;\n break;\n case \"TRIGGER\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.TriggersPathSegment}`;\n break;\n default:\n throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \\\n is an invalid resource kind`);\n break;\n }\n resourcePrefixPath += `${Constants.Path.Root}${sasTokenProperties.resourceName}${Constants.Path.Root}`;\n }\n sasTokenProperties.resourcePath = resourcePrefixPath.toString();\n\n let partitionRanges = \"\";\n\n if (\n sasTokenProperties.partitionKeyValueRanges !== undefined &&\n sasTokenProperties.partitionKeyValueRanges.length > 0\n ) {\n if (\n typeof sasTokenProperties.resourceKind !== \"string\" &&\n sasTokenProperties.resourceKind !== \"ITEM\"\n ) {\n throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \\\n is an invalid partition key value range`);\n }\n sasTokenProperties.partitionKeyValueRanges.forEach((range) => {\n partitionRanges += `${encodeUTF8(range)},`;\n });\n }\n\n if (sasTokenProperties.controlPlaneReaderScope === 0) {\n sasTokenProperties.controlPlaneReaderScope += SasTokenPermissionKind.ContainerReadAny;\n sasTokenProperties.controlPlaneWriterScope += SasTokenPermissionKind.ContainerReadAny;\n }\n\n if (\n sasTokenProperties.dataPlaneReaderScope === 0 &&\n sasTokenProperties.dataPlaneWriterScope === 0\n ) {\n sasTokenProperties.dataPlaneReaderScope = SasTokenPermissionKind.ContainerFullAccess;\n sasTokenProperties.dataPlaneWriterScope = SasTokenPermissionKind.ContainerFullAccess;\n }\n\n if (\n typeof sasTokenProperties.keyType !== \"number\" ||\n typeof sasTokenProperties.keyType === undefined\n ) {\n switch (sasTokenProperties.keyType) {\n case CosmosKeyType.PrimaryMaster:\n sasTokenProperties.keyType = 1;\n break;\n case CosmosKeyType.SecondaryMaster:\n sasTokenProperties.keyType = 2;\n break;\n case CosmosKeyType.PrimaryReadOnly:\n sasTokenProperties.keyType = 3;\n break;\n case CosmosKeyType.SecondaryReadOnly:\n sasTokenProperties.keyType = 4;\n break;\n default:\n throw new Error(`illegalArgumentException : ${sasTokenProperties.keyType} \\\n is an invalid key type`);\n break;\n }\n }\n\n const payload =\n sasTokenProperties.user +\n \"\\n\" +\n sasTokenProperties.userTag +\n \"\\n\" +\n sasTokenProperties.resourcePath +\n \"\\n\" +\n partitionRanges +\n \"\\n\" +\n utcsecondsSinceEpoch(sasTokenProperties.startTime).toString(16) +\n \"\\n\" +\n utcsecondsSinceEpoch(sasTokenProperties.expiryTime).toString(16) +\n \"\\n\" +\n sasTokenProperties.keyType +\n \"\\n\" +\n sasTokenProperties.controlPlaneReaderScope.toString(16) +\n \"\\n\" +\n sasTokenProperties.controlPlaneWriterScope.toString(16) +\n \"\\n\" +\n sasTokenProperties.dataPlaneReaderScope.toString(16) +\n \"\\n\" +\n sasTokenProperties.dataPlaneWriterScope.toString(16) +\n \"\\n\";\n\n const signedPayload = await hmac(masterKey, Buffer.from(payload).toString(\"base64\"));\n return \"type=sas&ver=1.0&sig=\" + signedPayload + \";\" + Buffer.from(payload).toString(\"base64\");\n}\n/**\n * @hidden\n */\n// TODO: utcMilllisecondsSinceEpoch\nexport function utcsecondsSinceEpoch(date: Date): number {\n return Math.round(date.getTime() / 1000);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.d.ts deleted file mode 100644 index 6a63db1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare let safeatob: any; -export default safeatob; -//# sourceMappingURL=atob.browser.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.d.ts.map deleted file mode 100644 index ecfa257..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"atob.browser.d.ts","sourceRoot":"","sources":["../../../src/utils/atob.browser.ts"],"names":[],"mappings":"AAGA,QAAA,IAAI,QAAQ,EAAE,GAAG,CAAC;AA8ClB,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.js deleted file mode 100644 index 6d9c3ef..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -let safeatob; -// base64 character set, plus padding character (=) -const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; -// Regular expression to check formal correctness of base64 encoded strings -const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/; -if ("function" !== typeof atob) { - // atob implementation for React Native - safeatob = (str) => { - // atob can work with strings with whitespaces, even inside the encoded part, - // but only \t, \n, \f, \r and ' ', which can be stripped. - str = String(str).replace(/[\t\n\f\r ]+/g, ""); - if (!b64re.test(str)) { - throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."); - } - // Adding the padding if missing, for simplicity - str += "==".slice(2 - (str.length & 3)); - let bitmap; - let result = ""; - let r1; - let r2; - let i = 0; - for (; i < str.length;) { - bitmap = - (b64.indexOf(str.charAt(i++)) << 18) | - (b64.indexOf(str.charAt(i++)) << 12) | - ((r1 = b64.indexOf(str.charAt(i++))) << 6) | - (r2 = b64.indexOf(str.charAt(i++))); - result += - r1 === 64 - ? String.fromCharCode((bitmap >> 16) & 255) - : r2 === 64 - ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255) - : String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255); - } - return result; - }; -} -else { - safeatob = atob; -} -export default safeatob; -//# sourceMappingURL=atob.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.js.map deleted file mode 100644 index 009bc12..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"atob.browser.js","sourceRoot":"","sources":["../../../src/utils/atob.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,IAAI,QAAa,CAAC;AAElB,mDAAmD;AACnD,MAAM,GAAG,GAAG,mEAAmE,CAAC;AAChF,2EAA2E;AAC3E,MAAM,KAAK,GAAG,sEAAsE,CAAC;AAErF,IAAI,UAAU,KAAK,OAAO,IAAI,EAAE;IAC9B,uCAAuC;IACvC,QAAQ,GAAG,CAAC,GAAW,EAAU,EAAE;QACjC,6EAA6E;QAC7E,0DAA0D;QAC1D,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACpB,MAAM,IAAI,SAAS,CACjB,0FAA0F,CAC3F,CAAC;SACH;QAED,gDAAgD;QAChD,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC;QACX,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;QACP,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,GAAI;YACvB,MAAM;gBACJ,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;oBACpC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;oBACpC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;oBAC1C,CAAC,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAEtC,MAAM;gBACJ,EAAE,KAAK,EAAE;oBACP,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC;oBAC3C,CAAC,CAAC,EAAE,KAAK,EAAE;wBACX,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;wBAChE,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,CAAC;SACpF;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;CACH;KAAM;IACL,QAAQ,GAAG,IAAI,CAAC;CACjB;AAED,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nlet safeatob: any;\n\n// base64 character set, plus padding character (=)\nconst b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n// Regular expression to check formal correctness of base64 encoded strings\nconst b64re = /^(?:[A-Za-z\\d+/]{4})*?(?:[A-Za-z\\d+/]{2}(?:==)?|[A-Za-z\\d+/]{3}=?)?$/;\n\nif (\"function\" !== typeof atob) {\n // atob implementation for React Native\n safeatob = (str: string): string => {\n // atob can work with strings with whitespaces, even inside the encoded part,\n // but only \\t, \\n, \\f, \\r and ' ', which can be stripped.\n str = String(str).replace(/[\\t\\n\\f\\r ]+/g, \"\");\n if (!b64re.test(str)) {\n throw new TypeError(\n \"Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.\"\n );\n }\n\n // Adding the padding if missing, for simplicity\n str += \"==\".slice(2 - (str.length & 3));\n let bitmap;\n let result = \"\";\n let r1;\n let r2;\n let i = 0;\n for (; i < str.length; ) {\n bitmap =\n (b64.indexOf(str.charAt(i++)) << 18) |\n (b64.indexOf(str.charAt(i++)) << 12) |\n ((r1 = b64.indexOf(str.charAt(i++))) << 6) |\n (r2 = b64.indexOf(str.charAt(i++)));\n\n result +=\n r1 === 64\n ? String.fromCharCode((bitmap >> 16) & 255)\n : r2 === 64\n ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)\n : String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);\n }\n return result;\n };\n} else {\n safeatob = atob;\n}\n\nexport default safeatob;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.d.ts deleted file mode 100644 index d19a8c5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function atob(str: string): string; -//# sourceMappingURL=atob.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.d.ts.map deleted file mode 100644 index 2cadd10..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"atob.d.ts","sourceRoot":"","sources":["../../../src/utils/atob.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.js deleted file mode 100644 index fcbda70..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export default function atob(str) { - return Buffer.from(str, "base64").toString("binary"); -} -//# sourceMappingURL=atob.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.js.map deleted file mode 100644 index a73d226..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/atob.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"atob.js","sourceRoot":"","sources":["../../../src/utils/atob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,GAAW;IACtC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACvD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport default function atob(str: string): string {\n return Buffer.from(str, \"base64\").toString(\"binary\");\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.d.ts deleted file mode 100644 index c82ad30..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.d.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { JSONObject } from "../queryExecutionContext"; -import { PartitionKeyDefinition } from "../documents"; -import { RequestOptions } from ".."; -import { PatchRequestBody } from "./patch"; -export declare type Operation = CreateOperation | UpsertOperation | ReadOperation | DeleteOperation | ReplaceOperation | BulkPatchOperation; -export interface Batch { - min: string; - max: string; - rangeId: string; - indexes: number[]; - operations: Operation[]; -} -export interface OperationResponse { - statusCode: number; - requestCharge: number; - eTag?: string; - resourceBody?: JSONObject; -} -/** - * Options object used to modify bulk execution. - * continueOnError (Default value: false) - Continues bulk execution when an operation fails ** NOTE THIS WILL DEFAULT TO TRUE IN the 4.0 RELEASE - */ -export interface BulkOptions { - continueOnError?: boolean; -} -export declare function isKeyInRange(min: string, max: string, key: string): boolean; -export interface OperationBase { - partitionKey?: string; - ifMatch?: string; - ifNoneMatch?: string; -} -export declare const BulkOperationType: { - readonly Create: "Create"; - readonly Upsert: "Upsert"; - readonly Read: "Read"; - readonly Delete: "Delete"; - readonly Replace: "Replace"; - readonly Patch: "Patch"; -}; -export declare type OperationInput = CreateOperationInput | UpsertOperationInput | ReadOperationInput | DeleteOperationInput | ReplaceOperationInput | PatchOperationInput; -export interface CreateOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Create; - resourceBody: JSONObject; -} -export interface UpsertOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Upsert; - resourceBody: JSONObject; -} -export interface ReadOperationInput { - partitionKey?: string | number | boolean | null | Record | undefined; - operationType: typeof BulkOperationType.Read; - id: string; -} -export interface DeleteOperationInput { - partitionKey?: string | number | null | Record | undefined; - operationType: typeof BulkOperationType.Delete; - id: string; -} -export interface ReplaceOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Replace; - resourceBody: JSONObject; - id: string; -} -export interface PatchOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Patch; - resourceBody: PatchRequestBody; - id: string; -} -export declare type OperationWithItem = OperationBase & { - resourceBody: JSONObject; -}; -export declare type CreateOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Create; -}; -export declare type UpsertOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Upsert; -}; -export declare type ReadOperation = OperationBase & { - operationType: typeof BulkOperationType.Read; - id: string; -}; -export declare type DeleteOperation = OperationBase & { - operationType: typeof BulkOperationType.Delete; - id: string; -}; -export declare type ReplaceOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Replace; - id: string; -}; -export declare type BulkPatchOperation = OperationBase & { - operationType: typeof BulkOperationType.Patch; - id: string; -}; -export declare function hasResource(operation: Operation): operation is CreateOperation | UpsertOperation | ReplaceOperation; -export declare function getPartitionKeyToHash(operation: Operation, partitionProperty: string): any; -export declare function decorateOperation(operation: OperationInput, definition: PartitionKeyDefinition, options?: RequestOptions): Operation; -/** - * Splits a batch into array of batches based on cumulative size of its operations by making sure - * cumulative size of an individual batch is not larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}. - * If a single operation itself is larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}, that - * operation would be moved into a batch containing only that operation. - * @param originalBatch - A batch of operations needed to be checked. - * @returns - * @hidden - */ -export declare function splitBatchBasedOnBodySize(originalBatch: Batch): Batch[]; -/** - * Calculates size of an JSON object in bytes with utf-8 encoding. - * @hidden - */ -export declare function calculateObjectSizeInBytes(obj: unknown): number; -export declare function decorateBatchOperation(operation: OperationInput, options?: RequestOptions): Operation; -/** - * Util function for finding partition key values nested in objects at slash (/) separated paths - * @hidden - */ -export declare function deepFind(document: T, path: P): string | JSONObject; -//# sourceMappingURL=batch.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.d.ts.map deleted file mode 100644 index f93a423..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"batch.d.ts","sour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K,CAAC;IAC9C,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,wBAAgB,WAAW,CACzB,SAAS,EAAE,SAAS,GACnB,SAAS,IAAI,eAAe,GAAG,eAAe,GAAG,gBAAgB,CAKnE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,GAAG,GAAG,CAiB1F;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,cAAc,EACzB,UAAU,EAAE,sBAAsB,EAClC,OAAO,GAAE,cAAmB,GAC3B,SAAS,CA6BX;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,EAAE,CA4BvE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE/D;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,cAAc,EACzB,OAAO,GAAE,cAAmB,GAC3B,SAAS,CAaX;AACD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,MAAM,GAAG,UAAU,CAavF"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.js deleted file mode 100644 index 715a9c3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.js +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { extractPartitionKey } from "../extractPartitionKey"; -import { v4 } from "uuid"; -import { bodyFromData } from "../request/request"; -import { Constants } from "../common/constants"; -const uuid = v4; -export function isKeyInRange(min, max, key) { - const isAfterMinInclusive = key.localeCompare(min) >= 0; - const isBeforeMax = key.localeCompare(max) < 0; - return isAfterMinInclusive && isBeforeMax; -} -export const BulkOperationType = { - Create: "Create", - Upsert: "Upsert", - Read: "Read", - Delete: "Delete", - Replace: "Replace", - Patch: "Patch", -}; -export function hasResource(operation) { - return (operation.operationType !== "Patch" && - operation.resourceBody !== undefined); -} -export function getPartitionKeyToHash(operation, partitionProperty) { - const toHashKey = hasResource(operation) - ? deepFind(operation.resourceBody, partitionProperty) - : (operation.partitionKey && operation.partitionKey.replace(/[[\]"']/g, "")) || - operation.partitionKey; - // We check for empty object since replace will stringify the value - // The second check avoids cases where the partitionKey value is actually the string '{}' - if (toHashKey === "{}" && operation.partitionKey === "[{}]") { - return {}; - } - if (toHashKey === "null" && operation.partitionKey === "[null]") { - return null; - } - if (toHashKey === "0" && operation.partitionKey === "[0]") { - return 0; - } - return toHashKey; -} -export function decorateOperation(operation, definition, options = {}) { - if (operation.operationType === BulkOperationType.Create || - operation.operationType === BulkOperationType.Upsert) { - if ((operation.resourceBody.id === undefined || operation.resourceBody.id === "") && - !options.disableAutomaticIdGeneration) { - operation.resourceBody.id = uuid(); - } - } - if ("partitionKey" in operation) { - const extracted = extractPartitionKey(operation, { paths: ["/partitionKey"] }); - return Object.assign(Object.assign({}, operation), { partitionKey: JSON.stringify(extracted) }); - } - else if (operation.operationType === BulkOperationType.Create || - operation.operationType === BulkOperationType.Replace || - operation.operationType === BulkOperationType.Upsert) { - const pk = extractPartitionKey(operation.resourceBody, definition); - return Object.assign(Object.assign({}, operation), { partitionKey: JSON.stringify(pk) }); - } - else if (operation.operationType === BulkOperationType.Read || - operation.operationType === BulkOperationType.Delete) { - return Object.assign(Object.assign({}, operation), { partitionKey: "[{}]" }); - } - return operation; -} -/** - * Splits a batch into array of batches based on cumulative size of its operations by making sure - * cumulative size of an individual batch is not larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}. - * If a single operation itself is larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}, that - * operation would be moved into a batch containing only that operation. - * @param originalBatch - A batch of operations needed to be checked. - * @returns - * @hidden - */ -export function splitBatchBasedOnBodySize(originalBatch) { - if ((originalBatch === null || originalBatch === void 0 ? void 0 : originalBatch.operations) === undefined || originalBatch.operations.length < 1) - return []; - let currentBatchSize = calculateObjectSizeInBytes(originalBatch.operations[0]); - let currentBatch = Object.assign(Object.assign({}, originalBatch), { operations: [originalBatch.operations[0]], indexes: [originalBatch.indexes[0]] }); - const processedBatches = []; - processedBatches.push(currentBatch); - for (let index = 1; index < originalBatch.operations.length; index++) { - const operation = originalBatch.operations[index]; - const currentOpSize = calculateObjectSizeInBytes(operation); - if (currentBatchSize + currentOpSize > Constants.DefaultMaxBulkRequestBodySizeInBytes) { - currentBatch = Object.assign(Object.assign({}, originalBatch), { operations: [], indexes: [] }); - processedBatches.push(currentBatch); - currentBatchSize = 0; - } - currentBatch.operations.push(operation); - currentBatch.indexes.push(originalBatch.indexes[index]); - currentBatchSize += currentOpSize; - } - return processedBatches; -} -/** - * Calculates size of an JSON object in bytes with utf-8 encoding. - * @hidden - */ -export function calculateObjectSizeInBytes(obj) { - return new TextEncoder().encode(bodyFromData(obj)).length; -} -export function decorateBatchOperation(operation, options = {}) { - if (operation.operationType === BulkOperationType.Create || - operation.operationType === BulkOperationType.Upsert) { - if ((operation.resourceBody.id === undefined || operation.resourceBody.id === "") && - !options.disableAutomaticIdGeneration) { - operation.resourceBody.id = uuid(); - } - } - return operation; -} -/** - * Util function for finding partition key values nested in objects at slash (/) separated paths - * @hidden - */ -export function deepFind(document, path) { - const apath = path.split("/"); - let h = document; - for (const p of apath) { - if (p in h) - h = h[p]; - else { - if (p !== "_partitionKey") { - console.warn(`Partition key not found, using undefined: ${path} at ${p}`); - } - return "{}"; - } - } - return h; -} -//# sourceMappingURL=batch.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/batch.js.map deleted file mode 100644 index b218192..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-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QACrB,IAAI,CAAC,IAAI,CAAC;YAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aAChB;YACH,IAAI,CAAC,KAAK,eAAe,EAAE;gBACzB,OAAO,CAAC,IAAI,CAAC,6CAA6C,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC;aAC3E;YACD,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { JSONObject } from \"../queryExecutionContext\";\nimport { extractPartitionKey } from \"../extractPartitionKey\";\nimport { PartitionKeyDefinition } from \"../documents\";\nimport { RequestOptions } from \"..\";\nimport { PatchRequestBody } from \"./patch\";\nimport { v4 } from \"uuid\";\nimport { bodyFromData } from \"../request/request\";\nimport { Constants } from \"../common/constants\";\nconst uuid = v4;\n\nexport type Operation =\n | CreateOperation\n | UpsertOperation\n | ReadOperation\n | DeleteOperation\n | ReplaceOperation\n | BulkPatchOperation;\n\nexport interface Batch {\n min: string;\n max: string;\n rangeId: string;\n indexes: number[];\n operations: Operation[];\n}\n\nexport interface OperationResponse {\n statusCode: number;\n requestCharge: number;\n eTag?: string;\n resourceBody?: JSONObject;\n}\n\n/**\n * Options object used to modify bulk execution.\n * continueOnError (Default value: false) - Continues bulk execution when an operation fails ** NOTE THIS WILL DEFAULT TO TRUE IN the 4.0 RELEASE\n */\nexport interface BulkOptions {\n continueOnError?: boolean;\n}\n\nexport function isKeyInRange(min: string, max: string, key: string): boolean {\n const isAfterMinInclusive = key.localeCompare(min) >= 0;\n const isBeforeMax = key.localeCompare(max) < 0;\n return isAfterMinInclusive && isBeforeMax;\n}\n\nexport interface OperationBase {\n partitionKey?: string;\n ifMatch?: string;\n ifNoneMatch?: string;\n}\n\nexport const BulkOperationType = {\n Create: \"Create\",\n Upsert: \"Upsert\",\n Read: \"Read\",\n Delete: \"Delete\",\n Replace: \"Replace\",\n Patch: \"Patch\",\n} as const;\n\nexport type OperationInput =\n | CreateOperationInput\n | UpsertOperationInput\n | ReadOperationInput\n | DeleteOperationInput\n | ReplaceOperationInput\n | PatchOperationInput;\n\nexport interface CreateOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Create;\n resourceBody: JSONObject;\n}\n\nexport interface UpsertOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Upsert;\n resourceBody: JSONObject;\n}\n\nexport interface ReadOperationInput {\n partitionKey?: string | number | boolean | null | Record | undefined;\n operationType: typeof BulkOperationType.Read;\n id: string;\n}\n\nexport interface DeleteOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n operationType: typeof BulkOperationType.Delete;\n id: string;\n}\n\nexport interface ReplaceOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Replace;\n resourceBody: JSONObject;\n id: string;\n}\n\nexport interface PatchOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Patch;\n resourceBody: PatchRequestBody;\n id: string;\n}\n\nexport type OperationWithItem = OperationBase & {\n resourceBody: JSONObject;\n};\n\nexport type CreateOperation = OperationWithItem & {\n operationType: typeof BulkOperationType.Create;\n};\n\nexport type UpsertOperation = OperationWithItem & {\n operationType: typeof BulkOperationType.Upsert;\n};\n\nexport type ReadOperation = OperationBase & {\n operationType: typeof BulkOperationType.Read;\n id: string;\n};\n\nexport type DeleteOperation = OperationBase & {\n operationType: typeof BulkOperationType.Delete;\n id: string;\n};\n\nexport type ReplaceOperation = OperationWithItem & {\n operationType: typeof BulkOperationType.Replace;\n id: string;\n};\n\nexport type BulkPatchOperation = OperationBase & {\n operationType: typeof BulkOperationType.Patch;\n id: string;\n};\n\nexport function hasResource(\n operation: Operation\n): operation is CreateOperation | UpsertOperation | ReplaceOperation {\n return (\n operation.operationType !== \"Patch\" &&\n (operation as OperationWithItem).resourceBody !== undefined\n );\n}\n\nexport function getPartitionKeyToHash(operation: Operation, partitionProperty: string): any {\n const toHashKey = hasResource(operation)\n ? deepFind(operation.resourceBody, partitionProperty)\n : (operation.partitionKey && operation.partitionKey.replace(/[[\\]\"']/g, \"\")) ||\n operation.partitionKey;\n // We check for empty object since replace will stringify the value\n // The second check avoids cases where the partitionKey value is actually the string '{}'\n if (toHashKey === \"{}\" && operation.partitionKey === \"[{}]\") {\n return {};\n }\n if (toHashKey === \"null\" && operation.partitionKey === \"[null]\") {\n return null;\n }\n if (toHashKey === \"0\" && operation.partitionKey === \"[0]\") {\n return 0;\n }\n return toHashKey;\n}\n\nexport function decorateOperation(\n operation: OperationInput,\n definition: PartitionKeyDefinition,\n options: RequestOptions = {}\n): Operation {\n if (\n operation.operationType === BulkOperationType.Create ||\n operation.operationType === BulkOperationType.Upsert\n ) {\n if (\n (operation.resourceBody.id === undefined || operation.resourceBody.id === \"\") &&\n !options.disableAutomaticIdGeneration\n ) {\n operation.resourceBody.id = uuid();\n }\n }\n if (\"partitionKey\" in operation) {\n const extracted = extractPartitionKey(operation, { paths: [\"/partitionKey\"] });\n return { ...operation, partitionKey: JSON.stringify(extracted) } as Operation;\n } else if (\n operation.operationType === BulkOperationType.Create ||\n operation.operationType === BulkOperationType.Replace ||\n operation.operationType === BulkOperationType.Upsert\n ) {\n const pk = extractPartitionKey(operation.resourceBody, definition);\n return { ...operation, partitionKey: JSON.stringify(pk) } as Operation;\n } else if (\n operation.operationType === BulkOperationType.Read ||\n operation.operationType === BulkOperationType.Delete\n ) {\n return { ...operation, partitionKey: \"[{}]\" };\n }\n return operation as Operation;\n}\n\n/**\n * Splits a batch into array of batches based on cumulative size of its operations by making sure\n * cumulative size of an individual batch is not larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}.\n * If a single operation itself is larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}, that\n * operation would be moved into a batch containing only that operation.\n * @param originalBatch - A batch of operations needed to be checked.\n * @returns\n * @hidden\n */\nexport function splitBatchBasedOnBodySize(originalBatch: Batch): Batch[] {\n if (originalBatch?.operations === undefined || originalBatch.operations.length < 1) return [];\n let currentBatchSize = calculateObjectSizeInBytes(originalBatch.operations[0]);\n let currentBatch: Batch = {\n ...originalBatch,\n operations: [originalBatch.operations[0]],\n indexes: [originalBatch.indexes[0]],\n };\n const processedBatches: Batch[] = [];\n processedBatches.push(currentBatch);\n\n for (let index = 1; index < originalBatch.operations.length; index++) {\n const operation = originalBatch.operations[index];\n const currentOpSize = calculateObjectSizeInBytes(operation);\n if (currentBatchSize + currentOpSize > Constants.DefaultMaxBulkRequestBodySizeInBytes) {\n currentBatch = {\n ...originalBatch,\n operations: [],\n indexes: [],\n };\n processedBatches.push(currentBatch);\n currentBatchSize = 0;\n }\n currentBatch.operations.push(operation);\n currentBatch.indexes.push(originalBatch.indexes[index]);\n currentBatchSize += currentOpSize;\n }\n return processedBatches;\n}\n\n/**\n * Calculates size of an JSON object in bytes with utf-8 encoding.\n * @hidden\n */\nexport function calculateObjectSizeInBytes(obj: unknown): number {\n return new TextEncoder().encode(bodyFromData(obj as any)).length;\n}\n\nexport function decorateBatchOperation(\n operation: OperationInput,\n options: RequestOptions = {}\n): Operation {\n if (\n operation.operationType === BulkOperationType.Create ||\n operation.operationType === BulkOperationType.Upsert\n ) {\n if (\n (operation.resourceBody.id === undefined || operation.resourceBody.id === \"\") &&\n !options.disableAutomaticIdGeneration\n ) {\n operation.resourceBody.id = uuid();\n }\n }\n return operation as Operation;\n}\n/**\n * Util function for finding partition key values nested in objects at slash (/) separated paths\n * @hidden\n */\nexport function deepFind(document: T, path: P): string | JSONObject {\n const apath = path.split(\"/\");\n let h: any = document;\n for (const p of apath) {\n if (p in h) h = h[p];\n else {\n if (p !== \"_partitionKey\") {\n console.warn(`Partition key not found, using undefined: ${path} at ${p}`);\n }\n return \"{}\";\n }\n }\n return h;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.d.ts deleted file mode 100644 index dee1f56..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { HttpClient } from "@azure/core-rest-pipeline"; -export declare function getCachedDefaultHttpClient(): HttpClient; -//# sourceMappingURL=cachedClient.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.d.ts.map deleted file mode 100644 index 9bfe4ca..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cachedClient.d.ts","sourceRoot":"","sources":["../../../src/utils/cachedClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAA2B,MAAM,2BAA2B,CAAC;AAIhF,wBAAgB,0BAA0B,IAAI,UAAU,CAMvD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.js deleted file mode 100644 index 49a4d21..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.js +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createDefaultHttpClient } from "@azure/core-rest-pipeline"; -let cachedHttpClient; -export function getCachedDefaultHttpClient() { - if (!cachedHttpClient) { - cachedHttpClient = createDefaultHttpClient(); - } - return cachedHttpClient; -} -//# sourceMappingURL=cachedClient.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.js.map deleted file mode 100644 index 2fbb43b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/cachedClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cachedClient.js","sourceRoot":"","sources":["../../../src/utils/cachedClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAc,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,IAAI,gBAAwC,CAAC;AAE7C,MAAM,UAAU,0BAA0B;IACxC,IAAI,CAAC,gBAAgB,EAAE;QACrB,gBAAgB,GAAG,uBAAuB,EAAE,CAAC;KAC9C;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient, createDefaultHttpClient } from \"@azure/core-rest-pipeline\";\n\nlet cachedHttpClient: HttpClient | undefined;\n\nexport function getCachedDefaultHttpClient(): HttpClient {\n if (!cachedHttpClient) {\n cachedHttpClient = createDefaultHttpClient();\n }\n\n return cachedHttpClient;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.d.ts deleted file mode 100644 index 36aff29..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function checkURL(testString: string): URL; -export declare function sanitizeEndpoint(url: string): string; -//# sourceMappingURL=checkURL.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.d.ts.map deleted file mode 100644 index 2cbabb4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"checkURL.d.ts","sourceRoot":"","sources":["../../../src/utils/checkURL.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAEhD;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.js deleted file mode 100644 index a79f532..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export function checkURL(testString) { - return new URL(testString); -} -export function sanitizeEndpoint(url) { - return new URL(url).href.replace(/\/$/, ""); -} -//# sourceMappingURL=checkURL.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.js.map deleted file mode 100644 index 3bd3d69..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/checkURL.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"checkURL.js","sourceRoot":"","sources":["../../../src/utils/checkURL.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,UAAU,QAAQ,CAAC,UAAkB;IACzC,OAAO,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport function checkURL(testString: string): URL {\n return new URL(testString);\n}\n\nexport function sanitizeEndpoint(url: string): string {\n return new URL(url).href.replace(/\\/$/, \"\");\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.d.ts deleted file mode 100644 index 58e11d2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function digest(str: string): Promise; -//# sourceMappingURL=digest.browser.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.d.ts.map deleted file mode 100644 index 63e2e73..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"digest.browser.d.ts","sourceRoot":"","sources":["../../../src/utils/digest.browser.ts"],"names":[],"mappings":"AAMA,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAIzD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.js deleted file mode 100644 index c60174e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { encodeUTF8 } from "./encode"; -import { globalCrypto } from "./globalCrypto"; -export async function digest(str) { - const data = encodeUTF8(str); - const hash = await globalCrypto.subtle.digest("SHA-256", data); - return bufferToHex(hash); -} -function bufferToHex(buffer) { - return Array.prototype.map - .call(new Uint8Array(buffer), (item) => ("00" + item.toString(16)).slice(-2)) - .join(""); -} -//# sourceMappingURL=digest.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.js.map deleted file mode 100644 index 1e01a8c..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"digest.browser.js","sourceRoot":"","sources":["../../../src/utils/digest.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,GAAW;IACtC,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC/D,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,WAAW,CAAC,MAAmB;IACtC,OAAO,KAAK,CAAC,SAAS,CAAC,GAAG;SACvB,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACpF,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { encodeUTF8 } from \"./encode\";\nimport { globalCrypto } from \"./globalCrypto\";\n\nexport async function digest(str: string): Promise {\n const data = encodeUTF8(str);\n const hash = await globalCrypto.subtle.digest(\"SHA-256\", data);\n return bufferToHex(hash);\n}\n\nfunction bufferToHex(buffer: ArrayBuffer): string {\n return Array.prototype.map\n .call(new Uint8Array(buffer), (item: number) => (\"00\" + item.toString(16)).slice(-2))\n .join(\"\");\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.d.ts deleted file mode 100644 index 6971dbf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function digest(str: string): Promise; -//# sourceMappingURL=digest.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.d.ts.map deleted file mode 100644 index 4bf95bc..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../../src/utils/digest.ts"],"names":[],"mappings":"AAKA,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAIzD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.js deleted file mode 100644 index 50e8cc1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createHash } from "crypto"; -export async function digest(str) { - const hash = createHash("sha256"); - hash.update(str, "utf8"); - return hash.digest("hex"); -} -//# sourceMappingURL=digest.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.js.map deleted file mode 100644 index 3a06414..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/digest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"digest.js","sourceRoot":"","sources":["../../../src/utils/digest.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,GAAW;IACtC,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createHash } from \"crypto\";\n\nexport async function digest(str: string): Promise {\n const hash = createHash(\"sha256\");\n hash.update(str, \"utf8\");\n return hash.digest(\"hex\");\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.d.ts deleted file mode 100644 index a9613ec..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -export declare function encodeUTF8(str: string): Uint8Array; -export declare function encodeBase64(value: ArrayBuffer): string; -//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.d.ts.map deleted file mode 100644 index b99d318..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/utils/encode.ts"],"names":[],"mappings":";AAKA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAMlD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAYvD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.js deleted file mode 100644 index 07ad71a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/// -export function encodeUTF8(str) { - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} -export function encodeBase64(value) { - if ("function" !== typeof btoa) { - throw new Error("Your browser environment is missing the global `btoa` function"); - } - let binary = ""; - const bytes = new Uint8Array(value); - const len = bytes.byteLength; - for (let i = 0; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); -} -//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.js.map deleted file mode 100644 index e13ca10..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/encode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.js","sourceRoot":"","sources":["../../../src/utils/encode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,0BAA0B;AAE1B,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACnC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,IAAI,UAAU,KAAK,OAAO,IAAI,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;KACnF;IAED,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC;IAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5B,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACzC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// \n\nexport function encodeUTF8(str: string): Uint8Array {\n const bytes = new Uint8Array(str.length);\n for (let i = 0; i < str.length; i++) {\n bytes[i] = str.charCodeAt(i);\n }\n return bytes;\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (\"function\" !== typeof btoa) {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n\n let binary = \"\";\n const bytes = new Uint8Array(value);\n const len = bytes.byteLength;\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.d.ts deleted file mode 100644 index 031468e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const globalCrypto: Crypto; -export { globalCrypto }; -//# sourceMappingURL=globalCrypto.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.d.ts.map deleted file mode 100644 index d161fda..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalCrypto.d.ts","sourceRoot":"","sources":["../../../src/utils/globalCrypto.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,YAAY,EAAE,MAA+C,CAAC;AAMpE,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.js deleted file mode 100644 index 22e96f0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// eslint-disable-next-line @azure/azure-sdk/ts-no-window -const globalRef = typeof self === "undefined" ? window : self; -if (!globalRef) { - throw new Error("Could not find global"); -} -const globalCrypto = globalRef.crypto || globalRef.msCrypto; -if (!globalCrypto || !globalCrypto.subtle) { - throw new Error("Browser does not support cryptography functions"); -} -export { globalCrypto }; -//# sourceMappingURL=globalCrypto.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.js.map deleted file mode 100644 index 27fab90..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalCrypto.js","sourceRoot":"","sources":["../../../src/utils/globalCrypto.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,yDAAyD;AACzD,MAAM,SAAS,GAAQ,OAAO,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAEnE,IAAI,CAAC,SAAS,EAAE;IACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;CAC1C;AAED,MAAM,YAAY,GAAW,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,QAAQ,CAAC;AAEpE,IAAI,CAAC,YAAY,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;IACzC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;CACpE;AAED,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nconst globalRef: any = typeof self === \"undefined\" ? window : self;\n\nif (!globalRef) {\n throw new Error(\"Could not find global\");\n}\n\nconst globalCrypto: Crypto = globalRef.crypto || globalRef.msCrypto;\n\nif (!globalCrypto || !globalCrypto.subtle) {\n throw new Error(\"Browser does not support cryptography functions\");\n}\n\nexport { globalCrypto };\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.d.ts deleted file mode 100644 index 635c2c0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const globalCrypto: any; -export { globalCrypto }; -//# sourceMappingURL=globalCrypto.native.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.d.ts.map deleted file mode 100644 index 5c3d2b7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalCrypto.native.d.ts","sourceRoot":"","sources":["../../../src/utils/globalCrypto.native.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,YAAY,KAAkC,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.js deleted file mode 100644 index 1a069ea..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// isomorphic-webcrypto is not listed as a dependency in package.json because -// doing so requires adding a bunch of react packages as peer dependencies. So, -// it is being loaded dynamically here to not cause compiler error. -const globalCrypto = require("isomorphic-webcrypto"); // eslint-disable-line import/no-extraneous-dependencies, @typescript-eslint/no-require-imports -export { globalCrypto }; -//# sourceMappingURL=globalCrypto.native.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.js.map deleted file mode 100644 index 1b92c11..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/globalCrypto.native.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalCrypto.native.js","sourceRoot":"","sources":["../../../src/utils/globalCrypto.native.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,6EAA6E;AAC7E,+EAA+E;AAC/E,mEAAmE;AACnE,MAAM,YAAY,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,+FAA+F;AACrJ,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// isomorphic-webcrypto is not listed as a dependency in package.json because\n// doing so requires adding a bunch of react packages as peer dependencies. So,\n// it is being loaded dynamically here to not cause compiler error.\nconst globalCrypto = require(\"isomorphic-webcrypto\"); // eslint-disable-line import/no-extraneous-dependencies, @typescript-eslint/no-require-imports\nexport { globalCrypto };\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.d.ts deleted file mode 100644 index 28f2a77..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function hashObject(object: unknown): Promise; -//# sourceMappingURL=hashObject.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.d.ts.map deleted file mode 100644 index dfad13a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hashObject.d.ts","sourceRoot":"","sources":["../../../src/utils/hashObject.ts"],"names":[],"mappings":"AAMA,wBAAsB,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAGjE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.js deleted file mode 100644 index 5b6cee4..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { digest } from "./digest"; -import stableStringify from "fast-json-stable-stringify"; -export async function hashObject(object) { - const stringifiedObject = stableStringify(object); - return digest(stringifiedObject); -} -//# sourceMappingURL=hashObject.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.js.map deleted file mode 100644 index 2c15ae8..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashObject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hashObject.js","sourceRoot":"","sources":["../../../src/utils/hashObject.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,eAAe,MAAM,4BAA4B,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAe;IAC9C,MAAM,iBAAiB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACnC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { digest } from \"./digest\";\nimport stableStringify from \"fast-json-stable-stringify\";\n\nexport async function hashObject(object: unknown): Promise {\n const stringifiedObject = stableStringify(object);\n return digest(stringifiedObject);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.d.ts deleted file mode 100644 index 9a1de54..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -export declare function writeNumberForBinaryEncodingJSBI(hash: number): Buffer; -export declare function doubleToByteArrayJSBI(double: number): Buffer; -//# sourceMappingURL=number.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.d.ts.map deleted file mode 100644 index 9ebf487..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../../../src/utils/hashing/encoding/number.ts"],"names":[],"mappings":";AAMA,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAyCrE;AAYD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAY5D"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.js deleted file mode 100644 index a1657ba..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import JSBI from "jsbi"; -import { BytePrefix } from "./prefix"; -export function writeNumberForBinaryEncodingJSBI(hash) { - let payload = encodeNumberAsUInt64JSBI(hash); - let outputStream = Buffer.from(BytePrefix.Number, "hex"); - const firstChunk = JSBI.asUintN(64, JSBI.signedRightShift(payload, JSBI.BigInt(56))); - outputStream = Buffer.concat([outputStream, Buffer.from(firstChunk.toString(16), "hex")]); - payload = JSBI.asUintN(64, JSBI.leftShift(JSBI.BigInt(payload), JSBI.BigInt(0x8))); - let byteToWrite = JSBI.BigInt(0); - let firstIteration = false; - let shifted; - let padded; - do { - if (!firstIteration) { - // we pad because after shifting because we will produce characters like "f" or similar, - // which cannot be encoded as hex in a buffer because they are invalid hex - // https://github.com/nodejs/node/issues/24491 - padded = byteToWrite.toString(16).padStart(2, "0"); - if (padded !== "00") { - outputStream = Buffer.concat([outputStream, Buffer.from(padded, "hex")]); - } - } - else { - firstIteration = false; - } - shifted = JSBI.asUintN(64, JSBI.signedRightShift(payload, JSBI.BigInt(56))); - byteToWrite = JSBI.asUintN(64, JSBI.bitwiseOr(shifted, JSBI.BigInt(0x01))); - payload = JSBI.asUintN(64, JSBI.leftShift(payload, JSBI.BigInt(7))); - } while (JSBI.notEqual(payload, JSBI.BigInt(0))); - const lastChunk = JSBI.asUintN(64, JSBI.bitwiseAnd(byteToWrite, JSBI.BigInt(0xfe))); - // we pad because after shifting because we will produce characters like "f" or similar, - // which cannot be encoded as hex in a buffer because they are invalid hex - // https://github.com/nodejs/node/issues/24491 - padded = lastChunk.toString(16).padStart(2, "0"); - if (padded !== "00") { - outputStream = Buffer.concat([outputStream, Buffer.from(padded, "hex")]); - } - return outputStream; -} -function encodeNumberAsUInt64JSBI(value) { - const rawValueBits = getRawBitsJSBI(value); - const mask = JSBI.BigInt(0x8000000000000000); - const returned = rawValueBits < mask - ? JSBI.bitwiseXor(rawValueBits, mask) - : JSBI.add(JSBI.bitwiseNot(rawValueBits), JSBI.BigInt(1)); - return returned; -} -export function doubleToByteArrayJSBI(double) { - const output = Buffer.alloc(8); - const lng = getRawBitsJSBI(double); - for (let i = 0; i < 8; i++) { - output[i] = JSBI.toNumber(JSBI.bitwiseAnd(JSBI.signedRightShift(lng, JSBI.multiply(JSBI.BigInt(i), JSBI.BigInt(8))), JSBI.BigInt(0xff))); - } - return output; -} -function getRawBitsJSBI(value) { - const view = new DataView(new ArrayBuffer(8)); - view.setFloat64(0, value); - return JSBI.BigInt(`0x${buf2hex(view.buffer)}`); -} -function buf2hex(buffer) { - return Array.prototype.map - .call(new Uint8Array(buffer), (x) => ("00" + x.toString(16)).slice(-2)) - .join(""); -} -//# sourceMappingURL=number.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.js.map deleted file mode 100644 index 6f390b3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/number.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.js","sourceRoot":"","sources":["../../../../../src/utils/hashing/encoding/number.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,UAAU,gCAAgC,CAAC,IAAY;IAC3D,IAAI,OAAO,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAErF,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1F,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAEnF,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,IAAI,OAAa,CAAC;IAClB,IAAI,MAAc,C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ChB,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,OAAO,CAAC,MAAmB;IAClC,OAAO,KAAK,CAAC,SAAS,CAAC,GAAG;SACvB,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SAC9E,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport JSBI from \"jsbi\";\nimport { BytePrefix } from \"./prefix\";\n\nexport function writeNumberForBinaryEncodingJSBI(hash: number): Buffer {\n let payload = encodeNumberAsUInt64JSBI(hash);\n let outputStream = Buffer.from(BytePrefix.Number, \"hex\");\n const firstChunk = JSBI.asUintN(64, JSBI.signedRightShift(payload, JSBI.BigInt(56)));\n\n outputStream = Buffer.concat([outputStream, Buffer.from(firstChunk.toString(16), \"hex\")]);\n payload = JSBI.asUintN(64, JSBI.leftShift(JSBI.BigInt(payload), JSBI.BigInt(0x8)));\n\n let byteToWrite = JSBI.BigInt(0);\n let firstIteration = false;\n let shifted: JSBI;\n let padded: string;\n\n do {\n if (!firstIteration) {\n // we pad because after shifting because we will produce characters like \"f\" or similar,\n // which cannot be encoded as hex in a buffer because they are invalid hex\n // https://github.com/nodejs/node/issues/24491\n padded = byteToWrite.toString(16).padStart(2, \"0\");\n if (padded !== \"00\") {\n outputStream = Buffer.concat([outputStream, Buffer.from(padded, \"hex\")]);\n }\n } else {\n firstIteration = false;\n }\n\n shifted = JSBI.asUintN(64, JSBI.signedRightShift(payload, JSBI.BigInt(56)));\n byteToWrite = JSBI.asUintN(64, JSBI.bitwiseOr(shifted, JSBI.BigInt(0x01)));\n payload = JSBI.asUintN(64, JSBI.leftShift(payload, JSBI.BigInt(7)));\n } while (JSBI.notEqual(payload, JSBI.BigInt(0)));\n\n const lastChunk = JSBI.asUintN(64, JSBI.bitwiseAnd(byteToWrite, JSBI.BigInt(0xfe)));\n // we pad because after shifting because we will produce characters like \"f\" or similar,\n // which cannot be encoded as hex in a buffer because they are invalid hex\n // https://github.com/nodejs/node/issues/24491\n padded = lastChunk.toString(16).padStart(2, \"0\");\n if (padded !== \"00\") {\n outputStream = Buffer.concat([outputStream, Buffer.from(padded, \"hex\")]);\n }\n\n return outputStream;\n}\n\nfunction encodeNumberAsUInt64JSBI(value: number): JSBI {\n const rawValueBits = getRawBitsJSBI(value);\n const mask = JSBI.BigInt(0x8000000000000000);\n const returned =\n rawValueBits < mask\n ? JSBI.bitwiseXor(rawValueBits, mask)\n : JSBI.add(JSBI.bitwiseNot(rawValueBits), JSBI.BigInt(1));\n return returned;\n}\n\nexport function doubleToByteArrayJSBI(double: number): Buffer {\n const output: Buffer = Buffer.alloc(8);\n const lng = getRawBitsJSBI(double);\n for (let i = 0; i < 8; i++) {\n output[i] = JSBI.toNumber(\n JSBI.bitwiseAnd(\n JSBI.signedRightShift(lng, JSBI.multiply(JSBI.BigInt(i), JSBI.BigInt(8))),\n JSBI.BigInt(0xff)\n )\n );\n }\n return output;\n}\n\nfunction getRawBitsJSBI(value: number): JSBI {\n const view = new DataView(new ArrayBuffer(8));\n view.setFloat64(0, value);\n return JSBI.BigInt(`0x${buf2hex(view.buffer)}`);\n}\n\nfunction buf2hex(buffer: ArrayBuffer): string {\n return Array.prototype.map\n .call(new Uint8Array(buffer), (x: number) => (\"00\" + x.toString(16)).slice(-2))\n .join(\"\");\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.d.ts deleted file mode 100644 index 51300e5..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export declare const BytePrefix: { - Undefined: string; - Null: string; - False: string; - True: string; - MinNumber: string; - Number: string; - MaxNumber: string; - MinString: string; - String: string; - MaxString: string; - Int64: string; - Int32: string; - Int16: string; - Int8: string; - Uint64: string; - Uint32: string; - Uint16: string; - Uint8: string; - Binary: string; - Guid: string; - Float: string; - Infinity: string; -}; -//# sourceMappingURL=prefix.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.d.ts.map deleted file mode 100644 index aa17136..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prefix.d.ts","sourceRoot":"","sources":["../../../../../src/utils/hashing/encoding/prefix.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;CAuBtB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.js deleted file mode 100644 index dd3cf5f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export const BytePrefix = { - Undefined: "00", - Null: "01", - False: "02", - True: "03", - MinNumber: "04", - Number: "05", - MaxNumber: "06", - MinString: "07", - String: "08", - MaxString: "09", - Int64: "0a", - Int32: "0b", - Int16: "0c", - Int8: "0d", - Uint64: "0e", - Uint32: "0f", - Uint16: "10", - Uint8: "11", - Binary: "12", - Guid: "13", - Float: "14", - Infinity: "FF", -}; -//# sourceMappingURL=prefix.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.js.map deleted file mode 100644 index b0239e7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/prefix.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prefix.js","sourceRoot":"","sources":["../../../../../src/utils/hashing/encoding/prefix.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;CACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const BytePrefix = {\n Undefined: \"00\",\n Null: \"01\",\n False: \"02\",\n True: \"03\",\n MinNumber: \"04\",\n Number: \"05\",\n MaxNumber: \"06\",\n MinString: \"07\",\n String: \"08\",\n MaxString: \"09\",\n Int64: \"0a\",\n Int32: \"0b\",\n Int16: \"0c\",\n Int8: \"0d\",\n Uint64: \"0e\",\n Uint32: \"0f\",\n Uint16: \"10\",\n Uint8: \"11\",\n Binary: \"12\",\n Guid: \"13\",\n Float: \"14\",\n Infinity: \"FF\",\n};\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.d.ts deleted file mode 100644 index ec7cc91..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -export declare function writeStringForBinaryEncoding(payload: string): Buffer; -//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.d.ts.map deleted file mode 100644 index 6239918..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../../src/utils/hashing/encoding/string.ts"],"names":[],"mappings":";AAKA,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAuBpE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.js deleted file mode 100644 index ef101d3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { BytePrefix } from "./prefix"; -export function writeStringForBinaryEncoding(payload) { - let outputStream = Buffer.from(BytePrefix.String, "hex"); - const MAX_STRING_BYTES_TO_APPEND = 100; - const byteArray = [...Buffer.from(payload)]; - const isShortString = payload.length <= MAX_STRING_BYTES_TO_APPEND; - for (let index = 0; index < (isShortString ? byteArray.length : MAX_STRING_BYTES_TO_APPEND + 1); index++) { - let charByte = byteArray[index]; - if (charByte < 0xff) { - charByte++; - } - outputStream = Buffer.concat([outputStream, Buffer.from(charByte.toString(16), "hex")]); - } - if (isShortString) { - outputStream = Buffer.concat([outputStream, Buffer.from(BytePrefix.Undefined, "hex")]); - } - return outputStream; -} -//# sourceMappingURL=string.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.js.map deleted file mode 100644 index 58542cf..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/encoding/string.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../../../src/utils/hashing/encoding/string.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,UAAU,4BAA4B,CAAC,OAAe;IAC1D,IAAI,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACzD,MAAM,0BAA0B,GAAG,GAAG,CAAC;IACvC,MAAM,SAAS,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5C,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,IAAI,0BAA0B,CAAC;IAEnE,KACE,IAAI,KAAK,GAAG,CAAC,EACb,KAAK,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,0BAA0B,GAAG,CAAC,CAAC,EAC3E,KAAK,EAAE,EACP;QACA,IAAI,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,QAAQ,GAAG,IAAI,EAAE;YACnB,QAAQ,EAAE,CAAC;SACZ;QACD,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;KACzF;IAED,IAAI,aAAa,EAAE;QACjB,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;KACxF;IACD,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BytePrefix } from \"./prefix\";\n\nexport function writeStringForBinaryEncoding(payload: string): Buffer {\n let outputStream = Buffer.from(BytePrefix.String, \"hex\");\n const MAX_STRING_BYTES_TO_APPEND = 100;\n const byteArray = [...Buffer.from(payload)];\n\n const isShortString = payload.length <= MAX_STRING_BYTES_TO_APPEND;\n\n for (\n let index = 0;\n index < (isShortString ? byteArray.length : MAX_STRING_BYTES_TO_APPEND + 1);\n index++\n ) {\n let charByte = byteArray[index];\n if (charByte < 0xff) {\n charByte++;\n }\n outputStream = Buffer.concat([outputStream, Buffer.from(charByte.toString(16), \"hex\")]);\n }\n\n if (isShortString) {\n outputStream = Buffer.concat([outputStream, Buffer.from(BytePrefix.Undefined, \"hex\")]);\n }\n return outputStream;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.d.ts deleted file mode 100644 index ece51a7..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/// -declare function x86Hash32(bytes: Buffer, seed?: number): number; -declare function x86Hash128(bytes: Buffer, seed?: number): string; -declare function x64Hash128(bytes: Buffer, seed?: number): string; -export declare function reverse(buff: Buffer): Buffer; -declare const _default: { - version: string; - x86: { - hash32: typeof x86Hash32; - hash128: typeof x86Hash128; - }; - x64: { - hash128: typeof x64Hash128; - }; - inputValidation: boolean; -}; -export default _default; -//# sourceMappingURL=murmurHash.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.d.ts.map deleted file mode 100644 index b5383c3..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"murmurHash.d.ts","sourceRoot":"","sources":["../../../../src/utils/hashing/murmurHash.ts"],"names":[],"mappings":";AAiLA,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,UAoD9C;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,UAwK/C;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,UAuI/C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UAQnC;;;;;;;;;;;;AAED,wBAUE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.js deleted file mode 100644 index b121007..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.js +++ /dev/null @@ -1,436 +0,0 @@ -// +----------------------------------------------------------------------+ -// | murmurHash3js.js v3.0.1 // https://github.com/pid/murmurHash3js -// | A javascript implementation of MurmurHash3's x86 hashing algorithms. | -// |----------------------------------------------------------------------| -// | Copyright (c) 2012-2015 Karan Lyons | -// | https://github.com/karanlyons/murmurHash3.js/blob/c1778f75792abef7bdd74bc85d2d4e1a3d25cfe9/murmurHash3.js | -// | Freely distributable under the MIT license. | -// +----------------------------------------------------------------------+ -// PRIVATE FUNCTIONS -// ----------------- -function _x86Multiply(m, n) { - // - // Given two 32bit ints, returns the two multiplied together as a - // 32bit int. - // - return (m & 0xffff) * n + ((((m >>> 16) * n) & 0xffff) << 16); -} -function _x86Rotl(m, n) { - // - // Given a 32bit int and an int representing a number of bit positions, - // returns the 32bit int rotated left by that number of positions. - // - return (m << n) | (m >>> (32 - n)); -} -function _x86Fmix(h) { - // - // Given a block, returns murmurHash3's final x86 mix of that block. - // - h ^= h >>> 16; - h = _x86Multiply(h, 0x85ebca6b); - h ^= h >>> 13; - h = _x86Multiply(h, 0xc2b2ae35); - h ^= h >>> 16; - return h; -} -function _x64Add(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // added together as a 64bit int (as an array of two 32bit ints). - // - m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; - n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; - const o = [0, 0, 0, 0]; - o[3] += m[3] + n[3]; - o[2] += o[3] >>> 16; - o[3] &= 0xffff; - o[2] += m[2] + n[2]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[1] += m[1] + n[1]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[0] += m[0] + n[0]; - o[0] &= 0xffff; - return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; -} -function _x64Multiply(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // multiplied together as a 64bit int (as an array of two 32bit ints). - // - m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; - n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; - const o = [0, 0, 0, 0]; - o[3] += m[3] * n[3]; - o[2] += o[3] >>> 16; - o[3] &= 0xffff; - o[2] += m[2] * n[3]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[2] += m[3] * n[2]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[1] += m[1] * n[3]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[1] += m[2] * n[2]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[1] += m[3] * n[1]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[0] += m[0] * n[3] + m[1] * n[2] + m[2] * n[1] + m[3] * n[0]; - o[0] &= 0xffff; - return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; -} -function _x64Rotl(m, n) { - // - // Given a 64bit int (as an array of two 32bit ints) and an int - // representing a number of bit positions, returns the 64bit int (as an - // array of two 32bit ints) rotated left by that number of positions. - // - n %= 64; - if (n === 32) { - return [m[1], m[0]]; - } - else if (n < 32) { - return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]; - } - else { - n -= 32; - return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]; - } -} -function _x64LeftShift(m, n) { - // - // Given a 64bit int (as an array of two 32bit ints) and an int - // representing a number of bit positions, returns the 64bit int (as an - // array of two 32bit ints) shifted left by that number of positions. - // - n %= 64; - if (n === 0) { - return m; - } - else if (n < 32) { - return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]; - } - else { - return [m[1] << (n - 32), 0]; - } -} -function _x64Xor(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // xored together as a 64bit int (as an array of two 32bit ints). - // - return [m[0] ^ n[0], m[1] ^ n[1]]; -} -function _x64Fmix(h) { - // - // Given a block, returns murmurHash3's final x64 mix of that block. - // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the - // only place where we need to right shift 64bit ints.) - // - h = _x64Xor(h, [0, h[0] >>> 1]); - h = _x64Multiply(h, [0xff51afd7, 0xed558ccd]); - h = _x64Xor(h, [0, h[0] >>> 1]); - h = _x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]); - h = _x64Xor(h, [0, h[0] >>> 1]); - return h; -} -// PUBLIC FUNCTIONS -// ---------------- -function x86Hash32(bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 32 bit hash - // using the x86 flavor of MurmurHash3, as an unsigned int. - // - seed = seed || 0; - const remainder = bytes.length % 4; - const blocks = bytes.length - remainder; - let h1 = seed; - let k1 = 0; - const c1 = 0xcc9e2d51; - const c2 = 0x1b873593; - let j = 0; - for (let i = 0; i < blocks; i = i + 4) { - k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - h1 = _x86Rotl(h1, 13); - h1 = _x86Multiply(h1, 5) + 0xe6546b64; - j = i + 4; - } - k1 = 0; - switch (remainder) { - case 3: - k1 ^= bytes[j + 2] << 16; - case 2: - k1 ^= bytes[j + 1] << 8; - case 1: - k1 ^= bytes[j]; - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - } - h1 ^= bytes.length; - h1 = _x86Fmix(h1); - return h1 >>> 0; -} -function x86Hash128(bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 128 bit - // hash using the x86 flavor of MurmurHash3, as an unsigned hex. - // - seed = seed || 0; - const remainder = bytes.length % 16; - const blocks = bytes.length - remainder; - let h1 = seed; - let h2 = seed; - let h3 = seed; - let h4 = seed; - let k1 = 0; - let k2 = 0; - let k3 = 0; - let k4 = 0; - const c1 = 0x239b961b; - const c2 = 0xab0e9789; - const c3 = 0x38b34ae5; - const c4 = 0xa1e38b93; - let j = 0; - for (let i = 0; i < blocks; i = i + 16) { - k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); - k2 = bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24); - k3 = bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24); - k4 = bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24); - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - h1 = _x86Rotl(h1, 19); - h1 += h2; - h1 = _x86Multiply(h1, 5) + 0x561ccd1b; - k2 = _x86Multiply(k2, c2); - k2 = _x86Rotl(k2, 16); - k2 = _x86Multiply(k2, c3); - h2 ^= k2; - h2 = _x86Rotl(h2, 17); - h2 += h3; - h2 = _x86Multiply(h2, 5) + 0x0bcaa747; - k3 = _x86Multiply(k3, c3); - k3 = _x86Rotl(k3, 17); - k3 = _x86Multiply(k3, c4); - h3 ^= k3; - h3 = _x86Rotl(h3, 15); - h3 += h4; - h3 = _x86Multiply(h3, 5) + 0x96cd1c35; - k4 = _x86Multiply(k4, c4); - k4 = _x86Rotl(k4, 18); - k4 = _x86Multiply(k4, c1); - h4 ^= k4; - h4 = _x86Rotl(h4, 13); - h4 += h1; - h4 = _x86Multiply(h4, 5) + 0x32ac3b17; - j = i + 16; - } - k1 = 0; - k2 = 0; - k3 = 0; - k4 = 0; - switch (remainder) { - case 15: - k4 ^= bytes[j + 14] << 16; - case 14: - k4 ^= bytes[j + 13] << 8; - case 13: - k4 ^= bytes[j + 12]; - k4 = _x86Multiply(k4, c4); - k4 = _x86Rotl(k4, 18); - k4 = _x86Multiply(k4, c1); - h4 ^= k4; - case 12: - k3 ^= bytes[j + 11] << 24; - case 11: - k3 ^= bytes[j + 10] << 16; - case 10: - k3 ^= bytes[j + 9] << 8; - case 9: - k3 ^= bytes[j + 8]; - k3 = _x86Multiply(k3, c3); - k3 = _x86Rotl(k3, 17); - k3 = _x86Multiply(k3, c4); - h3 ^= k3; - case 8: - k2 ^= bytes[j + 7] << 24; - case 7: - k2 ^= bytes[j + 6] << 16; - case 6: - k2 ^= bytes[j + 5] << 8; - case 5: - k2 ^= bytes[j + 4]; - k2 = _x86Multiply(k2, c2); - k2 = _x86Rotl(k2, 16); - k2 = _x86Multiply(k2, c3); - h2 ^= k2; - case 4: - k1 ^= bytes[j + 3] << 24; - case 3: - k1 ^= bytes[j + 2] << 16; - case 2: - k1 ^= bytes[j + 1] << 8; - case 1: - k1 ^= bytes[j]; - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - } - h1 ^= bytes.length; - h2 ^= bytes.length; - h3 ^= bytes.length; - h4 ^= bytes.length; - h1 += h2; - h1 += h3; - h1 += h4; - h2 += h1; - h3 += h1; - h4 += h1; - h1 = _x86Fmix(h1); - h2 = _x86Fmix(h2); - h3 = _x86Fmix(h3); - h4 = _x86Fmix(h4); - h1 += h2; - h1 += h3; - h1 += h4; - h2 += h1; - h3 += h1; - h4 += h1; - return (("00000000" + (h1 >>> 0).toString(16)).slice(-8) + - ("00000000" + (h2 >>> 0).toString(16)).slice(-8) + - ("00000000" + (h3 >>> 0).toString(16)).slice(-8) + - ("00000000" + (h4 >>> 0).toString(16)).slice(-8)); -} -function x64Hash128(bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 128 bit - // hash using the x64 flavor of MurmurHash3, as an unsigned hex. - // - seed = seed || 0; - const remainder = bytes.length % 16; - const blocks = bytes.length - remainder; - let h1 = [0, seed]; - let h2 = [0, seed]; - let k1 = [0, 0]; - let k2 = [0, 0]; - const c1 = [0x87c37b91, 0x114253d5]; - const c2 = [0x4cf5ad43, 0x2745937f]; - let j = 0; - for (let i = 0; i < blocks; i = i + 16) { - k1 = [ - bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24), - bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24), - ]; - k2 = [ - bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24), - bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24), - ]; - k1 = _x64Multiply(k1, c1); - k1 = _x64Rotl(k1, 31); - k1 = _x64Multiply(k1, c2); - h1 = _x64Xor(h1, k1); - h1 = _x64Rotl(h1, 27); - h1 = _x64Add(h1, h2); - h1 = _x64Add(_x64Multiply(h1, [0, 5]), [0, 0x52dce729]); - k2 = _x64Multiply(k2, c2); - k2 = _x64Rotl(k2, 33); - k2 = _x64Multiply(k2, c1); - h2 = _x64Xor(h2, k2); - h2 = _x64Rotl(h2, 31); - h2 = _x64Add(h2, h1); - h2 = _x64Add(_x64Multiply(h2, [0, 5]), [0, 0x38495ab5]); - j = i + 16; - } - k1 = [0, 0]; - k2 = [0, 0]; - switch (remainder) { - case 15: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 14]], 48)); - case 14: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 13]], 40)); - case 13: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 12]], 32)); - case 12: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 11]], 24)); - case 11: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 10]], 16)); - case 10: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 9]], 8)); - case 9: - k2 = _x64Xor(k2, [0, bytes[j + 8]]); - k2 = _x64Multiply(k2, c2); - k2 = _x64Rotl(k2, 33); - k2 = _x64Multiply(k2, c1); - h2 = _x64Xor(h2, k2); - case 8: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 7]], 56)); - case 7: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 6]], 48)); - case 6: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 5]], 40)); - case 5: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 4]], 32)); - case 4: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 3]], 24)); - case 3: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 2]], 16)); - case 2: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 1]], 8)); - case 1: - k1 = _x64Xor(k1, [0, bytes[j]]); - k1 = _x64Multiply(k1, c1); - k1 = _x64Rotl(k1, 31); - k1 = _x64Multiply(k1, c2); - h1 = _x64Xor(h1, k1); - } - h1 = _x64Xor(h1, [0, bytes.length]); - h2 = _x64Xor(h2, [0, bytes.length]); - h1 = _x64Add(h1, h2); - h2 = _x64Add(h2, h1); - h1 = _x64Fmix(h1); - h2 = _x64Fmix(h2); - h1 = _x64Add(h1, h2); - h2 = _x64Add(h2, h1); - // Here we reverse h1 and h2 in Cosmos - // This is an implementation detail and not part of the public spec - const h1Buff = Buffer.from(("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + - ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8), "hex"); - const h1Reversed = reverse(h1Buff).toString("hex"); - const h2Buff = Buffer.from(("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + - ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8), "hex"); - const h2Reversed = reverse(h2Buff).toString("hex"); - return h1Reversed + h2Reversed; -} -export function reverse(buff) { - const buffer = Buffer.allocUnsafe(buff.length); - for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) { - buffer[i] = buff[j]; - buffer[j] = buff[i]; - } - return buffer; -} -export default { - version: "3.0.0", - x86: { - hash32: x86Hash32, - hash128: x86Hash128, - }, - x64: { - hash128: x64Hash128, - }, - inputValidation: true, -}; -//# sourceMappingURL=murmurHash.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.js.map deleted file mode 100644 index 8add08a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/murmurHash.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"murmurHash.js","sourceRoot":"","sources":["../../../../src/utils/hashing/murmurHash.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,oEAAoE;AACpE,2EAA2E;AAC3E,2EAA2E;AAC3E,gFAAgF;AAChF,gHAAgH;AAChH,2EAA2E;AAC3E,2EAA2E;AAE3E,oBAAoB;AACpB,oBAAoB;AAEpB,SAAS,YAAY,CAAC,CAAS,EAAE,CAAS;IACxC,EAAE;IACF,iEAAiE;IACjE,aAAa;IACb,EAAE;IAEF,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,QAAQ,CAAC,CAAS,EAAE,CAAS;IACpC,EAAE;IACF,uEAAuE;IACvE,kEAAkE;IAClE,EAAE;IAEF,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,QAAQ,CAAC,CAAS;IACzB,EAAE;IACF,oEAAoE;IACpE,EAAE;IAEF,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IA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// | murmurHash3js.js v3.0.1 // https://github.com/pid/murmurHash3js\n// | A javascript implementation of MurmurHash3's x86 hashing algorithms. |\n// |----------------------------------------------------------------------|\n// | Copyright (c) 2012-2015 Karan Lyons |\n// | https://github.com/karanlyons/murmurHash3.js/blob/c1778f75792abef7bdd74bc85d2d4e1a3d25cfe9/murmurHash3.js |\n// | Freely distributable under the MIT license. |\n// +----------------------------------------------------------------------+\n\n// PRIVATE FUNCTIONS\n// -----------------\n\nfunction _x86Multiply(m: number, n: number) {\n //\n // Given two 32bit ints, returns the two multiplied together as a\n // 32bit int.\n //\n\n return (m & 0xffff) * n + ((((m >>> 16) * n) & 0xffff) << 16);\n}\n\nfunction _x86Rotl(m: number, n: number) {\n //\n // Given a 32bit int and an int representing a number of bit positions,\n // returns the 32bit int rotated left by that number of positions.\n //\n\n return (m << n) | (m >>> (32 - n));\n}\n\nfunction _x86Fmix(h: number) {\n //\n // Given a block, returns murmurHash3's final x86 mix of that block.\n //\n\n h ^= h >>> 16;\n h = _x86Multiply(h, 0x85ebca6b);\n h ^= h >>> 13;\n h = _x86Multiply(h, 0xc2b2ae35);\n h ^= h >>> 16;\n\n return h;\n}\n\nfunction _x64Add(m: number[], n: number[]) {\n //\n // Given two 64bit ints (as an array of two 32bit ints) returns the two\n // added together as a 64bit int (as an array of two 32bit ints).\n //\n\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n const o = [0, 0, 0, 0];\n\n o[3] += m[3] + n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n\n o[2] += m[2] + n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n\n o[1] += m[1] + n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[0] += m[0] + n[0];\n o[0] &= 0xffff;\n\n return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]];\n}\n\nfunction _x64Multiply(m: number[], n: number[]) {\n //\n // Given two 64bit ints (as an array of two 32bit ints) returns the two\n // multiplied together as a 64bit int (as an array of two 32bit ints).\n //\n\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n const o = [0, 0, 0, 0];\n\n o[3] += m[3] * n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n\n o[2] += m[2] * n[3];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n\n o[2] += m[3] * n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n\n o[1] += m[1] * n[3];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[1] += m[2] * n[2];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[1] += m[3] * n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[0] += m[0] * n[3] + m[1] * n[2] + m[2] * n[1] + m[3] * n[0];\n o[0] &= 0xffff;\n\n return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]];\n}\n\nfunction _x64Rotl(m: number[], n: number) {\n //\n // Given a 64bit int (as an array of two 32bit ints) and an int\n // representing a number of bit positions, returns the 64bit int (as an\n // array of two 32bit ints) rotated left by that number of positions.\n //\n\n n %= 64;\n\n if (n === 32) {\n return [m[1], m[0]];\n } else if (n < 32) {\n return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))];\n } else {\n n -= 32;\n return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))];\n }\n}\n\nfunction _x64LeftShift(m: number[], n: number) {\n //\n // Given a 64bit int (as an array of two 32bit ints) and an int\n // representing a number of bit positions, returns the 64bit int (as an\n // array of two 32bit ints) shifted left by that number of positions.\n //\n\n n %= 64;\n\n if (n === 0) {\n return m;\n } else if (n < 32) {\n return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n];\n } else {\n return [m[1] << (n - 32), 0];\n }\n}\n\nfunction _x64Xor(m: number[], n: number[]) {\n //\n // Given two 64bit ints (as an array of two 32bit ints) returns the two\n // xored together as a 64bit int (as an array of two 32bit ints).\n //\n\n return [m[0] ^ n[0], m[1] ^ n[1]];\n}\n\nfunction _x64Fmix(h: number[]) {\n //\n // Given a block, returns murmurHash3's final x64 mix of that block.\n // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the\n // only place where we need to right shift 64bit ints.)\n //\n\n h = _x64Xor(h, [0, h[0] >>> 1]);\n h = _x64Multiply(h, [0xff51afd7, 0xed558ccd]);\n h = _x64Xor(h, [0, h[0] >>> 1]);\n h = _x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]);\n h = _x64Xor(h, [0, h[0] >>> 1]);\n\n return h;\n}\n\n// PUBLIC FUNCTIONS\n// ----------------\n\nfunction x86Hash32(bytes: Buffer, seed?: number) {\n //\n // Given a string and an optional seed as an int, returns a 32 bit hash\n // using the x86 flavor of MurmurHash3, as an unsigned int.\n //\n seed = seed || 0;\n\n const remainder = bytes.length % 4;\n const blocks = bytes.length - remainder;\n\n let h1 = seed;\n\n let k1 = 0;\n\n const c1 = 0xcc9e2d51;\n const c2 = 0x1b873593;\n let j = 0;\n\n for (let i = 0; i < blocks; i = i + 4) {\n k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24);\n\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n\n h1 ^= k1;\n h1 = _x86Rotl(h1, 13);\n h1 = _x86Multiply(h1, 5) + 0xe6546b64;\n j = i + 4;\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3:\n k1 ^= bytes[j + 2] << 16;\n\n case 2:\n k1 ^= bytes[j + 1] << 8;\n\n case 1:\n k1 ^= bytes[j];\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n h1 ^= k1;\n }\n\n h1 ^= bytes.length;\n h1 = _x86Fmix(h1);\n\n return h1 >>> 0;\n}\n\nfunction x86Hash128(bytes: Buffer, seed?: number) {\n //\n // Given a string and an optional seed as an int, returns a 128 bit\n // hash using the x86 flavor of MurmurHash3, as an unsigned hex.\n //\n\n seed = seed || 0;\n const remainder = bytes.length % 16;\n const blocks = bytes.length - remainder;\n\n let h1 = seed;\n let h2 = seed;\n let h3 = seed;\n let h4 = seed;\n\n let k1 = 0;\n let k2 = 0;\n let k3 = 0;\n let k4 = 0;\n\n const c1 = 0x239b961b;\n const c2 = 0xab0e9789;\n const c3 = 0x38b34ae5;\n const c4 = 0xa1e38b93;\n let j = 0;\n\n for (let i = 0; i < blocks; i = i + 16) {\n k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24);\n k2 = bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24);\n k3 = bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24);\n k4 = bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24);\n\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n h1 ^= k1;\n\n h1 = _x86Rotl(h1, 19);\n h1 += h2;\n h1 = _x86Multiply(h1, 5) + 0x561ccd1b;\n\n k2 = _x86Multiply(k2, c2);\n k2 = _x86Rotl(k2, 16);\n k2 = _x86Multiply(k2, c3);\n h2 ^= k2;\n\n h2 = _x86Rotl(h2, 17);\n h2 += h3;\n h2 = _x86Multiply(h2, 5) + 0x0bcaa747;\n\n k3 = _x86Multiply(k3, c3);\n k3 = _x86Rotl(k3, 17);\n k3 = _x86Multiply(k3, c4);\n h3 ^= k3;\n\n h3 = _x86Rotl(h3, 15);\n h3 += h4;\n h3 = _x86Multiply(h3, 5) + 0x96cd1c35;\n\n k4 = _x86Multiply(k4, c4);\n k4 = _x86Rotl(k4, 18);\n k4 = _x86Multiply(k4, c1);\n h4 ^= k4;\n\n h4 = _x86Rotl(h4, 13);\n h4 += h1;\n h4 = _x86Multiply(h4, 5) + 0x32ac3b17;\n j = i + 16;\n }\n\n k1 = 0;\n k2 = 0;\n k3 = 0;\n k4 = 0;\n\n switch (remainder) {\n case 15:\n k4 ^= bytes[j + 14] << 16;\n\n case 14:\n k4 ^= bytes[j + 13] << 8;\n\n case 13:\n k4 ^= bytes[j + 12];\n k4 = _x86Multiply(k4, c4);\n k4 = _x86Rotl(k4, 18);\n k4 = _x86Multiply(k4, c1);\n h4 ^= k4;\n\n case 12:\n k3 ^= bytes[j + 11] << 24;\n\n case 11:\n k3 ^= bytes[j + 10] << 16;\n\n case 10:\n k3 ^= bytes[j + 9] << 8;\n\n case 9:\n k3 ^= bytes[j + 8];\n k3 = _x86Multiply(k3, c3);\n k3 = _x86Rotl(k3, 17);\n k3 = _x86Multiply(k3, c4);\n h3 ^= k3;\n\n case 8:\n k2 ^= bytes[j + 7] << 24;\n\n case 7:\n k2 ^= bytes[j + 6] << 16;\n\n case 6:\n k2 ^= bytes[j + 5] << 8;\n\n case 5:\n k2 ^= bytes[j + 4];\n k2 = _x86Multiply(k2, c2);\n k2 = _x86Rotl(k2, 16);\n k2 = _x86Multiply(k2, c3);\n h2 ^= k2;\n\n case 4:\n k1 ^= bytes[j + 3] << 24;\n\n case 3:\n k1 ^= bytes[j + 2] << 16;\n\n case 2:\n k1 ^= bytes[j + 1] << 8;\n\n case 1:\n k1 ^= bytes[j];\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n h1 ^= k1;\n }\n\n h1 ^= bytes.length;\n h2 ^= bytes.length;\n h3 ^= bytes.length;\n h4 ^= bytes.length;\n\n h1 += h2;\n h1 += h3;\n h1 += h4;\n h2 += h1;\n h3 += h1;\n h4 += h1;\n\n h1 = _x86Fmix(h1);\n h2 = _x86Fmix(h2);\n h3 = _x86Fmix(h3);\n h4 = _x86Fmix(h4);\n\n h1 += h2;\n h1 += h3;\n h1 += h4;\n h2 += h1;\n h3 += h1;\n h4 += h1;\n\n return (\n (\"00000000\" + (h1 >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h2 >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h3 >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h4 >>> 0).toString(16)).slice(-8)\n );\n}\n\nfunction x64Hash128(bytes: Buffer, seed?: number) {\n //\n // Given a string and an optional seed as an int, returns a 128 bit\n // hash using the x64 flavor of MurmurHash3, as an unsigned hex.\n //\n seed = seed || 0;\n\n const remainder = bytes.length % 16;\n const blocks = bytes.length - remainder;\n\n let h1 = [0, seed];\n let h2 = [0, seed];\n\n let k1 = [0, 0];\n let k2 = [0, 0];\n\n const c1 = [0x87c37b91, 0x114253d5];\n const c2 = [0x4cf5ad43, 0x2745937f];\n let j = 0;\n\n for (let i = 0; i < blocks; i = i + 16) {\n k1 = [\n bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24),\n bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24),\n ];\n k2 = [\n bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24),\n bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24),\n ];\n\n k1 = _x64Multiply(k1, c1);\n k1 = _x64Rotl(k1, 31);\n k1 = _x64Multiply(k1, c2);\n h1 = _x64Xor(h1, k1);\n\n h1 = _x64Rotl(h1, 27);\n h1 = _x64Add(h1, h2);\n h1 = _x64Add(_x64Multiply(h1, [0, 5]), [0, 0x52dce729]);\n\n k2 = _x64Multiply(k2, c2);\n k2 = _x64Rotl(k2, 33);\n k2 = _x64Multiply(k2, c1);\n h2 = _x64Xor(h2, k2);\n\n h2 = _x64Rotl(h2, 31);\n h2 = _x64Add(h2, h1);\n h2 = _x64Add(_x64Multiply(h2, [0, 5]), [0, 0x38495ab5]);\n j = i + 16;\n }\n\n k1 = [0, 0];\n k2 = [0, 0];\n\n switch (remainder) {\n case 15:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 14]], 48));\n\n case 14:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 13]], 40));\n\n case 13:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 12]], 32));\n\n case 12:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 11]], 24));\n\n case 11:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 10]], 16));\n\n case 10:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 9]], 8));\n\n case 9:\n k2 = _x64Xor(k2, [0, bytes[j + 8]]);\n k2 = _x64Multiply(k2, c2);\n k2 = _x64Rotl(k2, 33);\n k2 = _x64Multiply(k2, c1);\n h2 = _x64Xor(h2, k2);\n\n case 8:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 7]], 56));\n\n case 7:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 6]], 48));\n\n case 6:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 5]], 40));\n\n case 5:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 4]], 32));\n\n case 4:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 3]], 24));\n\n case 3:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 2]], 16));\n\n case 2:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 1]], 8));\n\n case 1:\n k1 = _x64Xor(k1, [0, bytes[j]]);\n k1 = _x64Multiply(k1, c1);\n k1 = _x64Rotl(k1, 31);\n k1 = _x64Multiply(k1, c2);\n h1 = _x64Xor(h1, k1);\n }\n\n h1 = _x64Xor(h1, [0, bytes.length]);\n h2 = _x64Xor(h2, [0, bytes.length]);\n\n h1 = _x64Add(h1, h2);\n h2 = _x64Add(h2, h1);\n\n h1 = _x64Fmix(h1);\n h2 = _x64Fmix(h2);\n\n h1 = _x64Add(h1, h2);\n h2 = _x64Add(h2, h1);\n\n // Here we reverse h1 and h2 in Cosmos\n // This is an implementation detail and not part of the public spec\n const h1Buff = Buffer.from(\n (\"00000000\" + (h1[0] >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h1[1] >>> 0).toString(16)).slice(-8),\n \"hex\"\n );\n const h1Reversed = reverse(h1Buff).toString(\"hex\");\n const h2Buff = Buffer.from(\n (\"00000000\" + (h2[0] >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h2[1] >>> 0).toString(16)).slice(-8),\n \"hex\"\n );\n const h2Reversed = reverse(h2Buff).toString(\"hex\");\n return h1Reversed + h2Reversed;\n}\n\nexport function reverse(buff: Buffer) {\n const buffer = Buffer.allocUnsafe(buff.length);\n\n for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) {\n buffer[i] = buff[j];\n buffer[j] = buff[i];\n }\n return buffer;\n}\n\nexport default {\n version: \"3.0.0\",\n x86: {\n hash32: x86Hash32,\n hash128: x86Hash128,\n },\n x64: {\n hash128: x64Hash128,\n },\n inputValidation: true,\n};\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.d.ts deleted file mode 100644 index ee77fed..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare type v1Key = string | number | boolean | null | Record | undefined; -export declare function hashV1PartitionKey(partitionKey: v1Key): string; -export {}; -//# sourceMappingURL=v1.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.d.ts.map deleted file mode 100644 index 377da2b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../../../src/utils/hashing/v1.ts"],"names":[],"mappings":"AAUA,aAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;AAEpF,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,KAAK,GAAG,MAAM,CAM9D"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.js deleted file mode 100644 index 801a902..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { doubleToByteArrayJSBI, writeNumberForBinaryEncodingJSBI } from "./encoding/number"; -import { writeStringForBinaryEncoding } from "./encoding/string"; -import { BytePrefix } from "./encoding/prefix"; -import MurmurHash from "./murmurHash"; -const MAX_STRING_CHARS = 100; -export function hashV1PartitionKey(partitionKey) { - const toHash = prefixKeyByType(partitionKey); - const hash = MurmurHash.x86.hash32(toHash); - const encodedJSBI = writeNumberForBinaryEncodingJSBI(hash); - const encodedValue = encodeByType(partitionKey); - return Buffer.concat([encodedJSBI, encodedValue]).toString("hex").toUpperCase(); -} -function prefixKeyByType(key) { - let bytes; - switch (typeof key) { - case "string": { - const truncated = key.substr(0, MAX_STRING_CHARS); - bytes = Buffer.concat([ - Buffer.from(BytePrefix.String, "hex"), - Buffer.from(truncated), - Buffer.from(BytePrefix.Undefined, "hex"), - ]); - return bytes; - } - case "number": { - const numberBytes = doubleToByteArrayJSBI(key); - bytes = Buffer.concat([Buffer.from(BytePrefix.Number, "hex"), numberBytes]); - return bytes; - } - case "boolean": { - const prefix = key ? BytePrefix.True : BytePrefix.False; - return Buffer.from(prefix, "hex"); - } - case "object": { - if (key === null) { - return Buffer.from(BytePrefix.Null, "hex"); - } - return Buffer.from(BytePrefix.Undefined, "hex"); - } - case "undefined": { - return Buffer.from(BytePrefix.Undefined, "hex"); - } - default: - throw new Error(`Unexpected type: ${typeof key}`); - } -} -function encodeByType(key) { - switch (typeof key) { - case "string": { - const truncated = key.substr(0, MAX_STRING_CHARS); - return writeStringForBinaryEncoding(truncated); - } - case "number": { - const encodedJSBI = writeNumberForBinaryEncodingJSBI(key); - return encodedJSBI; - } - case "boolean": { - const prefix = key ? BytePrefix.True : BytePrefix.False; - return Buffer.from(prefix, "hex"); - } - case "object": - if (key === null) { - return Buffer.from(BytePrefix.Null, "hex"); - } - return Buffer.from(BytePrefix.Undefined, "hex"); - case "undefined": - return Buffer.from(BytePrefix.Undefined, "hex"); - default: - throw new Error(`Unexpected type: ${typeof key}`); - } -} -//# sourceMappingURL=v1.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.js.map deleted file mode 100644 index be41adb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v1.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../../../src/utils/hashing/v1.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mB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,IAAI,EAAE;gBAChB,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aAC5C;YACD,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAClD,KAAK,WAAW;YACd,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAClD;YACE,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAO,GAAG,EAAE,CAAC,CAAC;KACrD;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { doubleToByteArrayJSBI, writeNumberForBinaryEncodingJSBI } from \"./encoding/number\";\nimport { writeStringForBinaryEncoding } from \"./encoding/string\";\nimport { BytePrefix } from \"./encoding/prefix\";\nimport MurmurHash from \"./murmurHash\";\n\nconst MAX_STRING_CHARS = 100;\n\ntype v1Key = string | number | boolean | null | Record | undefined;\n\nexport function hashV1PartitionKey(partitionKey: v1Key): string {\n const toHash = prefixKeyByType(partitionKey);\n const hash = MurmurHash.x86.hash32(toHash);\n const encodedJSBI = writeNumberForBinaryEncodingJSBI(hash);\n const encodedValue = encodeByType(partitionKey);\n return Buffer.concat([encodedJSBI, encodedValue]).toString(\"hex\").toUpperCase();\n}\n\nfunction prefixKeyByType(key: v1Key): Buffer {\n let bytes: Buffer;\n switch (typeof key) {\n case \"string\": {\n const truncated = key.substr(0, MAX_STRING_CHARS);\n bytes = Buffer.concat([\n Buffer.from(BytePrefix.String, \"hex\"),\n Buffer.from(truncated),\n Buffer.from(BytePrefix.Undefined, \"hex\"),\n ]);\n return bytes;\n }\n case \"number\": {\n const numberBytes = doubleToByteArrayJSBI(key);\n bytes = Buffer.concat([Buffer.from(BytePrefix.Number, \"hex\"), numberBytes]);\n return bytes;\n }\n case \"boolean\": {\n const prefix = key ? BytePrefix.True : BytePrefix.False;\n return Buffer.from(prefix, \"hex\");\n }\n case \"object\": {\n if (key === null) {\n return Buffer.from(BytePrefix.Null, \"hex\");\n }\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n case \"undefined\": {\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n default:\n throw new Error(`Unexpected type: ${typeof key}`);\n }\n}\n\nfunction encodeByType(key: v1Key): Buffer {\n switch (typeof key) {\n case \"string\": {\n const truncated = key.substr(0, MAX_STRING_CHARS);\n return writeStringForBinaryEncoding(truncated);\n }\n case \"number\": {\n const encodedJSBI = writeNumberForBinaryEncodingJSBI(key);\n return encodedJSBI;\n }\n case \"boolean\": {\n const prefix = key ? BytePrefix.True : BytePrefix.False;\n return Buffer.from(prefix, \"hex\");\n }\n case \"object\":\n if (key === null) {\n return Buffer.from(BytePrefix.Null, \"hex\");\n }\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n case \"undefined\":\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n default:\n throw new Error(`Unexpected type: ${typeof key}`);\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.d.ts deleted file mode 100644 index 512e9e2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -declare type v2Key = string | number | boolean | null | Record | undefined; -export declare function hashV2PartitionKey(partitionKey: v2Key): string; -export declare function reverse(buff: Buffer): Buffer; -export {}; -//# sourceMappingURL=v2.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.d.ts.map deleted file mode 100644 index f70224e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../../src/utils/hashing/v2.ts"],"names":[],"mappings":";AAOA,aAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;AAEpF,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,KAAK,GAAG,MAAM,CAM9D;AAoCD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ5C"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.js deleted file mode 100644 index 58bff4f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { doubleToByteArrayJSBI } from "./encoding/number"; -import { BytePrefix } from "./encoding/prefix"; -import MurmurHash from "./murmurHash"; -export function hashV2PartitionKey(partitionKey) { - const toHash = prefixKeyByType(partitionKey); - const hash = MurmurHash.x64.hash128(toHash); - const reverseBuff = reverse(Buffer.from(hash, "hex")); - reverseBuff[0] &= 0x3f; - return reverseBuff.toString("hex").toUpperCase(); -} -function prefixKeyByType(key) { - let bytes; - switch (typeof key) { - case "string": { - bytes = Buffer.concat([ - Buffer.from(BytePrefix.String, "hex"), - Buffer.from(key), - Buffer.from(BytePrefix.Infinity, "hex"), - ]); - return bytes; - } - case "number": { - const numberBytes = doubleToByteArrayJSBI(key); - bytes = Buffer.concat([Buffer.from(BytePrefix.Number, "hex"), numberBytes]); - return bytes; - } - case "boolean": { - const prefix = key ? BytePrefix.True : BytePrefix.False; - return Buffer.from(prefix, "hex"); - } - case "object": { - if (key === null) { - return Buffer.from(BytePrefix.Null, "hex"); - } - return Buffer.from(BytePrefix.Undefined, "hex"); - } - case "undefined": { - return Buffer.from(BytePrefix.Undefined, "hex"); - } - default: - throw new Error(`Unexpected type: ${typeof key}`); - } -} -export function reverse(buff) { - const buffer = Buffer.allocUnsafe(buff.length); - for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) { - buffer[i] = buff[j]; - buffer[j] = buff[i]; - } - return buffer; -} -//# sourceMappingURL=v2.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.js.map deleted file mode 100644 index 42516f2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hashing/v2.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"v2.js","sourceRoot":"","sources":["../../../../src/utils/hashing/v2.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,UAAU,MAAM,cAAc,CAAC;AAItC,MAAM,UAAU,kBAAkB,CAAC,YAAmB;IACpD,MAAM,MAAM,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAW,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9D,WAAW,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;IACvB,OAAO,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACnD,CAAC;AAED,SAAS,eAAe,CAAC,GAAU;IACjC,IAAI,KAAa,CAAC;IAClB,QAAQ,OAAO,GAAG,EAAE;QAClB,KAAK,QAAQ,CAAC,CAA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,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE;QACrD,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;KACrB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { doubleToByteArrayJSBI } from \"./encoding/number\";\nimport { BytePrefix } from \"./encoding/prefix\";\nimport MurmurHash from \"./murmurHash\";\n\ntype v2Key = string | number | boolean | null | Record | undefined;\n\nexport function hashV2PartitionKey(partitionKey: v2Key): string {\n const toHash = prefixKeyByType(partitionKey);\n const hash = MurmurHash.x64.hash128(toHash);\n const reverseBuff: Buffer = reverse(Buffer.from(hash, \"hex\"));\n reverseBuff[0] &= 0x3f;\n return reverseBuff.toString(\"hex\").toUpperCase();\n}\n\nfunction prefixKeyByType(key: v2Key): Buffer {\n let bytes: Buffer;\n switch (typeof key) {\n case \"string\": {\n bytes = Buffer.concat([\n Buffer.from(BytePrefix.String, \"hex\"),\n Buffer.from(key),\n Buffer.from(BytePrefix.Infinity, \"hex\"),\n ]);\n return bytes;\n }\n case \"number\": {\n const numberBytes = doubleToByteArrayJSBI(key);\n bytes = Buffer.concat([Buffer.from(BytePrefix.Number, \"hex\"), numberBytes]);\n return bytes;\n }\n case \"boolean\": {\n const prefix = key ? BytePrefix.True : BytePrefix.False;\n return Buffer.from(prefix, \"hex\");\n }\n case \"object\": {\n if (key === null) {\n return Buffer.from(BytePrefix.Null, \"hex\");\n }\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n case \"undefined\": {\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n default:\n throw new Error(`Unexpected type: ${typeof key}`);\n }\n}\n\nexport function reverse(buff: Buffer): Buffer {\n const buffer = Buffer.allocUnsafe(buff.length);\n\n for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) {\n buffer[i] = buff[j];\n buffer[j] = buff[i];\n }\n return buffer;\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.d.ts deleted file mode 100644 index 3e94745..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { HTTPMethod, ResourceType } from "../common"; -export declare function generateHeaders(masterKey: string, method: HTTPMethod, resourceType?: ResourceType, resourceId?: string, date?: Date): Promise<{ - [x: string]: string; -}>; -//# sourceMappingURL=headers.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.d.ts.map deleted file mode 100644 index 23c4ff0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../src/utils/headers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAa,MAAM,WAAW,CAAC;AAEhE,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,YAAY,GAAE,YAAgC,EAC9C,UAAU,GAAE,MAAW,EACvB,IAAI,OAAa,GAChB,OAAO,CAAC;IACT,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB,CAAC,CAaD"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.js deleted file mode 100644 index d32fefd..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { hmac } from "./hmac"; -import { ResourceType, Constants } from "../common"; -export async function generateHeaders(masterKey, method, resourceType = ResourceType.none, resourceId = "", date = new Date()) { - if (masterKey.startsWith("type=sas&")) { - return { - [Constants.HttpHeaders.Authorization]: encodeURIComponent(masterKey), - [Constants.HttpHeaders.XDate]: date.toUTCString(), - }; - } - const sig = await signature(masterKey, method, resourceType, resourceId, date); - return { - [Constants.HttpHeaders.Authorization]: sig, - [Constants.HttpHeaders.XDate]: date.toUTCString(), - }; -} -async function signature(masterKey, method, resourceType, resourceId = "", date = new Date()) { - const type = "master"; - const version = "1.0"; - const text = method.toLowerCase() + - "\n" + - resourceType.toLowerCase() + - "\n" + - resourceId + - "\n" + - date.toUTCString().toLowerCase() + - "\n" + - "" + - "\n"; - const signed = await hmac(masterKey, text); - return encodeURIComponent("type=" + type + "&ver=" + version + "&sig=" + signed); -} -//# sourceMappingURL=headers.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.js.map deleted file mode 100644 index 1520b83..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/headers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"headers.js","sourceRoot":"","sources":["../../../src/utils/headers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAc,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,SAAiB,EACjB,MAAkB,EAClB,eAA6B,YAAY,CAAC,IAAI,EAC9C,aAAqB,EAAE,EACvB,IAAI,GAAG,IAAI,IAAI,EAAE;IAIjB,IAAI,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;QACrC,OAAO;YACL,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC;YACpE,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE;SAClD,CAAC;KACH;IACD,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IAE/E,OAAO;QACL,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG;QAC1C,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE;KAClD,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,SAAS,CACtB,SAAiB,EACjB,MAAkB,EAClB,YAA0B,EAC1B,aAAqB,EAAE,EACvB,IAAI,GAAG,IAAI,IAAI,EAAE;IAEjB,MAAM,IAAI,GAAG,QAAQ,CAAC;IACtB,MAAM,OAAO,GAAG,KAAK,CAAC;IACtB,MAAM,IAAI,GACR,MAAM,CAAC,WAAW,EAAE;QACpB,IAAI;QACJ,YAAY,CAAC,WAAW,EAAE;QAC1B,IAAI;QACJ,UAAU;QACV,IAAI;QACJ,IAAI,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE;QAChC,IAAI;QACJ,EAAE;QACF,IAAI,CAAC;IAEP,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAE3C,OAAO,kBAAkB,CAAC,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AACnF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { hmac } from \"./hmac\";\nimport { HTTPMethod, ResourceType, Constants } from \"../common\";\n\nexport async function generateHeaders(\n masterKey: string,\n method: HTTPMethod,\n resourceType: ResourceType = ResourceType.none,\n resourceId: string = \"\",\n date = new Date()\n): Promise<{\n [x: string]: string;\n}> {\n if (masterKey.startsWith(\"type=sas&\")) {\n return {\n [Constants.HttpHeaders.Authorization]: encodeURIComponent(masterKey),\n [Constants.HttpHeaders.XDate]: date.toUTCString(),\n };\n }\n const sig = await signature(masterKey, method, resourceType, resourceId, date);\n\n return {\n [Constants.HttpHeaders.Authorization]: sig,\n [Constants.HttpHeaders.XDate]: date.toUTCString(),\n };\n}\n\nasync function signature(\n masterKey: string,\n method: HTTPMethod,\n resourceType: ResourceType,\n resourceId: string = \"\",\n date = new Date()\n): Promise {\n const type = \"master\";\n const version = \"1.0\";\n const text =\n method.toLowerCase() +\n \"\\n\" +\n resourceType.toLowerCase() +\n \"\\n\" +\n resourceId +\n \"\\n\" +\n date.toUTCString().toLowerCase() +\n \"\\n\" +\n \"\" +\n \"\\n\";\n\n const signed = await hmac(masterKey, text);\n\n return encodeURIComponent(\"type=\" + type + \"&ver=\" + version + \"&sig=\" + signed);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.d.ts deleted file mode 100644 index 7402b37..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function hmac(key: string, message: string): Promise; -//# sourceMappingURL=hmac.browser.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.d.ts.map deleted file mode 100644 index ef214e9..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hmac.browser.d.ts","sourceRoot":"","sources":["../../../src/utils/hmac.browser.ts"],"names":[],"mappings":"AAOA,wBAAsB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAYxE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.js deleted file mode 100644 index d8ca32d..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { encodeUTF8, encodeBase64 } from "./encode"; -import atob from "./atob"; -import { globalCrypto } from "./globalCrypto"; -export async function hmac(key, message) { - const importParams = { name: "HMAC", hash: { name: "SHA-256" } }; - const encodedMessage = new Uint8Array([...unescape(encodeURIComponent(message))].map((c) => c.charCodeAt(0))); - const encodedKey = encodeUTF8(atob(key)); - const cryptoKey = await globalCrypto.subtle.importKey("raw", encodedKey, importParams, false, [ - "sign", - ]); - const signature = await globalCrypto.subtle.sign(importParams, cryptoKey, encodedMessage); - return encodeBase64(signature); -} -//# sourceMappingURL=hmac.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.js.map deleted file mode 100644 index 3436ef1..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hmac.browser.js","sourceRoot":"","sources":["../../../src/utils/hmac.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,GAAW,EAAE,OAAe;IACrD,MAAM,YAAY,GAAqB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACnF,MAAM,cAAc,GAAG,IAAI,UAAU,CACnC,CAAC,GAAG,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACvE,CAAC;IACF,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE;QAC5F,MAAM;KACP,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;IAE1F,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { encodeUTF8, encodeBase64 } from \"./encode\";\nimport atob from \"./atob\";\nimport { globalCrypto } from \"./globalCrypto\";\n\nexport async function hmac(key: string, message: string): Promise {\n const importParams: HmacImportParams = { name: \"HMAC\", hash: { name: \"SHA-256\" } };\n const encodedMessage = new Uint8Array(\n [...unescape(encodeURIComponent(message))].map((c) => c.charCodeAt(0))\n );\n const encodedKey = encodeUTF8(atob(key));\n const cryptoKey = await globalCrypto.subtle.importKey(\"raw\", encodedKey, importParams, false, [\n \"sign\",\n ]);\n const signature = await globalCrypto.subtle.sign(importParams, cryptoKey, encodedMessage);\n\n return encodeBase64(signature);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.d.ts deleted file mode 100644 index ba17a3b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function hmac(key: string, message: string): Promise; -//# sourceMappingURL=hmac.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.d.ts.map deleted file mode 100644 index c6c6f68..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../../../src/utils/hmac.ts"],"names":[],"mappings":"AAKA,wBAAsB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAExE"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.js deleted file mode 100644 index f188489..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createHmac } from "crypto"; -export async function hmac(key, message) { - return createHmac("sha256", Buffer.from(key, "base64")).update(message).digest("base64"); -} -//# sourceMappingURL=hmac.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.js.map deleted file mode 100644 index 42ab387..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/hmac.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hmac.js","sourceRoot":"","sources":["../../../src/utils/hmac.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,GAAW,EAAE,OAAe;IACrD,OAAO,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createHmac } from \"crypto\";\n\nexport async function hmac(key: string, message: string): Promise {\n return createHmac(\"sha256\", Buffer.from(key, \"base64\")).update(message).digest(\"base64\");\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.d.ts deleted file mode 100644 index da44337..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ContainerRequest } from "../client/Container/ContainerRequest"; -export declare function validateOffer(body: ContainerRequest): void; -//# sourceMappingURL=offers.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.d.ts.map deleted file mode 100644 index 783a694..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["../../../src/utils/offers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAY1D"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.js deleted file mode 100644 index 9d6442f..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export function validateOffer(body) { - if (body.throughput) { - if (body.maxThroughput) { - console.log("should be erroring"); - throw new Error("Cannot specify `throughput` with `maxThroughput`"); - } - if (body.autoUpgradePolicy) { - throw new Error("Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead"); - } - } -} -//# sourceMappingURL=offers.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.js.map deleted file mode 100644 index 6167032..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/offers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"offers.js","sourceRoot":"","sources":["../../../src/utils/offers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,UAAU,aAAa,CAAC,IAAsB;IAClD,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;SACrE;QACD,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;SACH;KACF;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ContainerRequest } from \"../client/Container/ContainerRequest\";\n\nexport function validateOffer(body: ContainerRequest): void {\n if (body.throughput) {\n if (body.maxThroughput) {\n console.log(\"should be erroring\");\n throw new Error(\"Cannot specify `throughput` with `maxThroughput`\");\n }\n if (body.autoUpgradePolicy) {\n throw new Error(\n \"Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead\"\n );\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.d.ts deleted file mode 100644 index b4c3a18..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export declare type PatchOperation = ExistingKeyOperation | RemoveOperation; -export declare const PatchOperationType: { - readonly add: "add"; - readonly replace: "replace"; - readonly remove: "remove"; - readonly set: "set"; - readonly incr: "incr"; -}; -export declare type ExistingKeyOperation = { - op: keyof typeof PatchOperationType; - value: any; - path: string; -}; -export declare type RemoveOperation = { - op: "remove"; - path: string; -}; -export declare type PatchRequestBody = { - operations: PatchOperation[]; - condition?: string; -} | PatchOperation[]; -//# sourceMappingURL=patch.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.d.ts.map deleted file mode 100644 index 920724a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../src/utils/patch.ts"],"names":[],"mappings":"AAGA,oBAAY,cAAc,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC;AAEX,oBAAY,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,OAAO,kBAAkB,CAAC;IACpC,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,EAAE,EAAE,QAAQ,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,gBAAgB,GACxB;IACE,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACD,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.js deleted file mode 100644 index d771989..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export const PatchOperationType = { - add: "add", - replace: "replace", - remove: "remove", - set: "set", - incr: "incr", -}; -//# sourceMappingURL=patch.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.js.map deleted file mode 100644 index c970022..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/patch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patch.js","sourceRoot":"","sources":["../../../src/utils/patch.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport type PatchOperation = ExistingKeyOperation | RemoveOperation;\n\nexport const PatchOperationType = {\n add: \"add\",\n replace: \"replace\",\n remove: \"remove\",\n set: \"set\",\n incr: \"incr\",\n} as const;\n\nexport type ExistingKeyOperation = {\n op: keyof typeof PatchOperationType;\n value: any;\n path: string;\n};\n\nexport type RemoveOperation = {\n op: \"remove\";\n path: string;\n};\n\nexport type PatchRequestBody =\n | {\n operations: PatchOperation[];\n condition?: string;\n }\n | PatchOperation[];\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.d.ts deleted file mode 100644 index 7068676..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=tracing.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.d.ts.map deleted file mode 100644 index 8536c53..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../src/utils/tracing.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.js deleted file mode 100644 index 0ccd81b..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { createTracingClient } from "@azure/core-tracing"; -import { Constants } from "../common/constants"; -/** - * Global tracing client for this package. - * - * @internal - */ -export const tracingClient = createTracingClient({ - namespace: Constants.AzureNamespace, - packageName: Constants.AzurePackageName, - packageVersion: Constants.SDKVersion, -}); -//# sourceMappingURL=tracing.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.js.map deleted file mode 100644 index 3fda9fb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/tracing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../src/utils/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,SAAS,CAAC,cAAc;IACnC,WAAW,EAAE,SAAS,CAAC,gBAAgB;IACvC,cAAc,EAAE,SAAS,CAAC,UAAU;CACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { Constants } from \"../common/constants\";\n\n/**\n * Global tracing client for this package.\n *\n * @internal\n */\nexport const tracingClient = createTracingClient({\n namespace: Constants.AzureNamespace,\n packageName: Constants.AzurePackageName,\n packageVersion: Constants.SDKVersion,\n});\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.d.ts deleted file mode 100644 index 3fd13c0..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare type VerboseOmit = Pick>; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.d.ts.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.d.ts.map deleted file mode 100644 index fec8092..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAIA,oBAAY,WAAW,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.js b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.js deleted file mode 100644 index 26d279a..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.js.map deleted file mode 100644 index fa9c8c2..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist-esm/src/utils/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// Shim for Omit added in TypeScript 3.5\nexport type VerboseOmit = Pick>;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist/index.js b/reverse_engineering/node_modules/@azure/cosmos/dist/index.js deleted file mode 100644 index 9725deb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist/index.js +++ /dev/null @@ -1,9299 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var crypto = require('crypto'); -var uuid$3 = require('uuid'); -var logger$4 = require('@azure/logger'); -var tslib = require('tslib'); -var stableStringify = require('fast-json-stable-stringify'); -var PriorityQueue = require('priorityqueuejs'); -var semaphore = require('semaphore'); -var coreRestPipeline = require('@azure/core-rest-pipeline'); -var nodeAbortController = require('node-abort-controller'); -var universalUserAgent = require('universal-user-agent'); -var JSBI = require('jsbi'); -var abortController = require('@azure/abort-controller'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var stableStringify__default = /*#__PURE__*/_interopDefaultLegacy(stableStringify); -var PriorityQueue__default = /*#__PURE__*/_interopDefaultLegacy(PriorityQueue); -var semaphore__default = /*#__PURE__*/_interopDefaultLegacy(semaphore); -var JSBI__default = /*#__PURE__*/_interopDefaultLegacy(JSBI); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const DEFAULT_PARTITION_KEY_PATH = "/_partitionKey"; // eslint-disable-line @typescript-eslint/prefer-as-const - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * @hidden - */ -const Constants = { - HttpHeaders: { - Authorization: "authorization", - ETag: "etag", - MethodOverride: "X-HTTP-Method", - Slug: "Slug", - ContentType: "Content-Type", - LastModified: "Last-Modified", - ContentEncoding: "Content-Encoding", - CharacterSet: "CharacterSet", - UserAgent: "User-Agent", - IfModifiedSince: "If-Modified-Since", - IfMatch: "If-Match", - IfNoneMatch: "If-None-Match", - ContentLength: "Content-Length", - AcceptEncoding: "Accept-Encoding", - KeepAlive: "Keep-Alive", - CacheControl: "Cache-Control", - TransferEncoding: "Transfer-Encoding", - ContentLanguage: "Content-Language", - ContentLocation: "Content-Location", - ContentMd5: "Content-Md5", - ContentRange: "Content-Range", - Accept: "Accept", - AcceptCharset: "Accept-Charset", - AcceptLanguage: "Accept-Language", - IfRange: "If-Range", - IfUnmodifiedSince: "If-Unmodified-Since", - MaxForwards: "Max-Forwards", - ProxyAuthorization: "Proxy-Authorization", - AcceptRanges: "Accept-Ranges", - ProxyAuthenticate: "Proxy-Authenticate", - RetryAfter: "Retry-After", - SetCookie: "Set-Cookie", - WwwAuthenticate: "Www-Authenticate", - Origin: "Origin", - Host: "Host", - AccessControlAllowOrigin: "Access-Control-Allow-Origin", - AccessControlAllowHeaders: "Access-Control-Allow-Headers", - KeyValueEncodingFormat: "application/x-www-form-urlencoded", - WrapAssertionFormat: "wrap_assertion_format", - WrapAssertion: "wrap_assertion", - WrapScope: "wrap_scope", - SimpleToken: "SWT", - HttpDate: "date", - Prefer: "Prefer", - Location: "Location", - Referer: "referer", - A_IM: "A-IM", - // Query - Query: "x-ms-documentdb-query", - IsQuery: "x-ms-documentdb-isquery", - IsQueryPlan: "x-ms-cosmos-is-query-plan-request", - SupportedQueryFeatures: "x-ms-cosmos-supported-query-features", - QueryVersion: "x-ms-cosmos-query-version", - // Our custom Azure Cosmos DB headers - Continuation: "x-ms-continuation", - PageSize: "x-ms-max-item-count", - ItemCount: "x-ms-item-count", - // Request sender generated. Simply echoed by backend. - ActivityId: "x-ms-activity-id", - PreTriggerInclude: "x-ms-documentdb-pre-trigger-include", - PreTriggerExclude: "x-ms-documentdb-pre-trigger-exclude", - PostTriggerInclude: "x-ms-documentdb-post-trigger-include", - PostTriggerExclude: "x-ms-documentdb-post-trigger-exclude", - IndexingDirective: "x-ms-indexing-directive", - SessionToken: "x-ms-session-token", - ConsistencyLevel: "x-ms-consistency-level", - XDate: "x-ms-date", - CollectionPartitionInfo: "x-ms-collection-partition-info", - CollectionServiceInfo: "x-ms-collection-service-info", - // Deprecated, use RetryAfterInMs instead. - RetryAfterInMilliseconds: "x-ms-retry-after-ms", - RetryAfterInMs: "x-ms-retry-after-ms", - IsFeedUnfiltered: "x-ms-is-feed-unfiltered", - ResourceTokenExpiry: "x-ms-documentdb-expiry-seconds", - EnableScanInQuery: "x-ms-documentdb-query-enable-scan", - EmitVerboseTracesInQuery: "x-ms-documentdb-query-emit-traces", - EnableCrossPartitionQuery: "x-ms-documentdb-query-enablecrosspartition", - ParallelizeCrossPartitionQuery: "x-ms-documentdb-query-parallelizecrosspartitionquery", - ResponseContinuationTokenLimitInKB: "x-ms-documentdb-responsecontinuationtokenlimitinkb", - // QueryMetrics - // Request header to tell backend to give you query metrics. - PopulateQueryMetrics: "x-ms-documentdb-populatequerymetrics", - // Response header that holds the serialized version of query metrics. - QueryMetrics: "x-ms-documentdb-query-metrics", - // Version headers and values - Version: "x-ms-version", - // Owner name - OwnerFullName: "x-ms-alt-content-path", - // Owner ID used for name based request in session token. - OwnerId: "x-ms-content-path", - // Partition Key - PartitionKey: "x-ms-documentdb-partitionkey", - PartitionKeyRangeID: "x-ms-documentdb-partitionkeyrangeid", - // Quota Info - MaxEntityCount: "x-ms-root-entity-max-count", - CurrentEntityCount: "x-ms-root-entity-current-count", - CollectionQuotaInMb: "x-ms-collection-quota-mb", - CollectionCurrentUsageInMb: "x-ms-collection-usage-mb", - MaxMediaStorageUsageInMB: "x-ms-max-media-storage-usage-mb", - CurrentMediaStorageUsageInMB: "x-ms-media-storage-usage-mb", - RequestCharge: "x-ms-request-charge", - PopulateQuotaInfo: "x-ms-documentdb-populatequotainfo", - MaxResourceQuota: "x-ms-resource-quota", - // Offer header - OfferType: "x-ms-offer-type", - OfferThroughput: "x-ms-offer-throughput", - AutoscaleSettings: "x-ms-cosmos-offer-autopilot-settings", - // Custom RUs/minute headers - DisableRUPerMinuteUsage: "x-ms-documentdb-disable-ru-per-minute-usage", - IsRUPerMinuteUsed: "x-ms-documentdb-is-ru-per-minute-used", - OfferIsRUPerMinuteThroughputEnabled: "x-ms-offer-is-ru-per-minute-throughput-enabled", - // Index progress headers - IndexTransformationProgress: "x-ms-documentdb-collection-index-transformation-progress", - LazyIndexingProgress: "x-ms-documentdb-collection-lazy-indexing-progress", - // Upsert header - IsUpsert: "x-ms-documentdb-is-upsert", - // Sub status of the error - SubStatus: "x-ms-substatus", - // StoredProcedure related headers - EnableScriptLogging: "x-ms-documentdb-script-enable-logging", - ScriptLogResults: "x-ms-documentdb-script-log-results", - // Multi-Region Write - ALLOW_MULTIPLE_WRITES: "x-ms-cosmos-allow-tentative-writes", - // Bulk/Batch header - IsBatchRequest: "x-ms-cosmos-is-batch-request", - IsBatchAtomic: "x-ms-cosmos-batch-atomic", - BatchContinueOnError: "x-ms-cosmos-batch-continue-on-error", - // Dedicated Gateway Headers - DedicatedGatewayPerRequestCacheStaleness: "x-ms-dedicatedgateway-max-age", - // Cache Refresh header - ForceRefresh: "x-ms-force-refresh", - }, - // GlobalDB related constants - WritableLocations: "writableLocations", - ReadableLocations: "readableLocations", - LocationUnavailableExpirationTimeInMs: 5 * 60 * 1000, - // ServiceDocument Resource - ENABLE_MULTIPLE_WRITABLE_LOCATIONS: "enableMultipleWriteLocations", - // Background refresh time - DefaultUnavailableLocationExpirationTimeMS: 5 * 60 * 1000, - // Client generated retry count response header - ThrottleRetryCount: "x-ms-throttle-retry-count", - ThrottleRetryWaitTimeInMs: "x-ms-throttle-retry-wait-time-ms", - // Platform - CurrentVersion: "2020-07-15", - AzureNamespace: "Azure.Cosmos", - AzurePackageName: "@azure/cosmos", - SDKName: "azure-cosmos-js", - SDKVersion: "3.17.3", - // Bulk Operations - DefaultMaxBulkRequestBodySizeInBytes: 220201, - Quota: { - CollectionSize: "collectionSize", - }, - Path: { - Root: "/", - DatabasesPathSegment: "dbs", - CollectionsPathSegment: "colls", - UsersPathSegment: "users", - DocumentsPathSegment: "docs", - PermissionsPathSegment: "permissions", - StoredProceduresPathSegment: "sprocs", - TriggersPathSegment: "triggers", - UserDefinedFunctionsPathSegment: "udfs", - ConflictsPathSegment: "conflicts", - AttachmentsPathSegment: "attachments", - PartitionKeyRangesPathSegment: "pkranges", - SchemasPathSegment: "schemas", - OffersPathSegment: "offers", - TopologyPathSegment: "topology", - DatabaseAccountPathSegment: "databaseaccount", - }, - PartitionKeyRange: { - // Partition Key Range Constants - MinInclusive: "minInclusive", - MaxExclusive: "maxExclusive", - Id: "id", - }, - QueryRangeConstants: { - // Partition Key Range Constants - MinInclusive: "minInclusive", - MaxExclusive: "maxExclusive", - min: "min", - }, - /** - * @deprecated Use EffectivePartitionKeyConstants instead - */ - EffectiveParitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: "", - MaximumExclusiveEffectivePartitionKey: "FF", - }, - EffectivePartitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: "", - MaximumExclusiveEffectivePartitionKey: "FF", - }, -}; -/** - * @hidden - */ -exports.ResourceType = void 0; -(function (ResourceType) { - ResourceType["none"] = ""; - ResourceType["database"] = "dbs"; - ResourceType["offer"] = "offers"; - ResourceType["user"] = "users"; - ResourceType["permission"] = "permissions"; - ResourceType["container"] = "colls"; - ResourceType["conflicts"] = "conflicts"; - ResourceType["sproc"] = "sprocs"; - ResourceType["udf"] = "udfs"; - ResourceType["trigger"] = "triggers"; - ResourceType["item"] = "docs"; - ResourceType["pkranges"] = "pkranges"; - ResourceType["partitionkey"] = "partitionKey"; -})(exports.ResourceType || (exports.ResourceType = {})); -/** - * @hidden - */ -exports.HTTPMethod = void 0; -(function (HTTPMethod) { - HTTPMethod["get"] = "GET"; - HTTPMethod["patch"] = "PATCH"; - HTTPMethod["post"] = "POST"; - HTTPMethod["put"] = "PUT"; - HTTPMethod["delete"] = "DELETE"; -})(exports.HTTPMethod || (exports.HTTPMethod = {})); -/** - * @hidden - */ -exports.OperationType = void 0; -(function (OperationType) { - OperationType["Create"] = "create"; - OperationType["Replace"] = "replace"; - OperationType["Upsert"] = "upsert"; - OperationType["Delete"] = "delete"; - OperationType["Read"] = "read"; - OperationType["Query"] = "query"; - OperationType["Execute"] = "execute"; - OperationType["Batch"] = "batch"; - OperationType["Patch"] = "patch"; -})(exports.OperationType || (exports.OperationType = {})); -/** - * @hidden - */ -var CosmosKeyType; -(function (CosmosKeyType) { - CosmosKeyType["PrimaryMaster"] = "PRIMARY_MASTER"; - CosmosKeyType["SecondaryMaster"] = "SECONDARY_MASTER"; - CosmosKeyType["PrimaryReadOnly"] = "PRIMARY_READONLY"; - CosmosKeyType["SecondaryReadOnly"] = "SECONDARY_READONLY"; -})(CosmosKeyType || (CosmosKeyType = {})); -/** - * @hidden - */ -var CosmosContainerChildResourceKind; -(function (CosmosContainerChildResourceKind) { - CosmosContainerChildResourceKind["Item"] = "ITEM"; - CosmosContainerChildResourceKind["StoredProcedure"] = "STORED_PROCEDURE"; - CosmosContainerChildResourceKind["UserDefinedFunction"] = "USER_DEFINED_FUNCTION"; - CosmosContainerChildResourceKind["Trigger"] = "TRIGGER"; -})(CosmosContainerChildResourceKind || (CosmosContainerChildResourceKind = {})); -/** - * @hidden - */ -var PermissionScopeValues; -(function (PermissionScopeValues) { - /** - * Values which set permission Scope applicable to control plane related operations. - */ - PermissionScopeValues[PermissionScopeValues["ScopeAccountReadValue"] = 1] = "ScopeAccountReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountListDatabasesValue"] = 2] = "ScopeAccountListDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadValue"] = 4] = "ScopeDatabaseReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadOfferValue"] = 8] = "ScopeDatabaseReadOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseListContainerValue"] = 16] = "ScopeDatabaseListContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadValue"] = 32] = "ScopeContainerReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadOfferValue"] = 64] = "ScopeContainerReadOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountCreateDatabasesValue"] = 1] = "ScopeAccountCreateDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountDeleteDatabasesValue"] = 2] = "ScopeAccountDeleteDatabasesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseDeleteValue"] = 4] = "ScopeDatabaseDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReplaceOfferValue"] = 8] = "ScopeDatabaseReplaceOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseCreateContainerValue"] = 16] = "ScopeDatabaseCreateContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseDeleteContainerValue"] = 32] = "ScopeDatabaseDeleteContainerValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceValue"] = 64] = "ScopeContainerReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteValue"] = 128] = "ScopeContainerDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceOfferValue"] = 256] = "ScopeContainerReplaceOfferValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountReadAllAccessValue"] = 65535] = "ScopeAccountReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseReadAllAccessValue"] = 124] = "ScopeDatabaseReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainersReadAllAccessValue"] = 96] = "ScopeContainersReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeAccountWriteAllAccessValue"] = 65535] = "ScopeAccountWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeDatabaseWriteAllAccessValue"] = 508] = "ScopeDatabaseWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainersWriteAllAccessValue"] = 448] = "ScopeContainersWriteAllAccessValue"; - /** - * Values which set permission Scope applicable to data plane related operations. - */ - PermissionScopeValues[PermissionScopeValues["ScopeContainerExecuteQueriesValue"] = 1] = "ScopeContainerExecuteQueriesValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadFeedsValue"] = 2] = "ScopeContainerReadFeedsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadStoredProceduresValue"] = 4] = "ScopeContainerReadStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadUserDefinedFunctionsValue"] = 8] = "ScopeContainerReadUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadTriggersValue"] = 16] = "ScopeContainerReadTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadConflictsValue"] = 32] = "ScopeContainerReadConflictsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReadValue"] = 64] = "ScopeItemReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureReadValue"] = 128] = "ScopeStoredProcedureReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionReadValue"] = 256] = "ScopeUserDefinedFunctionReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerReadValue"] = 512] = "ScopeTriggerReadValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateItemsValue"] = 1] = "ScopeContainerCreateItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceItemsValue"] = 2] = "ScopeContainerReplaceItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerUpsertItemsValue"] = 4] = "ScopeContainerUpsertItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteItemsValue"] = 8] = "ScopeContainerDeleteItemsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateStoredProceduresValue"] = 16] = "ScopeContainerCreateStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceStoredProceduresValue"] = 32] = "ScopeContainerReplaceStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteStoredProceduresValue"] = 64] = "ScopeContainerDeleteStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerExecuteStoredProceduresValue"] = 128] = "ScopeContainerExecuteStoredProceduresValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateTriggersValue"] = 256] = "ScopeContainerCreateTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceTriggersValue"] = 512] = "ScopeContainerReplaceTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteTriggersValue"] = 1024] = "ScopeContainerDeleteTriggersValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerCreateUserDefinedFunctionsValue"] = 2048] = "ScopeContainerCreateUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReplaceUserDefinedFunctionsValue"] = 4096] = "ScopeContainerReplaceUserDefinedFunctionsValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteUserDefinedFunctionSValue"] = 8192] = "ScopeContainerDeleteUserDefinedFunctionSValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerDeleteCONFLICTSValue"] = 16384] = "ScopeContainerDeleteCONFLICTSValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReplaceValue"] = 65536] = "ScopeItemReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemUpsertValue"] = 131072] = "ScopeItemUpsertValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemDeleteValue"] = 262144] = "ScopeItemDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureReplaceValue"] = 1048576] = "ScopeStoredProcedureReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureDeleteValue"] = 2097152] = "ScopeStoredProcedureDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeStoredProcedureExecuteValue"] = 4194304] = "ScopeStoredProcedureExecuteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionReplaceValue"] = 8388608] = "ScopeUserDefinedFunctionReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeUserDefinedFunctionDeleteValue"] = 16777216] = "ScopeUserDefinedFunctionDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerReplaceValue"] = 33554432] = "ScopeTriggerReplaceValue"; - PermissionScopeValues[PermissionScopeValues["ScopeTriggerDeleteValue"] = 67108864] = "ScopeTriggerDeleteValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerReadAllAccessValue"] = 4294967295] = "ScopeContainerReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemReadAllAccessValue"] = 65] = "ScopeItemReadAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeContainerWriteAllAccessValue"] = 4294967295] = "ScopeContainerWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["ScopeItemWriteAllAccessValue"] = 458767] = "ScopeItemWriteAllAccessValue"; - PermissionScopeValues[PermissionScopeValues["NoneValue"] = 0] = "NoneValue"; -})(PermissionScopeValues || (PermissionScopeValues = {})); -/** - * @hidden - */ -exports.SasTokenPermissionKind = void 0; -(function (SasTokenPermissionKind) { - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateItems"] = 1] = "ContainerCreateItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceItems"] = 2] = "ContainerReplaceItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerUpsertItems"] = 4] = "ContainerUpsertItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteItems"] = 128] = "ContainerDeleteItems"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerExecuteQueries"] = 1] = "ContainerExecuteQueries"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadFeeds"] = 2] = "ContainerReadFeeds"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateStoreProcedure"] = 16] = "ContainerCreateStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadStoreProcedure"] = 4] = "ContainerReadStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceStoreProcedure"] = 32] = "ContainerReplaceStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteStoreProcedure"] = 64] = "ContainerDeleteStoreProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateTriggers"] = 256] = "ContainerCreateTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadTriggers"] = 16] = "ContainerReadTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceTriggers"] = 512] = "ContainerReplaceTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteTriggers"] = 1024] = "ContainerDeleteTriggers"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerCreateUserDefinedFunctions"] = 2048] = "ContainerCreateUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadUserDefinedFunctions"] = 8] = "ContainerReadUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReplaceUserDefinedFunctions"] = 4096] = "ContainerReplaceUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteUserDefinedFunctions"] = 8192] = "ContainerDeleteUserDefinedFunctions"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerExecuteStoredProcedure"] = 128] = "ContainerExecuteStoredProcedure"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadConflicts"] = 32] = "ContainerReadConflicts"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerDeleteConflicts"] = 16384] = "ContainerDeleteConflicts"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerReadAny"] = 64] = "ContainerReadAny"; - SasTokenPermissionKind[SasTokenPermissionKind["ContainerFullAccess"] = 4294967295] = "ContainerFullAccess"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemReadAny"] = 65536] = "ItemReadAny"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemFullAccess"] = 65] = "ItemFullAccess"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemRead"] = 64] = "ItemRead"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemReplace"] = 65536] = "ItemReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemUpsert"] = 131072] = "ItemUpsert"; - SasTokenPermissionKind[SasTokenPermissionKind["ItemDelete"] = 262144] = "ItemDelete"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureRead"] = 128] = "StoreProcedureRead"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureReplace"] = 1048576] = "StoreProcedureReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureDelete"] = 2097152] = "StoreProcedureDelete"; - SasTokenPermissionKind[SasTokenPermissionKind["StoreProcedureExecute"] = 4194304] = "StoreProcedureExecute"; - SasTokenPermissionKind[SasTokenPermissionKind["UserDefinedFuntionRead"] = 256] = "UserDefinedFuntionRead"; - SasTokenPermissionKind[SasTokenPermissionKind["UserDefinedFuntionReplace"] = 8388608] = "UserDefinedFuntionReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["UserDefinedFuntionDelete"] = 16777216] = "UserDefinedFuntionDelete"; - SasTokenPermissionKind[SasTokenPermissionKind["TriggerRead"] = 512] = "TriggerRead"; - SasTokenPermissionKind[SasTokenPermissionKind["TriggerReplace"] = 33554432] = "TriggerReplace"; - SasTokenPermissionKind[SasTokenPermissionKind["TriggerDelete"] = 67108864] = "TriggerDelete"; -})(exports.SasTokenPermissionKind || (exports.SasTokenPermissionKind = {})); - -const trimLeftSlashes = new RegExp("^[/]+"); -const trimRightSlashes = new RegExp("[/]+$"); -const illegalResourceIdCharacters = new RegExp("[/\\\\?#]"); -const illegalItemResourceIdCharacters = new RegExp("[/\\\\#]"); -/** @hidden */ -function jsonStringifyAndEscapeNonASCII(arg) { - // TODO: better way for this? Not sure. - // escapes non-ASCII characters as \uXXXX - return JSON.stringify(arg).replace(/[\u007F-\uFFFF]/g, (m) => { - return "\\u" + ("0000" + m.charCodeAt(0).toString(16)).slice(-4); - }); -} -/** - * @hidden - */ -function parseLink(resourcePath) { - if (resourcePath.length === 0) { - /* for DatabaseAccount case, both type and objectBody will be undefined. */ - return { - type: undefined, - objectBody: undefined, - }; - } - if (resourcePath[resourcePath.length - 1] !== "/") { - resourcePath = resourcePath + "/"; - } - if (resourcePath[0] !== "/") { - resourcePath = "/" + resourcePath; - } - /* - The path will be in the form of /[resourceType]/[resourceId]/ .... - /[resourceType]//[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/ - or /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/[resourceType]/[resourceId]/ .... - /[resourceType]/[resourceId]/ - The result of split will be in the form of - [[[resourceType], [resourceId] ... ,[resourceType], [resourceId], ""] - In the first case, to extract the resourceId it will the element before last ( at length -2 ) - and the type will be before it ( at length -3 ) - In the second case, to extract the resource type it will the element before last ( at length -2 ) - */ - const pathParts = resourcePath.split("/"); - let id; - let type; - if (pathParts.length % 2 === 0) { - // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]. - id = pathParts[pathParts.length - 2]; - type = pathParts[pathParts.length - 3]; - } - else { - // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/. - id = pathParts[pathParts.length - 3]; - type = pathParts[pathParts.length - 2]; - } - const result = { - type, - objectBody: { - id, - self: resourcePath, - }, - }; - return result; -} -/** - * @hidden - */ -function isReadRequest(operationType) { - return operationType === exports.OperationType.Read || operationType === exports.OperationType.Query; -} -/** - * @hidden - */ -function sleep(time) { - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }, time); - }); -} -/** - * @hidden - */ -function getContainerLink(link) { - return link.split("/").slice(0, 4).join("/"); -} -/** - * @hidden - */ -function trimSlashes(source) { - return source.replace(trimLeftSlashes, "").replace(trimRightSlashes, ""); -} -/** - * @hidden - */ -function parsePath(path) { - const pathParts = []; - let currentIndex = 0; - const throwError = () => { - throw new Error("Path " + path + " is invalid at index " + currentIndex); - }; - const getEscapedToken = () => { - const quote = path[currentIndex]; - let newIndex = ++currentIndex; - for (;;) { - newIndex = path.indexOf(quote, newIndex); - if (newIndex === -1) { - throwError(); - } - if (path[newIndex - 1] !== "\\") { - break; - } - ++newIndex; - } - const token = path.substr(currentIndex, newIndex - currentIndex); - currentIndex = newIndex + 1; - return token; - }; - const getToken = () => { - const newIndex = path.indexOf("/", currentIndex); - let token = null; - if (newIndex === -1) { - token = path.substr(currentIndex); - currentIndex = path.length; - } - else { - token = path.substr(currentIndex, newIndex - currentIndex); - currentIndex = newIndex; - } - token = token.trim(); - return token; - }; - while (currentIndex < path.length) { - if (path[currentIndex] !== "/") { - throwError(); - } - if (++currentIndex === path.length) { - break; - } - if (path[currentIndex] === '"' || path[currentIndex] === "'") { - pathParts.push(getEscapedToken()); - } - else { - pathParts.push(getToken()); - } - } - return pathParts; -} -/** - * @hidden - */ -function isResourceValid(resource, err) { - // TODO: fix strictness issues so that caller contexts respects the types of the functions - if (resource.id) { - if (typeof resource.id !== "string") { - err.message = "Id must be a string."; - return false; - } - if (resource.id.indexOf("/") !== -1 || - resource.id.indexOf("\\") !== -1 || - resource.id.indexOf("?") !== -1 || - resource.id.indexOf("#") !== -1) { - err.message = "Id contains illegal chars."; - return false; - } - if (resource.id[resource.id.length - 1] === " ") { - err.message = "Id ends with a space."; - return false; - } - } - return true; -} -/** - * @hidden - */ -function isItemResourceValid(resource, err) { - // TODO: fix strictness issues so that caller contexts respects the types of the functions - if (resource.id) { - if (typeof resource.id !== "string") { - err.message = "Id must be a string."; - return false; - } - if (resource.id.indexOf("/") !== -1 || - resource.id.indexOf("\\") !== -1 || - resource.id.indexOf("#") !== -1) { - err.message = "Id contains illegal chars."; - return false; - } - } - return true; -} -/** @hidden */ -function getIdFromLink(resourceLink) { - resourceLink = trimSlashes(resourceLink); - return resourceLink; -} -/** @hidden */ -function getPathFromLink(resourceLink, resourceType) { - resourceLink = trimSlashes(resourceLink); - if (resourceType) { - return "/" + encodeURI(resourceLink) + "/" + resourceType; - } - else { - return "/" + encodeURI(resourceLink); - } -} -/** - * @hidden - */ -function isStringNullOrEmpty(inputString) { - // checks whether string is null, undefined, empty or only contains space - return !inputString || /^\s*$/.test(inputString); -} -/** - * @hidden - */ -function trimSlashFromLeftAndRight(inputString) { - if (typeof inputString !== "string") { - throw new Error("invalid input: input is not string"); - } - return inputString.replace(trimLeftSlashes, "").replace(trimRightSlashes, ""); -} -/** - * @hidden - */ -function validateResourceId(resourceId) { - // if resourceId is not a string or is empty throw an error - if (typeof resourceId !== "string" || isStringNullOrEmpty(resourceId)) { - throw new Error("Resource ID must be a string and cannot be undefined, null or empty"); - } - // if resource id contains illegal characters throw an error - if (illegalResourceIdCharacters.test(resourceId)) { - throw new Error("Illegal characters ['/', '\\', '#', '?'] cannot be used in Resource ID"); - } - return true; -} -/** - * @hidden - */ -function validateItemResourceId(resourceId) { - // if resourceId is not a string or is empty throw an error - if (typeof resourceId !== "string" || isStringNullOrEmpty(resourceId)) { - throw new Error("Resource ID must be a string and cannot be undefined, null or empty"); - } - // if resource id contains illegal characters throw an error - if (illegalItemResourceIdCharacters.test(resourceId)) { - throw new Error("Illegal characters ['/', '\\', '#'] cannot be used in Resource ID"); - } - return true; -} -/** - * @hidden - */ -function getResourceIdFromPath(resourcePath) { - if (!resourcePath || typeof resourcePath !== "string") { - return null; - } - const trimmedPath = trimSlashFromLeftAndRight(resourcePath); - const pathSegments = trimmedPath.split("/"); - // number of segments of a path must always be even - if (pathSegments.length % 2 !== 0) { - return null; - } - return pathSegments[pathSegments.length - 1]; -} -/** - * @hidden - */ -function parseConnectionString(connectionString) { - const keyValueStrings = connectionString.split(";"); - const { AccountEndpoint, AccountKey } = keyValueStrings.reduce((connectionObject, keyValueString) => { - const [key, ...value] = keyValueString.split("="); - connectionObject[key] = value.join("="); - return connectionObject; - }, {}); - if (!AccountEndpoint || !AccountKey) { - throw new Error("Could not parse the provided connection string"); - } - return { - endpoint: AccountEndpoint, - key: AccountKey, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * @hidden - */ -const StatusCodes = { - // Success - Ok: 200, - Created: 201, - Accepted: 202, - NoContent: 204, - NotModified: 304, - // Client error - BadRequest: 400, - Unauthorized: 401, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - PreconditionFailed: 412, - RequestEntityTooLarge: 413, - TooManyRequests: 429, - RetryWith: 449, - // Server Error - InternalServerError: 500, - ServiceUnavailable: 503, - // System codes - ENOTFOUND: "ENOTFOUND", - // Operation pause and cancel. These are FAKE status codes for QOS logging purpose only. - OperationPaused: 1200, - OperationCancelled: 1201, -}; -/** - * @hidden - */ -const SubStatusCodes = { - Unknown: 0, - // 400: Bad Request Substatus - CrossPartitionQueryNotServable: 1004, - // 410: StatusCodeType_Gone: substatus - PartitionKeyRangeGone: 1002, - // 404: NotFound Substatus - ReadSessionNotAvailable: 1002, - // 403: Forbidden Substatus - WriteForbidden: 3, - DatabaseAccountNotFound: 1008, -}; - -// Copyright (c) Microsoft Corporation. -/** - * Would be used when creating or deleting a DocumentCollection - * or a User in Azure Cosmos DB database service - * @hidden - * Given a database id, this creates a database link. - * @param databaseId - The database id - * @returns A database link in the format of `dbs/{0}` - * with `{0}` being a Uri escaped version of the databaseId - */ -function createDatabaseUri(databaseId) { - databaseId = trimSlashFromLeftAndRight(databaseId); - validateResourceId(databaseId); - return Constants.Path.DatabasesPathSegment + "/" + databaseId; -} -/** - * Given a database and collection id, this creates a collection link. - * Would be used when updating or deleting a DocumentCollection, creating a - * Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query - * with CreateDocumentQuery in Azure Cosmos DB database service. - * @param databaseId - The database id - * @param collectionId - The collection id - * @returns A collection link in the format of `dbs/{0}/colls/{1}` - * with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId - * @hidden - */ -function createDocumentCollectionUri(databaseId, collectionId) { - collectionId = trimSlashFromLeftAndRight(collectionId); - validateResourceId(collectionId); - return (createDatabaseUri(databaseId) + "/" + Constants.Path.CollectionsPathSegment + "/" + collectionId); -} -/** - * Given a database and user id, this creates a user link. - * Would be used when creating a Permission, or when replacing or deleting - * a User in Azure Cosmos DB database service - * @param databaseId - The database id - * @param userId - The user id - * @returns A user link in the format of `dbs/{0}/users/{1}` - * with `{0}` being a Uri escaped version of the databaseId and `{1}` being userId - * @hidden - */ -function createUserUri(databaseId, userId) { - userId = trimSlashFromLeftAndRight(userId); - validateResourceId(userId); - return createDatabaseUri(databaseId) + "/" + Constants.Path.UsersPathSegment + "/" + userId; -} -/** - * Given a database and collection id, this creates a collection link. - * Would be used when creating an Attachment, or when replacing - * or deleting a Document in Azure Cosmos DB database service - * @param databaseId - The database id - * @param collectionId - The collection id - * @param documentId - The document id - * @returns A document link in the format of - * `dbs/{0}/colls/{1}/docs/{2}` with `{0}` being a Uri escaped version of - * the databaseId, `{1}` being collectionId and `{2}` being the documentId - * @hidden - */ -function createDocumentUri(databaseId, collectionId, documentId) { - documentId = trimSlashFromLeftAndRight(documentId); - validateItemResourceId(documentId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.DocumentsPathSegment + - "/" + - documentId); -} -/** - * Given a database, collection and document id, this creates a document link. - * Would be used when replacing or deleting a Permission in Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param userId -The user Id - * @param permissionId - The permissionId - * @returns A permission link in the format of `dbs/{0}/users/{1}/permissions/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being userId and `{2}` being permissionId - * @hidden - */ -function createPermissionUri(databaseId, userId, permissionId) { - permissionId = trimSlashFromLeftAndRight(permissionId); - validateResourceId(permissionId); - return (createUserUri(databaseId, userId) + - "/" + - Constants.Path.PermissionsPathSegment + - "/" + - permissionId); -} -/** - * Given a database, collection and stored proc id, this creates a stored proc link. - * Would be used when replacing, executing, or deleting a StoredProcedure in - * Azure Cosmos DB database service. - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param storedProcedureId -The stored procedure Id - * @returns A stored procedure link in the format of - * `dbs/{0}/colls/{1}/sprocs/{2}` with `{0}` being a Uri escaped version of the databaseId, - * `{1}` being collectionId and `{2}` being the storedProcedureId - * @hidden - */ -function createStoredProcedureUri(databaseId, collectionId, storedProcedureId) { - storedProcedureId = trimSlashFromLeftAndRight(storedProcedureId); - validateResourceId(storedProcedureId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.StoredProceduresPathSegment + - "/" + - storedProcedureId); -} -/** - * Given a database, collection and trigger id, this creates a trigger link. - * Would be used when replacing, executing, or deleting a Trigger in Azure Cosmos DB database service - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param triggerId -The trigger Id - * @returns A trigger link in the format of - * `dbs/{0}/colls/{1}/triggers/{2}` with `{0}` being a Uri escaped version of the databaseId, - * `{1}` being collectionId and `{2}` being the triggerId - * @hidden - */ -function createTriggerUri(databaseId, collectionId, triggerId) { - triggerId = trimSlashFromLeftAndRight(triggerId); - validateResourceId(triggerId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.TriggersPathSegment + - "/" + - triggerId); -} -/** - * Given a database, collection and udf id, this creates a udf link. - * Would be used when replacing, executing, or deleting a UserDefinedFunction in - * Azure Cosmos DB database service - * @param databaseId -The database Id - * @param collectionId -The collection Id - * @param udfId -The User Defined Function Id - * @returns A udf link in the format of `dbs/{0}/colls/{1}/udfs/{2}` - * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the udfId - * @hidden - */ -function createUserDefinedFunctionUri(databaseId, collectionId, udfId) { - udfId = trimSlashFromLeftAndRight(udfId); - validateResourceId(udfId); - return (createDocumentCollectionUri(databaseId, collectionId) + - "/" + - Constants.Path.UserDefinedFunctionsPathSegment + - "/" + - udfId); -} - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - */ -function extractPartitionKey(document, partitionKeyDefinition) { - if (partitionKeyDefinition && - partitionKeyDefinition.paths && - partitionKeyDefinition.paths.length > 0) { - const partitionKey = []; - partitionKeyDefinition.paths.forEach((path) => { - const pathParts = parsePath(path); - let obj = document; - for (const part of pathParts) { - if (typeof obj === "object" && part in obj) { - obj = obj[part]; - } - else { - obj = undefined; - break; - } - } - partitionKey.push(obj); - }); - if (partitionKey.length === 1 && partitionKey[0] === undefined) { - return undefinedPartitionKey(partitionKeyDefinition); - } - return partitionKey; - } -} -/** - * @hidden - */ -function undefinedPartitionKey(partitionKeyDefinition) { - if (partitionKeyDefinition.systemKey === true) { - return []; - } - else { - return [{}]; - } -} - -// Copyright (c) Microsoft Corporation. -async function hmac(key, message) { - return crypto.createHmac("sha256", Buffer.from(key, "base64")).update(message).digest("base64"); -} - -// Copyright (c) Microsoft Corporation. -async function generateHeaders(masterKey, method, resourceType = exports.ResourceType.none, resourceId = "", date = new Date()) { - if (masterKey.startsWith("type=sas&")) { - return { - [Constants.HttpHeaders.Authorization]: encodeURIComponent(masterKey), - [Constants.HttpHeaders.XDate]: date.toUTCString(), - }; - } - const sig = await signature(masterKey, method, resourceType, resourceId, date); - return { - [Constants.HttpHeaders.Authorization]: sig, - [Constants.HttpHeaders.XDate]: date.toUTCString(), - }; -} -async function signature(masterKey, method, resourceType, resourceId = "", date = new Date()) { - const type = "master"; - const version = "1.0"; - const text = method.toLowerCase() + - "\n" + - resourceType.toLowerCase() + - "\n" + - resourceId + - "\n" + - date.toUTCString().toLowerCase() + - "\n" + - "" + - "\n"; - const signed = await hmac(masterKey, text); - return encodeURIComponent("type=" + type + "&ver=" + version + "&sig=" + signed); -} - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - */ -async function setAuthorizationHeader(clientOptions, verb, path, resourceId, resourceType, headers) { - if (clientOptions.permissionFeed) { - clientOptions.resourceTokens = {}; - for (const permission of clientOptions.permissionFeed) { - const id = getResourceIdFromPath(permission.resource); - if (!id) { - throw new Error(`authorization error: ${id} \ - is an invalid resourceId in permissionFeed`); - } - clientOptions.resourceTokens[id] = permission._token; // TODO: any - } - } - if (clientOptions.key) { - await setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, clientOptions.key); - } - else if (clientOptions.resourceTokens) { - headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(getAuthorizationTokenUsingResourceTokens(clientOptions.resourceTokens, path, resourceId)); - } - else if (clientOptions.tokenProvider) { - headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(await clientOptions.tokenProvider({ verb, path, resourceId, resourceType, headers })); - } -} -/** - * The default function for setting header token using the masterKey - * @hidden - */ -async function setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, masterKey) { - // TODO This should live in cosmos-sign - if (resourceType === exports.ResourceType.offer) { - resourceId = resourceId && resourceId.toLowerCase(); - } - headers = Object.assign(headers, await generateHeaders(masterKey, verb, resourceType, resourceId)); -} -/** - * @hidden - */ -// TODO: Resource tokens -function getAuthorizationTokenUsingResourceTokens(resourceTokens, path, resourceId) { - if (resourceTokens && Object.keys(resourceTokens).length > 0) { - // For database account access(through getDatabaseAccount API), path and resourceId are "", - // so in this case we return the first token to be used for creating the auth header as the - // service will accept any token in this case - if (!path && !resourceId) { - return resourceTokens[Object.keys(resourceTokens)[0]]; - } - // If we have exact resource token for the path use it - if (resourceId && resourceTokens[resourceId]) { - return resourceTokens[resourceId]; - } - // minimum valid path /dbs - if (!path || path.length < 4) { - // TODO: This should throw an error - return null; - } - path = trimSlashFromLeftAndRight(path); - const pathSegments = (path && path.split("/")) || []; - // Item path - if (pathSegments.length === 6) { - // Look for a container token matching the item path - const containerPath = pathSegments.slice(0, 4).map(decodeURIComponent).join("/"); - if (resourceTokens[containerPath]) { - return resourceTokens[containerPath]; - } - } - // TODO remove in v4: This is legacy behavior that lets someone use a resource token pointing ONLY at an ID - // It was used when _rid was exposed by the SDK, but now that we are using user provided ids it is not needed - // However removing it now would be a breaking change - // if it's an incomplete path like /dbs/db1/colls/, start from the parent resource - let index = pathSegments.length % 2 === 0 ? pathSegments.length - 1 : pathSegments.length - 2; - for (; index > 0; index -= 2) { - const id = decodeURI(pathSegments[index]); - if (resourceTokens[id]) { - return resourceTokens[id]; - } - } - } - // TODO: This should throw an error - return null; -} - -// Copyright (c) Microsoft Corporation. -/** - * The \@azure/logger configuration for this package. - */ -const defaultLogger = logger$4.createClientLogger("cosmosdb"); - -// Copyright (c) Microsoft Corporation. -// ---------------------------------------------------------------------------- -// Utility methods -// -/** @hidden */ -function javaScriptFriendlyJSONStringify(s) { - // two line terminators (Line separator and Paragraph separator) are not needed to be escaped in JSON - // but are needed to be escaped in JavaScript. - return JSON.stringify(s) - .replace(/\u2028/g, "\\u2028") - .replace(/\u2029/g, "\\u2029"); -} -/** @hidden */ -function bodyFromData(data) { - if (typeof data === "object") { - return javaScriptFriendlyJSONStringify(data); - } - return data; -} -const JsonContentType = "application/json"; -/** - * @hidden - */ -async function getHeaders({ clientOptions, defaultHeaders, verb, path, resourceId, resourceType, options = {}, partitionKeyRangeId, useMultipleWriteLocations, partitionKey, }) { - const headers = Object.assign({ [Constants.HttpHeaders.ResponseContinuationTokenLimitInKB]: 1, [Constants.HttpHeaders.EnableCrossPartitionQuery]: true }, defaultHeaders); - if (useMultipleWriteLocations) { - headers[Constants.HttpHeaders.ALLOW_MULTIPLE_WRITES] = true; - } - if (options.continuationTokenLimitInKB) { - headers[Constants.HttpHeaders.ResponseContinuationTokenLimitInKB] = - options.continuationTokenLimitInKB; - } - if (options.continuationToken) { - headers[Constants.HttpHeaders.Continuation] = options.continuationToken; - } - else if (options.continuation) { - headers[Constants.HttpHeaders.Continuation] = options.continuation; - } - if (options.preTriggerInclude) { - headers[Constants.HttpHeaders.PreTriggerInclude] = - options.preTriggerInclude.constructor === Array - ? options.preTriggerInclude.join(",") - : options.preTriggerInclude; - } - if (options.postTriggerInclude) { - headers[Constants.HttpHeaders.PostTriggerInclude] = - options.postTriggerInclude.constructor === Array - ? options.postTriggerInclude.join(",") - : options.postTriggerInclude; - } - if (options.offerType) { - headers[Constants.HttpHeaders.OfferType] = options.offerType; - } - if (options.offerThroughput) { - headers[Constants.HttpHeaders.OfferThroughput] = options.offerThroughput; - } - if (options.maxItemCount) { - headers[Constants.HttpHeaders.PageSize] = options.maxItemCount; - } - if (options.accessCondition) { - if (options.accessCondition.type === "IfMatch") { - headers[Constants.HttpHeaders.IfMatch] = options.accessCondition.condition; - } - else { - headers[Constants.HttpHeaders.IfNoneMatch] = options.accessCondition.condition; - } - } - if (options.useIncrementalFeed) { - headers[Constants.HttpHeaders.A_IM] = "Incremental Feed"; - } - if (options.indexingDirective) { - headers[Constants.HttpHeaders.IndexingDirective] = options.indexingDirective; - } - if (options.consistencyLevel) { - headers[Constants.HttpHeaders.ConsistencyLevel] = options.consistencyLevel; - } - if (options.maxIntegratedCacheStalenessInMs && resourceType === exports.ResourceType.item) { - if (typeof options.maxIntegratedCacheStalenessInMs === "number") { - headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] = - options.maxIntegratedCacheStalenessInMs.toString(); - } - else { - defaultLogger.error(`RangeError: maxIntegratedCacheStalenessInMs "${options.maxIntegratedCacheStalenessInMs}" is not a valid parameter.`); - headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] = "null"; - } - } - if (options.resourceTokenExpirySeconds) { - headers[Constants.HttpHeaders.ResourceTokenExpiry] = options.resourceTokenExpirySeconds; - } - if (options.sessionToken) { - headers[Constants.HttpHeaders.SessionToken] = options.sessionToken; - } - if (options.enableScanInQuery) { - headers[Constants.HttpHeaders.EnableScanInQuery] = options.enableScanInQuery; - } - if (options.populateQuotaInfo) { - headers[Constants.HttpHeaders.PopulateQuotaInfo] = options.populateQuotaInfo; - } - if (options.populateQueryMetrics) { - headers[Constants.HttpHeaders.PopulateQueryMetrics] = options.populateQueryMetrics; - } - if (options.maxDegreeOfParallelism !== undefined) { - headers[Constants.HttpHeaders.ParallelizeCrossPartitionQuery] = true; - } - if (options.populateQuotaInfo) { - headers[Constants.HttpHeaders.PopulateQuotaInfo] = true; - } - if (partitionKey !== undefined && !headers[Constants.HttpHeaders.PartitionKey]) { - if (partitionKey === null || !Array.isArray(partitionKey)) { - partitionKey = [partitionKey]; - } - headers[Constants.HttpHeaders.PartitionKey] = jsonStringifyAndEscapeNonASCII(partitionKey); - } - if (clientOptions.key || clientOptions.tokenProvider) { - headers[Constants.HttpHeaders.XDate] = new Date().toUTCString(); - } - if (verb === exports.HTTPMethod.post || verb === exports.HTTPMethod.put) { - if (!headers[Constants.HttpHeaders.ContentType]) { - headers[Constants.HttpHeaders.ContentType] = JsonContentType; - } - } - if (!headers[Constants.HttpHeaders.Accept]) { - headers[Constants.HttpHeaders.Accept] = JsonContentType; - } - if (partitionKeyRangeId !== undefined) { - headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId; - } - if (options.enableScriptLogging) { - headers[Constants.HttpHeaders.EnableScriptLogging] = options.enableScriptLogging; - } - if (options.disableRUPerMinuteUsage) { - headers[Constants.HttpHeaders.DisableRUPerMinuteUsage] = true; - } - if (clientOptions.key || - clientOptions.resourceTokens || - clientOptions.tokenProvider || - clientOptions.permissionFeed) { - await setAuthorizationHeader(clientOptions, verb, path, resourceId, resourceType, headers); - } - return headers; -} - -// Copyright (c) Microsoft Corporation. -const uuid$2 = uuid$3.v4; -function isKeyInRange(min, max, key) { - const isAfterMinInclusive = key.localeCompare(min) >= 0; - const isBeforeMax = key.localeCompare(max) < 0; - return isAfterMinInclusive && isBeforeMax; -} -const BulkOperationType = { - Create: "Create", - Upsert: "Upsert", - Read: "Read", - Delete: "Delete", - Replace: "Replace", - Patch: "Patch", -}; -function hasResource(operation) { - return (operation.operationType !== "Patch" && - operation.resourceBody !== undefined); -} -function getPartitionKeyToHash(operation, partitionProperty) { - const toHashKey = hasResource(operation) - ? deepFind(operation.resourceBody, partitionProperty) - : (operation.partitionKey && operation.partitionKey.replace(/[[\]"']/g, "")) || - operation.partitionKey; - // We check for empty object since replace will stringify the value - // The second check avoids cases where the partitionKey value is actually the string '{}' - if (toHashKey === "{}" && operation.partitionKey === "[{}]") { - return {}; - } - if (toHashKey === "null" && operation.partitionKey === "[null]") { - return null; - } - if (toHashKey === "0" && operation.partitionKey === "[0]") { - return 0; - } - return toHashKey; -} -function decorateOperation(operation, definition, options = {}) { - if (operation.operationType === BulkOperationType.Create || - operation.operationType === BulkOperationType.Upsert) { - if ((operation.resourceBody.id === undefined || operation.resourceBody.id === "") && - !options.disableAutomaticIdGeneration) { - operation.resourceBody.id = uuid$2(); - } - } - if ("partitionKey" in operation) { - const extracted = extractPartitionKey(operation, { paths: ["/partitionKey"] }); - return Object.assign(Object.assign({}, operation), { partitionKey: JSON.stringify(extracted) }); - } - else if (operation.operationType === BulkOperationType.Create || - operation.operationType === BulkOperationType.Replace || - operation.operationType === BulkOperationType.Upsert) { - const pk = extractPartitionKey(operation.resourceBody, definition); - return Object.assign(Object.assign({}, operation), { partitionKey: JSON.stringify(pk) }); - } - else if (operation.operationType === BulkOperationType.Read || - operation.operationType === BulkOperationType.Delete) { - return Object.assign(Object.assign({}, operation), { partitionKey: "[{}]" }); - } - return operation; -} -/** - * Splits a batch into array of batches based on cumulative size of its operations by making sure - * cumulative size of an individual batch is not larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}. - * If a single operation itself is larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}, that - * operation would be moved into a batch containing only that operation. - * @param originalBatch - A batch of operations needed to be checked. - * @returns - * @hidden - */ -function splitBatchBasedOnBodySize(originalBatch) { - if ((originalBatch === null || originalBatch === void 0 ? void 0 : originalBatch.operations) === undefined || originalBatch.operations.length < 1) - return []; - let currentBatchSize = calculateObjectSizeInBytes(originalBatch.operations[0]); - let currentBatch = Object.assign(Object.assign({}, originalBatch), { operations: [originalBatch.operations[0]], indexes: [originalBatch.indexes[0]] }); - const processedBatches = []; - processedBatches.push(currentBatch); - for (let index = 1; index < originalBatch.operations.length; index++) { - const operation = originalBatch.operations[index]; - const currentOpSize = calculateObjectSizeInBytes(operation); - if (currentBatchSize + currentOpSize > Constants.DefaultMaxBulkRequestBodySizeInBytes) { - currentBatch = Object.assign(Object.assign({}, originalBatch), { operations: [], indexes: [] }); - processedBatches.push(currentBatch); - currentBatchSize = 0; - } - currentBatch.operations.push(operation); - currentBatch.indexes.push(originalBatch.indexes[index]); - currentBatchSize += currentOpSize; - } - return processedBatches; -} -/** - * Calculates size of an JSON object in bytes with utf-8 encoding. - * @hidden - */ -function calculateObjectSizeInBytes(obj) { - return new TextEncoder().encode(bodyFromData(obj)).length; -} -function decorateBatchOperation(operation, options = {}) { - if (operation.operationType === BulkOperationType.Create || - operation.operationType === BulkOperationType.Upsert) { - if ((operation.resourceBody.id === undefined || operation.resourceBody.id === "") && - !options.disableAutomaticIdGeneration) { - operation.resourceBody.id = uuid$2(); - } - } - return operation; -} -/** - * Util function for finding partition key values nested in objects at slash (/) separated paths - * @hidden - */ -function deepFind(document, path) { - const apath = path.split("/"); - let h = document; - for (const p of apath) { - if (p in h) - h = h[p]; - else { - if (p !== "_partitionKey") { - console.warn(`Partition key not found, using undefined: ${path} at ${p}`); - } - return "{}"; - } - } - return h; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const PatchOperationType = { - add: "add", - replace: "replace", - remove: "remove", - set: "set", - incr: "incr", -}; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. */ -exports.ConnectionMode = void 0; -(function (ConnectionMode) { - /** Gateway mode talks to an intermediate gateway which handles the direct communication with your individual partitions. */ - ConnectionMode[ConnectionMode["Gateway"] = 0] = "Gateway"; -})(exports.ConnectionMode || (exports.ConnectionMode = {})); - -/** - * @hidden - */ -const defaultConnectionPolicy = Object.freeze({ - connectionMode: exports.ConnectionMode.Gateway, - requestTimeout: 60000, - enableEndpointDiscovery: true, - preferredLocations: [], - retryOptions: { - maxRetryAttemptCount: 9, - fixedRetryIntervalInMilliseconds: 0, - maxWaitTimeInSeconds: 30, - }, - useMultipleWriteLocations: true, - endpointRefreshRateInMs: 300000, - enableBackgroundEndpointRefreshing: true, -}); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Represents the consistency levels supported for Azure Cosmos DB client operations.
- * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. - * Consistency levels. - * - * Consistency levels by order of strength are Strong, BoundedStaleness, Session, Consistent Prefix, and Eventual. - * - * See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels. - */ -exports.ConsistencyLevel = void 0; -(function (ConsistencyLevel) { - /** - * Strong Consistency guarantees that read operations always return the value that was last written. - */ - ConsistencyLevel["Strong"] = "Strong"; - /** - * Bounded Staleness guarantees that reads are not too out-of-date. - * This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds). - */ - ConsistencyLevel["BoundedStaleness"] = "BoundedStaleness"; - /** - * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), - * monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) - * within any single session. - */ - ConsistencyLevel["Session"] = "Session"; - /** - * Eventual Consistency guarantees that reads will return a subset of writes. - * All writes will be eventually be available for reads. - */ - ConsistencyLevel["Eventual"] = "Eventual"; - /** - * ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. - * All writes will be eventually be available for reads. - */ - ConsistencyLevel["ConsistentPrefix"] = "ConsistentPrefix"; -})(exports.ConsistencyLevel || (exports.ConsistencyLevel = {})); - -// Copyright (c) Microsoft Corporation. -/** - * Represents a DatabaseAccount in the Azure Cosmos DB database service. - */ -class DatabaseAccount { - // TODO: body - any - constructor(body, headers) { - /** The list of writable locations for a geo-replicated database account. */ - this.writableLocations = []; - /** The list of readable locations for a geo-replicated database account. */ - this.readableLocations = []; - this.databasesLink = "/dbs/"; - this.mediaLink = "/media/"; - this.maxMediaStorageUsageInMB = headers[Constants.HttpHeaders.MaxMediaStorageUsageInMB]; - this.currentMediaStorageUsageInMB = headers[Constants.HttpHeaders.CurrentMediaStorageUsageInMB]; - this.consistencyPolicy = body.userConsistencyPolicy - ? body.userConsistencyPolicy.defaultConsistencyLevel - : exports.ConsistencyLevel.Session; - if (body[Constants.WritableLocations] && body.id !== "localhost") { - this.writableLocations = body[Constants.WritableLocations]; - } - if (body[Constants.ReadableLocations] && body.id !== "localhost") { - this.readableLocations = body[Constants.ReadableLocations]; - } - if (body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]) { - this.enableMultipleWritableLocations = - body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === true || - body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === "true"; - } - } - /** - * The self-link for Databases in the databaseAccount. - * @deprecated Use `databasesLink` - */ - get DatabasesLink() { - return this.databasesLink; - } - /** - * The self-link for Media in the databaseAccount. - * @deprecated Use `mediaLink` - */ - get MediaLink() { - return this.mediaLink; - } - /** - * Attachment content (media) storage quota in MBs ( Retrieved from gateway ). - * @deprecated use `maxMediaStorageUsageInMB` - */ - get MaxMediaStorageUsageInMB() { - return this.maxMediaStorageUsageInMB; - } - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - * - * @deprecated use `currentMediaStorageUsageInMB` - */ - get CurrentMediaStorageUsageInMB() { - return this.currentMediaStorageUsageInMB; - } - /** - * Gets the UserConsistencyPolicy settings. - * @deprecated use `consistencyPolicy` - */ - get ConsistencyPolicy() { - return this.consistencyPolicy; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** Defines a target data type of an index path specification in the Azure Cosmos DB service. */ -exports.DataType = void 0; -(function (DataType) { - /** Represents a numeric data type. */ - DataType["Number"] = "Number"; - /** Represents a string data type. */ - DataType["String"] = "String"; - /** Represents a point data type. */ - DataType["Point"] = "Point"; - /** Represents a line string data type. */ - DataType["LineString"] = "LineString"; - /** Represents a polygon data type. */ - DataType["Polygon"] = "Polygon"; - /** Represents a multi-polygon data type. */ - DataType["MultiPolygon"] = "MultiPolygon"; -})(exports.DataType || (exports.DataType = {})); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Specifies the supported indexing modes. - */ -exports.IndexingMode = void 0; -(function (IndexingMode) { - /** - * Index is updated synchronously with a create or update operation. - * - * With consistent indexing, query behavior is the same as the default consistency level for the container. - * The index is always kept up to date with the data. - */ - IndexingMode["consistent"] = "consistent"; - /** - * Index is updated asynchronously with respect to a create or update operation. - * - * With lazy indexing, queries are eventually consistent. The index is updated when the container is idle. - */ - IndexingMode["lazy"] = "lazy"; - /** No Index is provided. */ - IndexingMode["none"] = "none"; -})(exports.IndexingMode || (exports.IndexingMode = {})); - -/* The target data type of a spatial path */ -exports.SpatialType = void 0; -(function (SpatialType) { - SpatialType["LineString"] = "LineString"; - SpatialType["MultiPolygon"] = "MultiPolygon"; - SpatialType["Point"] = "Point"; - SpatialType["Polygon"] = "Polygon"; -})(exports.SpatialType || (exports.SpatialType = {})); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Specifies the supported Index types. - */ -exports.IndexKind = void 0; -(function (IndexKind) { - /** - * This is supplied for a path which requires sorting. - */ - IndexKind["Range"] = "Range"; - /** - * This is supplied for a path which requires geospatial indexing. - */ - IndexKind["Spatial"] = "Spatial"; -})(exports.IndexKind || (exports.IndexKind = {})); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for permission mode values. - */ -exports.PermissionMode = void 0; -(function (PermissionMode) { - /** Permission not valid. */ - PermissionMode["None"] = "none"; - /** Permission applicable for read operations only. */ - PermissionMode["Read"] = "read"; - /** Permission applicable for all operations. */ - PermissionMode["All"] = "all"; -})(exports.PermissionMode || (exports.PermissionMode = {})); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for trigger operation values. - * specifies the operations on which a trigger should be executed. - */ -exports.TriggerOperation = void 0; -(function (TriggerOperation) { - /** All operations. */ - TriggerOperation["All"] = "all"; - /** Create operations only. */ - TriggerOperation["Create"] = "create"; - /** Update operations only. */ - TriggerOperation["Update"] = "update"; - /** Delete operations only. */ - TriggerOperation["Delete"] = "delete"; - /** Replace operations only. */ - TriggerOperation["Replace"] = "replace"; -})(exports.TriggerOperation || (exports.TriggerOperation = {})); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for trigger type values. - * Specifies the type of the trigger. - */ -exports.TriggerType = void 0; -(function (TriggerType) { - /** Trigger should be executed before the associated operation(s). */ - TriggerType["Pre"] = "pre"; - /** Trigger should be executed after the associated operation(s). */ - TriggerType["Post"] = "post"; -})(exports.TriggerType || (exports.TriggerType = {})); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Enum for udf type values. - * Specifies the types of user defined functions. - */ -exports.UserDefinedFunctionType = void 0; -(function (UserDefinedFunctionType) { - /** The User Defined Function is written in JavaScript. This is currently the only option. */ - UserDefinedFunctionType["Javascript"] = "Javascript"; -})(exports.UserDefinedFunctionType || (exports.UserDefinedFunctionType = {})); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -exports.GeospatialType = void 0; -(function (GeospatialType) { - /** Represents data in round-earth coordinate system. */ - GeospatialType["Geography"] = "Geography"; - /** Represents data in Eucledian(flat) coordinate system. */ - GeospatialType["Geometry"] = "Geometry"; -})(exports.GeospatialType || (exports.GeospatialType = {})); - -class ErrorResponse extends Error { -} - -// Copyright (c) Microsoft Corporation. -class ResourceResponse { - constructor(resource, headers, statusCode, substatus) { - this.resource = resource; - this.headers = headers; - this.statusCode = statusCode; - this.substatus = substatus; - } - get requestCharge() { - return Number(this.headers[Constants.HttpHeaders.RequestCharge]) || 0; - } - get activityId() { - return this.headers[Constants.HttpHeaders.ActivityId]; - } - get etag() { - return this.headers[Constants.HttpHeaders.ETag]; - } -} - -// Copyright (c) Microsoft Corporation. -class FeedResponse { - constructor(resources, headers, hasMoreResults) { - this.resources = resources; - this.headers = headers; - this.hasMoreResults = hasMoreResults; - } - get continuation() { - return this.continuationToken; - } - get continuationToken() { - return this.headers[Constants.HttpHeaders.Continuation]; - } - get queryMetrics() { - return this.headers[Constants.HttpHeaders.QueryMetrics]; - } - get requestCharge() { - return this.headers[Constants.HttpHeaders.RequestCharge]; - } - get activityId() { - return this.headers[Constants.HttpHeaders.ActivityId]; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * @hidden - */ -const TimeoutErrorCode = "TimeoutError"; -class TimeoutError extends Error { - constructor(message = "Timeout Error") { - super(message); - this.code = TimeoutErrorCode; - this.name = TimeoutErrorCode; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -class ClientSideMetrics { - constructor(requestCharge) { - this.requestCharge = requestCharge; - } - /** - * Adds one or more ClientSideMetrics to a copy of this instance and returns the result. - */ - add(...clientSideMetricsArray) { - let requestCharge = this.requestCharge; - for (const clientSideMetrics of clientSideMetricsArray) { - if (clientSideMetrics == null) { - throw new Error("clientSideMetrics has null or undefined item(s)"); - } - requestCharge += clientSideMetrics.requestCharge; - } - return new ClientSideMetrics(requestCharge); - } - static createFromArray(...clientSideMetricsArray) { - if (clientSideMetricsArray == null) { - throw new Error("clientSideMetricsArray is null or undefined item(s)"); - } - return this.zero.add(...clientSideMetricsArray); - } -} -ClientSideMetrics.zero = new ClientSideMetrics(0); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -var QueryMetricsConstants = { - // QueryMetrics - RetrievedDocumentCount: "retrievedDocumentCount", - RetrievedDocumentSize: "retrievedDocumentSize", - OutputDocumentCount: "outputDocumentCount", - OutputDocumentSize: "outputDocumentSize", - IndexHitRatio: "indexUtilizationRatio", - IndexHitDocumentCount: "indexHitDocumentCount", - TotalQueryExecutionTimeInMs: "totalExecutionTimeInMs", - // QueryPreparationTimes - QueryCompileTimeInMs: "queryCompileTimeInMs", - LogicalPlanBuildTimeInMs: "queryLogicalPlanBuildTimeInMs", - PhysicalPlanBuildTimeInMs: "queryPhysicalPlanBuildTimeInMs", - QueryOptimizationTimeInMs: "queryOptimizationTimeInMs", - // QueryTimes - IndexLookupTimeInMs: "indexLookupTimeInMs", - DocumentLoadTimeInMs: "documentLoadTimeInMs", - VMExecutionTimeInMs: "VMExecutionTimeInMs", - DocumentWriteTimeInMs: "writeOutputTimeInMs", - // RuntimeExecutionTimes - QueryEngineTimes: "queryEngineTimes", - SystemFunctionExecuteTimeInMs: "systemFunctionExecuteTimeInMs", - UserDefinedFunctionExecutionTimeInMs: "userFunctionExecuteTimeInMs", - // QueryMetrics Text - RetrievedDocumentCountText: "Retrieved Document Count", - RetrievedDocumentSizeText: "Retrieved Document Size", - OutputDocumentCountText: "Output Document Count", - OutputDocumentSizeText: "Output Document Size", - IndexUtilizationText: "Index Utilization", - TotalQueryExecutionTimeText: "Total Query Execution Time", - // QueryPreparationTimes Text - QueryPreparationTimesText: "Query Preparation Times", - QueryCompileTimeText: "Query Compilation Time", - LogicalPlanBuildTimeText: "Logical Plan Build Time", - PhysicalPlanBuildTimeText: "Physical Plan Build Time", - QueryOptimizationTimeText: "Query Optimization Time", - // QueryTimes Text - QueryEngineTimesText: "Query Engine Times", - IndexLookupTimeText: "Index Lookup Time", - DocumentLoadTimeText: "Document Load Time", - WriteOutputTimeText: "Document Write Time", - // RuntimeExecutionTimes Text - RuntimeExecutionTimesText: "Runtime Execution Times", - TotalExecutionTimeText: "Query Engine Execution Time", - SystemFunctionExecuteTimeText: "System Function Execution Time", - UserDefinedFunctionExecutionTimeText: "User-defined Function Execution Time", - // ClientSideQueryMetrics Text - ClientSideQueryMetricsText: "Client Side Metrics", - RetriesText: "Retry Count", - RequestChargeText: "Request Charge", - FetchExecutionRangesText: "Partition Execution Timeline", - SchedulingMetricsText: "Scheduling Metrics", -}; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// Ported this implementation to javascript: -// https://referencesource.microsoft.com/#mscorlib/system/timespan.cs,83e476c1ae112117 -/** @hidden */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const ticksPerMillisecond = 10000; -/** @hidden */ -const millisecondsPerTick = 1.0 / ticksPerMillisecond; -/** @hidden */ -const ticksPerSecond = ticksPerMillisecond * 1000; // 10,000,000 -/** @hidden */ -const secondsPerTick = 1.0 / ticksPerSecond; // 0.0001 -/** @hidden */ -const ticksPerMinute = ticksPerSecond * 60; // 600,000,000 -/** @hidden */ -const minutesPerTick = 1.0 / ticksPerMinute; // 1.6666666666667e-9 -/** @hidden */ -const ticksPerHour = ticksPerMinute * 60; // 36,000,000,000 -/** @hidden */ -const hoursPerTick = 1.0 / ticksPerHour; // 2.77777777777777778e-11 -/** @hidden */ -const ticksPerDay = ticksPerHour * 24; // 864,000,000,000 -/** @hidden */ -const daysPerTick = 1.0 / ticksPerDay; // 1.1574074074074074074e-12 -/** @hidden */ -const millisPerSecond = 1000; -/** @hidden */ -const millisPerMinute = millisPerSecond * 60; // 60,000 -/** @hidden */ -const millisPerHour = millisPerMinute * 60; // 3,600,000 -/** @hidden */ -const millisPerDay = millisPerHour * 24; // 86,400,000 -/** @hidden */ -const maxMilliSeconds = Number.MAX_SAFE_INTEGER / ticksPerMillisecond; -/** @hidden */ -const minMilliSeconds = Number.MIN_SAFE_INTEGER / ticksPerMillisecond; -/** - * Represents a time interval. - * - * @param days - Number of days. - * @param hours - Number of hours. - * @param minutes - Number of minutes. - * @param seconds - Number of seconds. - * @param milliseconds - Number of milliseconds. - * @hidden - */ -class TimeSpan { - constructor(days, hours, minutes, seconds, milliseconds) { - // Constructor - if (!Number.isInteger(days)) { - throw new Error("days is not an integer"); - } - if (!Number.isInteger(hours)) { - throw new Error("hours is not an integer"); - } - if (!Number.isInteger(minutes)) { - throw new Error("minutes is not an integer"); - } - if (!Number.isInteger(seconds)) { - throw new Error("seconds is not an integer"); - } - if (!Number.isInteger(milliseconds)) { - throw new Error("milliseconds is not an integer"); - } - const totalMilliSeconds = (days * 3600 * 24 + hours * 3600 + minutes * 60 + seconds) * 1000 + milliseconds; - if (totalMilliSeconds > maxMilliSeconds || totalMilliSeconds < minMilliSeconds) { - throw new Error("Total number of milliseconds was either too large or too small"); - } - this._ticks = totalMilliSeconds * ticksPerMillisecond; - } - /** - * Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance. - * @param ts - The time interval to add. - */ - add(ts) { - if (TimeSpan.additionDoesOverflow(this._ticks, ts._ticks)) { - throw new Error("Adding the two timestamps causes an overflow."); - } - const results = this._ticks + ts._ticks; - return TimeSpan.fromTicks(results); - } - /** - * Returns a new TimeSpan object whose value is the difference of the specified TimeSpan object and this instance. - * @param ts - The time interval to subtract. - */ - subtract(ts) { - if (TimeSpan.subtractionDoesUnderflow(this._ticks, ts._ticks)) { - throw new Error("Subtracting the two timestamps causes an underflow."); - } - const results = this._ticks - ts._ticks; - return TimeSpan.fromTicks(results); - } - /** - * Compares this instance to a specified object and returns an integer that indicates whether this - * instance is shorter than, equal to, or longer than the specified object. - * @param value - The time interval to add. - */ - compareTo(value) { - if (value == null) { - return 1; - } - if (!TimeSpan.isTimeSpan(value)) { - throw new Error("Argument must be a TimeSpan object"); - } - return TimeSpan.compare(this, value); - } - /** - * Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object. - */ - duration() { - return TimeSpan.fromTicks(this._ticks >= 0 ? this._ticks : -this._ticks); - } - /** - * Returns a value indicating whether this instance is equal to a specified object. - * @param value - The time interval to check for equality. - */ - equals(value) { - if (TimeSpan.isTimeSpan(value)) { - return this._ticks === value._ticks; - } - return false; - } - /** - * Returns a new TimeSpan object whose value is the negated value of this instance. - * @param value - The time interval to check for equality. - */ - negate() { - return TimeSpan.fromTicks(-this._ticks); - } - days() { - return Math.floor(this._ticks / ticksPerDay); - } - hours() { - return Math.floor(this._ticks / ticksPerHour); - } - milliseconds() { - return Math.floor(this._ticks / ticksPerMillisecond); - } - seconds() { - return Math.floor(this._ticks / ticksPerSecond); - } - ticks() { - return this._ticks; - } - totalDays() { - return this._ticks * daysPerTick; - } - totalHours() { - return this._ticks * hoursPerTick; - } - totalMilliseconds() { - return this._ticks * millisecondsPerTick; - } - totalMinutes() { - return this._ticks * minutesPerTick; - } - totalSeconds() { - return this._ticks * secondsPerTick; - } - static fromTicks(value) { - const timeSpan = new TimeSpan(0, 0, 0, 0, 0); - timeSpan._ticks = value; - return timeSpan; - } - static isTimeSpan(timespan) { - return timespan._ticks; - } - static additionDoesOverflow(a, b) { - const c = a + b; - return a !== c - b || b !== c - a; - } - static subtractionDoesUnderflow(a, b) { - const c = a - b; - return a !== c + b || b !== a - c; - } - static compare(t1, t2) { - if (t1._ticks > t2._ticks) { - return 1; - } - if (t1._ticks < t2._ticks) { - return -1; - } - return 0; - } - static interval(value, scale) { - if (isNaN(value)) { - throw new Error("value must be a number"); - } - const milliseconds = value * scale; - if (milliseconds > maxMilliSeconds || milliseconds < minMilliSeconds) { - throw new Error("timespan too long"); - } - return TimeSpan.fromTicks(Math.floor(milliseconds * ticksPerMillisecond)); - } - static fromMilliseconds(value) { - return TimeSpan.interval(value, 1); - } - static fromSeconds(value) { - return TimeSpan.interval(value, millisPerSecond); - } - static fromMinutes(value) { - return TimeSpan.interval(value, millisPerMinute); - } - static fromHours(value) { - return TimeSpan.interval(value, millisPerHour); - } - static fromDays(value) { - return TimeSpan.interval(value, millisPerDay); - } -} -TimeSpan.zero = new TimeSpan(0, 0, 0, 0, 0); -TimeSpan.maxValue = TimeSpan.fromTicks(Number.MAX_SAFE_INTEGER); -TimeSpan.minValue = TimeSpan.fromTicks(Number.MIN_SAFE_INTEGER); - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - */ -function parseDelimitedString(delimitedString) { - if (delimitedString == null) { - throw new Error("delimitedString is null or undefined"); - } - const metrics = {}; - const headerAttributes = delimitedString.split(";"); - for (const attribute of headerAttributes) { - const attributeKeyValue = attribute.split("="); - if (attributeKeyValue.length !== 2) { - throw new Error("recieved a malformed delimited string"); - } - const attributeKey = attributeKeyValue[0]; - const attributeValue = parseFloat(attributeKeyValue[1]); - metrics[attributeKey] = attributeValue; - } - return metrics; -} -/** - * @hidden - */ -function timeSpanFromMetrics(metrics /* TODO: any */, key) { - if (key in metrics) { - return TimeSpan.fromMilliseconds(metrics[key]); - } - return TimeSpan.zero; -} - -// Copyright (c) Microsoft Corporation. -class QueryPreparationTimes { - constructor(queryCompilationTime, logicalPlanBuildTime, physicalPlanBuildTime, queryOptimizationTime) { - this.queryCompilationTime = queryCompilationTime; - this.logicalPlanBuildTime = logicalPlanBuildTime; - this.physicalPlanBuildTime = physicalPlanBuildTime; - this.queryOptimizationTime = queryOptimizationTime; - } - /** - * returns a new QueryPreparationTimes instance that is the addition of this and the arguments. - */ - add(...queryPreparationTimesArray) { - let queryCompilationTime = this.queryCompilationTime; - let logicalPlanBuildTime = this.logicalPlanBuildTime; - let physicalPlanBuildTime = this.physicalPlanBuildTime; - let queryOptimizationTime = this.queryOptimizationTime; - for (const queryPreparationTimes of queryPreparationTimesArray) { - if (queryPreparationTimes == null) { - throw new Error("queryPreparationTimesArray has null or undefined item(s)"); - } - queryCompilationTime = queryCompilationTime.add(queryPreparationTimes.queryCompilationTime); - logicalPlanBuildTime = logicalPlanBuildTime.add(queryPreparationTimes.logicalPlanBuildTime); - physicalPlanBuildTime = physicalPlanBuildTime.add(queryPreparationTimes.physicalPlanBuildTime); - queryOptimizationTime = queryOptimizationTime.add(queryPreparationTimes.queryOptimizationTime); - } - return new QueryPreparationTimes(queryCompilationTime, logicalPlanBuildTime, physicalPlanBuildTime, queryOptimizationTime); - } - /** - * Output the QueryPreparationTimes as a delimited string. - */ - toDelimitedString() { - return (`${QueryMetricsConstants.QueryCompileTimeInMs}=${this.queryCompilationTime.totalMilliseconds()};` + - `${QueryMetricsConstants.LogicalPlanBuildTimeInMs}=${this.logicalPlanBuildTime.totalMilliseconds()};` + - `${QueryMetricsConstants.PhysicalPlanBuildTimeInMs}=${this.physicalPlanBuildTime.totalMilliseconds()};` + - `${QueryMetricsConstants.QueryOptimizationTimeInMs}=${this.queryOptimizationTime.totalMilliseconds()}`); - } - /** - * Returns a new instance of the QueryPreparationTimes class that is the - * aggregation of an array of QueryPreparationTimes. - */ - static createFromArray(queryPreparationTimesArray) { - if (queryPreparationTimesArray == null) { - throw new Error("queryPreparationTimesArray is null or undefined item(s)"); - } - return QueryPreparationTimes.zero.add(...queryPreparationTimesArray); - } - /** - * Returns a new instance of the QueryPreparationTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString) { - const metrics = parseDelimitedString(delimitedString); - return new QueryPreparationTimes(timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryCompileTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.LogicalPlanBuildTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.PhysicalPlanBuildTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryOptimizationTimeInMs)); - } -} -QueryPreparationTimes.zero = new QueryPreparationTimes(TimeSpan.zero, TimeSpan.zero, TimeSpan.zero, TimeSpan.zero); - -// Copyright (c) Microsoft Corporation. -class RuntimeExecutionTimes { - constructor(queryEngineExecutionTime, systemFunctionExecutionTime, userDefinedFunctionExecutionTime) { - this.queryEngineExecutionTime = queryEngineExecutionTime; - this.systemFunctionExecutionTime = systemFunctionExecutionTime; - this.userDefinedFunctionExecutionTime = userDefinedFunctionExecutionTime; - } - /** - * returns a new RuntimeExecutionTimes instance that is the addition of this and the arguments. - */ - add(...runtimeExecutionTimesArray) { - let queryEngineExecutionTime = this.queryEngineExecutionTime; - let systemFunctionExecutionTime = this.systemFunctionExecutionTime; - let userDefinedFunctionExecutionTime = this.userDefinedFunctionExecutionTime; - for (const runtimeExecutionTimes of runtimeExecutionTimesArray) { - if (runtimeExecutionTimes == null) { - throw new Error("runtimeExecutionTimes has null or undefined item(s)"); - } - queryEngineExecutionTime = queryEngineExecutionTime.add(runtimeExecutionTimes.queryEngineExecutionTime); - systemFunctionExecutionTime = systemFunctionExecutionTime.add(runtimeExecutionTimes.systemFunctionExecutionTime); - userDefinedFunctionExecutionTime = userDefinedFunctionExecutionTime.add(runtimeExecutionTimes.userDefinedFunctionExecutionTime); - } - return new RuntimeExecutionTimes(queryEngineExecutionTime, systemFunctionExecutionTime, userDefinedFunctionExecutionTime); - } - /** - * Output the RuntimeExecutionTimes as a delimited string. - */ - toDelimitedString() { - return (`${QueryMetricsConstants.SystemFunctionExecuteTimeInMs}=${this.systemFunctionExecutionTime.totalMilliseconds()};` + - `${QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs}=${this.userDefinedFunctionExecutionTime.totalMilliseconds()}`); - } - /** - * Returns a new instance of the RuntimeExecutionTimes class that is - * the aggregation of an array of RuntimeExecutionTimes. - */ - static createFromArray(runtimeExecutionTimesArray) { - if (runtimeExecutionTimesArray == null) { - throw new Error("runtimeExecutionTimesArray is null or undefined item(s)"); - } - return RuntimeExecutionTimes.zero.add(...runtimeExecutionTimesArray); - } - /** - * Returns a new instance of the RuntimeExecutionTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString) { - const metrics = parseDelimitedString(delimitedString); - const vmExecutionTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs); - const indexLookupTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs); - const documentLoadTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentLoadTimeInMs); - const documentWriteTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentWriteTimeInMs); - let queryEngineExecutionTime = TimeSpan.zero; - queryEngineExecutionTime = queryEngineExecutionTime.add(vmExecutionTime); - queryEngineExecutionTime = queryEngineExecutionTime.subtract(indexLookupTime); - queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentLoadTime); - queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentWriteTime); - return new RuntimeExecutionTimes(queryEngineExecutionTime, timeSpanFromMetrics(metrics, QueryMetricsConstants.SystemFunctionExecuteTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs)); - } -} -RuntimeExecutionTimes.zero = new RuntimeExecutionTimes(TimeSpan.zero, TimeSpan.zero, TimeSpan.zero); - -// Copyright (c) Microsoft Corporation. -class QueryMetrics { - constructor(retrievedDocumentCount, retrievedDocumentSize, outputDocumentCount, outputDocumentSize, indexHitDocumentCount, totalQueryExecutionTime, queryPreparationTimes, indexLookupTime, documentLoadTime, vmExecutionTime, runtimeExecutionTimes, documentWriteTime, clientSideMetrics) { - this.retrievedDocumentCount = retrievedDocumentCount; - this.retrievedDocumentSize = retrievedDocumentSize; - this.outputDocumentCount = outputDocumentCount; - this.outputDocumentSize = outputDocumentSize; - this.indexHitDocumentCount = indexHitDocumentCount; - this.totalQueryExecutionTime = totalQueryExecutionTime; - this.queryPreparationTimes = queryPreparationTimes; - this.indexLookupTime = indexLookupTime; - this.documentLoadTime = documentLoadTime; - this.vmExecutionTime = vmExecutionTime; - this.runtimeExecutionTimes = runtimeExecutionTimes; - this.documentWriteTime = documentWriteTime; - this.clientSideMetrics = clientSideMetrics; - } - /** - * Gets the IndexHitRatio - * @hidden - */ - get indexHitRatio() { - return this.retrievedDocumentCount === 0 - ? 1 - : this.indexHitDocumentCount / this.retrievedDocumentCount; - } - /** - * returns a new QueryMetrics instance that is the addition of this and the arguments. - */ - add(queryMetricsArray) { - let retrievedDocumentCount = 0; - let retrievedDocumentSize = 0; - let outputDocumentCount = 0; - let outputDocumentSize = 0; - let indexHitDocumentCount = 0; - let totalQueryExecutionTime = TimeSpan.zero; - const queryPreparationTimesArray = []; - let indexLookupTime = TimeSpan.zero; - let documentLoadTime = TimeSpan.zero; - let vmExecutionTime = TimeSpan.zero; - const runtimeExecutionTimesArray = []; - let documentWriteTime = TimeSpan.zero; - const clientSideQueryMetricsArray = []; - queryMetricsArray.push(this); - for (const queryMetrics of queryMetricsArray) { - if (queryMetrics) { - retrievedDocumentCount += queryMetrics.retrievedDocumentCount; - retrievedDocumentSize += queryMetrics.retrievedDocumentSize; - outputDocumentCount += queryMetrics.outputDocumentCount; - outputDocumentSize += queryMetrics.outputDocumentSize; - indexHitDocumentCount += queryMetrics.indexHitDocumentCount; - totalQueryExecutionTime = totalQueryExecutionTime.add(queryMetrics.totalQueryExecutionTime); - queryPreparationTimesArray.push(queryMetrics.queryPreparationTimes); - indexLookupTime = indexLookupTime.add(queryMetrics.indexLookupTime); - documentLoadTime = documentLoadTime.add(queryMetrics.documentLoadTime); - vmExecutionTime = vmExecutionTime.add(queryMetrics.vmExecutionTime); - runtimeExecutionTimesArray.push(queryMetrics.runtimeExecutionTimes); - documentWriteTime = documentWriteTime.add(queryMetrics.documentWriteTime); - clientSideQueryMetricsArray.push(queryMetrics.clientSideMetrics); - } - } - return new QueryMetrics(retrievedDocumentCount, retrievedDocumentSize, outputDocumentCount, outputDocumentSize, indexHitDocumentCount, totalQueryExecutionTime, QueryPreparationTimes.createFromArray(queryPreparationTimesArray), indexLookupTime, documentLoadTime, vmExecutionTime, RuntimeExecutionTimes.createFromArray(runtimeExecutionTimesArray), documentWriteTime, ClientSideMetrics.createFromArray(...clientSideQueryMetricsArray)); - } - /** - * Output the QueryMetrics as a delimited string. - * @hidden - */ - toDelimitedString() { - return (QueryMetricsConstants.RetrievedDocumentCount + - "=" + - this.retrievedDocumentCount + - ";" + - QueryMetricsConstants.RetrievedDocumentSize + - "=" + - this.retrievedDocumentSize + - ";" + - QueryMetricsConstants.OutputDocumentCount + - "=" + - this.outputDocumentCount + - ";" + - QueryMetricsConstants.OutputDocumentSize + - "=" + - this.outputDocumentSize + - ";" + - QueryMetricsConstants.IndexHitRatio + - "=" + - this.indexHitRatio + - ";" + - QueryMetricsConstants.TotalQueryExecutionTimeInMs + - "=" + - this.totalQueryExecutionTime.totalMilliseconds() + - ";" + - this.queryPreparationTimes.toDelimitedString() + - ";" + - QueryMetricsConstants.IndexLookupTimeInMs + - "=" + - this.indexLookupTime.totalMilliseconds() + - ";" + - QueryMetricsConstants.DocumentLoadTimeInMs + - "=" + - this.documentLoadTime.totalMilliseconds() + - ";" + - QueryMetricsConstants.VMExecutionTimeInMs + - "=" + - this.vmExecutionTime.totalMilliseconds() + - ";" + - this.runtimeExecutionTimes.toDelimitedString() + - ";" + - QueryMetricsConstants.DocumentWriteTimeInMs + - "=" + - this.documentWriteTime.totalMilliseconds()); - } - /** - * Returns a new instance of the QueryMetrics class that is the aggregation of an array of query metrics. - */ - static createFromArray(queryMetricsArray) { - if (!queryMetricsArray) { - throw new Error("queryMetricsArray is null or undefined item(s)"); - } - return QueryMetrics.zero.add(queryMetricsArray); - } - /** - * Returns a new instance of the QueryMetrics class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString, clientSideMetrics) { - const metrics = parseDelimitedString(delimitedString); - const indexHitRatio = metrics[QueryMetricsConstants.IndexHitRatio] || 0; - const retrievedDocumentCount = metrics[QueryMetricsConstants.RetrievedDocumentCount] || 0; - const indexHitCount = indexHitRatio * retrievedDocumentCount; - const outputDocumentCount = metrics[QueryMetricsConstants.OutputDocumentCount] || 0; - const outputDocumentSize = metrics[QueryMetricsConstants.OutputDocumentSize] || 0; - const retrievedDocumentSize = metrics[QueryMetricsConstants.RetrievedDocumentSize] || 0; - const totalQueryExecutionTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.TotalQueryExecutionTimeInMs); - return new QueryMetrics(retrievedDocumentCount, retrievedDocumentSize, outputDocumentCount, outputDocumentSize, indexHitCount, totalQueryExecutionTime, QueryPreparationTimes.createFromDelimitedString(delimitedString), timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentLoadTimeInMs), timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs), RuntimeExecutionTimes.createFromDelimitedString(delimitedString), timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentWriteTimeInMs), clientSideMetrics || ClientSideMetrics.zero); - } -} -QueryMetrics.zero = new QueryMetrics(0, 0, 0, 0, 0, TimeSpan.zero, QueryPreparationTimes.zero, TimeSpan.zero, TimeSpan.zero, TimeSpan.zero, RuntimeExecutionTimes.zero, TimeSpan.zero, ClientSideMetrics.zero); - -// Copyright (c) Microsoft Corporation. -/** @hidden */ -// TODO: docs -function getRequestChargeIfAny(headers) { - if (typeof headers === "number") { - return headers; - } - else if (typeof headers === "string") { - return parseFloat(headers); - } - if (headers) { - const rc = headers[Constants.HttpHeaders.RequestCharge]; - if (rc) { - return parseFloat(rc); - } - else { - return 0; - } - } - else { - return 0; - } -} -/** - * @hidden - */ -function getInitialHeader() { - const headers = {}; - headers[Constants.HttpHeaders.RequestCharge] = 0; - headers[Constants.HttpHeaders.QueryMetrics] = {}; - return headers; -} -/** - * @hidden - */ -// TODO: The name of this method isn't very accurate to what it does -function mergeHeaders(headers, toBeMergedHeaders) { - if (headers[Constants.HttpHeaders.RequestCharge] === undefined) { - headers[Constants.HttpHeaders.RequestCharge] = 0; - } - if (headers[Constants.HttpHeaders.QueryMetrics] === undefined) { - headers[Constants.HttpHeaders.QueryMetrics] = QueryMetrics.zero; - } - if (!toBeMergedHeaders) { - return; - } - headers[Constants.HttpHeaders.RequestCharge] += getRequestChargeIfAny(toBeMergedHeaders); - if (toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed]) { - headers[Constants.HttpHeaders.IsRUPerMinuteUsed] = - toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed]; - } - if (Constants.HttpHeaders.QueryMetrics in toBeMergedHeaders) { - const headerQueryMetrics = headers[Constants.HttpHeaders.QueryMetrics]; - const toBeMergedHeaderQueryMetrics = toBeMergedHeaders[Constants.HttpHeaders.QueryMetrics]; - for (const partitionId in toBeMergedHeaderQueryMetrics) { - if (headerQueryMetrics[partitionId]) { - const combinedQueryMetrics = headerQueryMetrics[partitionId].add([ - toBeMergedHeaderQueryMetrics[partitionId], - ]); - headerQueryMetrics[partitionId] = combinedQueryMetrics; - } - else { - headerQueryMetrics[partitionId] = toBeMergedHeaderQueryMetrics[partitionId]; - } - } - } -} - -// Copyright (c) Microsoft Corporation. -const logger$3 = logger$4.createClientLogger("ClientContext"); -/** @hidden */ -var STATES; -(function (STATES) { - STATES["start"] = "start"; - STATES["inProgress"] = "inProgress"; - STATES["ended"] = "ended"; -})(STATES || (STATES = {})); -/** @hidden */ -class DefaultQueryExecutionContext { - /** - * Provides the basic Query Execution Context. - * This wraps the internal logic query execution using provided fetch functions - * - * @param clientContext - Is used to read the partitionKeyRanges for split proofing - * @param query - A SQL query. - * @param options - Represents the feed options. - * @param fetchFunctions - A function to retrieve each page of data. - * An array of functions may be used to query more than one partition. - * @hidden - */ - constructor(options, fetchFunctions) { - this.resources = []; - this.currentIndex = 0; - this.currentPartitionIndex = 0; - this.fetchFunctions = Array.isArray(fetchFunctions) ? fetchFunctions : [fetchFunctions]; - this.options = options || {}; - this.continuationToken = this.options.continuationToken || this.options.continuation || null; - this.state = DefaultQueryExecutionContext.STATES.start; - } - get continuation() { - return this.continuationToken; - } - /** - * Execute a provided callback on the next element in the execution context. - */ - async nextItem() { - ++this.currentIndex; - const response = await this.current(); - return response; - } - /** - * Retrieve the current element on the execution context. - */ - async current() { - if (this.currentIndex < this.resources.length) { - return { - result: this.resources[this.currentIndex], - headers: getInitialHeader(), - }; - } - if (this._canFetchMore()) { - const { result: resources, headers } = await this.fetchMore(); - this.resources = resources; - if (this.resources.length === 0) { - if (!this.continuationToken && this.currentPartitionIndex >= this.fetchFunctions.length) { - this.state = DefaultQueryExecutionContext.STATES.ended; - return { result: undefined, headers }; - } - else { - return this.current(); - } - } - return { result: this.resources[this.currentIndex], headers }; - } - else { - this.state = DefaultQueryExecutionContext.STATES.ended; - return { result: undefined, headers: getInitialHeader() }; - } - } - /** - * Determine if there are still remaining resources to processs based on - * the value of the continuation token or the elements remaining on the current batch in the execution context. - * - * @returns true if there is other elements to process in the DefaultQueryExecutionContext. - */ - hasMoreResults() { - return (this.state === DefaultQueryExecutionContext.STATES.start || - this.continuationToken !== undefined || - this.currentIndex < this.resources.length - 1 || - this.currentPartitionIndex < this.fetchFunctions.length); - } - /** - * Fetches the next batch of the feed and pass them as an array to a callback - */ - async fetchMore() { - if (this.currentPartitionIndex >= this.fetchFunctions.length) { - return { headers: getInitialHeader(), result: undefined }; - } - // Keep to the original continuation and to restore the value after fetchFunction call - const originalContinuation = this.options.continuationToken || this.options.continuation; - this.options.continuationToken = this.continuationToken; - // Return undefined if there is no more results - if (this.currentPartitionIndex >= this.fetchFunctions.length) { - return { headers: getInitialHeader(), result: undefined }; - } - let resources; - let responseHeaders; - try { - let p; - if (this.nextFetchFunction !== undefined) { - logger$3.verbose("using prefetch"); - p = this.nextFetchFunction; - this.nextFetchFunction = undefined; - } - else { - logger$3.verbose("using fresh fetch"); - p = this.fetchFunctions[this.currentPartitionIndex](this.options); - } - const response = await p; - resources = response.result; - responseHeaders = response.headers; - this.continuationToken = responseHeaders[Constants.HttpHeaders.Continuation]; - if (!this.continuationToken) { - ++this.currentPartitionIndex; - } - if (this.options && this.options.bufferItems === true) { - const fetchFunction = this.fetchFunctions[this.currentPartitionIndex]; - this.nextFetchFunction = fetchFunction - ? fetchFunction(Object.assign(Object.assign({}, this.options), { continuationToken: this.continuationToken })) - : undefined; - } - } - catch (err) { - this.state = DefaultQueryExecutionContext.STATES.ended; - // return callback(err, undefined, responseHeaders); - // TODO: Error and data being returned is an antipattern, this might broken - throw err; - } - this.state = DefaultQueryExecutionContext.STATES.inProgress; - this.currentIndex = 0; - this.options.continuationToken = originalContinuation; - this.options.continuation = originalContinuation; - // deserializing query metrics so that we aren't working with delimited strings in the rest of the code base - if (Constants.HttpHeaders.QueryMetrics in responseHeaders) { - const delimitedString = responseHeaders[Constants.HttpHeaders.QueryMetrics]; - let queryMetrics = QueryMetrics.createFromDelimitedString(delimitedString); - // Add the request charge to the query metrics so that we can have per partition request charge. - if (Constants.HttpHeaders.RequestCharge in responseHeaders) { - const requestCharge = Number(responseHeaders[Constants.HttpHeaders.RequestCharge]) || 0; - queryMetrics = new QueryMetrics(queryMetrics.retrievedDocumentCount, queryMetrics.retrievedDocumentSize, queryMetrics.outputDocumentCount, queryMetrics.outputDocumentSize, queryMetrics.indexHitDocumentCount, queryMetrics.totalQueryExecutionTime, queryMetrics.queryPreparationTimes, queryMetrics.indexLookupTime, queryMetrics.documentLoadTime, queryMetrics.vmExecutionTime, queryMetrics.runtimeExecutionTimes, queryMetrics.documentWriteTime, new ClientSideMetrics(requestCharge)); - } - // Wraping query metrics in a object where the key is '0' just so single partition - // and partition queries have the same response schema - responseHeaders[Constants.HttpHeaders.QueryMetrics] = {}; - responseHeaders[Constants.HttpHeaders.QueryMetrics]["0"] = queryMetrics; - } - return { result: resources, headers: responseHeaders }; - } - _canFetchMore() { - const res = this.state === DefaultQueryExecutionContext.STATES.start || - (this.continuationToken && this.state === DefaultQueryExecutionContext.STATES.inProgress) || - (this.currentPartitionIndex < this.fetchFunctions.length && - this.state === DefaultQueryExecutionContext.STATES.inProgress); - return res; - } -} -DefaultQueryExecutionContext.STATES = STATES; - -/** @hidden */ -class AverageAggregator { - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (other == null || other.sum == null) { - return; - } - if (this.sum == null) { - this.sum = 0.0; - this.count = 0; - } - this.sum += other.sum; - this.count += other.count; - } - /** - * Get the aggregation result. - */ - getResult() { - if (this.sum == null || this.count <= 0) { - return undefined; - } - return this.sum / this.count; - } -} - -/** @hidden */ -class CountAggregator { - /** - * Represents an aggregator for COUNT operator. - * @hidden - */ - constructor() { - this.value = 0; - } - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - this.value += other; - } - /** - * Get the aggregation result. - */ - getResult() { - return this.value; - } -} - -// TODO: this smells funny -/** @hidden */ -const TYPEORDCOMPARATOR = Object.freeze({ - NoValue: { - ord: 0, - }, - undefined: { - ord: 1, - }, - boolean: { - ord: 2, - compFunc: (a, b) => { - return a === b ? 0 : a > b ? 1 : -1; - }, - }, - number: { - ord: 4, - compFunc: (a, b) => { - return a === b ? 0 : a > b ? 1 : -1; - }, - }, - string: { - ord: 5, - compFunc: (a, b) => { - return a === b ? 0 : a > b ? 1 : -1; - }, - }, -}); -/** @hidden */ -class OrderByDocumentProducerComparator { - constructor(sortOrder) { - this.sortOrder = sortOrder; - } // TODO: This should be an enum - targetPartitionKeyRangeDocProdComparator(docProd1, docProd2) { - const a = docProd1.getTargetParitionKeyRange()["minInclusive"]; - const b = docProd2.getTargetParitionKeyRange()["minInclusive"]; - return a === b ? 0 : a > b ? 1 : -1; - } - compare(docProd1, docProd2) { - // Need to check for split, since we don't want to dereference "item" of undefined / exception - if (docProd1.gotSplit()) { - return -1; - } - if (docProd2.gotSplit()) { - return 1; - } - const orderByItemsRes1 = this.getOrderByItems(docProd1.peekBufferedItems()[0]); - const orderByItemsRes2 = this.getOrderByItems(docProd2.peekBufferedItems()[0]); - // validate order by items and types - // TODO: once V1 order by on different types is fixed this need to change - this.validateOrderByItems(orderByItemsRes1, orderByItemsRes2); - // no async call in the for loop - for (let i = 0; i < orderByItemsRes1.length; i++) { - // compares the orderby items one by one - const compRes = this.compareOrderByItem(orderByItemsRes1[i], orderByItemsRes2[i]); - if (compRes !== 0) { - if (this.sortOrder[i] === "Ascending") { - return compRes; - } - else if (this.sortOrder[i] === "Descending") { - return -compRes; - } - } - } - return this.targetPartitionKeyRangeDocProdComparator(docProd1, docProd2); - } - // TODO: This smells funny - compareValue(item1, type1, item2, type2) { - if (type1 === "object" || type2 === "object") { - throw new Error("Tried to compare an object type"); - } - const type1Ord = TYPEORDCOMPARATOR[type1].ord; - const type2Ord = TYPEORDCOMPARATOR[type2].ord; - const typeCmp = type1Ord - type2Ord; - if (typeCmp !== 0) { - // if the types are different, use type ordinal - return typeCmp; - } - // both are of the same type - if (type1Ord === TYPEORDCOMPARATOR["undefined"].ord || - type1Ord === TYPEORDCOMPARATOR["NoValue"].ord) { - // if both types are undefined or Null they are equal - return 0; - } - const compFunc = TYPEORDCOMPARATOR[type1].compFunc; - if (typeof compFunc === "undefined") { - throw new Error("Cannot find the comparison function"); - } - // same type and type is defined compare the items - return compFunc(item1, item2); - } - compareOrderByItem(orderByItem1, orderByItem2) { - const type1 = this.getType(orderByItem1); - const type2 = this.getType(orderByItem2); - return this.compareValue(orderByItem1["item"], type1, orderByItem2["item"], type2); - } - validateOrderByItems(res1, res2) { - if (res1.length !== res2.length) { - throw new Error(`Expected ${res1.length}, but got ${res2.length}.`); - } - if (res1.length !== this.sortOrder.length) { - throw new Error("orderByItems cannot have a different size than sort orders."); - } - for (let i = 0; i < this.sortOrder.length; i++) { - const type1 = this.getType(res1[i]); - const type2 = this.getType(res2[i]); - if (type1 !== type2) { - throw new Error(`Expected ${type1}, but got ${type2}. Cannot execute cross partition order-by queries on mixed types. Consider filtering your query using IS_STRING or IS_NUMBER to get around this exception.`); - } - } - } - getType(orderByItem) { - // TODO: any item? - if (orderByItem === undefined || orderByItem.item === undefined) { - return "NoValue"; - } - const type = typeof orderByItem.item; - if (TYPEORDCOMPARATOR[type] === undefined) { - throw new Error(`unrecognizable type ${type}`); - } - return type; - } - getOrderByItems(res) { - // TODO: any res? - return res["orderByItems"]; - } -} - -// Copyright (c) Microsoft Corporation. -/** @hidden */ -class MaxAggregator { - /** - * Represents an aggregator for MAX operator. - * @hidden - */ - constructor() { - this.value = undefined; - this.comparer = new OrderByDocumentProducerComparator(["Ascending"]); - } - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (this.value === undefined) { - this.value = other.max; - } - else if (this.comparer.compareValue(other.max, typeof other.max, this.value, typeof this.value) > 0) { - this.value = other.max; - } - } - /** - * Get the aggregation result. - */ - getResult() { - return this.value; - } -} - -// Copyright (c) Microsoft Corporation. -/** @hidden */ -class MinAggregator { - /** - * Represents an aggregator for MIN operator. - * @hidden - */ - constructor() { - this.value = undefined; - this.comparer = new OrderByDocumentProducerComparator(["Ascending"]); - } - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (this.value === undefined) { - // || typeof this.value === "object" - this.value = other.min; - } - else { - const otherType = other.min === null ? "NoValue" : typeof other.min; // || typeof other === "object" - const thisType = this.value === null ? "NoValue" : typeof this.value; - if (this.comparer.compareValue(other.min, otherType, this.value, thisType) < 0) { - this.value = other.min; - } - } - } - /** - * Get the aggregation result. - */ - getResult() { - return this.value; - } -} - -/** @hidden */ -class SumAggregator { - /** - * Add the provided item to aggregation result. - */ - aggregate(other) { - if (other === undefined) { - return; - } - if (this.sum === undefined) { - this.sum = other; - } - else { - this.sum += other; - } - } - /** - * Get the aggregation result. - */ - getResult() { - return this.sum; - } -} - -/** @hidden */ -class StaticValueAggregator { - aggregate(other) { - if (this.value === undefined) { - this.value = other; - } - } - getResult() { - return this.value; - } -} - -// Copyright (c) Microsoft Corporation. -function createAggregator(aggregateType) { - switch (aggregateType) { - case "Average": - return new AverageAggregator(); - case "Count": - return new CountAggregator(); - case "Max": - return new MaxAggregator(); - case "Min": - return new MinAggregator(); - case "Sum": - return new SumAggregator(); - default: - return new StaticValueAggregator(); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** @hidden */ -var FetchResultType; -(function (FetchResultType) { - FetchResultType[FetchResultType["Done"] = 0] = "Done"; - FetchResultType[FetchResultType["Exception"] = 1] = "Exception"; - FetchResultType[FetchResultType["Result"] = 2] = "Result"; -})(FetchResultType || (FetchResultType = {})); -/** @hidden */ -class FetchResult { - /** - * Wraps fetch results for the document producer. - * This allows the document producer to buffer exceptions so that actual results don't get flushed during splits. - * - * @param feedReponse - The response the document producer got back on a successful fetch - * @param error - The exception meant to be buffered on an unsuccessful fetch - * @hidden - */ - constructor(feedResponse, error) { - // TODO: feedResponse/error - if (feedResponse !== undefined) { - this.feedResponse = feedResponse; - this.fetchResultType = FetchResultType.Result; - } - else { - this.error = error; - this.fetchResultType = FetchResultType.Exception; - } - } -} - -/** @hidden */ -class DocumentProducer { - /** - * Provides the Target Partition Range Query Execution Context. - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - Represents collection link - * @param query - A SQL query. - * @param targetPartitionKeyRange - Query Target Partition key Range - * @hidden - */ - constructor(clientContext, collectionLink, query, targetPartitionKeyRange, options) { - this.clientContext = clientContext; - this.generation = 0; - this.fetchFunction = async (options) => { - const path = getPathFromLink(this.collectionLink, exports.ResourceType.item); - const id = getIdFromLink(this.collectionLink); - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.item, - resourceId: id, - resultFn: (result) => result.Documents, - query: this.query, - options, - partitionKeyRangeId: this.targetPartitionKeyRange["id"], - }); - }; - // TODO: any options - this.collectionLink = collectionLink; - this.query = query; - this.targetPartitionKeyRange = targetPartitionKeyRange; - this.fetchResults = []; - this.allFetched = false; - this.err = undefined; - this.previousContinuationToken = undefined; - this.continuationToken = undefined; - this.respHeaders = getInitialHeader(); - this.internalExecutionContext = new DefaultQueryExecutionContext(options, this.fetchFunction); - } - /** - * Synchronously gives the contiguous buffered results (stops at the first non result) if any - * @returns buffered current items if any - * @hidden - */ - peekBufferedItems() { - const bufferedResults = []; - for (let i = 0, done = false; i < this.fetchResults.length && !done; i++) { - const fetchResult = this.fetchResults[i]; - switch (fetchResult.fetchResultType) { - case FetchResultType.Done: - done = true; - break; - case FetchResultType.Exception: - done = true; - break; - case FetchResultType.Result: - bufferedResults.push(fetchResult.feedResponse); - break; - } - } - return bufferedResults; - } - hasMoreResults() { - return this.internalExecutionContext.hasMoreResults() || this.fetchResults.length !== 0; - } - gotSplit() { - const fetchResult = this.fetchResults[0]; - if (fetchResult.fetchResultType === FetchResultType.Exception) { - if (DocumentProducer._needPartitionKeyRangeCacheRefresh(fetchResult.error)) { - return true; - } - } - return false; - } - _getAndResetActiveResponseHeaders() { - const ret = this.respHeaders; - this.respHeaders = getInitialHeader(); - return ret; - } - _updateStates(err, allFetched) { - // TODO: any Error - if (err) { - this.err = err; - return; - } - if (allFetched) { - this.allFetched = true; - } - if (this.internalExecutionContext.continuationToken === this.continuationToken) { - // nothing changed - return; - } - this.previousContinuationToken = this.continuationToken; - this.continuationToken = this.internalExecutionContext.continuationToken; - } - static _needPartitionKeyRangeCacheRefresh(error) { - // TODO: error - return (error.code === StatusCodes.Gone && - "substatus" in error && - error["substatus"] === SubStatusCodes.PartitionKeyRangeGone); - } - /** - * Fetches and bufferes the next page of results and executes the given callback - */ - async bufferMore() { - if (this.err) { - throw this.err; - } - try { - const { result: resources, headers: headerResponse } = await this.internalExecutionContext.fetchMore(); - ++this.generation; - this._updateStates(undefined, resources === undefined); - if (resources !== undefined) { - // some more results - resources.forEach((element) => { - // TODO: resources any - this.fetchResults.push(new FetchResult(element, undefined)); - }); - } - // need to modify the header response so that the query metrics are per partition - if (headerResponse != null && Constants.HttpHeaders.QueryMetrics in headerResponse) { - // "0" is the default partition before one is actually assigned. - const queryMetrics = headerResponse[Constants.HttpHeaders.QueryMetrics]["0"]; - // Wraping query metrics in a object where the keys are the partition key range. - headerResponse[Constants.HttpHeaders.QueryMetrics] = {}; - headerResponse[Constants.HttpHeaders.QueryMetrics][this.targetPartitionKeyRange.id] = - queryMetrics; - } - return { result: resources, headers: headerResponse }; - } - catch (err) { - // TODO: any error - if (DocumentProducer._needPartitionKeyRangeCacheRefresh(err)) { - // Split just happend - // Buffer the error so the execution context can still get the feedResponses in the itemBuffer - const bufferedError = new FetchResult(undefined, err); - this.fetchResults.push(bufferedError); - // Putting a dummy result so that the rest of code flows - return { result: [bufferedError], headers: err.headers }; - } - else { - this._updateStates(err, err.resources === undefined); - throw err; - } - } - } - /** - * Synchronously gives the bufferend current item if any - * @returns buffered current item if any - * @hidden - */ - getTargetParitionKeyRange() { - return this.targetPartitionKeyRange; - } - /** - * Fetches the next element in the DocumentProducer. - */ - async nextItem() { - if (this.err) { - this._updateStates(this.err, undefined); - throw this.err; - } - try { - const { result, headers } = await this.current(); - const fetchResult = this.fetchResults.shift(); - this._updateStates(undefined, result === undefined); - if (fetchResult.feedResponse !== result) { - throw new Error(`Expected ${fetchResult.feedResponse} to equal ${result}`); - } - switch (fetchResult.fetchResultType) { - case FetchResultType.Done: - return { result: undefined, headers }; - case FetchResultType.Exception: - fetchResult.error.headers = headers; - throw fetchResult.error; - case FetchResultType.Result: - return { result: fetchResult.feedResponse, headers }; - } - } - catch (err) { - this._updateStates(err, err.item === undefined); - throw err; - } - } - /** - * Retrieve the current element on the DocumentProducer. - */ - async current() { - // If something is buffered just give that - if (this.fetchResults.length > 0) { - const fetchResult = this.fetchResults[0]; - // Need to unwrap fetch results - switch (fetchResult.fetchResultType) { - case FetchResultType.Done: - return { - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }; - case FetchResultType.Exception: - fetchResult.error.headers = this._getAndResetActiveResponseHeaders(); - throw fetchResult.error; - case FetchResultType.Result: - return { - result: fetchResult.feedResponse, - headers: this._getAndResetActiveResponseHeaders(), - }; - } - } - // If there isn't anymore items left to fetch then let the user know. - if (this.allFetched) { - return { - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }; - } - // If there are no more bufferd items and there are still items to be fetched then buffer more - const { result, headers } = await this.bufferMore(); - mergeHeaders(this.respHeaders, headers); - if (result === undefined) { - return { result: undefined, headers: this.respHeaders }; - } - return this.current(); - } -} - -/** @hidden */ -class QueryRange { - /** - * Represents a QueryRange. - * - * @param rangeMin - min - * @param rangeMin - max - * @param isMinInclusive - isMinInclusive - * @param isMaxInclusive - isMaxInclusive - * @hidden - */ - constructor(rangeMin, rangeMax, isMinInclusive, isMaxInclusive) { - this.min = rangeMin; - this.max = rangeMax; - this.isMinInclusive = isMinInclusive; - this.isMaxInclusive = isMaxInclusive; - } - overlaps(other) { - const range1 = this; // eslint-disable-line @typescript-eslint/no-this-alias - const range2 = other; - if (range1 === undefined || range2 === undefined) { - return false; - } - if (range1.isEmpty() || range2.isEmpty()) { - return false; - } - if (range1.min <= range2.max || range2.min <= range1.max) { - if ((range1.min === range2.max && !(range1.isMinInclusive && range2.isMaxInclusive)) || - (range2.min === range1.max && !(range2.isMinInclusive && range1.isMaxInclusive))) { - return false; - } - return true; - } - return false; - } - isFullRange() { - return (this.min === Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey && - this.max === Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey && - this.isMinInclusive === true && - this.isMaxInclusive === false); - } - isEmpty() { - return !(this.isMinInclusive && this.isMaxInclusive) && this.min === this.max; - } - /** - * Parse a QueryRange from a partitionKeyRange - * @returns QueryRange - * @hidden - */ - static parsePartitionKeyRange(partitionKeyRange) { - return new QueryRange(partitionKeyRange[Constants.PartitionKeyRange.MinInclusive], partitionKeyRange[Constants.PartitionKeyRange.MaxExclusive], true, false); - } - /** - * Parse a QueryRange from a dictionary - * @returns QueryRange - * @hidden - */ - static parseFromDict(queryRangeDict) { - return new QueryRange(queryRangeDict.min, queryRangeDict.max, queryRangeDict.isMinInclusive, queryRangeDict.isMaxInclusive); - } -} - -/** @hidden */ -class InMemoryCollectionRoutingMap { - /** - * Represents a InMemoryCollectionRoutingMap Object, - * Stores partition key ranges in an efficient way with some additional information and provides - * convenience methods for working with set of ranges. - */ - constructor(orderedPartitionKeyRanges, orderedPartitionInfo) { - this.orderedPartitionKeyRanges = orderedPartitionKeyRanges; - this.orderedRanges = orderedPartitionKeyRanges.map((pkr) => { - return new QueryRange(pkr[Constants.PartitionKeyRange.MinInclusive], pkr[Constants.PartitionKeyRange.MaxExclusive], true, false); - }); - this.orderedPartitionInfo = orderedPartitionInfo; - } - getOrderedParitionKeyRanges() { - return this.orderedPartitionKeyRanges; - } - getOverlappingRanges(providedQueryRanges) { - // TODO This code has all kinds of smells. Multiple iterations and sorts just to grab overlapping ranges - // stfaul attempted to bring it down to one for-loop and failed - const pqr = Array.isArray(providedQueryRanges) - ? providedQueryRanges - : [providedQueryRanges]; - const minToPartitionRange = {}; // TODO: any - // this for loop doesn't invoke any async callback - for (const queryRange of pqr) { - if (queryRange.isEmpty()) { - continue; - } - if (queryRange.isFullRange()) { - return this.orderedPartitionKeyRanges; - } - const minIndex = this.orderedRanges.findIndex((range) => { - if (queryRange.min > range.min && queryRange.min < range.max) { - return true; - } - if (queryRange.min === range.min) { - return true; - } - if (queryRange.min === range.max) { - return true; - } - }); - if (minIndex < 0) { - throw new Error("error in collection routing map, queried value is less than the start range."); - } - // Start at the end and work backwards - let maxIndex; - for (let i = this.orderedRanges.length - 1; i >= 0; i--) { - const range = this.orderedRanges[i]; - if (queryRange.max > range.min && queryRange.max < range.max) { - maxIndex = i; - break; - } - if (queryRange.max === range.min) { - maxIndex = i; - break; - } - if (queryRange.max === range.max) { - maxIndex = i; - break; - } - } - if (maxIndex > this.orderedRanges.length) { - throw new Error("error in collection routing map, queried value is greater than the end range."); - } - for (let j = minIndex; j < maxIndex + 1; j++) { - if (queryRange.overlaps(this.orderedRanges[j])) { - minToPartitionRange[this.orderedPartitionKeyRanges[j][Constants.PartitionKeyRange.MinInclusive]] = this.orderedPartitionKeyRanges[j]; - } - } - } - const overlappingPartitionKeyRanges = Object.keys(minToPartitionRange).map((k) => minToPartitionRange[k]); - return overlappingPartitionKeyRanges.sort((a, b) => { - return a[Constants.PartitionKeyRange.MinInclusive].localeCompare(b[Constants.PartitionKeyRange.MinInclusive]); - }); - } -} - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - */ -function compareRanges(a, b) { - const aVal = a[0][Constants.PartitionKeyRange.MinInclusive]; - const bVal = b[0][Constants.PartitionKeyRange.MinInclusive]; - if (aVal > bVal) { - return 1; - } - if (aVal < bVal) { - return -1; - } - return 0; -} -/** @hidden */ -function createCompleteRoutingMap(partitionKeyRangeInfoTuppleList) { - const rangeById = {}; // TODO: any - const rangeByInfo = {}; // TODO: any - let sortedRanges = []; - // the for loop doesn't invoke any async callback - for (const r of partitionKeyRangeInfoTuppleList) { - rangeById[r[0][Constants.PartitionKeyRange.Id]] = r; - rangeByInfo[r[1]] = r[0]; - sortedRanges.push(r); - } - sortedRanges = sortedRanges.sort(compareRanges); - const partitionKeyOrderedRange = sortedRanges.map((r) => r[0]); - const orderedPartitionInfo = sortedRanges.map((r) => r[1]); - if (!isCompleteSetOfRange(partitionKeyOrderedRange)) { - return undefined; - } - return new InMemoryCollectionRoutingMap(partitionKeyOrderedRange, orderedPartitionInfo); -} -/** - * @hidden - */ -function isCompleteSetOfRange(partitionKeyOrderedRange) { - // TODO: any - let isComplete = false; - if (partitionKeyOrderedRange.length > 0) { - const firstRange = partitionKeyOrderedRange[0]; - const lastRange = partitionKeyOrderedRange[partitionKeyOrderedRange.length - 1]; - isComplete = - firstRange[Constants.PartitionKeyRange.MinInclusive] === - Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey; - isComplete = - isComplete && - lastRange[Constants.PartitionKeyRange.MaxExclusive] === - Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey; - for (let i = 1; i < partitionKeyOrderedRange.length; i++) { - const previousRange = partitionKeyOrderedRange[i - 1]; - const currentRange = partitionKeyOrderedRange[i]; - isComplete = - isComplete && - previousRange[Constants.PartitionKeyRange.MaxExclusive] === - currentRange[Constants.PartitionKeyRange.MinInclusive]; - if (!isComplete) { - if (previousRange[Constants.PartitionKeyRange.MaxExclusive] > - currentRange[Constants.PartitionKeyRange.MinInclusive]) { - throw Error("Ranges overlap"); - } - break; - } - } - } - return isComplete; -} - -/** @hidden */ -class PartitionKeyRangeCache { - constructor(clientContext) { - this.clientContext = clientContext; - this.collectionRoutingMapByCollectionId = {}; - } - /** - * Finds or Instantiates the requested Collection Routing Map - * @param collectionLink - Requested collectionLink - * @hidden - */ - async onCollectionRoutingMap(collectionLink) { - const collectionId = getIdFromLink(collectionLink); - if (this.collectionRoutingMapByCollectionId[collectionId] === undefined) { - this.collectionRoutingMapByCollectionId[collectionId] = - this.requestCollectionRoutingMap(collectionLink); - } - return this.collectionRoutingMapByCollectionId[collectionId]; - } - /** - * Given the query ranges and a collection, invokes the callback on the list of overlapping partition key ranges - * @hidden - */ - async getOverlappingRanges(collectionLink, queryRange) { - const crm = await this.onCollectionRoutingMap(collectionLink); - return crm.getOverlappingRanges(queryRange); - } - async requestCollectionRoutingMap(collectionLink) { - const { resources } = await this.clientContext - .queryPartitionKeyRanges(collectionLink) - .fetchAll(); - return createCompleteRoutingMap(resources.map((r) => [r, true])); - } -} - -/** @hidden */ -const PARITIONKEYRANGE = Constants.PartitionKeyRange; -/** @hidden */ -class SmartRoutingMapProvider { - constructor(clientContext) { - this.partitionKeyRangeCache = new PartitionKeyRangeCache(clientContext); - } - static _secondRangeIsAfterFirstRange(range1, range2) { - if (typeof range1.max === "undefined") { - throw new Error("range1 must have max"); - } - if (typeof range2.min === "undefined") { - throw new Error("range2 must have min"); - } - if (range1.max > range2.min) { - // r.min < #previous_r.max - return false; - } - else { - if (range1.max === range2.min && range1.isMaxInclusive && range2.isMinInclusive) { - // the inclusive ending endpoint of previous_r is the same as the inclusive beginning endpoint of r - // they share a point - return false; - } - return true; - } - } - static _isSortedAndNonOverlapping(ranges) { - for (let idx = 1; idx < ranges.length; idx++) { - const previousR = ranges[idx - 1]; - const r = ranges[idx]; - if (!this._secondRangeIsAfterFirstRange(previousR, r)) { - return false; - } - } - return true; - } - static _stringMax(a, b) { - return a >= b ? a : b; - } - static _stringCompare(a, b) { - return a === b ? 0 : a > b ? 1 : -1; - } - static _subtractRange(r, partitionKeyRange) { - const left = this._stringMax(partitionKeyRange[PARITIONKEYRANGE.MaxExclusive], r.min); - const leftInclusive = this._stringCompare(left, r.min) === 0 ? r.isMinInclusive : false; - return new QueryRange(left, r.max, leftInclusive, r.isMaxInclusive); - } - /** - * Given the sorted ranges and a collection, invokes the callback on the list of overlapping partition key ranges - * @param callback - Function execute on the overlapping partition key ranges result, - * takes two parameters error, partition key ranges - * @hidden - */ - async getOverlappingRanges(collectionLink, sortedRanges) { - // validate if the list is non- overlapping and sorted TODO: any PartitionKeyRanges - if (!SmartRoutingMapProvider._isSortedAndNonOverlapping(sortedRanges)) { - throw new Error("the list of ranges is not a non-overlapping sorted ranges"); - } - let partitionKeyRanges = []; // TODO: any ParitionKeyRanges - if (sortedRanges.length === 0) { - return partitionKeyRanges; - } - const collectionRoutingMap = await this.partitionKeyRangeCache.onCollectionRoutingMap(collectionLink); - let index = 0; - let currentProvidedRange = sortedRanges[index]; - for (;;) { - if (currentProvidedRange.isEmpty()) { - // skip and go to the next item - if (++index >= sortedRanges.length) { - return partitionKeyRanges; - } - currentProvidedRange = sortedRanges[index]; - continue; - } - let queryRange; - if (partitionKeyRanges.length > 0) { - queryRange = SmartRoutingMapProvider._subtractRange(currentProvidedRange, partitionKeyRanges[partitionKeyRanges.length - 1]); - } - else { - queryRange = currentProvidedRange; - } - const overlappingRanges = collectionRoutingMap.getOverlappingRanges(queryRange); - if (overlappingRanges.length <= 0) { - throw new Error(`error: returned overlapping ranges for queryRange ${queryRange} is empty`); - } - partitionKeyRanges = partitionKeyRanges.concat(overlappingRanges); - const lastKnownTargetRange = QueryRange.parsePartitionKeyRange(partitionKeyRanges[partitionKeyRanges.length - 1]); - if (!lastKnownTargetRange) { - throw new Error("expected lastKnowTargetRange to be truthy"); - } - // the overlapping ranges must contain the requested range - if (SmartRoutingMapProvider._stringCompare(currentProvidedRange.max, lastKnownTargetRange.max) > - 0) { - throw new Error(`error: returned overlapping ranges ${overlappingRanges} \ - does not contain the requested range ${queryRange}`); - } - // the current range is contained in partitionKeyRanges just move forward - if (++index >= sortedRanges.length) { - return partitionKeyRanges; - } - currentProvidedRange = sortedRanges[index]; - while (SmartRoutingMapProvider._stringCompare(currentProvidedRange.max, lastKnownTargetRange.max) <= 0) { - // the current range is covered too.just move forward - if (++index >= sortedRanges.length) { - return partitionKeyRanges; - } - currentProvidedRange = sortedRanges[index]; - } - } - } -} - -// Copyright (c) Microsoft Corporation. -/** @hidden */ -const logger$2 = logger$4.createClientLogger("parallelQueryExecutionContextBase"); -/** @hidden */ -var ParallelQueryExecutionContextBaseStates; -(function (ParallelQueryExecutionContextBaseStates) { - ParallelQueryExecutionContextBaseStates["started"] = "started"; - ParallelQueryExecutionContextBaseStates["inProgress"] = "inProgress"; - ParallelQueryExecutionContextBaseStates["ended"] = "ended"; -})(ParallelQueryExecutionContextBaseStates || (ParallelQueryExecutionContextBaseStates = {})); -/** @hidden */ -class ParallelQueryExecutionContextBase { - /** - * Provides the ParallelQueryExecutionContextBase. - * This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from. - * - * When handling a parallelized query, it instantiates one instance of - * DocumentProcuder per target partition key range and aggregates the result of each. - * - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - The Collection Link - * @param options - Represents the feed options. - * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo - * @hidden - */ - constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo) { - this.clientContext = clientContext; - this.collectionLink = collectionLink; - this.query = query; - this.options = options; - this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo; - this.clientContext = clientContext; - this.collectionLink = collectionLink; - this.query = query; - this.options = options; - this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo; - this.err = undefined; - this.state = ParallelQueryExecutionContextBase.STATES.started; - this.routingProvider = new SmartRoutingMapProvider(this.clientContext); - this.sortOrders = this.partitionedQueryExecutionInfo.queryInfo.orderBy; - this.requestContinuation = options ? options.continuationToken || options.continuation : null; - // response headers of undergoing operation - this.respHeaders = getInitialHeader(); - // Make priority queue for documentProducers - // The comparator is supplied by the derived class - this.orderByPQ = new PriorityQueue__default["default"]((a, b) => this.documentProducerComparator(b, a)); - // Creating the documentProducers - this.sem = semaphore__default["default"](1); - // Creating callback for semaphore - // TODO: Code smell - const createDocumentProducersAndFillUpPriorityQueueFunc = async () => { - // ensure the lock is released after finishing up - try { - const targetPartitionRanges = await this._onTargetPartitionRanges(); - this.waitingForInternalExecutionContexts = targetPartitionRanges.length; - const maxDegreeOfParallelism = options.maxDegreeOfParallelism === undefined || options.maxDegreeOfParallelism < 1 - ? targetPartitionRanges.length - : Math.min(options.maxDegreeOfParallelism, targetPartitionRanges.length); - logger$2.info("Query starting against " + - targetPartitionRanges.length + - " ranges with parallelism of " + - maxDegreeOfParallelism); - const parallelismSem = semaphore__default["default"](maxDegreeOfParallelism); - let filteredPartitionKeyRanges = []; - // The document producers generated from filteredPartitionKeyRanges - const targetPartitionQueryExecutionContextList = []; - if (this.requestContinuation) { - throw new Error("Continuation tokens are not yet supported for cross partition queries"); - } - else { - filteredPartitionKeyRanges = targetPartitionRanges; - } - // Create one documentProducer for each partitionTargetRange - filteredPartitionKeyRanges.forEach((partitionTargetRange) => { - // TODO: any partitionTargetRange - // no async callback - targetPartitionQueryExecutionContextList.push(this._createTargetPartitionQueryExecutionContext(partitionTargetRange)); - }); - // Fill up our priority queue with documentProducers - targetPartitionQueryExecutionContextList.forEach((documentProducer) => { - // has async callback - const throttledFunc = async () => { - try { - const { result: document, headers } = await documentProducer.current(); - this._mergeWithActiveResponseHeaders(headers); - if (document === undefined) { - // no results on this one - return; - } - // if there are matching results in the target ex range add it to the priority queue - try { - this.orderByPQ.enq(documentProducer); - } - catch (e) { - this.err = e; - } - } - catch (err) { - this._mergeWithActiveResponseHeaders(err.headers); - this.err = err; - } - finally { - parallelismSem.leave(); - this._decrementInitiationLock(); - } - }; - parallelismSem.take(throttledFunc); - }); - } - catch (err) { - this.err = err; - // release the lock - this.sem.leave(); - return; - } - }; - this.sem.take(createDocumentProducersAndFillUpPriorityQueueFunc); - } - _decrementInitiationLock() { - // decrements waitingForInternalExecutionContexts - // if waitingForInternalExecutionContexts reaches 0 releases the semaphore and changes the state - this.waitingForInternalExecutionContexts = this.waitingForInternalExecutionContexts - 1; - if (this.waitingForInternalExecutionContexts === 0) { - this.sem.leave(); - if (this.orderByPQ.size() === 0) { - this.state = ParallelQueryExecutionContextBase.STATES.inProgress; - } - } - } - _mergeWithActiveResponseHeaders(headers) { - mergeHeaders(this.respHeaders, headers); - } - _getAndResetActiveResponseHeaders() { - const ret = this.respHeaders; - this.respHeaders = getInitialHeader(); - return ret; - } - async _onTargetPartitionRanges() { - // invokes the callback when the target partition ranges are ready - const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges; - const queryRanges = parsedRanges.map((item) => QueryRange.parseFromDict(item)); - return this.routingProvider.getOverlappingRanges(this.collectionLink, queryRanges); - } - /** - * Gets the replacement ranges for a partitionkeyrange that has been split - */ - async _getReplacementPartitionKeyRanges(documentProducer) { - const partitionKeyRange = documentProducer.targetPartitionKeyRange; - // Download the new routing map - this.routingProvider = new SmartRoutingMapProvider(this.clientContext); - // Get the queryRange that relates to this partitionKeyRange - const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange); - return this.routingProvider.getOverlappingRanges(this.collectionLink, [queryRange]); - } - // TODO: P0 Code smell - can barely tell what this is doing - /** - * Removes the current document producer from the priqueue, - * replaces that document producer with child document producers, - * then reexecutes the originFunction with the corrrected executionContext - */ - async _repairExecutionContext(originFunction) { - // TODO: any - // Get the replacement ranges - // Removing the invalid documentProducer from the orderByPQ - const parentDocumentProducer = this.orderByPQ.deq(); - try { - const replacementPartitionKeyRanges = await this._getReplacementPartitionKeyRanges(parentDocumentProducer); - const replacementDocumentProducers = []; - // Create the replacement documentProducers - replacementPartitionKeyRanges.forEach((partitionKeyRange) => { - // Create replacment document producers with the parent's continuationToken - const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(partitionKeyRange, parentDocumentProducer.continuationToken); - replacementDocumentProducers.push(replacementDocumentProducer); - }); - // We need to check if the documentProducers even has anything left to fetch from before enqueing them - const checkAndEnqueueDocumentProducer = async (documentProducerToCheck, checkNextDocumentProducerCallback) => { - try { - const { result: afterItem } = await documentProducerToCheck.current(); - if (afterItem === undefined) { - // no more results left in this document producer, so we don't enqueue it - } - else { - // Safe to put document producer back in the queue - this.orderByPQ.enq(documentProducerToCheck); - } - await checkNextDocumentProducerCallback(); - } - catch (err) { - this.err = err; - return; - } - }; - const checkAndEnqueueDocumentProducers = async (rdp) => { - if (rdp.length > 0) { - // We still have a replacementDocumentProducer to check - const replacementDocumentProducer = rdp.shift(); - await checkAndEnqueueDocumentProducer(replacementDocumentProducer, async () => { - await checkAndEnqueueDocumentProducers(rdp); - }); - } - else { - // reexecutes the originFunction with the corrrected executionContext - return originFunction(); - } - }; - // Invoke the recursive function to get the ball rolling - await checkAndEnqueueDocumentProducers(replacementDocumentProducers); - } - catch (err) { - this.err = err; - throw err; - } - } - static _needPartitionKeyRangeCacheRefresh(error) { - // TODO: any error - return (error.code === StatusCodes.Gone && - "substatus" in error && - error["substatus"] === SubStatusCodes.PartitionKeyRangeGone); - } - /** - * Checks to see if the executionContext needs to be repaired. - * if so it repairs the execution context and executes the ifCallback, - * else it continues with the current execution context and executes the elseCallback - */ - async _repairExecutionContextIfNeeded(ifCallback, elseCallback) { - const documentProducer = this.orderByPQ.peek(); - // Check if split happened - try { - await documentProducer.current(); - elseCallback(); - } - catch (err) { - if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) { - // Split has happened so we need to repair execution context before continueing - return this._repairExecutionContext(ifCallback); - } - else { - // Something actually bad happened ... - this.err = err; - throw err; - } - } - } - /** - * Fetches the next element in the ParallelQueryExecutionContextBase. - */ - async nextItem() { - if (this.err) { - // if there is a prior error return error - throw this.err; - } - return new Promise((resolve, reject) => { - this.sem.take(() => { - // NOTE: lock must be released before invoking quitting - if (this.err) { - // release the lock before invoking callback - this.sem.leave(); - // if there is a prior error return error - this.err.headers = this._getAndResetActiveResponseHeaders(); - reject(this.err); - return; - } - if (this.orderByPQ.size() === 0) { - // there is no more results - this.state = ParallelQueryExecutionContextBase.STATES.ended; - // release the lock before invoking callback - this.sem.leave(); - return resolve({ - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }); - } - const ifCallback = () => { - // Release the semaphore to avoid deadlock - this.sem.leave(); - // Reexcute the function - return resolve(this.nextItem()); - }; - const elseCallback = async () => { - let documentProducer; - try { - documentProducer = this.orderByPQ.deq(); - } - catch (e) { - // if comparing elements of the priority queue throws exception - // set that error and return error - this.err = e; - // release the lock before invoking callback - this.sem.leave(); - this.err.headers = this._getAndResetActiveResponseHeaders(); - reject(this.err); - return; - } - let item; - let headers; - try { - const response = await documentProducer.nextItem(); - item = response.result; - headers = response.headers; - this._mergeWithActiveResponseHeaders(headers); - if (item === undefined) { - // this should never happen - // because the documentProducer already has buffered an item - // assert item !== undefined - this.err = new Error(`Extracted DocumentProducer from the priority queue \ - doesn't have any buffered item!`); - // release the lock before invoking callback - this.sem.leave(); - return resolve({ - result: undefined, - headers: this._getAndResetActiveResponseHeaders(), - }); - } - } - catch (err) { - this.err = new Error(`Extracted DocumentProducer from the priority queue fails to get the \ - buffered item. Due to ${JSON.stringify(err)}`); - this.err.headers = this._getAndResetActiveResponseHeaders(); - // release the lock before invoking callback - this.sem.leave(); - reject(this.err); - return; - } - // we need to put back the document producer to the queue if it has more elements. - // the lock will be released after we know document producer must be put back in the queue or not - try { - const { result: afterItem, headers: otherHeaders } = await documentProducer.current(); - this._mergeWithActiveResponseHeaders(otherHeaders); - if (afterItem === undefined) { - // no more results is left in this document producer - } - else { - try { - const headItem = documentProducer.fetchResults[0]; - if (typeof headItem === "undefined") { - throw new Error("Extracted DocumentProducer from PQ is invalid state with no result!"); - } - this.orderByPQ.enq(documentProducer); - } - catch (e) { - // if comparing elements in priority queue throws exception - // set error - this.err = e; - } - } - } - catch (err) { - if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) { - // We want the document producer enqueued - // So that later parts of the code can repair the execution context - this.orderByPQ.enq(documentProducer); - } - else { - // Something actually bad happened - this.err = err; - reject(this.err); - } - } - finally { - // release the lock before returning - this.sem.leave(); - } - // invoke the callback on the item - return resolve({ - result: item, - headers: this._getAndResetActiveResponseHeaders(), - }); - }; - this._repairExecutionContextIfNeeded(ifCallback, elseCallback).catch(reject); - }); - }); - } - /** - * Determine if there are still remaining resources to processs based on the value of the continuation - * token or the elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the ParallelQueryExecutionContextBase. - */ - hasMoreResults() { - return !(this.state === ParallelQueryExecutionContextBase.STATES.ended || this.err !== undefined); - } - /** - * Creates document producers - */ - _createTargetPartitionQueryExecutionContext(partitionKeyTargetRange, continuationToken) { - // TODO: any - // creates target partition range Query Execution Context - let rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery; - let sqlQuerySpec; - const query = this.query; - if (typeof query === "string") { - sqlQuerySpec = { query }; - } - else { - sqlQuerySpec = query; - } - const formatPlaceHolder = "{documentdb-formattableorderbyquery-filter}"; - if (rewrittenQuery) { - sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec)); - // We hardcode the formattable filter to true for now - rewrittenQuery = rewrittenQuery.replace(formatPlaceHolder, "true"); - sqlQuerySpec["query"] = rewrittenQuery; - } - const options = Object.assign({}, this.options); - options.continuationToken = continuationToken; - return new DocumentProducer(this.clientContext, this.collectionLink, sqlQuerySpec, partitionKeyTargetRange, options); - } -} -ParallelQueryExecutionContextBase.STATES = ParallelQueryExecutionContextBaseStates; - -// Copyright (c) Microsoft Corporation. -/** - * Provides the ParallelQueryExecutionContext. - * This class is capable of handling parallelized queries and derives from ParallelQueryExecutionContextBase. - * @hidden - */ -class ParallelQueryExecutionContext extends ParallelQueryExecutionContextBase { - // Instance members are inherited - // Overriding documentProducerComparator for ParallelQueryExecutionContexts - /** - * Provides a Comparator for document producers using the min value of the corresponding target partition. - * @returns Comparator Function - * @hidden - */ - documentProducerComparator(docProd1, docProd2) { - return docProd1.generation - docProd2.generation; - } -} - -/** @hidden */ -class OrderByQueryExecutionContext extends ParallelQueryExecutionContextBase { - /** - * Provides the OrderByQueryExecutionContext. - * This class is capable of handling orderby queries and dervives from ParallelQueryExecutionContextBase. - * - * When handling a parallelized query, it instantiates one instance of - * DocumentProcuder per target partition key range and aggregates the result of each. - * - * @param clientContext - The service endpoint to use to create the client. - * @param collectionLink - The Collection Link - * @param options - Represents the feed options. - * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo - * @hidden - */ - constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo) { - // Calling on base class constructor - super(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo); - this.orderByComparator = new OrderByDocumentProducerComparator(this.sortOrders); - } - // Instance members are inherited - // Overriding documentProducerComparator for OrderByQueryExecutionContexts - /** - * Provides a Comparator for document producers which respects orderby sort order. - * @returns Comparator Function - * @hidden - */ - documentProducerComparator(docProd1, docProd2) { - return this.orderByComparator.compare(docProd1, docProd2); - } -} - -/** @hidden */ -class OffsetLimitEndpointComponent { - constructor(executionContext, offset, limit) { - this.executionContext = executionContext; - this.offset = offset; - this.limit = limit; - } - async nextItem() { - const aggregateHeaders = getInitialHeader(); - while (this.offset > 0) { - // Grab next item but ignore the result. We only need the headers - const { headers } = await this.executionContext.nextItem(); - this.offset--; - mergeHeaders(aggregateHeaders, headers); - } - if (this.limit > 0) { - const { result, headers } = await this.executionContext.nextItem(); - this.limit--; - mergeHeaders(aggregateHeaders, headers); - return { result, headers: aggregateHeaders }; - } - // If both limit and offset are 0, return nothing - return { result: undefined, headers: getInitialHeader() }; - } - hasMoreResults() { - return (this.offset > 0 || this.limit > 0) && this.executionContext.hasMoreResults(); - } -} - -/** @hidden */ -class OrderByEndpointComponent { - /** - * Represents an endpoint in handling an order by query. For each processed orderby - * result it returns 'payload' item of the result - * - * @param executionContext - Underlying Execution Context - * @hidden - */ - constructor(executionContext) { - this.executionContext = executionContext; - } - /** - * Execute a provided function on the next element in the OrderByEndpointComponent. - */ - async nextItem() { - const { result: item, headers } = await this.executionContext.nextItem(); - return { - result: item !== undefined ? item.payload : undefined, - headers, - }; - } - /** - * Determine if there are still remaining resources to processs. - * @returns true if there is other elements to process in the OrderByEndpointComponent. - */ - hasMoreResults() { - return this.executionContext.hasMoreResults(); - } -} - -// Copyright (c) Microsoft Corporation. -async function digest(str) { - const hash = crypto.createHash("sha256"); - hash.update(str, "utf8"); - return hash.digest("hex"); -} - -// Copyright (c) Microsoft Corporation. -async function hashObject(object) { - const stringifiedObject = stableStringify__default["default"](object); - return digest(stringifiedObject); -} - -/** @hidden */ -class OrderedDistinctEndpointComponent { - constructor(executionContext) { - this.executionContext = executionContext; - } - async nextItem() { - const { headers, result } = await this.executionContext.nextItem(); - if (result) { - const hashedResult = await hashObject(result); - if (hashedResult === this.hashedLastResult) { - return { result: undefined, headers }; - } - this.hashedLastResult = hashedResult; - } - return { result, headers }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults(); - } -} - -/** @hidden */ -class UnorderedDistinctEndpointComponent { - constructor(executionContext) { - this.executionContext = executionContext; - this.hashedResults = new Set(); - } - async nextItem() { - const { headers, result } = await this.executionContext.nextItem(); - if (result) { - const hashedResult = await hashObject(result); - if (this.hashedResults.has(hashedResult)) { - return { result: undefined, headers }; - } - this.hashedResults.add(hashedResult); - } - return { result, headers }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults(); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// All aggregates are effectively a group by operation -// The empty group is used for aggregates without a GROUP BY clause -const emptyGroup = "__empty__"; -// Newer API versions rewrite the query to return `item2`. It fixes some legacy issues with the original `item` result -// Aggregator code should use item2 when available -const extractAggregateResult = (payload) => Object.keys(payload).length > 0 ? (payload.item2 ? payload.item2 : payload.item) : null; - -/** @hidden */ -class GroupByEndpointComponent { - constructor(executionContext, queryInfo) { - this.executionContext = executionContext; - this.queryInfo = queryInfo; - this.groupings = new Map(); - this.aggregateResultArray = []; - this.completed = false; - } - async nextItem() { - // If we have a full result set, begin returning results - if (this.aggregateResultArray.length > 0) { - return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() }; - } - if (this.completed) { - return { result: undefined, headers: getInitialHeader() }; - } - const aggregateHeaders = getInitialHeader(); - while (this.executionContext.hasMoreResults()) { - // Grab the next result - const { result, headers } = (await this.executionContext.nextItem()); - mergeHeaders(aggregateHeaders, headers); - // If it exists, process it via aggregators - if (result) { - const group = result.groupByItems ? await hashObject(result.groupByItems) : emptyGroup; - const aggregators = this.groupings.get(group); - const payload = result.payload; - if (aggregators) { - // Iterator over all results in the payload - Object.keys(payload).map((key) => { - // in case the value of a group is null make sure we create a dummy payload with item2==null - const effectiveGroupByValue = payload[key] - ? payload[key] - : new Map().set("item2", null); - const aggregateResult = extractAggregateResult(effectiveGroupByValue); - aggregators.get(key).aggregate(aggregateResult); - }); - } - else { - // This is the first time we have seen a grouping. Setup the initial result without aggregate values - const grouping = new Map(); - this.groupings.set(group, grouping); - // Iterator over all results in the payload - Object.keys(payload).map((key) => { - const aggregateType = this.queryInfo.groupByAliasToAggregateType[key]; - // Create a new aggregator for this specific aggregate field - const aggregator = createAggregator(aggregateType); - grouping.set(key, aggregator); - if (aggregateType) { - const aggregateResult = extractAggregateResult(payload[key]); - aggregator.aggregate(aggregateResult); - } - else { - aggregator.aggregate(payload[key]); - } - }); - } - } - } - for (const grouping of this.groupings.values()) { - const groupResult = {}; - for (const [aggregateKey, aggregator] of grouping.entries()) { - groupResult[aggregateKey] = aggregator.getResult(); - } - this.aggregateResultArray.push(groupResult); - } - this.completed = true; - return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0; - } -} - -/** @hidden */ -class GroupByValueEndpointComponent { - constructor(executionContext, queryInfo) { - this.executionContext = executionContext; - this.queryInfo = queryInfo; - this.aggregators = new Map(); - this.aggregateResultArray = []; - this.completed = false; - // VALUE queries will only every have a single grouping - this.aggregateType = this.queryInfo.aggregates[0]; - } - async nextItem() { - // Start returning results if we have processed a full results set - if (this.aggregateResultArray.length > 0) { - return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() }; - } - if (this.completed) { - return { result: undefined, headers: getInitialHeader() }; - } - const aggregateHeaders = getInitialHeader(); - while (this.executionContext.hasMoreResults()) { - // Grab the next result - const { result, headers } = (await this.executionContext.nextItem()); - mergeHeaders(aggregateHeaders, headers); - // If it exists, process it via aggregators - if (result) { - let grouping = emptyGroup; - let payload = result; - if (result.groupByItems) { - // If the query contains a GROUP BY clause, it will have a payload property and groupByItems - payload = result.payload; - grouping = await hashObject(result.groupByItems); - } - const aggregator = this.aggregators.get(grouping); - if (!aggregator) { - // This is the first time we have seen a grouping so create a new aggregator - this.aggregators.set(grouping, createAggregator(this.aggregateType)); - } - if (this.aggregateType) { - const aggregateResult = extractAggregateResult(payload[0]); - // if aggregate result is null, we need to short circuit aggregation and return undefined - if (aggregateResult === null) { - this.completed = true; - } - this.aggregators.get(grouping).aggregate(aggregateResult); - } - else { - // Queries with no aggregates pass the payload directly to the aggregator - // Example: SELECT VALUE c.team FROM c GROUP BY c.team - this.aggregators.get(grouping).aggregate(payload); - } - } - } - // We bail early since we got an undefined result back `[{}]` - if (this.completed) { - return { result: undefined, headers: aggregateHeaders }; - } - // If no results are left in the underlying execution context, convert our aggregate results to an array - for (const aggregator of this.aggregators.values()) { - this.aggregateResultArray.push(aggregator.getResult()); - } - this.completed = true; - return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders }; - } - hasMoreResults() { - return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0; - } -} - -/** @hidden */ -class PipelinedQueryExecutionContext { - constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo) { - this.clientContext = clientContext; - this.collectionLink = collectionLink; - this.query = query; - this.options = options; - this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo; - this.endpoint = null; - this.pageSize = options["maxItemCount"]; - if (this.pageSize === undefined) { - this.pageSize = PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE; - } - // Pick between parallel vs order by execution context - const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy; - if (Array.isArray(sortOrders) && sortOrders.length > 0) { - // Need to wrap orderby execution context in endpoint component, since the data is nested as a \ - // "payload" property. - this.endpoint = new OrderByEndpointComponent(new OrderByQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo)); - } - else { - this.endpoint = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo); - } - if (Object.keys(partitionedQueryExecutionInfo.queryInfo.groupByAliasToAggregateType).length > 0 || - partitionedQueryExecutionInfo.queryInfo.aggregates.length > 0 || - partitionedQueryExecutionInfo.queryInfo.groupByExpressions.length > 0) { - if (partitionedQueryExecutionInfo.queryInfo.hasSelectValue) { - this.endpoint = new GroupByValueEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo); - } - else { - this.endpoint = new GroupByEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo); - } - } - // If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N - const top = partitionedQueryExecutionInfo.queryInfo.top; - if (typeof top === "number") { - this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top); - } - // If offset+limit then add that to the pipeline - const limit = partitionedQueryExecutionInfo.queryInfo.limit; - const offset = partitionedQueryExecutionInfo.queryInfo.offset; - if (typeof limit === "number" && typeof offset === "number") { - this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit); - } - // If distinct then add that to the pipeline - const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType; - if (distinctType === "Ordered") { - this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint); - } - if (distinctType === "Unordered") { - this.endpoint = new UnorderedDistinctEndpointComponent(this.endpoint); - } - } - async nextItem() { - return this.endpoint.nextItem(); - } - // Removed callback here beacuse it wouldn't have ever worked... - hasMoreResults() { - return this.endpoint.hasMoreResults(); - } - async fetchMore() { - // if the wrapped endpoint has different implementation for fetchMore use that - // otherwise use the default implementation - if (typeof this.endpoint.fetchMore === "function") { - return this.endpoint.fetchMore(); - } - else { - this.fetchBuffer = []; - this.fetchMoreRespHeaders = getInitialHeader(); - return this._fetchMoreImplementation(); - } - } - async _fetchMoreImplementation() { - try { - const { result: item, headers } = await this.endpoint.nextItem(); - mergeHeaders(this.fetchMoreRespHeaders, headers); - if (item === undefined) { - // no more results - if (this.fetchBuffer.length === 0) { - return { - result: undefined, - headers: this.fetchMoreRespHeaders, - }; - } - else { - // Just give what we have - const temp = this.fetchBuffer; - this.fetchBuffer = []; - return { result: temp, headers: this.fetchMoreRespHeaders }; - } - } - else { - // append the result - this.fetchBuffer.push(item); - if (this.fetchBuffer.length >= this.pageSize) { - // fetched enough results - const temp = this.fetchBuffer.slice(0, this.pageSize); - this.fetchBuffer = this.fetchBuffer.splice(this.pageSize); - return { result: temp, headers: this.fetchMoreRespHeaders }; - } - else { - // recursively fetch more - // TODO: is recursion a good idea? - return this._fetchMoreImplementation(); - } - } - } - catch (err) { - mergeHeaders(this.fetchMoreRespHeaders, err.headers); - err.headers = this.fetchMoreRespHeaders; - if (err) { - throw err; - } - } - } -} -PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE = 10; - -// Copyright (c) Microsoft Corporation. -/** - * Represents a QueryIterator Object, an implementation of feed or query response that enables - * traversal and iterating over the response - * in the Azure Cosmos DB database service. - */ -class QueryIterator { - /** - * @hidden - */ - constructor(clientContext, query, options, fetchFunctions, resourceLink, resourceType) { - this.clientContext = clientContext; - this.query = query; - this.options = options; - this.fetchFunctions = fetchFunctions; - this.resourceLink = resourceLink; - this.resourceType = resourceType; - this.query = query; - this.fetchFunctions = fetchFunctions; - this.options = options || {}; - this.resourceLink = resourceLink; - this.fetchAllLastResHeaders = getInitialHeader(); - this.reset(); - this.isInitialized = false; - } - /** - * Gets an async iterator that will yield results until completion. - * - * NOTE: AsyncIterators are a very new feature and you might need to - * use polyfils/etc. in order to use them in your code. - * - * If you're using TypeScript, you can use the following polyfill as long - * as you target ES6 or higher and are running on Node 6 or higher. - * - * ```typescript - * if (!Symbol || !Symbol.asyncIterator) { - * (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); - * } - * ``` - * - * @example Iterate over all databases - * ```typescript - * for await(const { resources: db } of client.databases.readAll().getAsyncIterator()) { - * console.log(`Got ${db} from AsyncIterator`); - * } - * ``` - */ - getAsyncIterator() { - return tslib.__asyncGenerator(this, arguments, function* getAsyncIterator_1() { - this.reset(); - this.queryPlanPromise = this.fetchQueryPlan(); - while (this.queryExecutionContext.hasMoreResults()) { - let response; - try { - response = yield tslib.__await(this.queryExecutionContext.fetchMore()); - } - catch (error) { - if (this.needsQueryPlan(error)) { - yield tslib.__await(this.createPipelinedExecutionContext()); - try { - response = yield tslib.__await(this.queryExecutionContext.fetchMore()); - } - catch (queryError) { - this.handleSplitError(queryError); - } - } - else { - throw error; - } - } - const feedResponse = new FeedResponse(response.result, response.headers, this.queryExecutionContext.hasMoreResults()); - if (response.result !== undefined) { - yield yield tslib.__await(feedResponse); - } - } - }); - } - /** - * Determine if there are still remaining resources to processs based on the value of the continuation token or the - * elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the QueryIterator. - */ - hasMoreResults() { - return this.queryExecutionContext.hasMoreResults(); - } - /** - * Fetch all pages for the query and return a single FeedResponse. - */ - async fetchAll() { - this.reset(); - this.fetchAllTempResources = []; - let response; - try { - response = await this.toArrayImplementation(); - } - catch (error) { - this.handleSplitError(error); - } - return response; - } - /** - * Retrieve the next batch from the feed. - * - * This may or may not fetch more pages from the backend depending on your settings - * and the type of query. Aggregate queries will generally fetch all backend pages - * before returning the first batch of responses. - */ - async fetchNext() { - this.queryPlanPromise = this.fetchQueryPlan(); - if (!this.isInitialized) { - await this.init(); - } - let response; - try { - response = await this.queryExecutionContext.fetchMore(); - } - catch (error) { - if (this.needsQueryPlan(error)) { - await this.createPipelinedExecutionContext(); - try { - response = await this.queryExecutionContext.fetchMore(); - } - catch (queryError) { - this.handleSplitError(queryError); - } - } - else { - throw error; - } - } - return new FeedResponse(response.result, response.headers, this.queryExecutionContext.hasMoreResults()); - } - /** - * Reset the QueryIterator to the beginning and clear all the resources inside it - */ - reset() { - this.queryPlanPromise = undefined; - this.queryExecutionContext = new DefaultQueryExecutionContext(this.options, this.fetchFunctions); - } - async toArrayImplementation() { - this.queryPlanPromise = this.fetchQueryPlan(); - if (!this.isInitialized) { - await this.init(); - } - while (this.queryExecutionContext.hasMoreResults()) { - let response; - try { - response = await this.queryExecutionContext.nextItem(); - } - catch (error) { - if (this.needsQueryPlan(error)) { - await this.createPipelinedExecutionContext(); - response = await this.queryExecutionContext.nextItem(); - } - else { - throw error; - } - } - const { result, headers } = response; - // concatenate the results and fetch more - mergeHeaders(this.fetchAllLastResHeaders, headers); - if (result !== undefined) { - this.fetchAllTempResources.push(result); - } - } - return new FeedResponse(this.fetchAllTempResources, this.fetchAllLastResHeaders, this.queryExecutionContext.hasMoreResults()); - } - async createPipelinedExecutionContext() { - const queryPlanResponse = await this.queryPlanPromise; - // We always coerce queryPlanPromise to resolved. So if it errored, we need to manually inspect the resolved value - if (queryPlanResponse instanceof Error) { - throw queryPlanResponse; - } - const queryPlan = queryPlanResponse.result; - const queryInfo = queryPlan.queryInfo; - if (queryInfo.aggregates.length > 0 && queryInfo.hasSelectValue === false) { - throw new Error("Aggregate queries must use the VALUE keyword"); - } - this.queryExecutionContext = new PipelinedQueryExecutionContext(this.clientContext, this.resourceLink, this.query, this.options, queryPlan); - } - async fetchQueryPlan() { - if (!this.queryPlanPromise && this.resourceType === exports.ResourceType.item) { - return this.clientContext - .getQueryPlan(getPathFromLink(this.resourceLink) + "/docs", exports.ResourceType.item, this.resourceLink, this.query, this.options) - .catch((error) => error); // Without this catch, node reports an unhandled rejection. So we stash the promise as resolved even if it errored. - } - return this.queryPlanPromise; - } - needsQueryPlan(error) { - var _a; - if (((_a = error.body) === null || _a === void 0 ? void 0 : _a.additionalErrorInfo) || - error.message.includes("Cross partition query only supports")) { - return error.code === StatusCodes.BadRequest && this.resourceType === exports.ResourceType.item; - } - else { - throw error; - } - } - async init() { - if (this.isInitialized === true) { - return; - } - if (this.initPromise === undefined) { - this.initPromise = this._init(); - } - return this.initPromise; - } - async _init() { - if (this.options.forceQueryPlan === true && this.resourceType === exports.ResourceType.item) { - await this.createPipelinedExecutionContext(); - } - this.isInitialized = true; - } - handleSplitError(err) { - if (err.code === 410) { - const error = new Error("Encountered partition split and could not recover. This request is retryable"); - error.code = 503; - error.originalError = err; - throw error; - } - else { - throw err; - } - } -} - -class ConflictResponse extends ResourceResponse { - constructor(resource, headers, statusCode, conflict) { - super(resource, headers, statusCode); - this.conflict = conflict; - } -} - -/** - * Use to read or delete a given {@link Conflict} by id. - * - * @see {@link Conflicts} to query or read all conflicts. - */ -class Conflict { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Conflict}. - */ - constructor(container, id, clientContext, partitionKey) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - this.partitionKey = partitionKey; - this.partitionKey = partitionKey; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return `/${this.container.url}/${Constants.Path.ConflictsPathSegment}/${this.id}`; - } - /** - * Read the {@link ConflictDefinition} for the given {@link Conflict}. - */ - async read(options) { - const path = getPathFromLink(this.url, exports.ResourceType.conflicts); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.user, - resourceId: id, - options, - }); - return new ConflictResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link ConflictDefinition}. - */ - async delete(options) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.conflicts, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ConflictResponse(response.result, response.headers, response.code, this); - } -} - -/** - * Use to query or read all conflicts. - * - * @see {@link Conflict} to read or delete a given {@link Conflict} by id. - */ -class Conflicts { - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, exports.ResourceType.conflicts); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.conflicts, - resourceId: id, - resultFn: (result) => result.Conflicts, - query, - options: innerOptions, - }); - }); - } - /** - * Reads all conflicts - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - readAll(options) { - return this.query(undefined, options); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -exports.ConflictResolutionMode = void 0; -(function (ConflictResolutionMode) { - ConflictResolutionMode["Custom"] = "Custom"; - ConflictResolutionMode["LastWriterWins"] = "LastWriterWins"; -})(exports.ConflictResolutionMode || (exports.ConflictResolutionMode = {})); - -class ItemResponse extends ResourceResponse { - constructor(resource, headers, statusCode, subsstatusCode, item) { - super(resource, headers, statusCode, subsstatusCode); - this.item = item; - } -} - -/** - * Used to perform operations on a specific item. - * - * @see {@link Items} for operations on all items; see `container.items`. - */ -class Item { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Item}. - * @param partitionKey - The primary key of the given {@link Item} (only for partitioned containers). - */ - constructor(container, id, partitionKey, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - this.partitionKey = partitionKey; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createDocumentUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * If the type, T, is a class, it won't pass `typeof` comparisons, because it won't have a match prototype. - * It's recommended to only use interfaces. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Additional options for the request - * - * @example Using custom type for response - * ```typescript - * interface TodoItem { - * title: string; - * done: bool; - * id: string; - * } - * - * let item: TodoItem; - * ({body: item} = await item.read()); - * ``` - */ - async read(options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - let response; - try { - response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - } - catch (error) { - if (error.code !== StatusCodes.NotFound) { - throw error; - } - response = error; - } - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } - async replace(body, options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = extractPartitionKey(body, partitionKeyDefinition); - } - const err = {}; - if (!isItemResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: exports.ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } - /** - * Delete the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - async delete(options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } - /** - * Perform a JSONPatch on the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - async patch(body, options = {}) { - if (this.partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - this.partitionKey = extractPartitionKey(body, partitionKeyDefinition); - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.patch({ - body, - path, - resourceType: exports.ResourceType.item, - resourceId: id, - options, - partitionKey: this.partitionKey, - }); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, this); - } -} - -// Copyright (c) Microsoft Corporation. -/** - * A single response page from the Azure Cosmos DB Change Feed - */ -class ChangeFeedResponse { - /** - * @internal - */ - constructor( - /** - * Gets the items returned in the response from Azure Cosmos DB - */ - result, - /** - * Gets the number of items returned in the response from Azure Cosmos DB - */ - count, - /** - * Gets the status code of the response from Azure Cosmos DB - */ - statusCode, headers) { - this.result = result; - this.count = count; - this.statusCode = statusCode; - this.headers = Object.freeze(headers); - } - /** - * Gets the request charge for this request from the Azure Cosmos DB service. - */ - get requestCharge() { - const rus = this.headers[Constants.HttpHeaders.RequestCharge]; - return rus ? parseInt(rus, 10) : null; - } - /** - * Gets the activity ID for the request from the Azure Cosmos DB service. - */ - get activityId() { - return this.headers[Constants.HttpHeaders.ActivityId]; - } - /** - * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service. - * - * This is equivalent to the `etag` property. - */ - get continuation() { - return this.etag; - } - /** - * Gets the session token for use in session consistency reads from the Azure Cosmos DB service. - */ - get sessionToken() { - return this.headers[Constants.HttpHeaders.SessionToken]; - } - /** - * Gets the entity tag associated with last transaction in the Azure Cosmos DB service, - * which can be used as If-Non-Match Access condition for ReadFeed REST request or - * `continuation` property of `ChangeFeedOptions` parameter for - * `Items.changeFeed()` - * to get feed changes since the transaction specified by this entity tag. - * - * This is equivalent to the `continuation` property. - */ - get etag() { - return this.headers[Constants.HttpHeaders.ETag]; - } -} - -/** - * Provides iterator for change feed. - * - * Use `Items.changeFeed()` to get an instance of the iterator. - */ -class ChangeFeedIterator { - /** - * @internal - */ - constructor(clientContext, resourceId, resourceLink, partitionKey, changeFeedOptions) { - this.clientContext = clientContext; - this.resourceId = resourceId; - this.resourceLink = resourceLink; - this.partitionKey = partitionKey; - this.changeFeedOptions = changeFeedOptions; - // partition key XOR partition key range id - const partitionKeyValid = partitionKey !== undefined; - this.isPartitionSpecified = partitionKeyValid; - let canUseStartFromBeginning = true; - if (changeFeedOptions.continuation) { - this.nextIfNoneMatch = changeFeedOptions.continuation; - canUseStartFromBeginning = false; - } - if (changeFeedOptions.startTime) { - // .toUTCString() is platform specific, but most platforms use RFC 1123. - // In ECMAScript 2018, this was standardized to RFC 1123. - // See for more info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString - this.ifModifiedSince = changeFeedOptions.startTime.toUTCString(); - canUseStartFromBeginning = false; - } - if (canUseStartFromBeginning && !changeFeedOptions.startFromBeginning) { - this.nextIfNoneMatch = ChangeFeedIterator.IfNoneMatchAllHeaderValue; - } - } - /** - * Gets a value indicating whether there are potentially additional results that can be retrieved. - * - * Initially returns true. This value is set based on whether the last execution returned a continuation token. - * - * @returns Boolean value representing if whether there are potentially additional results that can be retrieved. - */ - get hasMoreResults() { - return this.lastStatusCode !== StatusCodes.NotModified; - } - /** - * Gets an async iterator which will yield pages of results from Azure Cosmos DB. - */ - getAsyncIterator() { - return tslib.__asyncGenerator(this, arguments, function* getAsyncIterator_1() { - do { - const result = yield tslib.__await(this.fetchNext()); - if (result.count > 0) { - yield yield tslib.__await(result); - } - } while (this.hasMoreResults); - }); - } - /** - * Read feed and retrieves the next page of results in Azure Cosmos DB. - */ - async fetchNext() { - const response = await this.getFeedResponse(); - this.lastStatusCode = response.statusCode; - this.nextIfNoneMatch = response.headers[Constants.HttpHeaders.ETag]; - return response; - } - async getFeedResponse() { - if (!this.isPartitionSpecified) { - throw new Error("Container is partitioned, but no partition key or partition key range id was specified."); - } - const feedOptions = { initialHeaders: {}, useIncrementalFeed: true }; - if (typeof this.changeFeedOptions.maxItemCount === "number") { - feedOptions.maxItemCount = this.changeFeedOptions.maxItemCount; - } - if (this.changeFeedOptions.sessionToken) { - feedOptions.sessionToken = this.changeFeedOptions.sessionToken; - } - if (this.nextIfNoneMatch) { - feedOptions.accessCondition = { - type: Constants.HttpHeaders.IfNoneMatch, - condition: this.nextIfNoneMatch, - }; - } - if (this.ifModifiedSince) { - feedOptions.initialHeaders[Constants.HttpHeaders.IfModifiedSince] = this.ifModifiedSince; - } - const response = await this.clientContext.queryFeed({ - path: this.resourceLink, - resourceType: exports.ResourceType.item, - resourceId: this.resourceId, - resultFn: (result) => (result ? result.Documents : []), - query: undefined, - options: feedOptions, - partitionKey: this.partitionKey, - }); // TODO: some funky issues with query feed. Probably need to change it up. - return new ChangeFeedResponse(response.result, response.result ? response.result.length : 0, response.code, response.headers); - } -} -ChangeFeedIterator.IfNoneMatchAllHeaderValue = "*"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -const BytePrefix = { - Undefined: "00", - Null: "01", - False: "02", - True: "03", - MinNumber: "04", - Number: "05", - MaxNumber: "06", - MinString: "07", - String: "08", - MaxString: "09", - Int64: "0a", - Int32: "0b", - Int16: "0c", - Int8: "0d", - Uint64: "0e", - Uint32: "0f", - Uint16: "10", - Uint8: "11", - Binary: "12", - Guid: "13", - Float: "14", - Infinity: "FF", -}; - -// Copyright (c) Microsoft Corporation. -function writeNumberForBinaryEncodingJSBI(hash) { - let payload = encodeNumberAsUInt64JSBI(hash); - let outputStream = Buffer.from(BytePrefix.Number, "hex"); - const firstChunk = JSBI__default["default"].asUintN(64, JSBI__default["default"].signedRightShift(payload, JSBI__default["default"].BigInt(56))); - outputStream = Buffer.concat([outputStream, Buffer.from(firstChunk.toString(16), "hex")]); - payload = JSBI__default["default"].asUintN(64, JSBI__default["default"].leftShift(JSBI__default["default"].BigInt(payload), JSBI__default["default"].BigInt(0x8))); - let byteToWrite = JSBI__default["default"].BigInt(0); - let shifted; - let padded; - do { - { - // we pad because after shifting because we will produce characters like "f" or similar, - // which cannot be encoded as hex in a buffer because they are invalid hex - // https://github.com/nodejs/node/issues/24491 - padded = byteToWrite.toString(16).padStart(2, "0"); - if (padded !== "00") { - outputStream = Buffer.concat([outputStream, Buffer.from(padded, "hex")]); - } - } - shifted = JSBI__default["default"].asUintN(64, JSBI__default["default"].signedRightShift(payload, JSBI__default["default"].BigInt(56))); - byteToWrite = JSBI__default["default"].asUintN(64, JSBI__default["default"].bitwiseOr(shifted, JSBI__default["default"].BigInt(0x01))); - payload = JSBI__default["default"].asUintN(64, JSBI__default["default"].leftShift(payload, JSBI__default["default"].BigInt(7))); - } while (JSBI__default["default"].notEqual(payload, JSBI__default["default"].BigInt(0))); - const lastChunk = JSBI__default["default"].asUintN(64, JSBI__default["default"].bitwiseAnd(byteToWrite, JSBI__default["default"].BigInt(0xfe))); - // we pad because after shifting because we will produce characters like "f" or similar, - // which cannot be encoded as hex in a buffer because they are invalid hex - // https://github.com/nodejs/node/issues/24491 - padded = lastChunk.toString(16).padStart(2, "0"); - if (padded !== "00") { - outputStream = Buffer.concat([outputStream, Buffer.from(padded, "hex")]); - } - return outputStream; -} -function encodeNumberAsUInt64JSBI(value) { - const rawValueBits = getRawBitsJSBI(value); - const mask = JSBI__default["default"].BigInt(0x8000000000000000); - const returned = rawValueBits < mask - ? JSBI__default["default"].bitwiseXor(rawValueBits, mask) - : JSBI__default["default"].add(JSBI__default["default"].bitwiseNot(rawValueBits), JSBI__default["default"].BigInt(1)); - return returned; -} -function doubleToByteArrayJSBI(double) { - const output = Buffer.alloc(8); - const lng = getRawBitsJSBI(double); - for (let i = 0; i < 8; i++) { - output[i] = JSBI__default["default"].toNumber(JSBI__default["default"].bitwiseAnd(JSBI__default["default"].signedRightShift(lng, JSBI__default["default"].multiply(JSBI__default["default"].BigInt(i), JSBI__default["default"].BigInt(8))), JSBI__default["default"].BigInt(0xff))); - } - return output; -} -function getRawBitsJSBI(value) { - const view = new DataView(new ArrayBuffer(8)); - view.setFloat64(0, value); - return JSBI__default["default"].BigInt(`0x${buf2hex(view.buffer)}`); -} -function buf2hex(buffer) { - return Array.prototype.map - .call(new Uint8Array(buffer), (x) => ("00" + x.toString(16)).slice(-2)) - .join(""); -} - -// Copyright (c) Microsoft Corporation. -function writeStringForBinaryEncoding(payload) { - let outputStream = Buffer.from(BytePrefix.String, "hex"); - const MAX_STRING_BYTES_TO_APPEND = 100; - const byteArray = [...Buffer.from(payload)]; - const isShortString = payload.length <= MAX_STRING_BYTES_TO_APPEND; - for (let index = 0; index < (isShortString ? byteArray.length : MAX_STRING_BYTES_TO_APPEND + 1); index++) { - let charByte = byteArray[index]; - if (charByte < 0xff) { - charByte++; - } - outputStream = Buffer.concat([outputStream, Buffer.from(charByte.toString(16), "hex")]); - } - if (isShortString) { - outputStream = Buffer.concat([outputStream, Buffer.from(BytePrefix.Undefined, "hex")]); - } - return outputStream; -} - -// +----------------------------------------------------------------------+ -// | murmurHash3js.js v3.0.1 // https://github.com/pid/murmurHash3js -// | A javascript implementation of MurmurHash3's x86 hashing algorithms. | -// |----------------------------------------------------------------------| -// | Copyright (c) 2012-2015 Karan Lyons | -// | https://github.com/karanlyons/murmurHash3.js/blob/c1778f75792abef7bdd74bc85d2d4e1a3d25cfe9/murmurHash3.js | -// | Freely distributable under the MIT license. | -// +----------------------------------------------------------------------+ -// PRIVATE FUNCTIONS -// ----------------- -function _x86Multiply(m, n) { - // - // Given two 32bit ints, returns the two multiplied together as a - // 32bit int. - // - return (m & 0xffff) * n + ((((m >>> 16) * n) & 0xffff) << 16); -} -function _x86Rotl(m, n) { - // - // Given a 32bit int and an int representing a number of bit positions, - // returns the 32bit int rotated left by that number of positions. - // - return (m << n) | (m >>> (32 - n)); -} -function _x86Fmix(h) { - // - // Given a block, returns murmurHash3's final x86 mix of that block. - // - h ^= h >>> 16; - h = _x86Multiply(h, 0x85ebca6b); - h ^= h >>> 13; - h = _x86Multiply(h, 0xc2b2ae35); - h ^= h >>> 16; - return h; -} -function _x64Add(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // added together as a 64bit int (as an array of two 32bit ints). - // - m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; - n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; - const o = [0, 0, 0, 0]; - o[3] += m[3] + n[3]; - o[2] += o[3] >>> 16; - o[3] &= 0xffff; - o[2] += m[2] + n[2]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[1] += m[1] + n[1]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[0] += m[0] + n[0]; - o[0] &= 0xffff; - return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; -} -function _x64Multiply(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // multiplied together as a 64bit int (as an array of two 32bit ints). - // - m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; - n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; - const o = [0, 0, 0, 0]; - o[3] += m[3] * n[3]; - o[2] += o[3] >>> 16; - o[3] &= 0xffff; - o[2] += m[2] * n[3]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[2] += m[3] * n[2]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[1] += m[1] * n[3]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[1] += m[2] * n[2]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[1] += m[3] * n[1]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[0] += m[0] * n[3] + m[1] * n[2] + m[2] * n[1] + m[3] * n[0]; - o[0] &= 0xffff; - return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; -} -function _x64Rotl(m, n) { - // - // Given a 64bit int (as an array of two 32bit ints) and an int - // representing a number of bit positions, returns the 64bit int (as an - // array of two 32bit ints) rotated left by that number of positions. - // - n %= 64; - if (n === 32) { - return [m[1], m[0]]; - } - else if (n < 32) { - return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]; - } - else { - n -= 32; - return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]; - } -} -function _x64LeftShift(m, n) { - // - // Given a 64bit int (as an array of two 32bit ints) and an int - // representing a number of bit positions, returns the 64bit int (as an - // array of two 32bit ints) shifted left by that number of positions. - // - n %= 64; - if (n === 0) { - return m; - } - else if (n < 32) { - return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]; - } - else { - return [m[1] << (n - 32), 0]; - } -} -function _x64Xor(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // xored together as a 64bit int (as an array of two 32bit ints). - // - return [m[0] ^ n[0], m[1] ^ n[1]]; -} -function _x64Fmix(h) { - // - // Given a block, returns murmurHash3's final x64 mix of that block. - // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the - // only place where we need to right shift 64bit ints.) - // - h = _x64Xor(h, [0, h[0] >>> 1]); - h = _x64Multiply(h, [0xff51afd7, 0xed558ccd]); - h = _x64Xor(h, [0, h[0] >>> 1]); - h = _x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]); - h = _x64Xor(h, [0, h[0] >>> 1]); - return h; -} -// PUBLIC FUNCTIONS -// ---------------- -function x86Hash32(bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 32 bit hash - // using the x86 flavor of MurmurHash3, as an unsigned int. - // - seed = seed || 0; - const remainder = bytes.length % 4; - const blocks = bytes.length - remainder; - let h1 = seed; - let k1 = 0; - const c1 = 0xcc9e2d51; - const c2 = 0x1b873593; - let j = 0; - for (let i = 0; i < blocks; i = i + 4) { - k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - h1 = _x86Rotl(h1, 13); - h1 = _x86Multiply(h1, 5) + 0xe6546b64; - j = i + 4; - } - k1 = 0; - switch (remainder) { - case 3: - k1 ^= bytes[j + 2] << 16; - case 2: - k1 ^= bytes[j + 1] << 8; - case 1: - k1 ^= bytes[j]; - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - } - h1 ^= bytes.length; - h1 = _x86Fmix(h1); - return h1 >>> 0; -} -function x86Hash128(bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 128 bit - // hash using the x86 flavor of MurmurHash3, as an unsigned hex. - // - seed = seed || 0; - const remainder = bytes.length % 16; - const blocks = bytes.length - remainder; - let h1 = seed; - let h2 = seed; - let h3 = seed; - let h4 = seed; - let k1 = 0; - let k2 = 0; - let k3 = 0; - let k4 = 0; - const c1 = 0x239b961b; - const c2 = 0xab0e9789; - const c3 = 0x38b34ae5; - const c4 = 0xa1e38b93; - let j = 0; - for (let i = 0; i < blocks; i = i + 16) { - k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); - k2 = bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24); - k3 = bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24); - k4 = bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24); - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - h1 = _x86Rotl(h1, 19); - h1 += h2; - h1 = _x86Multiply(h1, 5) + 0x561ccd1b; - k2 = _x86Multiply(k2, c2); - k2 = _x86Rotl(k2, 16); - k2 = _x86Multiply(k2, c3); - h2 ^= k2; - h2 = _x86Rotl(h2, 17); - h2 += h3; - h2 = _x86Multiply(h2, 5) + 0x0bcaa747; - k3 = _x86Multiply(k3, c3); - k3 = _x86Rotl(k3, 17); - k3 = _x86Multiply(k3, c4); - h3 ^= k3; - h3 = _x86Rotl(h3, 15); - h3 += h4; - h3 = _x86Multiply(h3, 5) + 0x96cd1c35; - k4 = _x86Multiply(k4, c4); - k4 = _x86Rotl(k4, 18); - k4 = _x86Multiply(k4, c1); - h4 ^= k4; - h4 = _x86Rotl(h4, 13); - h4 += h1; - h4 = _x86Multiply(h4, 5) + 0x32ac3b17; - j = i + 16; - } - k1 = 0; - k2 = 0; - k3 = 0; - k4 = 0; - switch (remainder) { - case 15: - k4 ^= bytes[j + 14] << 16; - case 14: - k4 ^= bytes[j + 13] << 8; - case 13: - k4 ^= bytes[j + 12]; - k4 = _x86Multiply(k4, c4); - k4 = _x86Rotl(k4, 18); - k4 = _x86Multiply(k4, c1); - h4 ^= k4; - case 12: - k3 ^= bytes[j + 11] << 24; - case 11: - k3 ^= bytes[j + 10] << 16; - case 10: - k3 ^= bytes[j + 9] << 8; - case 9: - k3 ^= bytes[j + 8]; - k3 = _x86Multiply(k3, c3); - k3 = _x86Rotl(k3, 17); - k3 = _x86Multiply(k3, c4); - h3 ^= k3; - case 8: - k2 ^= bytes[j + 7] << 24; - case 7: - k2 ^= bytes[j + 6] << 16; - case 6: - k2 ^= bytes[j + 5] << 8; - case 5: - k2 ^= bytes[j + 4]; - k2 = _x86Multiply(k2, c2); - k2 = _x86Rotl(k2, 16); - k2 = _x86Multiply(k2, c3); - h2 ^= k2; - case 4: - k1 ^= bytes[j + 3] << 24; - case 3: - k1 ^= bytes[j + 2] << 16; - case 2: - k1 ^= bytes[j + 1] << 8; - case 1: - k1 ^= bytes[j]; - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - } - h1 ^= bytes.length; - h2 ^= bytes.length; - h3 ^= bytes.length; - h4 ^= bytes.length; - h1 += h2; - h1 += h3; - h1 += h4; - h2 += h1; - h3 += h1; - h4 += h1; - h1 = _x86Fmix(h1); - h2 = _x86Fmix(h2); - h3 = _x86Fmix(h3); - h4 = _x86Fmix(h4); - h1 += h2; - h1 += h3; - h1 += h4; - h2 += h1; - h3 += h1; - h4 += h1; - return (("00000000" + (h1 >>> 0).toString(16)).slice(-8) + - ("00000000" + (h2 >>> 0).toString(16)).slice(-8) + - ("00000000" + (h3 >>> 0).toString(16)).slice(-8) + - ("00000000" + (h4 >>> 0).toString(16)).slice(-8)); -} -function x64Hash128(bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 128 bit - // hash using the x64 flavor of MurmurHash3, as an unsigned hex. - // - seed = seed || 0; - const remainder = bytes.length % 16; - const blocks = bytes.length - remainder; - let h1 = [0, seed]; - let h2 = [0, seed]; - let k1 = [0, 0]; - let k2 = [0, 0]; - const c1 = [0x87c37b91, 0x114253d5]; - const c2 = [0x4cf5ad43, 0x2745937f]; - let j = 0; - for (let i = 0; i < blocks; i = i + 16) { - k1 = [ - bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24), - bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24), - ]; - k2 = [ - bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24), - bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24), - ]; - k1 = _x64Multiply(k1, c1); - k1 = _x64Rotl(k1, 31); - k1 = _x64Multiply(k1, c2); - h1 = _x64Xor(h1, k1); - h1 = _x64Rotl(h1, 27); - h1 = _x64Add(h1, h2); - h1 = _x64Add(_x64Multiply(h1, [0, 5]), [0, 0x52dce729]); - k2 = _x64Multiply(k2, c2); - k2 = _x64Rotl(k2, 33); - k2 = _x64Multiply(k2, c1); - h2 = _x64Xor(h2, k2); - h2 = _x64Rotl(h2, 31); - h2 = _x64Add(h2, h1); - h2 = _x64Add(_x64Multiply(h2, [0, 5]), [0, 0x38495ab5]); - j = i + 16; - } - k1 = [0, 0]; - k2 = [0, 0]; - switch (remainder) { - case 15: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 14]], 48)); - case 14: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 13]], 40)); - case 13: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 12]], 32)); - case 12: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 11]], 24)); - case 11: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 10]], 16)); - case 10: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 9]], 8)); - case 9: - k2 = _x64Xor(k2, [0, bytes[j + 8]]); - k2 = _x64Multiply(k2, c2); - k2 = _x64Rotl(k2, 33); - k2 = _x64Multiply(k2, c1); - h2 = _x64Xor(h2, k2); - case 8: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 7]], 56)); - case 7: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 6]], 48)); - case 6: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 5]], 40)); - case 5: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 4]], 32)); - case 4: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 3]], 24)); - case 3: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 2]], 16)); - case 2: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 1]], 8)); - case 1: - k1 = _x64Xor(k1, [0, bytes[j]]); - k1 = _x64Multiply(k1, c1); - k1 = _x64Rotl(k1, 31); - k1 = _x64Multiply(k1, c2); - h1 = _x64Xor(h1, k1); - } - h1 = _x64Xor(h1, [0, bytes.length]); - h2 = _x64Xor(h2, [0, bytes.length]); - h1 = _x64Add(h1, h2); - h2 = _x64Add(h2, h1); - h1 = _x64Fmix(h1); - h2 = _x64Fmix(h2); - h1 = _x64Add(h1, h2); - h2 = _x64Add(h2, h1); - // Here we reverse h1 and h2 in Cosmos - // This is an implementation detail and not part of the public spec - const h1Buff = Buffer.from(("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + - ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8), "hex"); - const h1Reversed = reverse$1(h1Buff).toString("hex"); - const h2Buff = Buffer.from(("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + - ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8), "hex"); - const h2Reversed = reverse$1(h2Buff).toString("hex"); - return h1Reversed + h2Reversed; -} -function reverse$1(buff) { - const buffer = Buffer.allocUnsafe(buff.length); - for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) { - buffer[i] = buff[j]; - buffer[j] = buff[i]; - } - return buffer; -} -var MurmurHash = { - version: "3.0.0", - x86: { - hash32: x86Hash32, - hash128: x86Hash128, - }, - x64: { - hash128: x64Hash128, - }, - inputValidation: true, -}; - -// Copyright (c) Microsoft Corporation. -const MAX_STRING_CHARS = 100; -function hashV1PartitionKey(partitionKey) { - const toHash = prefixKeyByType$1(partitionKey); - const hash = MurmurHash.x86.hash32(toHash); - const encodedJSBI = writeNumberForBinaryEncodingJSBI(hash); - const encodedValue = encodeByType(partitionKey); - return Buffer.concat([encodedJSBI, encodedValue]).toString("hex").toUpperCase(); -} -function prefixKeyByType$1(key) { - let bytes; - switch (typeof key) { - case "string": { - const truncated = key.substr(0, MAX_STRING_CHARS); - bytes = Buffer.concat([ - Buffer.from(BytePrefix.String, "hex"), - Buffer.from(truncated), - Buffer.from(BytePrefix.Undefined, "hex"), - ]); - return bytes; - } - case "number": { - const numberBytes = doubleToByteArrayJSBI(key); - bytes = Buffer.concat([Buffer.from(BytePrefix.Number, "hex"), numberBytes]); - return bytes; - } - case "boolean": { - const prefix = key ? BytePrefix.True : BytePrefix.False; - return Buffer.from(prefix, "hex"); - } - case "object": { - if (key === null) { - return Buffer.from(BytePrefix.Null, "hex"); - } - return Buffer.from(BytePrefix.Undefined, "hex"); - } - case "undefined": { - return Buffer.from(BytePrefix.Undefined, "hex"); - } - default: - throw new Error(`Unexpected type: ${typeof key}`); - } -} -function encodeByType(key) { - switch (typeof key) { - case "string": { - const truncated = key.substr(0, MAX_STRING_CHARS); - return writeStringForBinaryEncoding(truncated); - } - case "number": { - const encodedJSBI = writeNumberForBinaryEncodingJSBI(key); - return encodedJSBI; - } - case "boolean": { - const prefix = key ? BytePrefix.True : BytePrefix.False; - return Buffer.from(prefix, "hex"); - } - case "object": - if (key === null) { - return Buffer.from(BytePrefix.Null, "hex"); - } - return Buffer.from(BytePrefix.Undefined, "hex"); - case "undefined": - return Buffer.from(BytePrefix.Undefined, "hex"); - default: - throw new Error(`Unexpected type: ${typeof key}`); - } -} - -// Copyright (c) Microsoft Corporation. -function hashV2PartitionKey(partitionKey) { - const toHash = prefixKeyByType(partitionKey); - const hash = MurmurHash.x64.hash128(toHash); - const reverseBuff = reverse(Buffer.from(hash, "hex")); - reverseBuff[0] &= 0x3f; - return reverseBuff.toString("hex").toUpperCase(); -} -function prefixKeyByType(key) { - let bytes; - switch (typeof key) { - case "string": { - bytes = Buffer.concat([ - Buffer.from(BytePrefix.String, "hex"), - Buffer.from(key), - Buffer.from(BytePrefix.Infinity, "hex"), - ]); - return bytes; - } - case "number": { - const numberBytes = doubleToByteArrayJSBI(key); - bytes = Buffer.concat([Buffer.from(BytePrefix.Number, "hex"), numberBytes]); - return bytes; - } - case "boolean": { - const prefix = key ? BytePrefix.True : BytePrefix.False; - return Buffer.from(prefix, "hex"); - } - case "object": { - if (key === null) { - return Buffer.from(BytePrefix.Null, "hex"); - } - return Buffer.from(BytePrefix.Undefined, "hex"); - } - case "undefined": { - return Buffer.from(BytePrefix.Undefined, "hex"); - } - default: - throw new Error(`Unexpected type: ${typeof key}`); - } -} -function reverse(buff) { - const buffer = Buffer.allocUnsafe(buff.length); - for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) { - buffer[i] = buff[j]; - buffer[j] = buff[i]; - } - return buffer; -} - -// Copyright (c) Microsoft Corporation. -const uuid$1 = uuid$3.v4; -/** - * @hidden - */ -function isChangeFeedOptions(options) { - const optionsType = typeof options; - return (options && !(optionsType === "string" || optionsType === "boolean" || optionsType === "number")); -} -/** - * Operations for creating new items, and reading/querying all items - * - * @see {@link Item} for reading, replacing, or deleting an existing container; use `.item(id)`. - */ -class Items { - /** - * Create an instance of {@link Items} linked to the parent {@link Container}. - * @param container - The parent container. - * @hidden - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options = {}) { - const path = getPathFromLink(this.container.url, exports.ResourceType.item); - const id = getIdFromLink(this.container.url); - const fetchFunction = (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.item, - resourceId: id, - resultFn: (result) => (result ? result.Documents : []), - query, - options: innerOptions, - partitionKey: options.partitionKey, - }); - }; - return new QueryIterator(this.clientContext, query, options, fetchFunction, this.container.url, exports.ResourceType.item); - } - readChangeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions) { - if (isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) { - return this.changeFeed(partitionKeyOrChangeFeedOptions); - } - else { - return this.changeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions); - } - } - changeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions) { - let partitionKey; - if (!changeFeedOptions && isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) { - partitionKey = undefined; - changeFeedOptions = partitionKeyOrChangeFeedOptions; - } - else if (partitionKeyOrChangeFeedOptions !== undefined && - !isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) { - partitionKey = partitionKeyOrChangeFeedOptions; - } - if (!changeFeedOptions) { - changeFeedOptions = {}; - } - const path = getPathFromLink(this.container.url, exports.ResourceType.item); - const id = getIdFromLink(this.container.url); - return new ChangeFeedIterator(this.clientContext, id, path, partitionKey, changeFeedOptions); - } - readAll(options) { - return this.query("SELECT * from c", options); - } - /** - * Create an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - async create(body, options = {}) { - // Generate random document id if the id is missing in the payload and - // options.disableAutomaticIdGeneration != true - if ((body.id === undefined || body.id === "") && !options.disableAutomaticIdGeneration) { - body.id = uuid$1(); - } - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - const partitionKey = extractPartitionKey(body, partitionKeyDefinition); - const err = {}; - if (!isItemResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, exports.ResourceType.item); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.item, - resourceId: id, - options, - partitionKey, - }); - const ref = new Item(this.container, response.result.id, partitionKey, this.clientContext); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, ref); - } - async upsert(body, options = {}) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - const partitionKey = extractPartitionKey(body, partitionKeyDefinition); - // Generate random document id if the id is missing in the payload and - // options.disableAutomaticIdGeneration != true - if ((body.id === undefined || body.id === "") && !options.disableAutomaticIdGeneration) { - body.id = uuid$1(); - } - const err = {}; - if (!isItemResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, exports.ResourceType.item); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.upsert({ - body, - path, - resourceType: exports.ResourceType.item, - resourceId: id, - options, - partitionKey, - }); - const ref = new Item(this.container, response.result.id, partitionKey, this.clientContext); - return new ItemResponse(response.result, response.headers, response.code, response.substatus, ref); - } - /** - * Execute bulk operations on items. - * - * Bulk takes an array of Operations which are typed based on what the operation does. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is optional at the top level if present in the resourceBody - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.bulk(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param bulkOptions - Optional options object to modify bulk behavior. Pass \{ continueOnError: true \} to continue executing operations when one fails. (Defaults to false) ** NOTE: THIS WILL DEFAULT TO TRUE IN THE 4.0 RELEASE - * @param options - Used for modifying the request. - */ - async bulk(operations, bulkOptions, options) { - const { resources: partitionKeyRanges } = await this.container - .readPartitionKeyRanges() - .fetchAll(); - const { resource: definition } = await this.container.getPartitionKeyDefinition(); - const batches = partitionKeyRanges.map((keyRange) => { - return { - min: keyRange.minInclusive, - max: keyRange.maxExclusive, - rangeId: keyRange.id, - indexes: [], - operations: [], - }; - }); - operations - .map((operation) => decorateOperation(operation, definition, options)) - .forEach((operation, index) => { - const partitionProp = definition.paths[0].replace("/", ""); - const isV2 = definition.version && definition.version === 2; - const toHashKey = getPartitionKeyToHash(operation, partitionProp); - const hashed = isV2 ? hashV2PartitionKey(toHashKey) : hashV1PartitionKey(toHashKey); - const batchForKey = batches.find((batch) => { - return isKeyInRange(batch.min, batch.max, hashed); - }); - batchForKey.operations.push(operation); - batchForKey.indexes.push(index); - }); - const path = getPathFromLink(this.container.url, exports.ResourceType.item); - const orderedResponses = []; - await Promise.all(batches - .filter((batch) => batch.operations.length) - .flatMap((batch) => splitBatchBasedOnBodySize(batch)) - .map(async (batch) => { - if (batch.operations.length > 100) { - throw new Error("Cannot run bulk request with more than 100 operations per partition"); - } - try { - const response = await this.clientContext.bulk({ - body: batch.operations, - partitionKeyRangeId: batch.rangeId, - path, - resourceId: this.container.url, - bulkOptions, - options, - }); - response.result.forEach((operationResponse, index) => { - orderedResponses[batch.indexes[index]] = operationResponse; - }); - } - catch (err) { - // In the case of 410 errors, we need to recompute the partition key ranges - // and redo the batch request, however, 410 errors occur for unsupported - // partition key types as well since we don't support them, so for now we throw - if (err.code === 410) { - throw new Error("Partition key error. Either the partitions have split or an operation has an unsupported partitionKey type"); - } - throw new Error(`Bulk request errored with: ${err.message}`); - } - })); - return orderedResponses; - } - /** - * Execute transactional batch operations on items. - * - * Batch takes an array of Operations which are typed based on what the operation does. Batch is transactional and will rollback all operations if one fails. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is required as a second argument to batch, but defaults to the default partition key - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.batch(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param options - Used for modifying the request - */ - async batch(operations, partitionKey = "[{}]", options) { - operations.map((operation) => decorateBatchOperation(operation, options)); - const path = getPathFromLink(this.container.url, exports.ResourceType.item); - if (operations.length > 100) { - throw new Error("Cannot run batch request with more than 100 operations per partition"); - } - try { - const response = await this.clientContext.batch({ - body: operations, - partitionKey, - path, - resourceId: this.container.url, - options, - }); - return response; - } - catch (err) { - throw new Error(`Batch request error: ${err.message}`); - } - } -} - -class StoredProcedureResponse extends ResourceResponse { - constructor(resource, headers, statusCode, storedProcedure) { - super(resource, headers, statusCode); - this.storedProcedure = storedProcedure; - } - /** - * Alias for storedProcedure. - * - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - get sproc() { - return this.storedProcedure; - } -} - -/** - * Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id. - * - * For operations to create, read all, or query Stored Procedures, - */ -class StoredProcedure { - /** - * Creates a new instance of {@link StoredProcedure} linked to the parent {@link Container}. - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link StoredProcedure}. - * @hidden - */ - constructor(container, id, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createStoredProcedureUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the {@link StoredProcedureDefinition} for the given {@link StoredProcedure}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.sproc, - resourceId: id, - options, - }); - return new StoredProcedureResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link StoredProcedure} with the specified {@link StoredProcedureDefinition}. - * @param body - The specified {@link StoredProcedureDefinition} to replace the existing definition. - */ - async replace(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: exports.ResourceType.sproc, - resourceId: id, - options, - }); - return new StoredProcedureResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link StoredProcedure}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.sproc, - resourceId: id, - options, - }); - return new StoredProcedureResponse(response.result, response.headers, response.code, this); - } - /** - * Execute the given {@link StoredProcedure}. - * - * The specified type, T, is not enforced by the client. - * Be sure to validate the response from the stored procedure matches the type, T, you provide. - * - * @param partitionKey - The partition key to use when executing the stored procedure - * @param params - Array of parameters to pass as arguments to the given {@link StoredProcedure}. - * @param options - Additional options, such as the partition key to invoke the {@link StoredProcedure} on. - */ - async execute(partitionKey, params, options) { - if (partitionKey === undefined) { - const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition(); - partitionKey = undefinedPartitionKey(partitionKeyDefinition); - } - const response = await this.clientContext.execute({ - sprocLink: this.url, - params, - options, - partitionKey, - }); - return new ResourceResponse(response.result, response.headers, response.code); - } -} - -/** - * Operations for creating, upserting, or reading/querying all Stored Procedures. - * - * For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see `container.storedProcedure()`. - */ -class StoredProcedures { - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, exports.ResourceType.sproc); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.sproc, - resourceId: id, - resultFn: (result) => result.StoredProcedures, - query, - options: innerOptions, - }); - }); - } - /** - * Read all stored procedures. - * @example Read all stored procedures to array. - * ```typescript - * const {body: sprocList} = await containers.storedProcedures.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a StoredProcedure. - * - * Azure Cosmos DB allows stored procedures to be executed in the storage tier, - * directly against an item container. The script - * gets executed under ACID transactions on the primary storage partition of the - * specified container. For additional details, - * refer to the server-side JavaScript API documentation. - */ - async create(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, exports.ResourceType.sproc); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.sproc, - resourceId: id, - options, - }); - const ref = new StoredProcedure(this.container, response.result.id, this.clientContext); - return new StoredProcedureResponse(response.result, response.headers, response.code, ref); - } -} - -class TriggerResponse extends ResourceResponse { - constructor(resource, headers, statusCode, trigger) { - super(resource, headers, statusCode); - this.trigger = trigger; - } -} - -/** - * Operations to read, replace, or delete a {@link Trigger}. - * - * Use `container.triggers` to create, upsert, query, or read all. - */ -class Trigger { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Trigger}. - */ - constructor(container, id, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createTriggerUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the {@link TriggerDefinition} for the given {@link Trigger}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.trigger, - resourceId: id, - options, - }); - return new TriggerResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link Trigger} with the specified {@link TriggerDefinition}. - * @param body - The specified {@link TriggerDefinition} to replace the existing definition with. - */ - async replace(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: exports.ResourceType.trigger, - resourceId: id, - options, - }); - return new TriggerResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link Trigger}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.trigger, - resourceId: id, - options, - }); - return new TriggerResponse(response.result, response.headers, response.code, this); - } -} - -/** - * Operations to create, upsert, query, and read all triggers. - * - * Use `container.triggers` to read, replace, or delete a {@link Trigger}. - */ -class Triggers { - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, exports.ResourceType.trigger); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.trigger, - resourceId: id, - resultFn: (result) => result.Triggers, - query, - options: innerOptions, - }); - }); - } - /** - * Read all Triggers. - * @example Read all trigger to array. - * ```typescript - * const {body: triggerList} = await container.triggers.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a trigger. - * - * Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed - * on creates, updates and deletes. - * - * For additional details, refer to the server-side JavaScript API documentation. - */ - async create(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, exports.ResourceType.trigger); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.trigger, - resourceId: id, - options, - }); - const ref = new Trigger(this.container, response.result.id, this.clientContext); - return new TriggerResponse(response.result, response.headers, response.code, ref); - } -} - -class UserDefinedFunctionResponse extends ResourceResponse { - constructor(resource, headers, statusCode, udf) { - super(resource, headers, statusCode); - this.userDefinedFunction = udf; - } - /** - * Alias for `userDefinedFunction(id)`. - * - * A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. - */ - get udf() { - return this.userDefinedFunction; - } -} - -/** - * Used to read, replace, or delete a specified User Definied Function by id. - * - * @see {@link UserDefinedFunction} to create, upsert, query, read all User Defined Functions. - */ -class UserDefinedFunction { - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link UserDefinedFunction}. - */ - constructor(container, id, clientContext) { - this.container = container; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createUserDefinedFunctionUri(this.container.database.id, this.container.id, this.id); - } - /** - * Read the {@link UserDefinedFunctionDefinition} for the given {@link UserDefinedFunction}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.udf, - resourceId: id, - options, - }); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link UserDefinedFunction} with the specified {@link UserDefinedFunctionDefinition}. - * @param options - - */ - async replace(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: exports.ResourceType.udf, - resourceId: id, - options, - }); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link UserDefined}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.udf, - resourceId: id, - options, - }); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this); - } -} - -/** - * Used to create, upsert, query, or read all User Defined Functions. - * - * @see {@link UserDefinedFunction} to read, replace, or delete a given User Defined Function by id. - */ -class UserDefinedFunctions { - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.container.url, exports.ResourceType.udf); - const id = getIdFromLink(this.container.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.udf, - resourceId: id, - resultFn: (result) => result.UserDefinedFunctions, - query, - options: innerOptions, - }); - }); - } - /** - * Read all User Defined Functions. - * @example Read all User Defined Functions to array. - * ```typescript - * const {body: udfList} = await container.userDefinedFunctions.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a UserDefinedFunction. - * - * Azure Cosmos DB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers. - * - * For additional details, refer to the server-side JavaScript API documentation. - * - */ - async create(body, options) { - if (body.body) { - body.body = body.body.toString(); - } - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.container.url, exports.ResourceType.udf); - const id = getIdFromLink(this.container.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.udf, - resourceId: id, - options, - }); - const ref = new UserDefinedFunction(this.container, response.result.id, this.clientContext); - return new UserDefinedFunctionResponse(response.result, response.headers, response.code, ref); - } -} - -// Copyright (c) Microsoft Corporation. -class Scripts { - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container, clientContext) { - this.container = container; - this.clientContext = clientContext; - } - /** - * Used to read, replace, or delete a specific, existing {@link StoredProcedure} by id. - * - * Use `.storedProcedures` for creating new stored procedures, or querying/reading all stored procedures. - * @param id - The id of the {@link StoredProcedure}. - */ - storedProcedure(id) { - return new StoredProcedure(this.container, id, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link Trigger} by id. - * - * Use `.triggers` for creating new triggers, or querying/reading all triggers. - * @param id - The id of the {@link Trigger}. - */ - trigger(id) { - return new Trigger(this.container, id, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link UserDefinedFunction} by id. - * - * Use `.userDefinedFunctions` for creating new user defined functions, or querying/reading all user defined functions. - * @param id - The id of the {@link UserDefinedFunction}. - */ - userDefinedFunction(id) { - return new UserDefinedFunction(this.container, id, this.clientContext); - } - /** - * Operations for creating new stored procedures, and reading/querying all stored procedures. - * - * For reading, replacing, or deleting an existing stored procedure, use `.storedProcedure(id)`. - */ - get storedProcedures() { - if (!this.$sprocs) { - this.$sprocs = new StoredProcedures(this.container, this.clientContext); - } - return this.$sprocs; - } - /** - * Operations for creating new triggers, and reading/querying all triggers. - * - * For reading, replacing, or deleting an existing trigger, use `.trigger(id)`. - */ - get triggers() { - if (!this.$triggers) { - this.$triggers = new Triggers(this.container, this.clientContext); - } - return this.$triggers; - } - /** - * Operations for creating new user defined functions, and reading/querying all user defined functions. - * - * For reading, replacing, or deleting an existing user defined function, use `.userDefinedFunction(id)`. - */ - get userDefinedFunctions() { - if (!this.$udfs) { - this.$udfs = new UserDefinedFunctions(this.container, this.clientContext); - } - return this.$udfs; - } -} - -/** Response object for Container operations */ -class ContainerResponse extends ResourceResponse { - constructor(resource, headers, statusCode, container) { - super(resource, headers, statusCode); - this.container = container; - } -} - -class OfferResponse extends ResourceResponse { - constructor(resource, headers, statusCode, offer) { - super(resource, headers, statusCode); - this.offer = offer; - } -} - -/** - * Use to read or replace an existing {@link Offer} by id. - * - * @see {@link Offers} to query or read all offers. - */ -class Offer { - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database Account. - * @param id - The id of the given {@link Offer}. - */ - constructor(client, id, clientContext) { - this.client = client; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return `/${Constants.Path.OffersPathSegment}/${this.id}`; - } - /** - * Read the {@link OfferDefinition} for the given {@link Offer}. - */ - async read(options) { - const response = await this.clientContext.read({ - path: this.url, - resourceType: exports.ResourceType.offer, - resourceId: this.id, - options, - }); - return new OfferResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link Offer} with the specified {@link OfferDefinition}. - * @param body - The specified {@link OfferDefinition} - */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const response = await this.clientContext.replace({ - body, - path: this.url, - resourceType: exports.ResourceType.offer, - resourceId: this.id, - options, - }); - return new OfferResponse(response.result, response.headers, response.code, this); - } -} - -/** - * Use to query or read all Offers. - * - * @see {@link Offer} to read or replace an existing {@link Offer} by id. - */ -class Offers { - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the offers. - */ - constructor(client, clientContext) { - this.client = client; - this.clientContext = clientContext; - } - query(query, options) { - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path: "/offers", - resourceType: exports.ResourceType.offer, - resourceId: "", - resultFn: (result) => result.Offers, - query, - options: innerOptions, - }); - }); - } - /** - * Read all offers. - * @example Read all offers to array. - * ```typescript - * const {body: offerList} = await client.offers.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } -} - -/** - * Operations for reading, replacing, or deleting a specific, existing container by id. - * - * @see {@link Containers} for creating new containers, and reading/querying all containers; use `.containers`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `container(id).read()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -class Container { - /** - * Returns a container instance. Note: You should get this from `database.container(id)`, rather than creating your own object. - * @param database - The parent {@link Database}. - * @param id - The id of the given container. - * @hidden - */ - constructor(database, id, clientContext) { - this.database = database; - this.id = id; - this.clientContext = clientContext; - } - /** - * Operations for creating new items, and reading/querying all items - * - * For reading, replacing, or deleting an existing item, use `.item(id)`. - * - * @example Create a new item - * ```typescript - * const {body: createdItem} = await container.items.create({id: "", properties: {}}); - * ``` - */ - get items() { - if (!this.$items) { - this.$items = new Items(this, this.clientContext); - } - return this.$items; - } - /** - * All operations for Stored Procedures, Triggers, and User Defined Functions - */ - get scripts() { - if (!this.$scripts) { - this.$scripts = new Scripts(this, this.clientContext); - } - return this.$scripts; - } - /** - * Operations for reading and querying conflicts for the given container. - * - * For reading or deleting a specific conflict, use `.conflict(id)`. - */ - get conflicts() { - if (!this.$conflicts) { - this.$conflicts = new Conflicts(this, this.clientContext); - } - return this.$conflicts; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createDocumentCollectionUri(this.database.id, this.id); - } - /** - * Used to read, replace, or delete a specific, existing {@link Item} by id. - * - * Use `.items` for creating new items, or querying/reading all items. - * - * @param id - The id of the {@link Item}. - * @param partitionKeyValue - The value of the {@link Item} partition key - * @example Replace an item - * `const {body: replacedItem} = await container.item("", "").replace({id: "", title: "Updated post", authorID: 5});` - */ - item(id, partitionKeyValue) { - return new Item(this, id, partitionKeyValue, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link Conflict} by id. - * - * Use `.conflicts` for creating new conflicts, or querying/reading all conflicts. - * @param id - The id of the {@link Conflict}. - */ - conflict(id, partitionKey) { - return new Conflict(this, id, this.clientContext, partitionKey); - } - /** Read the container's definition */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.container, - resourceId: id, - options, - }); - this.clientContext.partitionKeyDefinitionCache[this.url] = response.result.partitionKey; - return new ContainerResponse(response.result, response.headers, response.code, this); - } - /** Replace the container's definition */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: exports.ResourceType.container, - resourceId: id, - options, - }); - return new ContainerResponse(response.result, response.headers, response.code, this); - } - /** Delete the container */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.container, - resourceId: id, - options, - }); - return new ContainerResponse(response.result, response.headers, response.code, this); - } - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @deprecated This method has been renamed to readPartitionKeyDefinition. - */ - async getPartitionKeyDefinition() { - return this.readPartitionKeyDefinition(); - } - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @hidden - */ - async readPartitionKeyDefinition() { - // $ISSUE-felixfan-2016-03-17: Make name based path and link based path use the same key - // $ISSUE-felixfan-2016-03-17: Refresh partitionKeyDefinitionCache when necessary - if (this.url in this.clientContext.partitionKeyDefinitionCache) { - return new ResourceResponse(this.clientContext.partitionKeyDefinitionCache[this.url], {}, 0); - } - const { headers, statusCode } = await this.read(); - return new ResourceResponse(this.clientContext.partitionKeyDefinitionCache[this.url], headers, statusCode); - } - /** - * Gets offer on container. If none exists, returns an OfferResponse with undefined. - */ - async readOffer(options = {}) { - const { resource: container } = await this.read(); - const path = "/offers"; - const url = container._self; - const response = await this.clientContext.queryFeed({ - path, - resourceId: "", - resourceType: exports.ResourceType.offer, - query: `SELECT * from root where root.resource = "${url}"`, - resultFn: (result) => result.Offers, - options, - }); - const offer = response.result[0] - ? new Offer(this.database.client, response.result[0].id, this.clientContext) - : undefined; - return new OfferResponse(response.result[0], response.headers, response.code, offer); - } - async getQueryPlan(query) { - const path = getPathFromLink(this.url); - return this.clientContext.getQueryPlan(path + "/docs", exports.ResourceType.item, getIdFromLink(this.url), query); - } - readPartitionKeyRanges(feedOptions) { - feedOptions = feedOptions || {}; - return this.clientContext.queryPartitionKeyRanges(this.url, undefined, feedOptions); - } - /** - * Delete all documents belong to the container for the provided partition key value - * @param partitionKey - The partition key value of the items to be deleted - */ - async deleteAllItemsForPartitionKey(partitionKey, options) { - let path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - path = path + "/operations/partitionkeydelete"; - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.container, - resourceId: id, - options, - partitionKey: partitionKey, - method: exports.HTTPMethod.post, - }); - return new ContainerResponse(response.result, response.headers, response.code, this); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -function validateOffer(body) { - if (body.throughput) { - if (body.maxThroughput) { - console.log("should be erroring"); - throw new Error("Cannot specify `throughput` with `maxThroughput`"); - } - if (body.autoUpgradePolicy) { - throw new Error("Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead"); - } - } -} - -/** - * Operations for creating new containers, and reading/querying all containers - * - * @see {@link Container} for reading, replacing, or deleting an existing container; use `.container(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `containers.readAll()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -class Containers { - constructor(database, clientContext) { - this.database = database; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.database.url, exports.ResourceType.container); - const id = getIdFromLink(this.database.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.container, - resourceId: id, - resultFn: (result) => result.DocumentCollections, - query, - options: innerOptions, - }); - }); - } - /** - * Creates a container. - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - async create(body, options = {}) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.database.url, exports.ResourceType.container); - const id = getIdFromLink(this.database.url); - validateOffer(body); - if (body.maxThroughput) { - const autoscaleParams = { - maxThroughput: body.maxThroughput, - }; - if (body.autoUpgradePolicy) { - autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy; - } - const autoscaleHeader = JSON.stringify(autoscaleParams); - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeader, - }); - delete body.maxThroughput; - delete body.autoUpgradePolicy; - } - if (body.throughput) { - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.OfferThroughput]: body.throughput, - }); - delete body.throughput; - } - if (typeof body.partitionKey === "string") { - if (!body.partitionKey.startsWith("/")) { - throw new Error("Partition key must start with '/'"); - } - body.partitionKey = { - paths: [body.partitionKey], - }; - } - // If they don't specify a partition key, use the default path - if (!body.partitionKey || !body.partitionKey.paths) { - body.partitionKey = { - paths: [DEFAULT_PARTITION_KEY_PATH], - }; - } - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.container, - resourceId: id, - options, - }); - const ref = new Container(this.database, response.result.id, this.clientContext); - return new ContainerResponse(response.result, response.headers, response.code, ref); - } - /** - * Checks if a Container exists, and, if it doesn't, creates it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * You should confirm that the output matches the body you passed in for non-default properties (i.e. indexing policy/etc.) - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - async createIfNotExists(body, options) { - if (!body || body.id === null || body.id === undefined) { - throw new Error("body parameter must be an object with an id property"); - } - /* - 1. Attempt to read the Container (based on an assumption that most containers will already exist, so its faster) - 2. If it fails with NotFound error, attempt to create the container. Else, return the read results. - */ - try { - const readResponse = await this.database.container(body.id).read(options); - return readResponse; - } - catch (err) { - if (err.code === StatusCodes.NotFound) { - const createResponse = await this.create(body, options); - // Must merge the headers to capture RU costskaty - mergeHeaders(createResponse.headers, err.headers); - return createResponse; - } - else { - throw err; - } - } - } - /** - * Read all containers. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const {body: containerList} = await client.database("").containers.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } -} - -class PermissionResponse extends ResourceResponse { - constructor(resource, headers, statusCode, permission) { - super(resource, headers, statusCode); - this.permission = permission; - } -} - -/** - * Use to read, replace, or delete a given {@link Permission} by id. - * - * @see {@link Permissions} to create, upsert, query, or read all Permissions. - */ -class Permission { - /** - * @hidden - * @param user - The parent {@link User}. - * @param id - The id of the given {@link Permission}. - */ - constructor(user, id, clientContext) { - this.user = user; - this.id = id; - this.clientContext = clientContext; - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createPermissionUri(this.user.database.id, this.user.id, this.id); - } - /** - * Read the {@link PermissionDefinition} of the given {@link Permission}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.permission, - resourceId: id, - options, - }); - return new PermissionResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link Permission} with the specified {@link PermissionDefinition}. - * @param body - The specified {@link PermissionDefinition}. - */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: exports.ResourceType.permission, - resourceId: id, - options, - }); - return new PermissionResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link Permission}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.permission, - resourceId: id, - options, - }); - return new PermissionResponse(response.result, response.headers, response.code, this); - } -} - -/** - * Use to create, replace, query, and read all Permissions. - * - * @see {@link Permission} to read, replace, or delete a specific permission by id. - */ -class Permissions { - /** - * @hidden - * @param user - The parent {@link User}. - */ - constructor(user, clientContext) { - this.user = user; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.user.url, exports.ResourceType.permission); - const id = getIdFromLink(this.user.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.permission, - resourceId: id, - resultFn: (result) => result.Permissions, - query, - options: innerOptions, - }); - }); - } - /** - * Read all permissions. - * @example Read all permissions to array. - * ```typescript - * const {body: permissionList} = await user.permissions.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a permission. - * - * A permission represents a per-User Permission to access a specific resource - * e.g. Item or Container. - * @param body - Represents the body of the permission. - */ - async create(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.user.url, exports.ResourceType.permission); - const id = getIdFromLink(this.user.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.permission, - resourceId: id, - options, - }); - const ref = new Permission(this.user, response.result.id, this.clientContext); - return new PermissionResponse(response.result, response.headers, response.code, ref); - } - /** - * Upsert a permission. - * - * A permission represents a per-User Permission to access a - * specific resource e.g. Item or Container. - */ - async upsert(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.user.url, exports.ResourceType.permission); - const id = getIdFromLink(this.user.url); - const response = await this.clientContext.upsert({ - body, - path, - resourceType: exports.ResourceType.permission, - resourceId: id, - options, - }); - const ref = new Permission(this.user, response.result.id, this.clientContext); - return new PermissionResponse(response.result, response.headers, response.code, ref); - } -} - -class UserResponse extends ResourceResponse { - constructor(resource, headers, statusCode, user) { - super(resource, headers, statusCode); - this.user = user; - } -} - -/** - * Used to read, replace, and delete Users. - * - * Additionally, you can access the permissions for a given user via `user.permission` and `user.permissions`. - * - * @see {@link Users} to create, upsert, query, or read all. - */ -class User { - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database, id, clientContext) { - this.database = database; - this.id = id; - this.clientContext = clientContext; - this.permissions = new Permissions(this, this.clientContext); - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createUserUri(this.database.id, this.id); - } - /** - * Operations to read, replace, or delete a specific Permission by id. - * - * See `client.permissions` for creating, upserting, querying, or reading all operations. - */ - permission(id) { - return new Permission(this, id, this.clientContext); - } - /** - * Read the {@link UserDefinition} for the given {@link User}. - */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.user, - resourceId: id, - options, - }); - return new UserResponse(response.result, response.headers, response.code, this); - } - /** - * Replace the given {@link User}'s definition with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition} to replace the definition. - */ - async replace(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.replace({ - body, - path, - resourceType: exports.ResourceType.user, - resourceId: id, - options, - }); - return new UserResponse(response.result, response.headers, response.code, this); - } - /** - * Delete the given {@link User}. - */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.user, - resourceId: id, - options, - }); - return new UserResponse(response.result, response.headers, response.code, this); - } -} - -/** - * Used to create, upsert, query, and read all users. - * - * @see {@link User} to read, replace, or delete a specific User by id. - */ -class Users { - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database, clientContext) { - this.database = database; - this.clientContext = clientContext; - } - query(query, options) { - const path = getPathFromLink(this.database.url, exports.ResourceType.user); - const id = getIdFromLink(this.database.url); - return new QueryIterator(this.clientContext, query, options, (innerOptions) => { - return this.clientContext.queryFeed({ - path, - resourceType: exports.ResourceType.user, - resourceId: id, - resultFn: (result) => result.Users, - query, - options: innerOptions, - }); - }); - } - /** - * Read all users.- - * @example Read all users to array. - * ```typescript - * const {body: usersList} = await database.users.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } - /** - * Create a database user with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - async create(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.database.url, exports.ResourceType.user); - const id = getIdFromLink(this.database.url); - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.user, - resourceId: id, - options, - }); - const ref = new User(this.database, response.result.id, this.clientContext); - return new UserResponse(response.result, response.headers, response.code, ref); - } - /** - * Upsert a database user with a specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - async upsert(body, options) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - const path = getPathFromLink(this.database.url, exports.ResourceType.user); - const id = getIdFromLink(this.database.url); - const response = await this.clientContext.upsert({ - body, - path, - resourceType: exports.ResourceType.user, - resourceId: id, - options, - }); - const ref = new User(this.database, response.result.id, this.clientContext); - return new UserResponse(response.result, response.headers, response.code, ref); - } -} - -/** Response object for Database operations */ -class DatabaseResponse extends ResourceResponse { - constructor(resource, headers, statusCode, database) { - super(resource, headers, statusCode); - this.database = database; - } -} - -/** - * Operations for reading or deleting an existing database. - * - * @see {@link Databases} for creating new databases, and reading/querying all databases; use `client.databases`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `database.read()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -class Database { - /** Returns a new {@link Database} instance. - * - * Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself. - */ - constructor(client, id, clientContext) { - this.client = client; - this.id = id; - this.clientContext = clientContext; - this.containers = new Containers(this, this.clientContext); - this.users = new Users(this, this.clientContext); - } - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url() { - return createDatabaseUri(this.id); - } - /** - * Used to read, replace, or delete a specific, existing {@link Database} by id. - * - * Use `.containers` creating new containers, or querying/reading all containers. - * - * @example Delete a container - * ```typescript - * await client.database("").container("").delete(); - * ``` - */ - container(id) { - return new Container(this, id, this.clientContext); - } - /** - * Used to read, replace, or delete a specific, existing {@link User} by id. - * - * Use `.users` for creating new users, or querying/reading all users. - */ - user(id) { - return new User(this, id, this.clientContext); - } - /** Read the definition of the given Database. */ - async read(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.read({ - path, - resourceType: exports.ResourceType.database, - resourceId: id, - options, - }); - return new DatabaseResponse(response.result, response.headers, response.code, this); - } - /** Delete the given Database. */ - async delete(options) { - const path = getPathFromLink(this.url); - const id = getIdFromLink(this.url); - const response = await this.clientContext.delete({ - path, - resourceType: exports.ResourceType.database, - resourceId: id, - options, - }); - return new DatabaseResponse(response.result, response.headers, response.code, this); - } - /** - * Gets offer on database. If none exists, returns an OfferResponse with undefined. - */ - async readOffer(options = {}) { - const { resource: record } = await this.read(); - const path = "/offers"; - const url = record._self; - const response = await this.clientContext.queryFeed({ - path, - resourceId: "", - resourceType: exports.ResourceType.offer, - query: `SELECT * from root where root.resource = "${url}"`, - resultFn: (result) => result.Offers, - options, - }); - const offer = response.result[0] - ? new Offer(this.client, response.result[0].id, this.clientContext) - : undefined; - return new OfferResponse(response.result[0], response.headers, response.code, offer); - } -} - -/** - * Operations for creating new databases, and reading/querying all databases - * - * @see {@link Database} for reading or deleting an existing database; use `client.database(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `databases.readAll()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -class Databases { - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database. - */ - constructor(client, clientContext) { - this.client = client; - this.clientContext = clientContext; - } - query(query, options) { - const cb = (innerOptions) => { - return this.clientContext.queryFeed({ - path: "/dbs", - resourceType: exports.ResourceType.database, - resourceId: "", - resultFn: (result) => result.Databases, - query, - options: innerOptions, - }); - }; - return new QueryIterator(this.clientContext, query, options, cb); - } - /** - * Send a request for creating a database. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - async create(body, options = {}) { - const err = {}; - if (!isResourceValid(body, err)) { - throw err; - } - validateOffer(body); - if (body.maxThroughput) { - const autoscaleParams = { - maxThroughput: body.maxThroughput, - }; - if (body.autoUpgradePolicy) { - autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy; - } - const autoscaleHeaders = JSON.stringify(autoscaleParams); - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeaders, - }); - delete body.maxThroughput; - delete body.autoUpgradePolicy; - } - if (body.throughput) { - options.initialHeaders = Object.assign({}, options.initialHeaders, { - [Constants.HttpHeaders.OfferThroughput]: body.throughput, - }); - delete body.throughput; - } - const path = "/dbs"; // TODO: constant - const response = await this.clientContext.create({ - body, - path, - resourceType: exports.ResourceType.database, - resourceId: undefined, - options, - }); - const ref = new Database(this.client, body.id, this.clientContext); - return new DatabaseResponse(response.result, response.headers, response.code, ref); - } - /** - * Check if a database exists, and if it doesn't, create it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Additional options for the request - */ - async createIfNotExists(body, options) { - if (!body || body.id === null || body.id === undefined) { - throw new Error("body parameter must be an object with an id property"); - } - /* - 1. Attempt to read the Database (based on an assumption that most databases will already exist, so its faster) - 2. If it fails with NotFound error, attempt to create the db. Else, return the read results. - */ - try { - const readResponse = await this.client.database(body.id).read(options); - return readResponse; - } - catch (err) { - if (err.code === StatusCodes.NotFound) { - const createResponse = await this.create(body, options); - // Must merge the headers to capture RU costskaty - mergeHeaders(createResponse.headers, err.headers); - return createResponse; - } - else { - throw err; - } - } - } - // TODO: DatabaseResponse for QueryIterator? - /** - * Reads all databases. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const {body: databaseList} = await client.databases.readAll().fetchAll(); - * ``` - */ - readAll(options) { - return this.query(undefined, options); - } -} - -/** - * Used to specify which type of events to execute this plug in on. - * - * @hidden - */ -exports.PluginOn = void 0; -(function (PluginOn) { - /** - * Will be executed per network request - */ - PluginOn["request"] = "request"; - /** - * Will be executed per API operation - */ - PluginOn["operation"] = "operation"; -})(exports.PluginOn || (exports.PluginOn = {})); -/** - * @internal - */ -async function executePlugins(requestContext, next, on) { - if (!requestContext.plugins) { - return next(requestContext, undefined); - } - let level = 0; - const _ = (inner) => { - if (++level >= inner.plugins.length) { - return next(requestContext, undefined); - } - else if (inner.plugins[level].on !== on) { - return _(requestContext); - } - else { - return inner.plugins[level].plugin(inner, _); - } - }; - if (requestContext.plugins[level].on !== on) { - return _(requestContext); - } - else { - return requestContext.plugins[level].plugin(requestContext, _); - } -} - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - */ -// Windows Socket Error Codes -const WindowsInterruptedFunctionCall = 10004; -/** - * @hidden - */ -const WindowsFileHandleNotValid = 10009; -/** - * @hidden - */ -const WindowsPermissionDenied = 10013; -/** - * @hidden - */ -const WindowsBadAddress = 10014; -/** - * @hidden - */ -const WindowsInvalidArgumnet = 10022; -/** - * @hidden - */ -const WindowsResourceTemporarilyUnavailable = 10035; -/** - * @hidden - */ -const WindowsOperationNowInProgress = 10036; -/** - * @hidden - */ -const WindowsAddressAlreadyInUse = 10048; -/** - * @hidden - */ -const WindowsConnectionResetByPeer = 10054; -/** - * @hidden - */ -const WindowsCannotSendAfterSocketShutdown = 10058; -/** - * @hidden - */ -const WindowsConnectionTimedOut = 10060; -/** - * @hidden - */ -const WindowsConnectionRefused = 10061; -/** - * @hidden - */ -const WindowsNameTooLong = 10063; -/** - * @hidden - */ -const WindowsHostIsDown = 10064; -/** - * @hidden - */ -const WindowsNoRouteTohost = 10065; -/** - * @hidden - */ -// Linux Error Codes -/** - * @hidden - */ -const LinuxConnectionReset = "ECONNRESET"; -// Node Error Codes -/** - * @hidden - */ -const BrokenPipe = "EPIPE"; -/** - * @hidden - */ -const CONNECTION_ERROR_CODES = [ - WindowsInterruptedFunctionCall, - WindowsFileHandleNotValid, - WindowsPermissionDenied, - WindowsBadAddress, - WindowsInvalidArgumnet, - WindowsResourceTemporarilyUnavailable, - WindowsOperationNowInProgress, - WindowsAddressAlreadyInUse, - WindowsConnectionResetByPeer, - WindowsCannotSendAfterSocketShutdown, - WindowsConnectionTimedOut, - WindowsConnectionRefused, - WindowsNameTooLong, - WindowsHostIsDown, - WindowsNoRouteTohost, - LinuxConnectionReset, - TimeoutErrorCode, - BrokenPipe, -]; -/** - * @hidden - */ -function needsRetry(operationType, code) { - if ((operationType === exports.OperationType.Read || operationType === exports.OperationType.Query) && - CONNECTION_ERROR_CODES.indexOf(code) !== -1) { - return true; - } - else { - return false; - } -} -/** - * This class implements the default connection retry policy for requests. - * @hidden - */ -class DefaultRetryPolicy { - constructor(operationType) { - this.operationType = operationType; - this.maxTries = 10; - this.currentRetryAttemptCount = 0; - this.retryAfterInMs = 1000; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - async shouldRetry(err) { - if (err) { - if (this.currentRetryAttemptCount < this.maxTries && - needsRetry(this.operationType, err.code)) { - this.currentRetryAttemptCount++; - return true; - } - } - return false; - } -} - -/** - * This class implements the retry policy for endpoint discovery. - * @hidden - */ -class EndpointDiscoveryRetryPolicy { - /** - * @param globalEndpointManager - The GlobalEndpointManager instance. - */ - constructor(globalEndpointManager, operationType) { - this.globalEndpointManager = globalEndpointManager; - this.operationType = operationType; - this.maxTries = EndpointDiscoveryRetryPolicy.maxTries; - this.currentRetryAttemptCount = 0; - this.retryAfterInMs = EndpointDiscoveryRetryPolicy.retryAfterInMs; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - async shouldRetry(err, retryContext, locationEndpoint) { - if (!err) { - return false; - } - if (!retryContext || !locationEndpoint) { - return false; - } - if (!this.globalEndpointManager.enableEndpointDiscovery) { - return false; - } - if (this.currentRetryAttemptCount >= this.maxTries) { - return false; - } - this.currentRetryAttemptCount++; - if (isReadRequest(this.operationType)) { - await this.globalEndpointManager.markCurrentLocationUnavailableForRead(locationEndpoint); - } - else { - await this.globalEndpointManager.markCurrentLocationUnavailableForWrite(locationEndpoint); - } - retryContext.retryCount = this.currentRetryAttemptCount; - retryContext.clearSessionTokenNotAvailable = false; - retryContext.retryRequestOnPreferredLocations = false; - return true; - } -} -EndpointDiscoveryRetryPolicy.maxTries = 120; // TODO: Constant? -EndpointDiscoveryRetryPolicy.retryAfterInMs = 1000; - -/** - * This class implements the resource throttle retry policy for requests. - * @hidden - */ -class ResourceThrottleRetryPolicy { - /** - * @param maxTries - Max number of retries to be performed for a request. - * @param fixedRetryIntervalInMs - Fixed retry interval in milliseconds to wait between each - * retry ignoring the retryAfter returned as part of the response. - * @param timeoutInSeconds - Max wait time in seconds to wait for a request while the - * retries are happening. - */ - constructor(maxTries = 9, fixedRetryIntervalInMs = 0, timeoutInSeconds = 30) { - this.maxTries = maxTries; - this.fixedRetryIntervalInMs = fixedRetryIntervalInMs; - /** Current retry attempt count. */ - this.currentRetryAttemptCount = 0; - /** Cummulative wait time in milliseconds for a request while the retries are happening. */ - this.cummulativeWaitTimeinMs = 0; - /** Retry interval in milliseconds to wait before the next request will be sent. */ - this.retryAfterInMs = 0; - this.timeoutInMs = timeoutInSeconds * 1000; - this.currentRetryAttemptCount = 0; - this.cummulativeWaitTimeinMs = 0; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - */ - async shouldRetry(err) { - // TODO: any custom error object - if (err) { - if (this.currentRetryAttemptCount < this.maxTries) { - this.currentRetryAttemptCount++; - this.retryAfterInMs = 0; - if (this.fixedRetryIntervalInMs) { - this.retryAfterInMs = this.fixedRetryIntervalInMs; - } - else if (err.retryAfterInMs) { - this.retryAfterInMs = err.retryAfterInMs; - } - if (this.cummulativeWaitTimeinMs < this.timeoutInMs) { - this.cummulativeWaitTimeinMs += this.retryAfterInMs; - return true; - } - } - } - return false; - } -} - -// Copyright (c) Microsoft Corporation. -/** - * This class implements the retry policy for session consistent reads. - * @hidden - */ -class SessionRetryPolicy { - /** - * @param globalEndpointManager - The GlobalEndpointManager instance. - */ - constructor(globalEndpointManager, resourceType, operationType, connectionPolicy) { - this.globalEndpointManager = globalEndpointManager; - this.resourceType = resourceType; - this.operationType = operationType; - this.connectionPolicy = connectionPolicy; - /** Current retry attempt count. */ - this.currentRetryAttemptCount = 0; - /** Retry interval in milliseconds. */ - this.retryAfterInMs = 0; - } - /** - * Determines whether the request should be retried or not. - * @param err - Error returned by the request. - * @param callback - The callback function which takes bool argument which specifies whether the request - * will be retried or not. - */ - async shouldRetry(err, retryContext) { - if (!err) { - return false; - } - if (!retryContext) { - return false; - } - if (!this.connectionPolicy.enableEndpointDiscovery) { - return false; - } - if (this.globalEndpointManager.canUseMultipleWriteLocations(this.resourceType, this.operationType)) { - // If we can write to multiple locations, we should against every write endpoint until we succeed - const endpoints = isReadRequest(this.operationType) - ? await this.globalEndpointManager.getReadEndpoints() - : await this.globalEndpointManager.getWriteEndpoints(); - if (this.currentRetryAttemptCount > endpoints.length) { - return false; - } - else { - this.currentRetryAttemptCount++; - retryContext.retryCount++; - retryContext.retryRequestOnPreferredLocations = this.currentRetryAttemptCount > 1; - retryContext.clearSessionTokenNotAvailable = - this.currentRetryAttemptCount === endpoints.length; - return true; - } - } - else { - if (this.currentRetryAttemptCount > 1) { - return false; - } - else { - this.currentRetryAttemptCount++; - retryContext.retryCount++; - retryContext.retryRequestOnPreferredLocations = false; // Forces all operations to primary write endpoint - retryContext.clearSessionTokenNotAvailable = true; - return true; - } - } - } -} - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - */ -async function execute({ retryContext = { retryCount: 0 }, retryPolicies, requestContext, executeRequest, }) { - // TODO: any response - if (!retryPolicies) { - retryPolicies = { - endpointDiscoveryRetryPolicy: new EndpointDiscoveryRetryPolicy(requestContext.globalEndpointManager, requestContext.operationType), - resourceThrottleRetryPolicy: new ResourceThrottleRetryPolicy(requestContext.connectionPolicy.retryOptions.maxRetryAttemptCount, requestContext.connectionPolicy.retryOptions.fixedRetryIntervalInMilliseconds, requestContext.connectionPolicy.retryOptions.maxWaitTimeInSeconds), - sessionReadRetryPolicy: new SessionRetryPolicy(requestContext.globalEndpointManager, requestContext.resourceType, requestContext.operationType, requestContext.connectionPolicy), - defaultRetryPolicy: new DefaultRetryPolicy(requestContext.operationType), - }; - } - if (retryContext && retryContext.clearSessionTokenNotAvailable) { - requestContext.client.clearSessionToken(requestContext.path); - delete requestContext.headers["x-ms-session-token"]; - } - requestContext.endpoint = await requestContext.globalEndpointManager.resolveServiceEndpoint(requestContext.resourceType, requestContext.operationType); - try { - const response = await executeRequest(requestContext); - response.headers[Constants.ThrottleRetryCount] = - retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount; - response.headers[Constants.ThrottleRetryWaitTimeInMs] = - retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs; - return response; - } - catch (err) { - // TODO: any error - let retryPolicy = null; - const headers = err.headers || {}; - if (err.code === StatusCodes.ENOTFOUND || - err.code === "REQUEST_SEND_ERROR" || - (err.code === StatusCodes.Forbidden && - (err.substatus === SubStatusCodes.DatabaseAccountNotFound || - err.substatus === SubStatusCodes.WriteForbidden))) { - retryPolicy = retryPolicies.endpointDiscoveryRetryPolicy; - } - else if (err.code === StatusCodes.TooManyRequests) { - retryPolicy = retryPolicies.resourceThrottleRetryPolicy; - } - else if (err.code === StatusCodes.NotFound && - err.substatus === SubStatusCodes.ReadSessionNotAvailable) { - retryPolicy = retryPolicies.sessionReadRetryPolicy; - } - else { - retryPolicy = retryPolicies.defaultRetryPolicy; - } - const results = await retryPolicy.shouldRetry(err, retryContext, requestContext.endpoint); - if (!results) { - headers[Constants.ThrottleRetryCount] = - retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount; - headers[Constants.ThrottleRetryWaitTimeInMs] = - retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs; - err.headers = Object.assign(Object.assign({}, err.headers), headers); - throw err; - } - else { - requestContext.retryCount++; - const newUrl = results[1]; // TODO: any hack - if (newUrl !== undefined) { - requestContext.endpoint = newUrl; - } - await sleep(retryPolicy.retryAfterInMs); - return execute({ - executeRequest, - requestContext, - retryContext, - retryPolicies, - }); - } - } -} - -/** - * @hidden - */ -let defaultHttpsAgent; -const https = require("https"); // eslint-disable-line @typescript-eslint/no-require-imports -const tls = require("tls"); // eslint-disable-line @typescript-eslint/no-require-imports -// minVersion only available in Node 10+ -if (tls.DEFAULT_MIN_VERSION) { - defaultHttpsAgent = new https.Agent({ - keepAlive: true, - minVersion: "TLSv1.2", - }); -} -else { - // Remove when Node 8 support has been dropped - defaultHttpsAgent = new https.Agent({ - keepAlive: true, - secureProtocol: "TLSv1_2_method", - }); -} -const http = require("http"); // eslint-disable-line @typescript-eslint/no-require-imports -/** - * @internal - */ -const defaultHttpAgent = new http.Agent({ - keepAlive: true, -}); - -// Copyright (c) Microsoft Corporation. -let cachedHttpClient; -function getCachedDefaultHttpClient() { - if (!cachedHttpClient) { - cachedHttpClient = coreRestPipeline.createDefaultHttpClient(); - } - return cachedHttpClient; -} - -// Copyright (c) Microsoft Corporation. -const logger$1 = logger$4.createClientLogger("RequestHandler"); -async function executeRequest(requestContext) { - return executePlugins(requestContext, httpRequest, exports.PluginOn.request); -} -/** - * @hidden - */ -async function httpRequest(requestContext) { - const controller = new nodeAbortController.AbortController(); - const signal = controller.signal; - // Wrap users passed abort events and call our own internal abort() - const userSignal = requestContext.options && requestContext.options.abortSignal; - if (userSignal) { - if (userSignal.aborted) { - controller.abort(); - } - else { - userSignal.addEventListener("abort", () => { - controller.abort(); - }); - } - } - const timeout = setTimeout(() => { - controller.abort(); - }, requestContext.connectionPolicy.requestTimeout); - let response; - if (requestContext.body) { - requestContext.body = bodyFromData(requestContext.body); - } - const httpsClient = getCachedDefaultHttpClient(); - const url = trimSlashes(requestContext.endpoint) + requestContext.path; - const reqHeaders = coreRestPipeline.createHttpHeaders(requestContext.headers); - const pipelineRequest = coreRestPipeline.createPipelineRequest({ - url, - headers: reqHeaders, - method: requestContext.method, - abortSignal: signal, - body: requestContext.body, - }); - if (requestContext.requestAgent) { - pipelineRequest.agent = requestContext.requestAgent; - } - else { - const parsedUrl = new URL(url); - pipelineRequest.agent = parsedUrl.protocol === "http" ? defaultHttpAgent : defaultHttpsAgent; - } - try { - if (requestContext.pipeline) { - response = await requestContext.pipeline.sendRequest(httpsClient, pipelineRequest); - } - else { - response = await httpsClient.sendRequest(pipelineRequest); - } - } - catch (error) { - if (error.name === "AbortError") { - // If the user passed signal caused the abort, cancel the timeout and rethrow the error - if (userSignal && userSignal.aborted === true) { - clearTimeout(timeout); - throw error; - } - // If the user didn't cancel, it must be an abort we called due to timeout - throw new TimeoutError(`Timeout Error! Request took more than ${requestContext.connectionPolicy.requestTimeout} ms`); - } - throw error; - } - clearTimeout(timeout); - const result = response.status === 204 || response.status === 304 || response.bodyAsText === "" - ? null - : JSON.parse(response.bodyAsText); - const headers = response.headers.toJSON(); - const substatus = headers[Constants.HttpHeaders.SubStatus] - ? parseInt(headers[Constants.HttpHeaders.SubStatus], 10) - : undefined; - if (response.status >= 400) { - const errorResponse = new ErrorResponse(result.message); - logger$1.warning(response.status + - " " + - requestContext.endpoint + - " " + - requestContext.path + - " " + - result.message); - errorResponse.code = response.status; - errorResponse.body = result; - errorResponse.headers = headers; - if (Constants.HttpHeaders.ActivityId in headers) { - errorResponse.activityId = headers[Constants.HttpHeaders.ActivityId]; - } - if (Constants.HttpHeaders.SubStatus in headers) { - errorResponse.substatus = substatus; - } - if (Constants.HttpHeaders.RetryAfterInMs in headers) { - errorResponse.retryAfterInMs = parseInt(headers[Constants.HttpHeaders.RetryAfterInMs], 10); - Object.defineProperty(errorResponse, "retryAfterInMilliseconds", { - get: () => { - return errorResponse.retryAfterInMs; - }, - }); - } - throw errorResponse; - } - return { - headers, - result, - code: response.status, - substatus, - }; -} -/** - * @hidden - */ -async function request(requestContext) { - if (requestContext.body) { - requestContext.body = bodyFromData(requestContext.body); - if (!requestContext.body) { - throw new Error("parameter data must be a javascript object, string, or Buffer"); - } - } - return execute({ - requestContext, - executeRequest, - }); -} -const RequestHandler = { - request, -}; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -function atob(str) { - return Buffer.from(str, "base64").toString("binary"); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/** - * Models vector clock bases session token. Session token has the following format: - * `{Version}#{GlobalLSN}#{RegionId1}={LocalLsn1}#{RegionId2}={LocalLsn2}....#{RegionIdN}={LocalLsnN}` - * 'Version' captures the configuration number of the partition which returned this session token. - * 'Version' is incremented everytime topology of the partition is updated (say due to Add/Remove/Failover). - * - * The choice of separators '#' and '=' is important. Separators ';' and ',' are used to delimit - * per-partitionKeyRange session token - * @hidden - * - */ -class VectorSessionToken { - constructor(version, globalLsn, localLsnByregion, sessionToken) { - this.version = version; - this.globalLsn = globalLsn; - this.localLsnByregion = localLsnByregion; - this.sessionToken = sessionToken; - if (!this.sessionToken) { - const regionAndLocalLsn = []; - for (const [key, value] of this.localLsnByregion.entries()) { - regionAndLocalLsn.push(`${key}${VectorSessionToken.REGION_PROGRESS_SEPARATOR}${value}`); - } - const regionProgress = regionAndLocalLsn.join(VectorSessionToken.SEGMENT_SEPARATOR); - if (regionProgress === "") { - this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}`; - } - else { - this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}${VectorSessionToken.SEGMENT_SEPARATOR}${regionProgress}`; - } - } - } - static create(sessionToken) { - const [versionStr, globalLsnStr, ...regionSegments] = sessionToken.split(VectorSessionToken.SEGMENT_SEPARATOR); - const version = parseInt(versionStr, 10); - const globalLsn = parseFloat(globalLsnStr); - if (typeof version !== "number" || typeof globalLsn !== "number") { - return null; - } - const lsnByRegion = new Map(); - for (const regionSegment of regionSegments) { - const [regionIdStr, localLsnStr] = regionSegment.split(VectorSessionToken.REGION_PROGRESS_SEPARATOR); - if (!regionIdStr || !localLsnStr) { - return null; - } - const regionId = parseInt(regionIdStr, 10); - let localLsn; - try { - localLsn = localLsnStr; - } - catch (err) { - // TODO: log error - return null; - } - if (typeof regionId !== "number") { - return null; - } - lsnByRegion.set(regionId, localLsn); - } - return new VectorSessionToken(version, globalLsn, lsnByRegion, sessionToken); - } - equals(other) { - return !other - ? false - : this.version === other.version && - this.globalLsn === other.globalLsn && - this.areRegionProgressEqual(other.localLsnByregion); - } - merge(other) { - if (other == null) { - throw new Error("other (Vector Session Token) must not be null"); - } - if (this.version === other.version && - this.localLsnByregion.size !== other.localLsnByregion.size) { - throw new Error(`Compared session tokens ${this.sessionToken} and ${other.sessionToken} have unexpected regions`); - } - const [higherVersionSessionToken, lowerVersionSessionToken] = this.version < other.version ? [other, this] : [this, other]; - const highestLocalLsnByRegion = new Map(); - for (const [regionId, highLocalLsn] of higherVersionSessionToken.localLsnByregion.entries()) { - const lowLocalLsn = lowerVersionSessionToken.localLsnByregion.get(regionId); - if (lowLocalLsn) { - highestLocalLsnByRegion.set(regionId, max(highLocalLsn, lowLocalLsn)); - } - else if (this.version === other.version) { - throw new Error(`Compared session tokens have unexpected regions. Session 1: ${this.sessionToken} - Session 2: ${this.sessionToken}`); - } - else { - highestLocalLsnByRegion.set(regionId, highLocalLsn); - } - } - return new VectorSessionToken(Math.max(this.version, other.version), Math.max(this.globalLsn, other.globalLsn), highestLocalLsnByRegion); - } - toString() { - return this.sessionToken; - } - areRegionProgressEqual(other) { - if (this.localLsnByregion.size !== other.size) { - return false; - } - for (const [regionId, localLsn] of this.localLsnByregion.entries()) { - const otherLocalLsn = other.get(regionId); - if (localLsn !== otherLocalLsn) { - return false; - } - } - return true; - } -} -VectorSessionToken.SEGMENT_SEPARATOR = "#"; -VectorSessionToken.REGION_PROGRESS_SEPARATOR = "="; -/** - * @hidden - */ -function max(int1, int2) { - // NOTE: This only works for positive numbers - if (int1.length === int2.length) { - return int1 > int2 ? int1 : int2; - } - else if (int1.length > int2.length) { - return int1; - } - else { - return int2; - } -} - -// Copyright (c) Microsoft Corporation. -/** @hidden */ -class SessionContainer { - constructor(collectionNameToCollectionResourceId = new Map(), collectionResourceIdToSessionTokens = new Map()) { - this.collectionNameToCollectionResourceId = collectionNameToCollectionResourceId; - this.collectionResourceIdToSessionTokens = collectionResourceIdToSessionTokens; - } - get(request) { - if (!request) { - throw new Error("request cannot be null"); - } - const collectionName = getContainerLink(trimSlashes(request.resourceAddress)); - const rangeIdToTokenMap = this.getPartitionKeyRangeIdToTokenMap(collectionName); - return SessionContainer.getCombinedSessionTokenString(rangeIdToTokenMap); - } - remove(request) { - let collectionResourceId; - const resourceAddress = trimSlashes(request.resourceAddress); - const collectionName = getContainerLink(resourceAddress); - if (collectionName) { - collectionResourceId = this.collectionNameToCollectionResourceId.get(collectionName); - this.collectionNameToCollectionResourceId.delete(collectionName); - } - if (collectionResourceId !== undefined) { - this.collectionResourceIdToSessionTokens.delete(collectionResourceId); - } - } - set(request, resHeaders) { - // TODO: we check the master logic a few different places. Might not need it. - if (!resHeaders || - SessionContainer.isReadingFromMaster(request.resourceType, request.operationType)) { - return; - } - const sessionTokenString = resHeaders[Constants.HttpHeaders.SessionToken]; - if (!sessionTokenString) { - return; - } - const containerName = this.getContainerName(request, resHeaders); - const ownerId = !request.isNameBased - ? request.resourceId - : resHeaders[Constants.HttpHeaders.OwnerId] || request.resourceId; - if (!ownerId) { - return; - } - if (containerName && this.validateOwnerID(ownerId)) { - if (!this.collectionResourceIdToSessionTokens.has(ownerId)) { - this.collectionResourceIdToSessionTokens.set(ownerId, new Map()); - } - if (!this.collectionNameToCollectionResourceId.has(containerName)) { - this.collectionNameToCollectionResourceId.set(containerName, ownerId); - } - const containerSessionContainer = this.collectionResourceIdToSessionTokens.get(ownerId); - SessionContainer.compareAndSetToken(sessionTokenString, containerSessionContainer); - } - } - validateOwnerID(ownerId) { - // If ownerId contains exactly 8 bytes it represents a unique database+collection identifier. Otherwise it represents another resource - // The first 4 bytes are the database. The last 4 bytes are the collection. - // Cosmos rids potentially contain "-" which is an invalid character in the browser atob implementation - // See https://en.wikipedia.org/wiki/Base64#Filenames - return atob(ownerId.replace(/-/g, "/")).length === 8; - } - getPartitionKeyRangeIdToTokenMap(collectionName) { - let rangeIdToTokenMap = null; - if (collectionName && this.collectionNameToCollectionResourceId.has(collectionName)) { - rangeIdToTokenMap = this.collectionResourceIdToSessionTokens.get(this.collectionNameToCollectionResourceId.get(collectionName)); - } - return rangeIdToTokenMap; - } - static getCombinedSessionTokenString(tokens) { - if (!tokens || tokens.size === 0) { - return SessionContainer.EMPTY_SESSION_TOKEN; - } - let result = ""; - for (const [range, token] of tokens.entries()) { - result += - range + - SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER + - token.toString() + - SessionContainer.SESSION_TOKEN_SEPARATOR; - } - return result.slice(0, -1); - } - static compareAndSetToken(newTokenString, containerSessionTokens) { - if (!newTokenString) { - return; - } - const partitionsParts = newTokenString.split(SessionContainer.SESSION_TOKEN_SEPARATOR); - for (const partitionPart of partitionsParts) { - const newTokenParts = partitionPart.split(SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER); - if (newTokenParts.length !== 2) { - return; - } - const range = newTokenParts[0]; - const newToken = VectorSessionToken.create(newTokenParts[1]); - const tokenForRange = !containerSessionTokens.get(range) - ? newToken - : containerSessionTokens.get(range).merge(newToken); - containerSessionTokens.set(range, tokenForRange); - } - } - // TODO: have a assert if the type doesn't mastch known types - static isReadingFromMaster(resourceType, operationType) { - if (resourceType === Constants.Path.OffersPathSegment || - resourceType === Constants.Path.DatabasesPathSegment || - resourceType === Constants.Path.UsersPathSegment || - resourceType === Constants.Path.PermissionsPathSegment || - resourceType === Constants.Path.TopologyPathSegment || - resourceType === Constants.Path.DatabaseAccountPathSegment || - resourceType === Constants.Path.PartitionKeyRangesPathSegment || - (resourceType === Constants.Path.CollectionsPathSegment && - operationType === exports.OperationType.Query)) { - return true; - } - return false; - } - getContainerName(request, headers) { - let ownerFullName = headers[Constants.HttpHeaders.OwnerFullName]; - if (!ownerFullName) { - ownerFullName = trimSlashes(request.resourceAddress); - } - return getContainerLink(ownerFullName); - } -} -SessionContainer.EMPTY_SESSION_TOKEN = ""; -SessionContainer.SESSION_TOKEN_SEPARATOR = ","; -SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER = ":"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -function checkURL(testString) { - return new URL(testString); -} -function sanitizeEndpoint(url) { - return new URL(url).href.replace(/\/$/, ""); -} - -// Copyright (c) Microsoft Corporation. -const uuid = uuid$3.v4; -const logger = logger$4.createClientLogger("ClientContext"); -const QueryJsonContentType = "application/query+json"; -/** - * @hidden - * @hidden - */ -class ClientContext { - constructor(cosmosClientOptions, globalEndpointManager) { - this.cosmosClientOptions = cosmosClientOptions; - this.globalEndpointManager = globalEndpointManager; - this.connectionPolicy = cosmosClientOptions.connectionPolicy; - this.sessionContainer = new SessionContainer(); - this.partitionKeyDefinitionCache = {}; - this.pipeline = null; - if (cosmosClientOptions.aadCredentials) { - this.pipeline = coreRestPipeline.createEmptyPipeline(); - const hrefEndpoint = sanitizeEndpoint(cosmosClientOptions.endpoint); - const scope = `${hrefEndpoint}/.default`; - this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: cosmosClientOptions.aadCredentials, - scopes: scope, - challengeCallbacks: { - async authorizeRequest({ request, getAccessToken }) { - const tokenResponse = await getAccessToken([scope], {}); - const AUTH_PREFIX = `type=aad&ver=1.0&sig=`; - const authorizationToken = `${AUTH_PREFIX}${tokenResponse.token}`; - request.headers.set("Authorization", authorizationToken); - }, - }, - })); - } - } - /** @hidden */ - async read({ path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.get, path, operationType: exports.OperationType.Read, resourceId, - options, - resourceType, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // read will use ReadEndpoint since it uses GET operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - this.captureSessionToken(undefined, path, exports.OperationType.Read, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - async queryFeed({ path, resourceType, resourceId, resultFn, query, options, partitionKeyRangeId, partitionKey, }) { - // Query operations will use ReadEndpoint even though it uses - // GET(for queryFeed) and POST(for regular query operations) - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.get, path, operationType: exports.OperationType.Query, partitionKeyRangeId, - resourceId, - resourceType, - options, body: query, partitionKey }); - const requestId = uuid(); - if (query !== undefined) { - request.method = exports.HTTPMethod.post; - } - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - request.headers = await this.buildHeaders(request); - if (query !== undefined) { - request.headers[Constants.HttpHeaders.IsQuery] = "true"; - request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType; - if (typeof query === "string") { - request.body = { query }; // Converts query text to query object. - } - } - this.applySessionToken(request); - logger.info("query " + - requestId + - " started" + - (request.partitionKeyRangeId ? " pkrid: " + request.partitionKeyRangeId : "")); - logger.verbose(request); - const start = Date.now(); - const response = await RequestHandler.request(request); - logger.info("query " + requestId + " finished - " + (Date.now() - start) + "ms"); - this.captureSessionToken(undefined, path, exports.OperationType.Query, response.headers); - return this.processQueryFeedResponse(response, !!query, resultFn); - } - async getQueryPlan(path, resourceType, resourceId, query, options = {}) { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.post, path, operationType: exports.OperationType.Read, resourceId, - resourceType, - options, body: query }); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsQueryPlan] = "True"; - request.headers[Constants.HttpHeaders.QueryVersion] = "1.4"; - request.headers[Constants.HttpHeaders.SupportedQueryFeatures] = - "NonValueAggregate, Aggregate, Distinct, MultipleOrderBy, OffsetAndLimit, OrderBy, Top, CompositeAggregate, GroupBy, MultipleAggregates"; - request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType; - if (typeof query === "string") { - request.body = { query }; // Converts query text to query object. - } - this.applySessionToken(request); - const response = await RequestHandler.request(request); - this.captureSessionToken(undefined, path, exports.OperationType.Query, response.headers); - return response; - } - queryPartitionKeyRanges(collectionLink, query, options) { - const path = getPathFromLink(collectionLink, exports.ResourceType.pkranges); - const id = getIdFromLink(collectionLink); - const cb = (innerOptions) => { - return this.queryFeed({ - path, - resourceType: exports.ResourceType.pkranges, - resourceId: id, - resultFn: (result) => result.PartitionKeyRanges, - query, - options: innerOptions, - }); - }; - return new QueryIterator(this, query, options, cb); - } - async delete({ path, resourceType, resourceId, options = {}, partitionKey, method = exports.HTTPMethod.delete, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: method, operationType: exports.OperationType.Delete, path, - resourceType, - options, - resourceId, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // deleteResource will use WriteEndpoint since it uses DELETE operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - if (parseLink(path).type !== "colls") { - this.captureSessionToken(undefined, path, exports.OperationType.Delete, response.headers); - } - else { - this.clearSessionToken(path); - } - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - async patch({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.patch, operationType: exports.OperationType.Patch, path, - resourceType, - body, - resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // patch will use WriteEndpoint - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - this.captureSessionToken(undefined, path, exports.OperationType.Patch, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - async create({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.post, operationType: exports.OperationType.Create, path, - resourceType, - resourceId, - body, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - // create will use WriteEndpoint since it uses POST operation - this.applySessionToken(request); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - this.captureSessionToken(undefined, path, exports.OperationType.Create, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - processQueryFeedResponse(res, isQuery, resultFn) { - if (isQuery) { - return { result: resultFn(res.result), headers: res.headers, code: res.code }; - } - else { - const newResult = resultFn(res.result).map((body) => body); - return { result: newResult, headers: res.headers, code: res.code }; - } - } - applySessionToken(requestContext) { - const request = this.getSessionParams(requestContext.path); - if (requestContext.headers && requestContext.headers[Constants.HttpHeaders.SessionToken]) { - return; - } - const sessionConsistency = requestContext.headers[Constants.HttpHeaders.ConsistencyLevel]; - if (!sessionConsistency) { - return; - } - if (sessionConsistency !== exports.ConsistencyLevel.Session) { - return; - } - if (request.resourceAddress) { - const sessionToken = this.sessionContainer.get(request); - if (sessionToken) { - requestContext.headers[Constants.HttpHeaders.SessionToken] = sessionToken; - } - } - } - async replace({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.put, operationType: exports.OperationType.Replace, path, - resourceType, - body, - resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - this.applySessionToken(request); - // replace will use WriteEndpoint since it uses PUT operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - this.captureSessionToken(undefined, path, exports.OperationType.Replace, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - async upsert({ body, path, resourceType, resourceId, options = {}, partitionKey, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.post, operationType: exports.OperationType.Upsert, path, - resourceType, - body, - resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsUpsert] = true; - this.applySessionToken(request); - // upsert will use WriteEndpoint since it uses POST operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - this.captureSessionToken(undefined, path, exports.OperationType.Upsert, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - async execute({ sprocLink, params, options = {}, partitionKey, }) { - // Accept a single parameter or an array of parameters. - // Didn't add type annotation for this because we should legacy this behavior - if (params !== null && params !== undefined && !Array.isArray(params)) { - params = [params]; - } - const path = getPathFromLink(sprocLink); - const id = getIdFromLink(sprocLink); - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.post, operationType: exports.OperationType.Execute, path, resourceType: exports.ResourceType.sproc, options, resourceId: id, body: params, partitionKey }); - request.headers = await this.buildHeaders(request); - // executeStoredProcedure will use WriteEndpoint since it uses POST operation - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - return executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - } - /** - * Gets the Database account information. - * @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved. - * If not present, current client's url will be used. - */ - async getDatabaseAccount(options = {}) { - const endpoint = options.urlConnection || this.cosmosClientOptions.endpoint; - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { endpoint, method: exports.HTTPMethod.get, operationType: exports.OperationType.Read, path: "", resourceType: exports.ResourceType.none, options }); - request.headers = await this.buildHeaders(request); - // await options.beforeOperation({ endpoint, request, headers: requestHeaders }); - const { result, headers } = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - const databaseAccount = new DatabaseAccount(result, headers); - return { result: databaseAccount, headers }; - } - getWriteEndpoint() { - return this.globalEndpointManager.getWriteEndpoint(); - } - getReadEndpoint() { - return this.globalEndpointManager.getReadEndpoint(); - } - getWriteEndpoints() { - return this.globalEndpointManager.getWriteEndpoints(); - } - getReadEndpoints() { - return this.globalEndpointManager.getReadEndpoints(); - } - async batch({ body, path, partitionKey, resourceId, options = {}, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.post, operationType: exports.OperationType.Batch, path, - body, resourceType: exports.ResourceType.item, resourceId, - options, - partitionKey }); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsBatchRequest] = true; - request.headers[Constants.HttpHeaders.IsBatchAtomic] = true; - this.applySessionToken(request); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - this.captureSessionToken(undefined, path, exports.OperationType.Batch, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - async bulk({ body, path, partitionKeyRangeId, resourceId, bulkOptions = {}, options = {}, }) { - try { - const request = Object.assign(Object.assign({}, this.getContextDerivedPropsForRequestCreation()), { method: exports.HTTPMethod.post, operationType: exports.OperationType.Batch, path, - body, resourceType: exports.ResourceType.item, resourceId, - options }); - request.headers = await this.buildHeaders(request); - request.headers[Constants.HttpHeaders.IsBatchRequest] = true; - request.headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId; - request.headers[Constants.HttpHeaders.IsBatchAtomic] = false; - request.headers[Constants.HttpHeaders.BatchContinueOnError] = - bulkOptions.continueOnError || false; - this.applySessionToken(request); - request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(request.resourceType, request.operationType); - const response = await executePlugins(request, RequestHandler.request, exports.PluginOn.operation); - this.captureSessionToken(undefined, path, exports.OperationType.Batch, response.headers); - return response; - } - catch (err) { - this.captureSessionToken(err, path, exports.OperationType.Upsert, err.headers); - throw err; - } - } - captureSessionToken(err, path, operationType, resHeaders) { - const request = this.getSessionParams(path); - request.operationType = operationType; - if (!err || - (!this.isMasterResource(request.resourceType) && - (err.code === StatusCodes.PreconditionFailed || - err.code === StatusCodes.Conflict || - (err.code === StatusCodes.NotFound && - err.substatus !== SubStatusCodes.ReadSessionNotAvailable)))) { - this.sessionContainer.set(request, resHeaders); - } - } - clearSessionToken(path) { - const request = this.getSessionParams(path); - this.sessionContainer.remove(request); - } - getSessionParams(resourceLink) { - const resourceId = null; - let resourceAddress = null; - const parserOutput = parseLink(resourceLink); - resourceAddress = parserOutput.objectBody.self; - const resourceType = parserOutput.type; - return { - resourceId, - resourceAddress, - resourceType, - isNameBased: true, - }; - } - isMasterResource(resourceType) { - if (resourceType === Constants.Path.OffersPathSegment || - resourceType === Constants.Path.DatabasesPathSegment || - resourceType === Constants.Path.UsersPathSegment || - resourceType === Constants.Path.PermissionsPathSegment || - resourceType === Constants.Path.TopologyPathSegment || - resourceType === Constants.Path.DatabaseAccountPathSegment || - resourceType === Constants.Path.PartitionKeyRangesPathSegment || - resourceType === Constants.Path.CollectionsPathSegment) { - return true; - } - return false; - } - buildHeaders(requestContext) { - return getHeaders({ - clientOptions: this.cosmosClientOptions, - defaultHeaders: Object.assign(Object.assign({}, this.cosmosClientOptions.defaultHeaders), requestContext.options.initialHeaders), - verb: requestContext.method, - path: requestContext.path, - resourceId: requestContext.resourceId, - resourceType: requestContext.resourceType, - options: requestContext.options, - partitionKeyRangeId: requestContext.partitionKeyRangeId, - useMultipleWriteLocations: this.connectionPolicy.useMultipleWriteLocations, - partitionKey: requestContext.partitionKey, - }); - } - /** - * Returns collection of properties which are derived from the context for Request Creation - * @returns - */ - getContextDerivedPropsForRequestCreation() { - return { - globalEndpointManager: this.globalEndpointManager, - requestAgent: this.cosmosClientOptions.agent, - connectionPolicy: this.connectionPolicy, - client: this, - plugins: this.cosmosClientOptions.plugins, - pipeline: this.pipeline, - }; - } -} - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - */ -function getUserAgent(suffix) { - const ua = `${universalUserAgent.getUserAgent()} ${Constants.SDKName}/${Constants.SDKVersion}`; - if (suffix) { - return ua + " " + suffix; - } - return ua; -} - -// Copyright (c) Microsoft Corporation. -/** - * @hidden - * This internal class implements the logic for endpoint management for geo-replicated database accounts. - */ -class GlobalEndpointManager { - /** - * @param options - The document client instance. - */ - constructor(options, readDatabaseAccount) { - this.readDatabaseAccount = readDatabaseAccount; - this.writeableLocations = []; - this.readableLocations = []; - this.unavailableReadableLocations = []; - this.unavailableWriteableLocations = []; - this.options = options; - this.defaultEndpoint = options.endpoint; - this.enableEndpointDiscovery = options.connectionPolicy.enableEndpointDiscovery; - this.isRefreshing = false; - this.preferredLocations = this.options.connectionPolicy.preferredLocations; - } - /** - * Gets the current read endpoint from the endpoint cache. - */ - async getReadEndpoint() { - return this.resolveServiceEndpoint(exports.ResourceType.item, exports.OperationType.Read); - } - /** - * Gets the current write endpoint from the endpoint cache. - */ - async getWriteEndpoint() { - return this.resolveServiceEndpoint(exports.ResourceType.item, exports.OperationType.Replace); - } - async getReadEndpoints() { - return this.readableLocations.map((loc) => loc.databaseAccountEndpoint); - } - async getWriteEndpoints() { - return this.writeableLocations.map((loc) => loc.databaseAccountEndpoint); - } - async markCurrentLocationUnavailableForRead(endpoint) { - await this.refreshEndpointList(); - const location = this.readableLocations.find((loc) => loc.databaseAccountEndpoint === endpoint); - if (location) { - location.unavailable = true; - location.lastUnavailabilityTimestampInMs = Date.now(); - this.unavailableReadableLocations.push(location); - } - } - async markCurrentLocationUnavailableForWrite(endpoint) { - await this.refreshEndpointList(); - const location = this.writeableLocations.find((loc) => loc.databaseAccountEndpoint === endpoint); - if (location) { - location.unavailable = true; - location.lastUnavailabilityTimestampInMs = Date.now(); - this.unavailableWriteableLocations.push(location); - } - } - canUseMultipleWriteLocations(resourceType, operationType) { - let canUse = this.options.connectionPolicy.useMultipleWriteLocations; - if (resourceType) { - canUse = - canUse && - (resourceType === exports.ResourceType.item || - (resourceType === exports.ResourceType.sproc && operationType === exports.OperationType.Execute)); - } - return canUse; - } - async resolveServiceEndpoint(resourceType, operationType) { - // If endpoint discovery is disabled, always use the user provided endpoint - if (!this.options.connectionPolicy.enableEndpointDiscovery) { - return this.defaultEndpoint; - } - // If getting the database account, always use the user provided endpoint - if (resourceType === exports.ResourceType.none) { - return this.defaultEndpoint; - } - if (this.readableLocations.length === 0 || this.writeableLocations.length === 0) { - const { resource: databaseAccount } = await this.readDatabaseAccount({ - urlConnection: this.defaultEndpoint, - }); - this.writeableLocations = databaseAccount.writableLocations; - this.readableLocations = databaseAccount.readableLocations; - } - const locations = isReadRequest(operationType) - ? this.readableLocations - : this.writeableLocations; - let location; - // If we have preferred locations, try each one in order and use the first available one - if (this.preferredLocations && this.preferredLocations.length > 0) { - for (const preferredLocation of this.preferredLocations) { - location = locations.find((loc) => loc.unavailable !== true && - normalizeEndpoint(loc.name) === normalizeEndpoint(preferredLocation)); - if (location) { - break; - } - } - } - // If no preferred locations or one did not match, just grab the first one that is available - if (!location) { - location = locations.find((loc) => { - return loc.unavailable !== true; - }); - } - return location ? location.databaseAccountEndpoint : this.defaultEndpoint; - } - /** - * Refreshes the endpoint list by clearning stale unavailability and then - * retrieving the writable and readable locations from the geo-replicated database account - * and then updating the locations cache. - * We skip the refreshing if enableEndpointDiscovery is set to False - */ - async refreshEndpointList() { - if (!this.isRefreshing && this.enableEndpointDiscovery) { - this.isRefreshing = true; - const databaseAccount = await this.getDatabaseAccountFromAnyEndpoint(); - if (databaseAccount) { - this.refreshStaleUnavailableLocations(); - this.refreshEndpoints(databaseAccount); - } - this.isRefreshing = false; - } - } - refreshEndpoints(databaseAccount) { - for (const location of databaseAccount.writableLocations) { - const existingLocation = this.writeableLocations.find((loc) => loc.name === location.name); - if (!existingLocation) { - this.writeableLocations.push(location); - } - } - for (const location of databaseAccount.readableLocations) { - const existingLocation = this.readableLocations.find((loc) => loc.name === location.name); - if (!existingLocation) { - this.readableLocations.push(location); - } - } - } - refreshStaleUnavailableLocations() { - const now = Date.now(); - this.updateLocation(now, this.unavailableReadableLocations, this.readableLocations); - this.unavailableReadableLocations = this.cleanUnavailableLocationList(now, this.unavailableReadableLocations); - this.updateLocation(now, this.unavailableWriteableLocations, this.writeableLocations); - this.unavailableWriteableLocations = this.cleanUnavailableLocationList(now, this.unavailableWriteableLocations); - } - /** - * update the locationUnavailability to undefined if the location is available again - * @param now - current time - * @param unavailableLocations - list of unavailable locations - * @param allLocations - list of all locations - */ - updateLocation(now, unavailableLocations, allLocations) { - for (const location of unavailableLocations) { - const unavaialableLocation = allLocations.find((loc) => loc.name === location.name); - if (unavaialableLocation && - now - unavaialableLocation.lastUnavailabilityTimestampInMs > - Constants.LocationUnavailableExpirationTimeInMs) { - unavaialableLocation.unavailable = false; - } - } - } - cleanUnavailableLocationList(now, unavailableLocations) { - return unavailableLocations.filter((loc) => { - if (loc && - now - loc.lastUnavailabilityTimestampInMs >= Constants.LocationUnavailableExpirationTimeInMs) { - return false; - } - return true; - }); - } - /** - * Gets the database account first by using the default endpoint, and if that doesn't returns - * use the endpoints for the preferred locations in the order they are specified to get - * the database account. - */ - async getDatabaseAccountFromAnyEndpoint() { - try { - const options = { urlConnection: this.defaultEndpoint }; - const { resource: databaseAccount } = await this.readDatabaseAccount(options); - return databaseAccount; - // If for any reason(non - globaldb related), we are not able to get the database - // account from the above call to readDatabaseAccount, - // we would try to get this information from any of the preferred locations that the user - // might have specified (by creating a locational endpoint) - // and keeping eating the exception until we get the database account and return None at the end, - // if we are not able to get that info from any endpoints - } - catch (err) { - // TODO: Tracing - } - if (this.preferredLocations) { - for (const location of this.preferredLocations) { - try { - const locationalEndpoint = GlobalEndpointManager.getLocationalEndpoint(this.defaultEndpoint, location); - const options = { urlConnection: locationalEndpoint }; - const { resource: databaseAccount } = await this.readDatabaseAccount(options); - if (databaseAccount) { - return databaseAccount; - } - } - catch (err) { - // TODO: Tracing - } - } - } - } - /** - * Gets the locational endpoint using the location name passed to it using the default endpoint. - * - * @param defaultEndpoint - The default endpoint to use for the endpoint. - * @param locationName - The location name for the azure region like "East US". - */ - static getLocationalEndpoint(defaultEndpoint, locationName) { - // For defaultEndpoint like 'https://contoso.documents.azure.com:443/' parse it to generate URL format - // This defaultEndpoint should be global endpoint(and cannot be a locational endpoint) - // and we agreed to document that - const endpointUrl = new URL(defaultEndpoint); - // hostname attribute in endpointUrl will return 'contoso.documents.azure.com' - if (endpointUrl.hostname) { - const hostnameParts = endpointUrl.hostname.toString().toLowerCase().split("."); - if (hostnameParts) { - // globalDatabaseAccountName will return 'contoso' - const globalDatabaseAccountName = hostnameParts[0]; - // Prepare the locationalDatabaseAccountName as contoso-EastUS for location_name 'East US' - const locationalDatabaseAccountName = globalDatabaseAccountName + "-" + locationName.replace(" ", ""); - // Replace 'contoso' with 'contoso-EastUS' and - // return locationalEndpoint as https://contoso-EastUS.documents.azure.com:443/ - const locationalEndpoint = defaultEndpoint - .toLowerCase() - .replace(globalDatabaseAccountName, locationalDatabaseAccountName); - return locationalEndpoint; - } - } - return null; - } -} -function normalizeEndpoint(endpoint) { - return endpoint.split(" ").join("").toLowerCase(); -} - -// Copyright (c) Microsoft Corporation. -/** - * Provides a client-side logical representation of the Azure Cosmos DB database account. - * This client is used to configure and execute requests in the Azure Cosmos DB database service. - * @example Instantiate a client and create a new database - * ```typescript - * const client = new CosmosClient({endpoint: "", auth: {masterKey: ""}}); - * await client.databases.create({id: ""}); - * ``` - * @example Instantiate a client with custom Connection Policy - * ```typescript - * const connectionPolicy = new ConnectionPolicy(); - * connectionPolicy.RequestTimeout = 10000; - * const client = new CosmosClient({ - * endpoint: "", - * auth: {masterKey: ""}, - * connectionPolicy - * }); - * ``` - */ -class CosmosClient { - constructor(optionsOrConnectionString) { - var _a, _b; - if (typeof optionsOrConnectionString === "string") { - optionsOrConnectionString = parseConnectionString(optionsOrConnectionString); - } - const endpoint = checkURL(optionsOrConnectionString.endpoint); - if (!endpoint) { - throw new Error("Invalid endpoint specified"); - } - optionsOrConnectionString.connectionPolicy = Object.assign({}, defaultConnectionPolicy, optionsOrConnectionString.connectionPolicy); - optionsOrConnectionString.defaultHeaders = optionsOrConnectionString.defaultHeaders || {}; - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.CacheControl] = "no-cache"; - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.Version] = - Constants.CurrentVersion; - if (optionsOrConnectionString.consistencyLevel !== undefined) { - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.ConsistencyLevel] = - optionsOrConnectionString.consistencyLevel; - } - optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.UserAgent] = getUserAgent(optionsOrConnectionString.userAgentSuffix); - const globalEndpointManager = new GlobalEndpointManager(optionsOrConnectionString, async (opts) => this.getDatabaseAccount(opts)); - this.clientContext = new ClientContext(optionsOrConnectionString, globalEndpointManager); - if (((_a = optionsOrConnectionString.connectionPolicy) === null || _a === void 0 ? void 0 : _a.enableEndpointDiscovery) && - ((_b = optionsOrConnectionString.connectionPolicy) === null || _b === void 0 ? void 0 : _b.enableBackgroundEndpointRefreshing)) { - this.backgroundRefreshEndpointList(globalEndpointManager, optionsOrConnectionString.connectionPolicy.endpointRefreshRateInMs || - defaultConnectionPolicy.endpointRefreshRateInMs); - } - this.databases = new Databases(this, this.clientContext); - this.offers = new Offers(this, this.clientContext); - } - /** - * Get information about the current {@link DatabaseAccount} (including which regions are supported, etc.) - */ - async getDatabaseAccount(options) { - const response = await this.clientContext.getDatabaseAccount(options); - return new ResourceResponse(response.result, response.headers, response.code); - } - /** - * Gets the currently used write endpoint url. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoint() { - return this.clientContext.getWriteEndpoint(); - } - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoint() { - return this.clientContext.getReadEndpoint(); - } - /** - * Gets the known write endpoints. Useful for troubleshooting purposes. - * - * The urls may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoints() { - return this.clientContext.getWriteEndpoints(); - } - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoints() { - return this.clientContext.getReadEndpoints(); - } - /** - * Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database. - * - * This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object. - * - * @param id - The id of the database. - * @example Create a new container off of an existing database - * ```typescript - * const container = client.database("").containers.create(""); - * ``` - * - * @example Delete an existing database - * ```typescript - * await client.database("").delete(); - * ``` - */ - database(id) { - return new Database(this, id, this.clientContext); - } - /** - * Used for reading, or updating a existing offer by id. - * @param id - The id of the offer. - */ - offer(id) { - return new Offer(this, id, this.clientContext); - } - /** - * Clears background endpoint refresher. Use client.dispose() when destroying the CosmosClient within another process. - */ - dispose() { - clearTimeout(this.endpointRefresher); - } - async backgroundRefreshEndpointList(globalEndpointManager, refreshRate) { - this.endpointRefresher = setInterval(() => { - try { - globalEndpointManager.refreshEndpointList(); - } - catch (e) { - console.warn("Failed to refresh endpoints", e); - } - }, refreshRate); - if (this.endpointRefresher.unref && typeof this.endpointRefresher.unref === "function") { - this.endpointRefresher.unref(); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -class SasTokenProperties { -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -/// -function encodeUTF8(str) { - const bytes = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} - -// Copyright (c) Microsoft Corporation. -/** - * Experimental internal only - * Generates the payload representing the permission configuration for the sas token. - */ -async function createAuthorizationSasToken(masterKey, sasTokenProperties) { - let resourcePrefixPath = ""; - if (typeof sasTokenProperties.databaseName === "string" && - sasTokenProperties.databaseName !== "") { - resourcePrefixPath += `/${Constants.Path.DatabasesPathSegment}/${sasTokenProperties.databaseName}`; - } - if (typeof sasTokenProperties.containerName === "string" && - sasTokenProperties.containerName !== "") { - if (sasTokenProperties.databaseName === "") { - throw new Error(`illegalArgumentException : ${sasTokenProperties.databaseName} \ - is an invalid database name`); - } - resourcePrefixPath += `/${Constants.Path.CollectionsPathSegment}/${sasTokenProperties.containerName}`; - } - if (typeof sasTokenProperties.resourceName === "string" && - sasTokenProperties.resourceName !== "") { - if (sasTokenProperties.containerName === "") { - throw new Error(`illegalArgumentException : ${sasTokenProperties.containerName} \ - is an invalid container name`); - } - switch (sasTokenProperties.resourceKind) { - case "ITEM": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.DocumentsPathSegment}`; - break; - case "STORED_PROCEDURE": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.StoredProceduresPathSegment}`; - break; - case "USER_DEFINED_FUNCTION": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.UserDefinedFunctionsPathSegment}`; - break; - case "TRIGGER": - resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.TriggersPathSegment}`; - break; - default: - throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \ - is an invalid resource kind`); - } - resourcePrefixPath += `${Constants.Path.Root}${sasTokenProperties.resourceName}${Constants.Path.Root}`; - } - sasTokenProperties.resourcePath = resourcePrefixPath.toString(); - let partitionRanges = ""; - if (sasTokenProperties.partitionKeyValueRanges !== undefined && - sasTokenProperties.partitionKeyValueRanges.length > 0) { - if (typeof sasTokenProperties.resourceKind !== "string" && - sasTokenProperties.resourceKind !== "ITEM") { - throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \ - is an invalid partition key value range`); - } - sasTokenProperties.partitionKeyValueRanges.forEach((range) => { - partitionRanges += `${encodeUTF8(range)},`; - }); - } - if (sasTokenProperties.controlPlaneReaderScope === 0) { - sasTokenProperties.controlPlaneReaderScope += exports.SasTokenPermissionKind.ContainerReadAny; - sasTokenProperties.controlPlaneWriterScope += exports.SasTokenPermissionKind.ContainerReadAny; - } - if (sasTokenProperties.dataPlaneReaderScope === 0 && - sasTokenProperties.dataPlaneWriterScope === 0) { - sasTokenProperties.dataPlaneReaderScope = exports.SasTokenPermissionKind.ContainerFullAccess; - sasTokenProperties.dataPlaneWriterScope = exports.SasTokenPermissionKind.ContainerFullAccess; - } - if (typeof sasTokenProperties.keyType !== "number" || - typeof sasTokenProperties.keyType === undefined) { - switch (sasTokenProperties.keyType) { - case CosmosKeyType.PrimaryMaster: - sasTokenProperties.keyType = 1; - break; - case CosmosKeyType.SecondaryMaster: - sasTokenProperties.keyType = 2; - break; - case CosmosKeyType.PrimaryReadOnly: - sasTokenProperties.keyType = 3; - break; - case CosmosKeyType.SecondaryReadOnly: - sasTokenProperties.keyType = 4; - break; - default: - throw new Error(`illegalArgumentException : ${sasTokenProperties.keyType} \ - is an invalid key type`); - } - } - const payload = sasTokenProperties.user + - "\n" + - sasTokenProperties.userTag + - "\n" + - sasTokenProperties.resourcePath + - "\n" + - partitionRanges + - "\n" + - utcsecondsSinceEpoch(sasTokenProperties.startTime).toString(16) + - "\n" + - utcsecondsSinceEpoch(sasTokenProperties.expiryTime).toString(16) + - "\n" + - sasTokenProperties.keyType + - "\n" + - sasTokenProperties.controlPlaneReaderScope.toString(16) + - "\n" + - sasTokenProperties.controlPlaneWriterScope.toString(16) + - "\n" + - sasTokenProperties.dataPlaneReaderScope.toString(16) + - "\n" + - sasTokenProperties.dataPlaneWriterScope.toString(16) + - "\n"; - const signedPayload = await hmac(masterKey, Buffer.from(payload).toString("base64")); - return "type=sas&ver=1.0&sig=" + signedPayload + ";" + Buffer.from(payload).toString("base64"); -} -/** - * @hidden - */ -// TODO: utcMilllisecondsSinceEpoch -function utcsecondsSinceEpoch(date) { - return Math.round(date.getTime() / 1000); -} - -Object.defineProperty(exports, 'RestError', { - enumerable: true, - get: function () { return coreRestPipeline.RestError; } -}); -Object.defineProperty(exports, 'AbortError', { - enumerable: true, - get: function () { return abortController.AbortError; } -}); -exports.BulkOperationType = BulkOperationType; -exports.ChangeFeedIterator = ChangeFeedIterator; -exports.ChangeFeedResponse = ChangeFeedResponse; -exports.ClientContext = ClientContext; -exports.ClientSideMetrics = ClientSideMetrics; -exports.Conflict = Conflict; -exports.ConflictResponse = ConflictResponse; -exports.Conflicts = Conflicts; -exports.Constants = Constants; -exports.Container = Container; -exports.ContainerResponse = ContainerResponse; -exports.Containers = Containers; -exports.CosmosClient = CosmosClient; -exports.DEFAULT_PARTITION_KEY_PATH = DEFAULT_PARTITION_KEY_PATH; -exports.Database = Database; -exports.DatabaseAccount = DatabaseAccount; -exports.DatabaseResponse = DatabaseResponse; -exports.Databases = Databases; -exports.ErrorResponse = ErrorResponse; -exports.FeedResponse = FeedResponse; -exports.GlobalEndpointManager = GlobalEndpointManager; -exports.Item = Item; -exports.ItemResponse = ItemResponse; -exports.Items = Items; -exports.Offer = Offer; -exports.OfferResponse = OfferResponse; -exports.Offers = Offers; -exports.PatchOperationType = PatchOperationType; -exports.Permission = Permission; -exports.PermissionResponse = PermissionResponse; -exports.Permissions = Permissions; -exports.QueryIterator = QueryIterator; -exports.QueryMetrics = QueryMetrics; -exports.QueryMetricsConstants = QueryMetricsConstants; -exports.QueryPreparationTimes = QueryPreparationTimes; -exports.ResourceResponse = ResourceResponse; -exports.RuntimeExecutionTimes = RuntimeExecutionTimes; -exports.SasTokenProperties = SasTokenProperties; -exports.Scripts = Scripts; -exports.StatusCodes = StatusCodes; -exports.StoredProcedure = StoredProcedure; -exports.StoredProcedureResponse = StoredProcedureResponse; -exports.StoredProcedures = StoredProcedures; -exports.TimeSpan = TimeSpan; -exports.TimeoutError = TimeoutError; -exports.Trigger = Trigger; -exports.TriggerResponse = TriggerResponse; -exports.Triggers = Triggers; -exports.User = User; -exports.UserDefinedFunction = UserDefinedFunction; -exports.UserDefinedFunctionResponse = UserDefinedFunctionResponse; -exports.UserDefinedFunctions = UserDefinedFunctions; -exports.UserResponse = UserResponse; -exports.Users = Users; -exports.createAuthorizationSasToken = createAuthorizationSasToken; -exports.extractPartitionKey = extractPartitionKey; -exports.setAuthorizationTokenHeaderUsingMasterKey = setAuthorizationTokenHeaderUsingMasterKey; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist/index.js.map b/reverse_engineering/node_modules/@azure/cosmos/dist/index.js.map deleted file mode 100644 index d710adb..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/common/partitionKeys.ts","../src/common/constants.ts","../src/common/helper.ts","../src/common/statusCodes.ts","../src/common/uriFactory.ts","../src/extractPartitionKey.ts","../src/utils/hmac.ts","../src/utils/headers.ts","../src/auth.ts","../src/common/logger.ts","../src/request/request.ts","../src/utils/batch.ts","../src/utils/patch.ts","../src/documents/ConnectionMode.ts","../src/documents/ConnectionPolicy.ts","../src/documents/ConsistencyLevel.ts","../src/documents/DatabaseAccount.ts","../src/documents/DataType.ts","../src/documents/IndexingMode.ts","../src/documents/IndexingPolicy.ts","../src/documents/IndexKind.ts","../src/documents/PermissionMode.ts","../src/documents/TriggerOperation.ts","../src/documents/TriggerType.ts","../src/documents/UserDefinedFunctionType.ts","../src/documents/GeospatialType.ts","../src/request/ErrorResponse.ts","../src/request/ResourceResponse.ts","../src/request/FeedResponse.ts","../src/request/TimeoutError.ts","../src/queryMetrics/clientSideMetrics.ts","../src/queryMetrics/queryMetricsConstants.ts","../src/queryMetrics/timeSpan.ts","../src/queryMetrics/queryMetricsUtils.ts","../src/queryMetrics/queryPreparationTime.ts","../src/queryMetrics/runtimeExecutionTimes.ts","../src/queryMetrics/queryMetrics.ts","../src/queryExecutionContext/headerUtils.ts","../src/queryExecutionContext/defaultQueryExecutionContext.ts","../src/queryExecutionContext/Aggregators/AverageAggregator.ts","../src/queryExecutionContext/Aggregators/CountAggregator.ts","../src/queryExecutionContext/orderByDocumentProducerComparator.ts","../src/queryExecutionContext/Aggregators/MaxAggregator.ts","../src/queryExecutionContext/Aggregators/MinAggregator.ts","../src/queryExecutionContext/Aggregators/SumAggregator.ts","../src/queryExecutionContext/Aggregators/StaticValueAggregator.ts","../src/queryExecutionContext/Aggregators/index.ts","../src/queryExecutionContext/FetchResult.ts","../src/queryExecutionContext/documentProducer.ts","../src/routing/QueryRange.ts","../src/routing/inMemoryCollectionRoutingMap.ts","../src/routing/CollectionRoutingMapFactory.ts","../src/routing/partitionKeyRangeCache.ts","../src/routing/smartRoutingMapProvider.ts","../src/queryExecutionContext/parallelQueryExecutionContextBase.ts","../src/queryExecutionContext/parallelQueryExecutionContext.ts","../src/queryExecutionContext/orderByQueryExecutionContext.ts","../src/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.ts","../src/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.ts","../src/utils/digest.ts","../src/utils/hashObject.ts","../src/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.ts","../src/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.ts","../src/queryExecutionContext/EndpointComponent/emptyGroup.ts","../src/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.ts","../src/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.ts","../src/queryExecutionContext/pipelinedQueryExecutionContext.ts","../src/queryIterator.ts","../src/client/Conflict/ConflictResponse.ts","../src/client/Conflict/Conflict.ts","../src/client/Conflict/Conflicts.ts","../src/client/Conflict/ConflictResolutionMode.ts","../src/client/Item/ItemResponse.ts","../src/client/Item/Item.ts","../src/ChangeFeedResponse.ts","../src/ChangeFeedIterator.ts","../src/utils/hashing/encoding/prefix.ts","../src/utils/hashing/encoding/number.ts","../src/utils/hashing/encoding/string.ts","../src/utils/hashing/murmurHash.ts","../src/utils/hashing/v1.ts","../src/utils/hashing/v2.ts","../src/client/Item/Items.ts","../src/client/StoredProcedure/StoredProcedureResponse.ts","../src/client/StoredProcedure/StoredProcedure.ts","../src/client/StoredProcedure/StoredProcedures.ts","../src/client/Trigger/TriggerResponse.ts","../src/client/Trigger/Trigger.ts","../src/client/Trigger/Triggers.ts","../src/client/UserDefinedFunction/UserDefinedFunctionResponse.ts","../src/client/UserDefinedFunction/UserDefinedFunction.ts","../src/client/UserDefinedFunction/UserDefinedFunctions.ts","../src/client/Script/Scripts.ts","../src/client/Container/ContainerResponse.ts","../src/client/Offer/OfferResponse.ts","../src/client/Offer/Offer.ts","../src/client/Offer/Offers.ts","../src/client/Container/Container.ts","../src/utils/offers.ts","../src/client/Container/Containers.ts","../src/client/Permission/PermissionResponse.ts","../src/client/Permission/Permission.ts","../src/client/Permission/Permissions.ts","../src/client/User/UserResponse.ts","../src/client/User/User.ts","../src/client/User/Users.ts","../src/client/Database/DatabaseResponse.ts","../src/client/Database/Database.ts","../src/client/Database/Databases.ts","../src/plugins/Plugin.ts","../src/retry/defaultRetryPolicy.ts","../src/retry/endpointDiscoveryRetryPolicy.ts","../src/retry/resourceThrottleRetryPolicy.ts","../src/retry/sessionRetryPolicy.ts","../src/retry/retryUtility.ts","../src/request/defaultAgent.ts","../src/utils/cachedClient.ts","../src/request/RequestHandler.ts","../src/utils/atob.ts","../src/session/VectorSessionToken.ts","../src/session/sessionContainer.ts","../src/utils/checkURL.ts","../src/ClientContext.ts","../src/common/platform.ts","../src/globalEndpointManager.ts","../src/CosmosClient.ts","../src/client/SasToken/SasTokenProperties.ts","../src/utils/encode.ts","../src/utils/SasToken.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport const DEFAULT_PARTITION_KEY_PATH = \"/_partitionKey\" as \"/_partitionKey\"; // eslint-disable-line @typescript-eslint/prefer-as-const\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface PartitionKeyRangePropertiesNames {\n // Partition Key Range Constants\n MinInclusive: \"minInclusive\";\n MaxExclusive: \"maxExclusive\";\n Id: \"id\";\n}\n\n/**\n * @hidden\n */\nexport const Constants = {\n HttpHeaders: {\n Authorization: \"authorization\",\n ETag: \"etag\",\n MethodOverride: \"X-HTTP-Method\",\n Slug: \"Slug\",\n ContentType: \"Content-Type\",\n LastModified: \"Last-Modified\",\n ContentEncoding: \"Content-Encoding\",\n CharacterSet: \"CharacterSet\",\n UserAgent: \"User-Agent\",\n IfModifiedSince: \"If-Modified-Since\",\n IfMatch: \"If-Match\",\n IfNoneMatch: \"If-None-Match\",\n ContentLength: \"Content-Length\",\n AcceptEncoding: \"Accept-Encoding\",\n KeepAlive: \"Keep-Alive\",\n CacheControl: \"Cache-Control\",\n TransferEncoding: \"Transfer-Encoding\",\n ContentLanguage: \"Content-Language\",\n ContentLocation: \"Content-Location\",\n ContentMd5: \"Content-Md5\",\n ContentRange: \"Content-Range\",\n Accept: \"Accept\",\n AcceptCharset: \"Accept-Charset\",\n AcceptLanguage: \"Accept-Language\",\n IfRange: \"If-Range\",\n IfUnmodifiedSince: \"If-Unmodified-Since\",\n MaxForwards: \"Max-Forwards\",\n ProxyAuthorization: \"Proxy-Authorization\",\n AcceptRanges: \"Accept-Ranges\",\n ProxyAuthenticate: \"Proxy-Authenticate\",\n RetryAfter: \"Retry-After\",\n SetCookie: \"Set-Cookie\",\n WwwAuthenticate: \"Www-Authenticate\",\n Origin: \"Origin\",\n Host: \"Host\",\n AccessControlAllowOrigin: \"Access-Control-Allow-Origin\",\n AccessControlAllowHeaders: \"Access-Control-Allow-Headers\",\n KeyValueEncodingFormat: \"application/x-www-form-urlencoded\",\n WrapAssertionFormat: \"wrap_assertion_format\",\n WrapAssertion: \"wrap_assertion\",\n WrapScope: \"wrap_scope\",\n SimpleToken: \"SWT\",\n HttpDate: \"date\",\n Prefer: \"Prefer\",\n Location: \"Location\",\n Referer: \"referer\",\n A_IM: \"A-IM\",\n\n // Query\n Query: \"x-ms-documentdb-query\",\n IsQuery: \"x-ms-documentdb-isquery\",\n IsQueryPlan: \"x-ms-cosmos-is-query-plan-request\",\n SupportedQueryFeatures: \"x-ms-cosmos-supported-query-features\",\n QueryVersion: \"x-ms-cosmos-query-version\",\n\n // Our custom Azure Cosmos DB headers\n Continuation: \"x-ms-continuation\",\n PageSize: \"x-ms-max-item-count\",\n ItemCount: \"x-ms-item-count\",\n\n // Request sender generated. Simply echoed by backend.\n ActivityId: \"x-ms-activity-id\",\n PreTriggerInclude: \"x-ms-documentdb-pre-trigger-include\",\n PreTriggerExclude: \"x-ms-documentdb-pre-trigger-exclude\",\n PostTriggerInclude: \"x-ms-documentdb-post-trigger-include\",\n PostTriggerExclude: \"x-ms-documentdb-post-trigger-exclude\",\n IndexingDirective: \"x-ms-indexing-directive\",\n SessionToken: \"x-ms-session-token\",\n ConsistencyLevel: \"x-ms-consistency-level\",\n XDate: \"x-ms-date\",\n CollectionPartitionInfo: \"x-ms-collection-partition-info\",\n CollectionServiceInfo: \"x-ms-collection-service-info\",\n // Deprecated, use RetryAfterInMs instead.\n RetryAfterInMilliseconds: \"x-ms-retry-after-ms\",\n RetryAfterInMs: \"x-ms-retry-after-ms\",\n IsFeedUnfiltered: \"x-ms-is-feed-unfiltered\",\n ResourceTokenExpiry: \"x-ms-documentdb-expiry-seconds\",\n EnableScanInQuery: \"x-ms-documentdb-query-enable-scan\",\n EmitVerboseTracesInQuery: \"x-ms-documentdb-query-emit-traces\",\n EnableCrossPartitionQuery: \"x-ms-documentdb-query-enablecrosspartition\",\n ParallelizeCrossPartitionQuery: \"x-ms-documentdb-query-parallelizecrosspartitionquery\",\n ResponseContinuationTokenLimitInKB: \"x-ms-documentdb-responsecontinuationtokenlimitinkb\",\n\n // QueryMetrics\n // Request header to tell backend to give you query metrics.\n PopulateQueryMetrics: \"x-ms-documentdb-populatequerymetrics\",\n // Response header that holds the serialized version of query metrics.\n QueryMetrics: \"x-ms-documentdb-query-metrics\",\n\n // Version headers and values\n Version: \"x-ms-version\",\n\n // Owner name\n OwnerFullName: \"x-ms-alt-content-path\",\n\n // Owner ID used for name based request in session token.\n OwnerId: \"x-ms-content-path\",\n\n // Partition Key\n PartitionKey: \"x-ms-documentdb-partitionkey\",\n PartitionKeyRangeID: \"x-ms-documentdb-partitionkeyrangeid\",\n\n // Quota Info\n MaxEntityCount: \"x-ms-root-entity-max-count\",\n CurrentEntityCount: \"x-ms-root-entity-current-count\",\n CollectionQuotaInMb: \"x-ms-collection-quota-mb\",\n CollectionCurrentUsageInMb: \"x-ms-collection-usage-mb\",\n MaxMediaStorageUsageInMB: \"x-ms-max-media-storage-usage-mb\",\n CurrentMediaStorageUsageInMB: \"x-ms-media-storage-usage-mb\",\n RequestCharge: \"x-ms-request-charge\",\n PopulateQuotaInfo: \"x-ms-documentdb-populatequotainfo\",\n MaxResourceQuota: \"x-ms-resource-quota\",\n\n // Offer header\n OfferType: \"x-ms-offer-type\",\n OfferThroughput: \"x-ms-offer-throughput\",\n AutoscaleSettings: \"x-ms-cosmos-offer-autopilot-settings\",\n\n // Custom RUs/minute headers\n DisableRUPerMinuteUsage: \"x-ms-documentdb-disable-ru-per-minute-usage\",\n IsRUPerMinuteUsed: \"x-ms-documentdb-is-ru-per-minute-used\",\n OfferIsRUPerMinuteThroughputEnabled: \"x-ms-offer-is-ru-per-minute-throughput-enabled\",\n\n // Index progress headers\n IndexTransformationProgress: \"x-ms-documentdb-collection-index-transformation-progress\",\n LazyIndexingProgress: \"x-ms-documentdb-collection-lazy-indexing-progress\",\n\n // Upsert header\n IsUpsert: \"x-ms-documentdb-is-upsert\",\n\n // Sub status of the error\n SubStatus: \"x-ms-substatus\",\n\n // StoredProcedure related headers\n EnableScriptLogging: \"x-ms-documentdb-script-enable-logging\",\n ScriptLogResults: \"x-ms-documentdb-script-log-results\",\n\n // Multi-Region Write\n ALLOW_MULTIPLE_WRITES: \"x-ms-cosmos-allow-tentative-writes\",\n\n // Bulk/Batch header\n IsBatchRequest: \"x-ms-cosmos-is-batch-request\",\n IsBatchAtomic: \"x-ms-cosmos-batch-atomic\",\n BatchContinueOnError: \"x-ms-cosmos-batch-continue-on-error\",\n\n // Dedicated Gateway Headers\n DedicatedGatewayPerRequestCacheStaleness: \"x-ms-dedicatedgateway-max-age\",\n\n // Cache Refresh header\n ForceRefresh: \"x-ms-force-refresh\",\n },\n\n // GlobalDB related constants\n WritableLocations: \"writableLocations\",\n ReadableLocations: \"readableLocations\",\n LocationUnavailableExpirationTimeInMs: 5 * 60 * 1000, // 5 minutes\n\n // ServiceDocument Resource\n ENABLE_MULTIPLE_WRITABLE_LOCATIONS: \"enableMultipleWriteLocations\",\n\n // Background refresh time\n DefaultUnavailableLocationExpirationTimeMS: 5 * 60 * 1000,\n\n // Client generated retry count response header\n ThrottleRetryCount: \"x-ms-throttle-retry-count\",\n ThrottleRetryWaitTimeInMs: \"x-ms-throttle-retry-wait-time-ms\",\n\n // Platform\n CurrentVersion: \"2020-07-15\",\n AzureNamespace: \"Azure.Cosmos\",\n AzurePackageName: \"@azure/cosmos\",\n SDKName: \"azure-cosmos-js\",\n SDKVersion: \"3.17.3\",\n\n // Bulk Operations\n DefaultMaxBulkRequestBodySizeInBytes: 220201,\n\n Quota: {\n CollectionSize: \"collectionSize\",\n },\n\n Path: {\n Root: \"/\",\n DatabasesPathSegment: \"dbs\",\n CollectionsPathSegment: \"colls\",\n UsersPathSegment: \"users\",\n DocumentsPathSegment: \"docs\",\n PermissionsPathSegment: \"permissions\",\n StoredProceduresPathSegment: \"sprocs\",\n TriggersPathSegment: \"triggers\",\n UserDefinedFunctionsPathSegment: \"udfs\",\n ConflictsPathSegment: \"conflicts\",\n AttachmentsPathSegment: \"attachments\",\n PartitionKeyRangesPathSegment: \"pkranges\",\n SchemasPathSegment: \"schemas\",\n OffersPathSegment: \"offers\",\n TopologyPathSegment: \"topology\",\n DatabaseAccountPathSegment: \"databaseaccount\",\n },\n\n PartitionKeyRange: {\n // Partition Key Range Constants\n MinInclusive: \"minInclusive\",\n MaxExclusive: \"maxExclusive\",\n Id: \"id\",\n } as PartitionKeyRangePropertiesNames,\n\n QueryRangeConstants: {\n // Partition Key Range Constants\n MinInclusive: \"minInclusive\",\n MaxExclusive: \"maxExclusive\",\n min: \"min\",\n },\n\n /**\n * @deprecated Use EffectivePartitionKeyConstants instead\n */\n EffectiveParitionKeyConstants: {\n MinimumInclusiveEffectivePartitionKey: \"\",\n MaximumExclusiveEffectivePartitionKey: \"FF\",\n },\n\n EffectivePartitionKeyConstants: {\n MinimumInclusiveEffectivePartitionKey: \"\",\n MaximumExclusiveEffectivePartitionKey: \"FF\",\n },\n};\n\n/**\n * @hidden\n */\nexport enum ResourceType {\n none = \"\",\n database = \"dbs\",\n offer = \"offers\",\n user = \"users\",\n permission = \"permissions\",\n container = \"colls\",\n conflicts = \"conflicts\",\n sproc = \"sprocs\",\n udf = \"udfs\",\n trigger = \"triggers\",\n item = \"docs\",\n pkranges = \"pkranges\",\n partitionkey = \"partitionKey\",\n}\n\n/**\n * @hidden\n */\nexport enum HTTPMethod {\n get = \"GET\",\n patch = \"PATCH\",\n post = \"POST\",\n put = \"PUT\",\n delete = \"DELETE\",\n}\n\n/**\n * @hidden\n */\nexport enum OperationType {\n Create = \"create\",\n Replace = \"replace\",\n Upsert = \"upsert\",\n Delete = \"delete\",\n Read = \"read\",\n Query = \"query\",\n Execute = \"execute\",\n Batch = \"batch\",\n Patch = \"patch\",\n}\n\n/**\n * @hidden\n */\nexport enum CosmosKeyType {\n PrimaryMaster = \"PRIMARY_MASTER\",\n SecondaryMaster = \"SECONDARY_MASTER\",\n PrimaryReadOnly = \"PRIMARY_READONLY\",\n SecondaryReadOnly = \"SECONDARY_READONLY\",\n}\n\n/**\n * @hidden\n */\nexport enum CosmosContainerChildResourceKind {\n Item = \"ITEM\",\n StoredProcedure = \"STORED_PROCEDURE\",\n UserDefinedFunction = \"USER_DEFINED_FUNCTION\",\n Trigger = \"TRIGGER\",\n}\n/**\n * @hidden\n */\nexport enum PermissionScopeValues {\n /**\n * Values which set permission Scope applicable to control plane related operations.\n */\n ScopeAccountReadValue = 0x0001,\n ScopeAccountListDatabasesValue = 0x0002,\n ScopeDatabaseReadValue = 0x0004,\n ScopeDatabaseReadOfferValue = 0x0008,\n ScopeDatabaseListContainerValue = 0x0010,\n ScopeContainerReadValue = 0x0020,\n ScopeContainerReadOfferValue = 0x0040,\n\n ScopeAccountCreateDatabasesValue = 0x0001,\n ScopeAccountDeleteDatabasesValue = 0x0002,\n ScopeDatabaseDeleteValue = 0x0004,\n ScopeDatabaseReplaceOfferValue = 0x0008,\n ScopeDatabaseCreateContainerValue = 0x0010,\n ScopeDatabaseDeleteContainerValue = 0x0020,\n ScopeContainerReplaceValue = 0x0040,\n ScopeContainerDeleteValue = 0x0080,\n ScopeContainerReplaceOfferValue = 0x0100,\n\n ScopeAccountReadAllAccessValue = 0xffff,\n ScopeDatabaseReadAllAccessValue = PermissionScopeValues.ScopeDatabaseReadValue |\n PermissionScopeValues.ScopeDatabaseReadOfferValue |\n PermissionScopeValues.ScopeDatabaseListContainerValue |\n PermissionScopeValues.ScopeContainerReadValue |\n PermissionScopeValues.ScopeContainerReadOfferValue,\n\n ScopeContainersReadAllAccessValue = PermissionScopeValues.ScopeContainerReadValue |\n PermissionScopeValues.ScopeContainerReadOfferValue,\n\n ScopeAccountWriteAllAccessValue = 0xffff,\n ScopeDatabaseWriteAllAccessValue = PermissionScopeValues.ScopeDatabaseDeleteValue |\n PermissionScopeValues.ScopeDatabaseReplaceOfferValue |\n PermissionScopeValues.ScopeDatabaseCreateContainerValue |\n PermissionScopeValues.ScopeDatabaseDeleteContainerValue |\n PermissionScopeValues.ScopeContainerReplaceValue |\n PermissionScopeValues.ScopeContainerDeleteValue |\n PermissionScopeValues.ScopeContainerReplaceOfferValue,\n\n ScopeContainersWriteAllAccessValue = PermissionScopeValues.ScopeContainerReplaceValue |\n PermissionScopeValues.ScopeContainerDeleteValue |\n PermissionScopeValues.ScopeContainerReplaceOfferValue,\n\n /**\n * Values which set permission Scope applicable to data plane related operations.\n */\n ScopeContainerExecuteQueriesValue = 0x00000001,\n ScopeContainerReadFeedsValue = 0x00000002,\n ScopeContainerReadStoredProceduresValue = 0x00000004,\n ScopeContainerReadUserDefinedFunctionsValue = 0x00000008,\n ScopeContainerReadTriggersValue = 0x00000010,\n ScopeContainerReadConflictsValue = 0x00000020,\n ScopeItemReadValue = 0x00000040,\n ScopeStoredProcedureReadValue = 0x00000080,\n ScopeUserDefinedFunctionReadValue = 0x00000100,\n ScopeTriggerReadValue = 0x00000200,\n\n ScopeContainerCreateItemsValue = 0x00000001,\n ScopeContainerReplaceItemsValue = 0x00000002,\n ScopeContainerUpsertItemsValue = 0x00000004,\n ScopeContainerDeleteItemsValue = 0x00000008,\n ScopeContainerCreateStoredProceduresValue = 0x00000010,\n ScopeContainerReplaceStoredProceduresValue = 0x00000020,\n ScopeContainerDeleteStoredProceduresValue = 0x00000040,\n ScopeContainerExecuteStoredProceduresValue = 0x00000080,\n ScopeContainerCreateTriggersValue = 0x00000100,\n ScopeContainerReplaceTriggersValue = 0x00000200,\n ScopeContainerDeleteTriggersValue = 0x00000400,\n ScopeContainerCreateUserDefinedFunctionsValue = 0x00000800,\n ScopeContainerReplaceUserDefinedFunctionsValue = 0x00001000,\n ScopeContainerDeleteUserDefinedFunctionSValue = 0x00002000,\n ScopeContainerDeleteCONFLICTSValue = 0x00004000,\n ScopeItemReplaceValue = 0x00010000,\n ScopeItemUpsertValue = 0x00020000,\n ScopeItemDeleteValue = 0x00040000,\n ScopeStoredProcedureReplaceValue = 0x00100000,\n ScopeStoredProcedureDeleteValue = 0x00200000,\n ScopeStoredProcedureExecuteValue = 0x00400000,\n ScopeUserDefinedFunctionReplaceValue = 0x00800000,\n ScopeUserDefinedFunctionDeleteValue = 0x01000000,\n ScopeTriggerReplaceValue = 0x02000000,\n ScopeTriggerDeleteValue = 0x04000000,\n\n ScopeContainerReadAllAccessValue = 0xffffffff,\n ScopeItemReadAllAccessValue = PermissionScopeValues.ScopeContainerExecuteQueriesValue |\n PermissionScopeValues.ScopeItemReadValue,\n ScopeContainerWriteAllAccessValue = 0xffffffff,\n ScopeItemWriteAllAccessValue = PermissionScopeValues.ScopeContainerCreateItemsValue |\n PermissionScopeValues.ScopeContainerReplaceItemsValue |\n PermissionScopeValues.ScopeContainerUpsertItemsValue |\n PermissionScopeValues.ScopeContainerDeleteItemsValue |\n PermissionScopeValues.ScopeItemReplaceValue |\n PermissionScopeValues.ScopeItemUpsertValue |\n PermissionScopeValues.ScopeItemDeleteValue,\n\n NoneValue = 0,\n}\n/**\n * @hidden\n */\nexport enum SasTokenPermissionKind {\n ContainerCreateItems = PermissionScopeValues.ScopeContainerCreateItemsValue,\n ContainerReplaceItems = PermissionScopeValues.ScopeContainerReplaceItemsValue,\n ContainerUpsertItems = PermissionScopeValues.ScopeContainerUpsertItemsValue,\n ContainerDeleteItems = PermissionScopeValues.ScopeContainerDeleteValue,\n ContainerExecuteQueries = PermissionScopeValues.ScopeContainerExecuteQueriesValue,\n ContainerReadFeeds = PermissionScopeValues.ScopeContainerReadFeedsValue,\n ContainerCreateStoreProcedure = PermissionScopeValues.ScopeContainerCreateStoredProceduresValue,\n ContainerReadStoreProcedure = PermissionScopeValues.ScopeContainerReadStoredProceduresValue,\n ContainerReplaceStoreProcedure = PermissionScopeValues.ScopeContainerReplaceStoredProceduresValue,\n ContainerDeleteStoreProcedure = PermissionScopeValues.ScopeContainerDeleteStoredProceduresValue,\n ContainerCreateTriggers = PermissionScopeValues.ScopeContainerCreateTriggersValue,\n ContainerReadTriggers = PermissionScopeValues.ScopeContainerReadTriggersValue,\n ContainerReplaceTriggers = PermissionScopeValues.ScopeContainerReplaceTriggersValue,\n ContainerDeleteTriggers = PermissionScopeValues.ScopeContainerDeleteTriggersValue,\n ContainerCreateUserDefinedFunctions = PermissionScopeValues.ScopeContainerCreateUserDefinedFunctionsValue,\n ContainerReadUserDefinedFunctions = PermissionScopeValues.ScopeContainerReadUserDefinedFunctionsValue,\n ContainerReplaceUserDefinedFunctions = PermissionScopeValues.ScopeContainerReplaceUserDefinedFunctionsValue,\n ContainerDeleteUserDefinedFunctions = PermissionScopeValues.ScopeContainerDeleteUserDefinedFunctionSValue,\n ContainerExecuteStoredProcedure = PermissionScopeValues.ScopeContainerExecuteStoredProceduresValue,\n ContainerReadConflicts = PermissionScopeValues.ScopeContainerReadConflictsValue,\n ContainerDeleteConflicts = PermissionScopeValues.ScopeContainerDeleteCONFLICTSValue,\n ContainerReadAny = PermissionScopeValues.ScopeContainerReadOfferValue,\n ContainerFullAccess = PermissionScopeValues.ScopeContainerReadAllAccessValue,\n ItemReadAny = PermissionScopeValues.ScopeItemReplaceValue,\n ItemFullAccess = PermissionScopeValues.ScopeItemReadAllAccessValue,\n ItemRead = PermissionScopeValues.ScopeItemReadValue,\n ItemReplace = PermissionScopeValues.ScopeItemReplaceValue,\n ItemUpsert = PermissionScopeValues.ScopeItemUpsertValue,\n ItemDelete = PermissionScopeValues.ScopeItemDeleteValue,\n StoreProcedureRead = PermissionScopeValues.ScopeStoredProcedureReadValue,\n StoreProcedureReplace = PermissionScopeValues.ScopeStoredProcedureReplaceValue,\n StoreProcedureDelete = PermissionScopeValues.ScopeStoredProcedureDeleteValue,\n StoreProcedureExecute = PermissionScopeValues.ScopeStoredProcedureExecuteValue,\n UserDefinedFuntionRead = PermissionScopeValues.ScopeUserDefinedFunctionReadValue,\n UserDefinedFuntionReplace = PermissionScopeValues.ScopeUserDefinedFunctionReplaceValue,\n UserDefinedFuntionDelete = PermissionScopeValues.ScopeUserDefinedFunctionDeleteValue,\n TriggerRead = PermissionScopeValues.ScopeTriggerReadValue,\n TriggerReplace = PermissionScopeValues.ScopeTriggerReplaceValue,\n TriggerDelete = PermissionScopeValues.ScopeTriggerDeleteValue,\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosClientOptions } from \"../CosmosClientOptions\";\nimport { OperationType, ResourceType } from \"./constants\";\n\nconst trimLeftSlashes = new RegExp(\"^[/]+\");\nconst trimRightSlashes = new RegExp(\"[/]+$\");\nconst illegalResourceIdCharacters = new RegExp(\"[/\\\\\\\\?#]\");\nconst illegalItemResourceIdCharacters = new RegExp(\"[/\\\\\\\\#]\");\n\n/** @hidden */\nexport function jsonStringifyAndEscapeNonASCII(arg: unknown): string {\n // TODO: better way for this? Not sure.\n // escapes non-ASCII characters as \\uXXXX\n return JSON.stringify(arg).replace(/[\\u007F-\\uFFFF]/g, (m) => {\n return \"\\\\u\" + (\"0000\" + m.charCodeAt(0).toString(16)).slice(-4);\n });\n}\n\n/**\n * @hidden\n */\nexport function parseLink(resourcePath: string): {\n type: ResourceType;\n objectBody: {\n id: string;\n self: string;\n };\n} {\n if (resourcePath.length === 0) {\n /* for DatabaseAccount case, both type and objectBody will be undefined. */\n return {\n type: undefined,\n objectBody: undefined,\n };\n }\n\n if (resourcePath[resourcePath.length - 1] !== \"/\") {\n resourcePath = resourcePath + \"/\";\n }\n\n if (resourcePath[0] !== \"/\") {\n resourcePath = \"/\" + resourcePath;\n }\n\n /*\n The path will be in the form of /[resourceType]/[resourceId]/ ....\n /[resourceType]//[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/\n or /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId]/[resourceType]/[resourceId]/ ....\n /[resourceType]/[resourceId]/\n The result of split will be in the form of\n [[[resourceType], [resourceId] ... ,[resourceType], [resourceId], \"\"]\n In the first case, to extract the resourceId it will the element before last ( at length -2 )\n and the type will be before it ( at length -3 )\n In the second case, to extract the resource type it will the element before last ( at length -2 )\n */\n const pathParts = resourcePath.split(\"/\");\n let id;\n let type: ResourceType;\n if (pathParts.length % 2 === 0) {\n // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/[resourceId].\n id = pathParts[pathParts.length - 2];\n type = pathParts[pathParts.length - 3] as ResourceType;\n } else {\n // request in form /[resourceType]/[resourceId]/ .... /[resourceType]/.\n id = pathParts[pathParts.length - 3];\n type = pathParts[pathParts.length - 2] as ResourceType;\n }\n\n const result = {\n type,\n objectBody: {\n id,\n self: resourcePath,\n },\n };\n\n return result;\n}\n\n/**\n * @hidden\n */\nexport function isReadRequest(operationType: OperationType): boolean {\n return operationType === OperationType.Read || operationType === OperationType.Query;\n}\n\n/**\n * @hidden\n */\nexport function sleep(time: number): Promise {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, time);\n });\n}\n\n/**\n * @hidden\n */\nexport function getContainerLink(link: string): string {\n return link.split(\"/\").slice(0, 4).join(\"/\");\n}\n\n/**\n * @hidden\n */\nexport function trimSlashes(source: string): string {\n return source.replace(trimLeftSlashes, \"\").replace(trimRightSlashes, \"\");\n}\n\n/**\n * @hidden\n */\nexport function getHexaDigit(): string {\n return Math.floor(Math.random() * 16).toString(16);\n}\n\n/**\n * @hidden\n */\nexport function parsePath(path: string): string[] {\n const pathParts = [];\n let currentIndex = 0;\n\n const throwError = (): never => {\n throw new Error(\"Path \" + path + \" is invalid at index \" + currentIndex);\n };\n\n const getEscapedToken = (): string => {\n const quote = path[currentIndex];\n let newIndex = ++currentIndex;\n\n for (;;) {\n newIndex = path.indexOf(quote, newIndex);\n if (newIndex === -1) {\n throwError();\n }\n\n if (path[newIndex - 1] !== \"\\\\\") {\n break;\n }\n\n ++newIndex;\n }\n\n const token = path.substr(currentIndex, newIndex - currentIndex);\n currentIndex = newIndex + 1;\n return token;\n };\n\n const getToken = (): string => {\n const newIndex = path.indexOf(\"/\", currentIndex);\n let token = null;\n if (newIndex === -1) {\n token = path.substr(currentIndex);\n currentIndex = path.length;\n } else {\n token = path.substr(currentIndex, newIndex - currentIndex);\n currentIndex = newIndex;\n }\n\n token = token.trim();\n return token;\n };\n\n while (currentIndex < path.length) {\n if (path[currentIndex] !== \"/\") {\n throwError();\n }\n\n if (++currentIndex === path.length) {\n break;\n }\n\n if (path[currentIndex] === '\"' || path[currentIndex] === \"'\") {\n pathParts.push(getEscapedToken());\n } else {\n pathParts.push(getToken());\n }\n }\n\n return pathParts;\n}\n\n/**\n * @hidden\n */\nexport function isResourceValid(resource: { id?: string }, err: { message?: string }): boolean {\n // TODO: fix strictness issues so that caller contexts respects the types of the functions\n if (resource.id) {\n if (typeof resource.id !== \"string\") {\n err.message = \"Id must be a string.\";\n return false;\n }\n\n if (\n resource.id.indexOf(\"/\") !== -1 ||\n resource.id.indexOf(\"\\\\\") !== -1 ||\n resource.id.indexOf(\"?\") !== -1 ||\n resource.id.indexOf(\"#\") !== -1\n ) {\n err.message = \"Id contains illegal chars.\";\n return false;\n }\n\n if (resource.id[resource.id.length - 1] === \" \") {\n err.message = \"Id ends with a space.\";\n return false;\n }\n }\n return true;\n}\n\n/**\n * @hidden\n */\nexport function isItemResourceValid(resource: { id?: string }, err: { message?: string }): boolean {\n // TODO: fix strictness issues so that caller contexts respects the types of the functions\n if (resource.id) {\n if (typeof resource.id !== \"string\") {\n err.message = \"Id must be a string.\";\n return false;\n }\n\n if (\n resource.id.indexOf(\"/\") !== -1 ||\n resource.id.indexOf(\"\\\\\") !== -1 ||\n resource.id.indexOf(\"#\") !== -1\n ) {\n err.message = \"Id contains illegal chars.\";\n return false;\n }\n }\n return true;\n}\n\n/** @hidden */\nexport function getIdFromLink(resourceLink: string): string {\n resourceLink = trimSlashes(resourceLink);\n return resourceLink;\n}\n\n/** @hidden */\nexport function getPathFromLink(resourceLink: string, resourceType?: string): string {\n resourceLink = trimSlashes(resourceLink);\n if (resourceType) {\n return \"/\" + encodeURI(resourceLink) + \"/\" + resourceType;\n } else {\n return \"/\" + encodeURI(resourceLink);\n }\n}\n\n/**\n * @hidden\n */\nexport function isStringNullOrEmpty(inputString: string): boolean {\n // checks whether string is null, undefined, empty or only contains space\n return !inputString || /^\\s*$/.test(inputString);\n}\n\n/**\n * @hidden\n */\nexport function trimSlashFromLeftAndRight(inputString: string): string {\n if (typeof inputString !== \"string\") {\n throw new Error(\"invalid input: input is not string\");\n }\n\n return inputString.replace(trimLeftSlashes, \"\").replace(trimRightSlashes, \"\");\n}\n\n/**\n * @hidden\n */\nexport function validateResourceId(resourceId: string): boolean {\n // if resourceId is not a string or is empty throw an error\n if (typeof resourceId !== \"string\" || isStringNullOrEmpty(resourceId)) {\n throw new Error(\"Resource ID must be a string and cannot be undefined, null or empty\");\n }\n\n // if resource id contains illegal characters throw an error\n if (illegalResourceIdCharacters.test(resourceId)) {\n throw new Error(\"Illegal characters ['/', '\\\\', '#', '?'] cannot be used in Resource ID\");\n }\n\n return true;\n}\n\n/**\n * @hidden\n */\nexport function validateItemResourceId(resourceId: string): boolean {\n // if resourceId is not a string or is empty throw an error\n if (typeof resourceId !== \"string\" || isStringNullOrEmpty(resourceId)) {\n throw new Error(\"Resource ID must be a string and cannot be undefined, null or empty\");\n }\n\n // if resource id contains illegal characters throw an error\n if (illegalItemResourceIdCharacters.test(resourceId)) {\n throw new Error(\"Illegal characters ['/', '\\\\', '#'] cannot be used in Resource ID\");\n }\n\n return true;\n}\n\n/**\n * @hidden\n */\nexport function getResourceIdFromPath(resourcePath: string): string {\n if (!resourcePath || typeof resourcePath !== \"string\") {\n return null;\n }\n\n const trimmedPath = trimSlashFromLeftAndRight(resourcePath);\n const pathSegments = trimmedPath.split(\"/\");\n\n // number of segments of a path must always be even\n if (pathSegments.length % 2 !== 0) {\n return null;\n }\n\n return pathSegments[pathSegments.length - 1];\n}\n\n/**\n * @hidden\n */\ninterface ConnectionObject {\n AccountEndpoint: string;\n AccountKey: string;\n}\n\n/**\n * @hidden\n */\nexport function parseConnectionString(connectionString: string): CosmosClientOptions {\n const keyValueStrings = connectionString.split(\";\");\n const { AccountEndpoint, AccountKey } = keyValueStrings.reduce(\n (connectionObject, keyValueString: string) => {\n const [key, ...value] = keyValueString.split(\"=\");\n (connectionObject as any)[key] = value.join(\"=\");\n return connectionObject;\n },\n {} as ConnectionObject\n );\n if (!AccountEndpoint || !AccountKey) {\n throw new Error(\"Could not parse the provided connection string\");\n }\n return {\n endpoint: AccountEndpoint,\n key: AccountKey,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * @hidden\n */\nexport interface StatusCodesType {\n // Success\n Ok: 200;\n Created: 201;\n Accepted: 202;\n NoContent: 204;\n NotModified: 304;\n\n // Client error\n BadRequest: 400;\n Unauthorized: 401;\n Forbidden: 403;\n NotFound: 404;\n MethodNotAllowed: 405;\n RequestTimeout: 408;\n Conflict: 409;\n Gone: 410;\n PreconditionFailed: 412;\n RequestEntityTooLarge: 413;\n TooManyRequests: 429;\n RetryWith: 449;\n\n // Server Error\n InternalServerError: 500;\n ServiceUnavailable: 503;\n\n // System codes\n ENOTFOUND: \"ENOTFOUND\";\n\n // Operation pause and cancel. These are FAKE status codes for QOS logging purpose only.\n OperationPaused: 1200;\n OperationCancelled: 1201;\n}\n\n/**\n * @hidden\n */\nexport const StatusCodes: StatusCodesType = {\n // Success\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NoContent: 204,\n NotModified: 304,\n\n // Client error\n BadRequest: 400,\n Unauthorized: 401,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n PreconditionFailed: 412,\n RequestEntityTooLarge: 413,\n TooManyRequests: 429,\n RetryWith: 449,\n\n // Server Error\n InternalServerError: 500,\n ServiceUnavailable: 503,\n\n // System codes\n ENOTFOUND: \"ENOTFOUND\",\n\n // Operation pause and cancel. These are FAKE status codes for QOS logging purpose only.\n OperationPaused: 1200,\n OperationCancelled: 1201,\n};\n\n/**\n * @hidden\n */\nexport interface SubStatusCodesType {\n Unknown: 0;\n\n // 400: Bad Request Substatus\n CrossPartitionQueryNotServable: 1004;\n\n // 410: StatusCodeType_Gone: substatus\n PartitionKeyRangeGone: 1002;\n\n // 404: NotFound Substatus\n ReadSessionNotAvailable: 1002;\n\n // 403: Forbidden Substatus\n WriteForbidden: 3;\n DatabaseAccountNotFound: 1008;\n}\n\n/**\n * @hidden\n */\nexport const SubStatusCodes: SubStatusCodesType = {\n Unknown: 0,\n\n // 400: Bad Request Substatus\n CrossPartitionQueryNotServable: 1004,\n\n // 410: StatusCodeType_Gone: substatus\n PartitionKeyRangeGone: 1002,\n\n // 404: NotFound Substatus\n ReadSessionNotAvailable: 1002,\n\n // 403: Forbidden Substatus\n WriteForbidden: 3,\n DatabaseAccountNotFound: 1008,\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"./constants\";\nimport { trimSlashFromLeftAndRight, validateResourceId, validateItemResourceId } from \"./helper\";\n\n/**\n * Would be used when creating or deleting a DocumentCollection\n * or a User in Azure Cosmos DB database service\n * @hidden\n * Given a database id, this creates a database link.\n * @param databaseId - The database id\n * @returns A database link in the format of `dbs/{0}`\n * with `{0}` being a Uri escaped version of the databaseId\n */\nexport function createDatabaseUri(databaseId: string): string {\n databaseId = trimSlashFromLeftAndRight(databaseId);\n validateResourceId(databaseId);\n\n return Constants.Path.DatabasesPathSegment + \"/\" + databaseId;\n}\n\n/**\n * Given a database and collection id, this creates a collection link.\n * Would be used when updating or deleting a DocumentCollection, creating a\n * Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query\n * with CreateDocumentQuery in Azure Cosmos DB database service.\n * @param databaseId - The database id\n * @param collectionId - The collection id\n * @returns A collection link in the format of `dbs/{0}/colls/{1}`\n * with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId\n * @hidden\n */\nexport function createDocumentCollectionUri(databaseId: string, collectionId: string): string {\n collectionId = trimSlashFromLeftAndRight(collectionId);\n validateResourceId(collectionId);\n\n return (\n createDatabaseUri(databaseId) + \"/\" + Constants.Path.CollectionsPathSegment + \"/\" + collectionId\n );\n}\n\n/**\n * Given a database and user id, this creates a user link.\n * Would be used when creating a Permission, or when replacing or deleting\n * a User in Azure Cosmos DB database service\n * @param databaseId - The database id\n * @param userId - The user id\n * @returns A user link in the format of `dbs/{0}/users/{1}`\n * with `{0}` being a Uri escaped version of the databaseId and `{1}` being userId\n * @hidden\n */\nexport function createUserUri(databaseId: string, userId: string): string {\n userId = trimSlashFromLeftAndRight(userId);\n validateResourceId(userId);\n\n return createDatabaseUri(databaseId) + \"/\" + Constants.Path.UsersPathSegment + \"/\" + userId;\n}\n\n/**\n * Given a database and collection id, this creates a collection link.\n * Would be used when creating an Attachment, or when replacing\n * or deleting a Document in Azure Cosmos DB database service\n * @param databaseId - The database id\n * @param collectionId - The collection id\n * @param documentId - The document id\n * @returns A document link in the format of\n * `dbs/{0}/colls/{1}/docs/{2}` with `{0}` being a Uri escaped version of\n * the databaseId, `{1}` being collectionId and `{2}` being the documentId\n * @hidden\n */\nexport function createDocumentUri(\n databaseId: string,\n collectionId: string,\n documentId: string\n): string {\n documentId = trimSlashFromLeftAndRight(documentId);\n validateItemResourceId(documentId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.DocumentsPathSegment +\n \"/\" +\n documentId\n );\n}\n\n/**\n * Given a database, collection and document id, this creates a document link.\n * Would be used when replacing or deleting a Permission in Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param userId -The user Id\n * @param permissionId - The permissionId\n * @returns A permission link in the format of `dbs/{0}/users/{1}/permissions/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being userId and `{2}` being permissionId\n * @hidden\n */\nexport function createPermissionUri(\n databaseId: string,\n userId: string,\n permissionId: string\n): string {\n permissionId = trimSlashFromLeftAndRight(permissionId);\n validateResourceId(permissionId);\n\n return (\n createUserUri(databaseId, userId) +\n \"/\" +\n Constants.Path.PermissionsPathSegment +\n \"/\" +\n permissionId\n );\n}\n\n/**\n * Given a database, collection and stored proc id, this creates a stored proc link.\n * Would be used when replacing, executing, or deleting a StoredProcedure in\n * Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param storedProcedureId -The stored procedure Id\n * @returns A stored procedure link in the format of\n * `dbs/{0}/colls/{1}/sprocs/{2}` with `{0}` being a Uri escaped version of the databaseId,\n * `{1}` being collectionId and `{2}` being the storedProcedureId\n * @hidden\n */\nexport function createStoredProcedureUri(\n databaseId: string,\n collectionId: string,\n storedProcedureId: string\n): string {\n storedProcedureId = trimSlashFromLeftAndRight(storedProcedureId);\n validateResourceId(storedProcedureId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.StoredProceduresPathSegment +\n \"/\" +\n storedProcedureId\n );\n}\n\n/**\n * Given a database, collection and trigger id, this creates a trigger link.\n * Would be used when replacing, executing, or deleting a Trigger in Azure Cosmos DB database service\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param triggerId -The trigger Id\n * @returns A trigger link in the format of\n * `dbs/{0}/colls/{1}/triggers/{2}` with `{0}` being a Uri escaped version of the databaseId,\n * `{1}` being collectionId and `{2}` being the triggerId\n * @hidden\n */\nexport function createTriggerUri(\n databaseId: string,\n collectionId: string,\n triggerId: string\n): string {\n triggerId = trimSlashFromLeftAndRight(triggerId);\n validateResourceId(triggerId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.TriggersPathSegment +\n \"/\" +\n triggerId\n );\n}\n\n/**\n * Given a database, collection and udf id, this creates a udf link.\n * Would be used when replacing, executing, or deleting a UserDefinedFunction in\n * Azure Cosmos DB database service\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param udfId -The User Defined Function Id\n * @returns A udf link in the format of `dbs/{0}/colls/{1}/udfs/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the udfId\n * @hidden\n */\nexport function createUserDefinedFunctionUri(\n databaseId: string,\n collectionId: string,\n udfId: string\n): string {\n udfId = trimSlashFromLeftAndRight(udfId);\n validateResourceId(udfId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.UserDefinedFunctionsPathSegment +\n \"/\" +\n udfId\n );\n}\n\n/**\n * Given a database, collection and conflict id, this creates a conflict link.\n * Would be used when creating a Conflict in Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param conflictId -The conflict Id\n * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId\n * @hidden\n */\nexport function createConflictUri(\n databaseId: string,\n collectionId: string,\n conflictId: string\n): string {\n conflictId = trimSlashFromLeftAndRight(conflictId);\n validateResourceId(conflictId);\n\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.ConflictsPathSegment +\n \"/\" +\n conflictId\n );\n}\n\n/**\n * Given a database, collection and conflict id, this creates a conflict link.\n * Would be used when creating a Conflict in Azure Cosmos DB database service.\n * @param databaseId -The database Id\n * @param collectionId -The collection Id\n * @param documentId -The document Id\n * @param attachmentId -The attachment Id\n * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}`\n * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId\n * @hidden\n */\nexport function createAttachmentUri(\n databaseId: string,\n collectionId: string,\n documentId: string,\n attachmentId: string\n): string {\n attachmentId = trimSlashFromLeftAndRight(attachmentId);\n validateResourceId(attachmentId);\n\n return (\n createDocumentUri(databaseId, collectionId, documentId) +\n \"/\" +\n Constants.Path.AttachmentsPathSegment +\n \"/\" +\n attachmentId\n );\n}\n\n/**\n * Given a database and collection, this creates a partition key ranges link in\n * the Azure Cosmos DB database service.\n * @param databaseId - The database Id\n * @param collectionId - The collection Id\n * @returns A partition key ranges link in the format of\n * `dbs/{0}/colls/{1}/pkranges` with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId\n * @hidden\n */\nexport function createPartitionKeyRangesUri(databaseId: string, collectionId: string): string {\n return (\n createDocumentCollectionUri(databaseId, collectionId) +\n \"/\" +\n Constants.Path.PartitionKeyRangesPathSegment\n );\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { parsePath } from \"./common\";\nimport { PartitionKey, PartitionKeyDefinition } from \"./documents\";\n\n/**\n * @hidden\n */\nexport function extractPartitionKey(\n document: unknown,\n partitionKeyDefinition: PartitionKeyDefinition\n): PartitionKey[] {\n if (\n partitionKeyDefinition &&\n partitionKeyDefinition.paths &&\n partitionKeyDefinition.paths.length > 0\n ) {\n const partitionKey: PartitionKey[] = [];\n partitionKeyDefinition.paths.forEach((path: string) => {\n const pathParts = parsePath(path);\n let obj = document;\n for (const part of pathParts) {\n if (typeof obj === \"object\" && part in obj) {\n obj = (obj as Record)[part];\n } else {\n obj = undefined;\n break;\n }\n }\n partitionKey.push(obj);\n });\n if (partitionKey.length === 1 && partitionKey[0] === undefined) {\n return undefinedPartitionKey(partitionKeyDefinition);\n }\n return partitionKey;\n }\n}\n/**\n * @hidden\n */\nexport function undefinedPartitionKey(partitionKeyDefinition: PartitionKeyDefinition): unknown[] {\n if (partitionKeyDefinition.systemKey === true) {\n return [];\n } else {\n return [{}];\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createHmac } from \"crypto\";\n\nexport async function hmac(key: string, message: string): Promise {\n return createHmac(\"sha256\", Buffer.from(key, \"base64\")).update(message).digest(\"base64\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { hmac } from \"./hmac\";\nimport { HTTPMethod, ResourceType, Constants } from \"../common\";\n\nexport async function generateHeaders(\n masterKey: string,\n method: HTTPMethod,\n resourceType: ResourceType = ResourceType.none,\n resourceId: string = \"\",\n date = new Date()\n): Promise<{\n [x: string]: string;\n}> {\n if (masterKey.startsWith(\"type=sas&\")) {\n return {\n [Constants.HttpHeaders.Authorization]: encodeURIComponent(masterKey),\n [Constants.HttpHeaders.XDate]: date.toUTCString(),\n };\n }\n const sig = await signature(masterKey, method, resourceType, resourceId, date);\n\n return {\n [Constants.HttpHeaders.Authorization]: sig,\n [Constants.HttpHeaders.XDate]: date.toUTCString(),\n };\n}\n\nasync function signature(\n masterKey: string,\n method: HTTPMethod,\n resourceType: ResourceType,\n resourceId: string = \"\",\n date = new Date()\n): Promise {\n const type = \"master\";\n const version = \"1.0\";\n const text =\n method.toLowerCase() +\n \"\\n\" +\n resourceType.toLowerCase() +\n \"\\n\" +\n resourceId +\n \"\\n\" +\n date.toUTCString().toLowerCase() +\n \"\\n\" +\n \"\" +\n \"\\n\";\n\n const signed = await hmac(masterKey, text);\n\n return encodeURIComponent(\"type=\" + type + \"&ver=\" + version + \"&sig=\" + signed);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { generateHeaders } from \"./utils/headers\";\nimport {\n Constants,\n getResourceIdFromPath,\n HTTPMethod,\n ResourceType,\n trimSlashFromLeftAndRight,\n} from \"./common\";\nimport { CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { CosmosHeaders } from \"./queryExecutionContext\";\n\n/** @hidden */\nexport interface RequestInfo {\n verb: HTTPMethod;\n path: string;\n resourceId: string;\n resourceType: ResourceType;\n headers: CosmosHeaders;\n}\n\nexport type TokenProvider = (requestInfo: RequestInfo) => Promise;\n\n/**\n * @hidden\n */\nexport async function setAuthorizationHeader(\n clientOptions: CosmosClientOptions,\n verb: HTTPMethod,\n path: string,\n resourceId: string,\n resourceType: ResourceType,\n headers: CosmosHeaders\n): Promise {\n if (clientOptions.permissionFeed) {\n clientOptions.resourceTokens = {};\n for (const permission of clientOptions.permissionFeed) {\n const id = getResourceIdFromPath(permission.resource);\n if (!id) {\n throw new Error(`authorization error: ${id} \\\n is an invalid resourceId in permissionFeed`);\n }\n\n clientOptions.resourceTokens[id] = (permission as any)._token; // TODO: any\n }\n }\n\n if (clientOptions.key) {\n await setAuthorizationTokenHeaderUsingMasterKey(\n verb,\n resourceId,\n resourceType,\n headers,\n clientOptions.key\n );\n } else if (clientOptions.resourceTokens) {\n headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(\n getAuthorizationTokenUsingResourceTokens(clientOptions.resourceTokens, path, resourceId)\n );\n } else if (clientOptions.tokenProvider) {\n headers[Constants.HttpHeaders.Authorization] = encodeURIComponent(\n await clientOptions.tokenProvider({ verb, path, resourceId, resourceType, headers })\n );\n }\n}\n\n/**\n * The default function for setting header token using the masterKey\n * @hidden\n */\nexport async function setAuthorizationTokenHeaderUsingMasterKey(\n verb: HTTPMethod,\n resourceId: string,\n resourceType: ResourceType,\n headers: CosmosHeaders,\n masterKey: string\n): Promise {\n // TODO This should live in cosmos-sign\n if (resourceType === ResourceType.offer) {\n resourceId = resourceId && resourceId.toLowerCase();\n }\n headers = Object.assign(\n headers,\n await generateHeaders(masterKey, verb, resourceType, resourceId)\n );\n}\n\n/**\n * @hidden\n */\n// TODO: Resource tokens\nexport function getAuthorizationTokenUsingResourceTokens(\n resourceTokens: { [resourceId: string]: string },\n path: string,\n resourceId: string\n): string {\n if (resourceTokens && Object.keys(resourceTokens).length > 0) {\n // For database account access(through getDatabaseAccount API), path and resourceId are \"\",\n // so in this case we return the first token to be used for creating the auth header as the\n // service will accept any token in this case\n if (!path && !resourceId) {\n return resourceTokens[Object.keys(resourceTokens)[0]];\n }\n\n // If we have exact resource token for the path use it\n if (resourceId && resourceTokens[resourceId]) {\n return resourceTokens[resourceId];\n }\n\n // minimum valid path /dbs\n if (!path || path.length < 4) {\n // TODO: This should throw an error\n return null;\n }\n\n path = trimSlashFromLeftAndRight(path);\n const pathSegments = (path && path.split(\"/\")) || [];\n\n // Item path\n if (pathSegments.length === 6) {\n // Look for a container token matching the item path\n const containerPath = pathSegments.slice(0, 4).map(decodeURIComponent).join(\"/\");\n if (resourceTokens[containerPath]) {\n return resourceTokens[containerPath];\n }\n }\n\n // TODO remove in v4: This is legacy behavior that lets someone use a resource token pointing ONLY at an ID\n // It was used when _rid was exposed by the SDK, but now that we are using user provided ids it is not needed\n // However removing it now would be a breaking change\n // if it's an incomplete path like /dbs/db1/colls/, start from the parent resource\n let index = pathSegments.length % 2 === 0 ? pathSegments.length - 1 : pathSegments.length - 2;\n for (; index > 0; index -= 2) {\n const id = decodeURI(pathSegments[index]);\n if (resourceTokens[id]) {\n return resourceTokens[id];\n }\n }\n }\n\n // TODO: This should throw an error\n return null;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger, AzureLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n */\nexport const defaultLogger: AzureLogger = createClientLogger(\"cosmosdb\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { setAuthorizationHeader } from \"../auth\";\nimport { Constants, HTTPMethod, jsonStringifyAndEscapeNonASCII, ResourceType } from \"../common\";\nimport { CosmosClientOptions } from \"../CosmosClientOptions\";\nimport { PartitionKey } from \"../documents\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\nimport { FeedOptions, RequestOptions } from \"./index\";\nimport { defaultLogger } from \"../common/logger\";\n// ----------------------------------------------------------------------------\n// Utility methods\n//\n\n/** @hidden */\nfunction javaScriptFriendlyJSONStringify(s: unknown): string {\n // two line terminators (Line separator and Paragraph separator) are not needed to be escaped in JSON\n // but are needed to be escaped in JavaScript.\n return JSON.stringify(s)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\n\n/** @hidden */\nexport function bodyFromData(data: Buffer | string | Record): string {\n if (typeof data === \"object\") {\n return javaScriptFriendlyJSONStringify(data);\n }\n return data;\n}\n\n/**\n * @hidden\n */\ninterface GetHeadersOptions {\n clientOptions: CosmosClientOptions;\n defaultHeaders: CosmosHeaders;\n verb: HTTPMethod;\n path: string;\n resourceId: string;\n resourceType: ResourceType;\n options: RequestOptions & FeedOptions;\n partitionKeyRangeId?: string;\n useMultipleWriteLocations?: boolean;\n partitionKey?: PartitionKey;\n}\n\nconst JsonContentType = \"application/json\";\n\n/**\n * @hidden\n */\nexport async function getHeaders({\n clientOptions,\n defaultHeaders,\n verb,\n path,\n resourceId,\n resourceType,\n options = {},\n partitionKeyRangeId,\n useMultipleWriteLocations,\n partitionKey,\n}: GetHeadersOptions): Promise {\n const headers: CosmosHeaders = {\n [Constants.HttpHeaders.ResponseContinuationTokenLimitInKB]: 1,\n [Constants.HttpHeaders.EnableCrossPartitionQuery]: true,\n ...defaultHeaders,\n };\n\n if (useMultipleWriteLocations) {\n headers[Constants.HttpHeaders.ALLOW_MULTIPLE_WRITES] = true;\n }\n\n if (options.continuationTokenLimitInKB) {\n headers[Constants.HttpHeaders.ResponseContinuationTokenLimitInKB] =\n options.continuationTokenLimitInKB;\n }\n if (options.continuationToken) {\n headers[Constants.HttpHeaders.Continuation] = options.continuationToken;\n } else if (options.continuation) {\n headers[Constants.HttpHeaders.Continuation] = options.continuation;\n }\n\n if (options.preTriggerInclude) {\n headers[Constants.HttpHeaders.PreTriggerInclude] =\n options.preTriggerInclude.constructor === Array\n ? (options.preTriggerInclude as string[]).join(\",\")\n : (options.preTriggerInclude as string);\n }\n\n if (options.postTriggerInclude) {\n headers[Constants.HttpHeaders.PostTriggerInclude] =\n options.postTriggerInclude.constructor === Array\n ? (options.postTriggerInclude as string[]).join(\",\")\n : (options.postTriggerInclude as string);\n }\n\n if (options.offerType) {\n headers[Constants.HttpHeaders.OfferType] = options.offerType;\n }\n\n if (options.offerThroughput) {\n headers[Constants.HttpHeaders.OfferThroughput] = options.offerThroughput;\n }\n\n if (options.maxItemCount) {\n headers[Constants.HttpHeaders.PageSize] = options.maxItemCount;\n }\n\n if (options.accessCondition) {\n if (options.accessCondition.type === \"IfMatch\") {\n headers[Constants.HttpHeaders.IfMatch] = options.accessCondition.condition;\n } else {\n headers[Constants.HttpHeaders.IfNoneMatch] = options.accessCondition.condition;\n }\n }\n\n if (options.useIncrementalFeed) {\n headers[Constants.HttpHeaders.A_IM] = \"Incremental Feed\";\n }\n\n if (options.indexingDirective) {\n headers[Constants.HttpHeaders.IndexingDirective] = options.indexingDirective;\n }\n\n if (options.consistencyLevel) {\n headers[Constants.HttpHeaders.ConsistencyLevel] = options.consistencyLevel;\n }\n\n if (options.maxIntegratedCacheStalenessInMs && resourceType === ResourceType.item) {\n if (typeof options.maxIntegratedCacheStalenessInMs === \"number\") {\n headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] =\n options.maxIntegratedCacheStalenessInMs.toString();\n } else {\n defaultLogger.error(\n `RangeError: maxIntegratedCacheStalenessInMs \"${options.maxIntegratedCacheStalenessInMs}\" is not a valid parameter.`\n );\n headers[Constants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness] = \"null\";\n }\n }\n\n if (options.resourceTokenExpirySeconds) {\n headers[Constants.HttpHeaders.ResourceTokenExpiry] = options.resourceTokenExpirySeconds;\n }\n\n if (options.sessionToken) {\n headers[Constants.HttpHeaders.SessionToken] = options.sessionToken;\n }\n\n if (options.enableScanInQuery) {\n headers[Constants.HttpHeaders.EnableScanInQuery] = options.enableScanInQuery;\n }\n\n if (options.populateQuotaInfo) {\n headers[Constants.HttpHeaders.PopulateQuotaInfo] = options.populateQuotaInfo;\n }\n\n if (options.populateQueryMetrics) {\n headers[Constants.HttpHeaders.PopulateQueryMetrics] = options.populateQueryMetrics;\n }\n\n if (options.maxDegreeOfParallelism !== undefined) {\n headers[Constants.HttpHeaders.ParallelizeCrossPartitionQuery] = true;\n }\n\n if (options.populateQuotaInfo) {\n headers[Constants.HttpHeaders.PopulateQuotaInfo] = true;\n }\n\n if (partitionKey !== undefined && !headers[Constants.HttpHeaders.PartitionKey]) {\n if (partitionKey === null || !Array.isArray(partitionKey)) {\n partitionKey = [partitionKey as string];\n }\n headers[Constants.HttpHeaders.PartitionKey] = jsonStringifyAndEscapeNonASCII(partitionKey);\n }\n\n if (clientOptions.key || clientOptions.tokenProvider) {\n headers[Constants.HttpHeaders.XDate] = new Date().toUTCString();\n }\n\n if (verb === HTTPMethod.post || verb === HTTPMethod.put) {\n if (!headers[Constants.HttpHeaders.ContentType]) {\n headers[Constants.HttpHeaders.ContentType] = JsonContentType;\n }\n }\n\n if (!headers[Constants.HttpHeaders.Accept]) {\n headers[Constants.HttpHeaders.Accept] = JsonContentType;\n }\n\n if (partitionKeyRangeId !== undefined) {\n headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId;\n }\n\n if (options.enableScriptLogging) {\n headers[Constants.HttpHeaders.EnableScriptLogging] = options.enableScriptLogging;\n }\n\n if (options.disableRUPerMinuteUsage) {\n headers[Constants.HttpHeaders.DisableRUPerMinuteUsage] = true;\n }\n\n if (\n clientOptions.key ||\n clientOptions.resourceTokens ||\n clientOptions.tokenProvider ||\n clientOptions.permissionFeed\n ) {\n await setAuthorizationHeader(clientOptions, verb, path, resourceId, resourceType, headers);\n }\n return headers;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { JSONObject } from \"../queryExecutionContext\";\nimport { extractPartitionKey } from \"../extractPartitionKey\";\nimport { PartitionKeyDefinition } from \"../documents\";\nimport { RequestOptions } from \"..\";\nimport { PatchRequestBody } from \"./patch\";\nimport { v4 } from \"uuid\";\nimport { bodyFromData } from \"../request/request\";\nimport { Constants } from \"../common/constants\";\nconst uuid = v4;\n\nexport type Operation =\n | CreateOperation\n | UpsertOperation\n | ReadOperation\n | DeleteOperation\n | ReplaceOperation\n | BulkPatchOperation;\n\nexport interface Batch {\n min: string;\n max: string;\n rangeId: string;\n indexes: number[];\n operations: Operation[];\n}\n\nexport interface OperationResponse {\n statusCode: number;\n requestCharge: number;\n eTag?: string;\n resourceBody?: JSONObject;\n}\n\n/**\n * Options object used to modify bulk execution.\n * continueOnError (Default value: false) - Continues bulk execution when an operation fails ** NOTE THIS WILL DEFAULT TO TRUE IN the 4.0 RELEASE\n */\nexport interface BulkOptions {\n continueOnError?: boolean;\n}\n\nexport function isKeyInRange(min: string, max: string, key: string): boolean {\n const isAfterMinInclusive = key.localeCompare(min) >= 0;\n const isBeforeMax = key.localeCompare(max) < 0;\n return isAfterMinInclusive && isBeforeMax;\n}\n\nexport interface OperationBase {\n partitionKey?: string;\n ifMatch?: string;\n ifNoneMatch?: string;\n}\n\nexport const BulkOperationType = {\n Create: \"Create\",\n Upsert: \"Upsert\",\n Read: \"Read\",\n Delete: \"Delete\",\n Replace: \"Replace\",\n Patch: \"Patch\",\n} as const;\n\nexport type OperationInput =\n | CreateOperationInput\n | UpsertOperationInput\n | ReadOperationInput\n | DeleteOperationInput\n | ReplaceOperationInput\n | PatchOperationInput;\n\nexport interface CreateOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Create;\n resourceBody: JSONObject;\n}\n\nexport interface UpsertOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Upsert;\n resourceBody: JSONObject;\n}\n\nexport interface ReadOperationInput {\n partitionKey?: string | number | boolean | null | Record | undefined;\n operationType: typeof BulkOperationType.Read;\n id: string;\n}\n\nexport interface DeleteOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n operationType: typeof BulkOperationType.Delete;\n id: string;\n}\n\nexport interface ReplaceOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Replace;\n resourceBody: JSONObject;\n id: string;\n}\n\nexport interface PatchOperationInput {\n partitionKey?: string | number | null | Record | undefined;\n ifMatch?: string;\n ifNoneMatch?: string;\n operationType: typeof BulkOperationType.Patch;\n resourceBody: PatchRequestBody;\n id: string;\n}\n\nexport type OperationWithItem = OperationBase & {\n resourceBody: JSONObject;\n};\n\nexport type CreateOperation = OperationWithItem & {\n operationType: typeof BulkOperationType.Create;\n};\n\nexport type UpsertOperation = OperationWithItem & {\n operationType: typeof BulkOperationType.Upsert;\n};\n\nexport type ReadOperation = OperationBase & {\n operationType: typeof BulkOperationType.Read;\n id: string;\n};\n\nexport type DeleteOperation = OperationBase & {\n operationType: typeof BulkOperationType.Delete;\n id: string;\n};\n\nexport type ReplaceOperation = OperationWithItem & {\n operationType: typeof BulkOperationType.Replace;\n id: string;\n};\n\nexport type BulkPatchOperation = OperationBase & {\n operationType: typeof BulkOperationType.Patch;\n id: string;\n};\n\nexport function hasResource(\n operation: Operation\n): operation is CreateOperation | UpsertOperation | ReplaceOperation {\n return (\n operation.operationType !== \"Patch\" &&\n (operation as OperationWithItem).resourceBody !== undefined\n );\n}\n\nexport function getPartitionKeyToHash(operation: Operation, partitionProperty: string): any {\n const toHashKey = hasResource(operation)\n ? deepFind(operation.resourceBody, partitionProperty)\n : (operation.partitionKey && operation.partitionKey.replace(/[[\\]\"']/g, \"\")) ||\n operation.partitionKey;\n // We check for empty object since replace will stringify the value\n // The second check avoids cases where the partitionKey value is actually the string '{}'\n if (toHashKey === \"{}\" && operation.partitionKey === \"[{}]\") {\n return {};\n }\n if (toHashKey === \"null\" && operation.partitionKey === \"[null]\") {\n return null;\n }\n if (toHashKey === \"0\" && operation.partitionKey === \"[0]\") {\n return 0;\n }\n return toHashKey;\n}\n\nexport function decorateOperation(\n operation: OperationInput,\n definition: PartitionKeyDefinition,\n options: RequestOptions = {}\n): Operation {\n if (\n operation.operationType === BulkOperationType.Create ||\n operation.operationType === BulkOperationType.Upsert\n ) {\n if (\n (operation.resourceBody.id === undefined || operation.resourceBody.id === \"\") &&\n !options.disableAutomaticIdGeneration\n ) {\n operation.resourceBody.id = uuid();\n }\n }\n if (\"partitionKey\" in operation) {\n const extracted = extractPartitionKey(operation, { paths: [\"/partitionKey\"] });\n return { ...operation, partitionKey: JSON.stringify(extracted) } as Operation;\n } else if (\n operation.operationType === BulkOperationType.Create ||\n operation.operationType === BulkOperationType.Replace ||\n operation.operationType === BulkOperationType.Upsert\n ) {\n const pk = extractPartitionKey(operation.resourceBody, definition);\n return { ...operation, partitionKey: JSON.stringify(pk) } as Operation;\n } else if (\n operation.operationType === BulkOperationType.Read ||\n operation.operationType === BulkOperationType.Delete\n ) {\n return { ...operation, partitionKey: \"[{}]\" };\n }\n return operation as Operation;\n}\n\n/**\n * Splits a batch into array of batches based on cumulative size of its operations by making sure\n * cumulative size of an individual batch is not larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}.\n * If a single operation itself is larger than {@link Constants.DefaultMaxBulkRequestBodySizeInBytes}, that\n * operation would be moved into a batch containing only that operation.\n * @param originalBatch - A batch of operations needed to be checked.\n * @returns\n * @hidden\n */\nexport function splitBatchBasedOnBodySize(originalBatch: Batch): Batch[] {\n if (originalBatch?.operations === undefined || originalBatch.operations.length < 1) return [];\n let currentBatchSize = calculateObjectSizeInBytes(originalBatch.operations[0]);\n let currentBatch: Batch = {\n ...originalBatch,\n operations: [originalBatch.operations[0]],\n indexes: [originalBatch.indexes[0]],\n };\n const processedBatches: Batch[] = [];\n processedBatches.push(currentBatch);\n\n for (let index = 1; index < originalBatch.operations.length; index++) {\n const operation = originalBatch.operations[index];\n const currentOpSize = calculateObjectSizeInBytes(operation);\n if (currentBatchSize + currentOpSize > Constants.DefaultMaxBulkRequestBodySizeInBytes) {\n currentBatch = {\n ...originalBatch,\n operations: [],\n indexes: [],\n };\n processedBatches.push(currentBatch);\n currentBatchSize = 0;\n }\n currentBatch.operations.push(operation);\n currentBatch.indexes.push(originalBatch.indexes[index]);\n currentBatchSize += currentOpSize;\n }\n return processedBatches;\n}\n\n/**\n * Calculates size of an JSON object in bytes with utf-8 encoding.\n * @hidden\n */\nexport function calculateObjectSizeInBytes(obj: unknown): number {\n return new TextEncoder().encode(bodyFromData(obj as any)).length;\n}\n\nexport function decorateBatchOperation(\n operation: OperationInput,\n options: RequestOptions = {}\n): Operation {\n if (\n operation.operationType === BulkOperationType.Create ||\n operation.operationType === BulkOperationType.Upsert\n ) {\n if (\n (operation.resourceBody.id === undefined || operation.resourceBody.id === \"\") &&\n !options.disableAutomaticIdGeneration\n ) {\n operation.resourceBody.id = uuid();\n }\n }\n return operation as Operation;\n}\n/**\n * Util function for finding partition key values nested in objects at slash (/) separated paths\n * @hidden\n */\nexport function deepFind(document: T, path: P): string | JSONObject {\n const apath = path.split(\"/\");\n let h: any = document;\n for (const p of apath) {\n if (p in h) h = h[p];\n else {\n if (p !== \"_partitionKey\") {\n console.warn(`Partition key not found, using undefined: ${path} at ${p}`);\n }\n return \"{}\";\n }\n }\n return h;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport type PatchOperation = ExistingKeyOperation | RemoveOperation;\n\nexport const PatchOperationType = {\n add: \"add\",\n replace: \"replace\",\n remove: \"remove\",\n set: \"set\",\n incr: \"incr\",\n} as const;\n\nexport type ExistingKeyOperation = {\n op: keyof typeof PatchOperationType;\n value: any;\n path: string;\n};\n\nexport type RemoveOperation = {\n op: \"remove\";\n path: string;\n};\n\nexport type PatchRequestBody =\n | {\n operations: PatchOperation[];\n condition?: string;\n }\n | PatchOperation[];\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. */\nexport enum ConnectionMode {\n /** Gateway mode talks to an intermediate gateway which handles the direct communication with your individual partitions. */\n Gateway = 0,\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { RetryOptions } from \"../retry/retryOptions\";\nimport { ConnectionMode } from \"./ConnectionMode\";\n/**\n * Represents the Connection policy associated with a CosmosClient in the Azure Cosmos DB database service.\n */\nexport interface ConnectionPolicy {\n /** Determines which mode to connect to Cosmos with. (Currently only supports Gateway option) */\n connectionMode?: ConnectionMode;\n /** Request timeout (time to wait for response from network peer). Represented in milliseconds. */\n requestTimeout?: number;\n /**\n * Flag to enable/disable automatic redirecting of requests based on read/write operations. Default true.\n * Required to call client.dispose() when this is set to true after destroying the CosmosClient inside another process or in the browser.\n */\n enableEndpointDiscovery?: boolean;\n /** List of azure regions to be used as preferred locations for read requests. */\n preferredLocations?: string[];\n /** RetryOptions object which defines several configurable properties used during retry. */\n retryOptions?: RetryOptions;\n /**\n * The flag that enables writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service.\n * Default is `false`.\n */\n useMultipleWriteLocations?: boolean;\n /** Rate in milliseconds at which the client will refresh the endpoints list in the background */\n endpointRefreshRateInMs?: number;\n /** Flag to enable/disable background refreshing of endpoints. Defaults to false.\n * Endpoint discovery using `enableEndpointsDiscovery` will still work for failed requests. */\n enableBackgroundEndpointRefreshing?: boolean;\n}\n\n/**\n * @hidden\n */\nexport const defaultConnectionPolicy: ConnectionPolicy = Object.freeze({\n connectionMode: ConnectionMode.Gateway,\n requestTimeout: 60000,\n enableEndpointDiscovery: true,\n preferredLocations: [],\n retryOptions: {\n maxRetryAttemptCount: 9,\n fixedRetryIntervalInMilliseconds: 0,\n maxWaitTimeInSeconds: 30,\n },\n useMultipleWriteLocations: true,\n endpointRefreshRateInMs: 300000,\n enableBackgroundEndpointRefreshing: true,\n});\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Represents the consistency levels supported for Azure Cosmos DB client operations.
\n * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account.\n * Consistency levels.\n *\n * Consistency levels by order of strength are Strong, BoundedStaleness, Session, Consistent Prefix, and Eventual.\n *\n * See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels.\n */\nexport enum ConsistencyLevel {\n /**\n * Strong Consistency guarantees that read operations always return the value that was last written.\n */\n Strong = \"Strong\",\n /**\n * Bounded Staleness guarantees that reads are not too out-of-date.\n * This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds).\n */\n BoundedStaleness = \"BoundedStaleness\",\n /**\n * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again),\n * monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads)\n * within any single session.\n */\n Session = \"Session\",\n /**\n * Eventual Consistency guarantees that reads will return a subset of writes.\n * All writes will be eventually be available for reads.\n */\n Eventual = \"Eventual\",\n /**\n * ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps.\n * All writes will be eventually be available for reads.\n */\n ConsistentPrefix = \"ConsistentPrefix\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\nimport { ConsistencyLevel } from \"./ConsistencyLevel\";\n\n/**\n * Represents a DatabaseAccount in the Azure Cosmos DB database service.\n */\nexport class DatabaseAccount {\n /** The list of writable locations for a geo-replicated database account. */\n public readonly writableLocations: Location[] = [];\n /** The list of readable locations for a geo-replicated database account. */\n public readonly readableLocations: Location[] = [];\n /**\n * The self-link for Databases in the databaseAccount.\n * @deprecated Use `databasesLink`\n */\n public get DatabasesLink(): string {\n return this.databasesLink;\n }\n /** The self-link for Databases in the databaseAccount. */\n public readonly databasesLink: string;\n /**\n * The self-link for Media in the databaseAccount.\n * @deprecated Use `mediaLink`\n */\n public get MediaLink(): string {\n return this.mediaLink;\n }\n /** The self-link for Media in the databaseAccount. */\n public readonly mediaLink: string;\n /**\n * Attachment content (media) storage quota in MBs ( Retrieved from gateway ).\n * @deprecated use `maxMediaStorageUsageInMB`\n */\n public get MaxMediaStorageUsageInMB(): number {\n return this.maxMediaStorageUsageInMB;\n }\n /** Attachment content (media) storage quota in MBs ( Retrieved from gateway ). */\n public readonly maxMediaStorageUsageInMB: number;\n /**\n * Current attachment content (media) usage in MBs (Retrieved from gateway )\n *\n * Value is returned from cached information updated periodically and is not guaranteed\n * to be real time.\n *\n * @deprecated use `currentMediaStorageUsageInMB`\n */\n public get CurrentMediaStorageUsageInMB(): number {\n return this.currentMediaStorageUsageInMB;\n }\n /**\n * Current attachment content (media) usage in MBs (Retrieved from gateway )\n *\n * Value is returned from cached information updated periodically and is not guaranteed\n * to be real time.\n */\n public readonly currentMediaStorageUsageInMB: number;\n /**\n * Gets the UserConsistencyPolicy settings.\n * @deprecated use `consistencyPolicy`\n */\n public get ConsistencyPolicy(): ConsistencyLevel {\n return this.consistencyPolicy;\n }\n /** Gets the UserConsistencyPolicy settings. */\n public readonly consistencyPolicy: ConsistencyLevel;\n public readonly enableMultipleWritableLocations: boolean;\n\n // TODO: body - any\n public constructor(body: { [key: string]: any }, headers: CosmosHeaders) {\n this.databasesLink = \"/dbs/\";\n this.mediaLink = \"/media/\";\n this.maxMediaStorageUsageInMB = headers[Constants.HttpHeaders.MaxMediaStorageUsageInMB];\n this.currentMediaStorageUsageInMB = headers[Constants.HttpHeaders.CurrentMediaStorageUsageInMB];\n this.consistencyPolicy = body.userConsistencyPolicy\n ? (body.userConsistencyPolicy.defaultConsistencyLevel as ConsistencyLevel)\n : ConsistencyLevel.Session;\n if (body[Constants.WritableLocations] && body.id !== \"localhost\") {\n this.writableLocations = body[Constants.WritableLocations] as Location[];\n }\n if (body[Constants.ReadableLocations] && body.id !== \"localhost\") {\n this.readableLocations = body[Constants.ReadableLocations] as Location[];\n }\n if (body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]) {\n this.enableMultipleWritableLocations =\n body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === true ||\n body[Constants.ENABLE_MULTIPLE_WRITABLE_LOCATIONS] === \"true\";\n }\n }\n}\n\n/**\n * Used to specify the locations that are available, read is index 1 and write is index 0.\n */\nexport interface Location {\n name: string;\n databaseAccountEndpoint: string;\n unavailable?: boolean;\n lastUnavailabilityTimestampInMs?: number;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** Defines a target data type of an index path specification in the Azure Cosmos DB service. */\nexport enum DataType {\n /** Represents a numeric data type. */\n Number = \"Number\",\n /** Represents a string data type. */\n String = \"String\",\n /** Represents a point data type. */\n Point = \"Point\",\n /** Represents a line string data type. */\n LineString = \"LineString\",\n /** Represents a polygon data type. */\n Polygon = \"Polygon\",\n /** Represents a multi-polygon data type. */\n MultiPolygon = \"MultiPolygon\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Specifies the supported indexing modes.\n */\nexport enum IndexingMode {\n /**\n * Index is updated synchronously with a create or update operation.\n *\n * With consistent indexing, query behavior is the same as the default consistency level for the container.\n * The index is always kept up to date with the data.\n */\n consistent = \"consistent\",\n /**\n * Index is updated asynchronously with respect to a create or update operation.\n *\n * With lazy indexing, queries are eventually consistent. The index is updated when the container is idle.\n */\n lazy = \"lazy\",\n /** No Index is provided. */\n none = \"none\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { DataType, IndexingMode, IndexKind } from \"./index\";\n\nexport interface IndexingPolicy {\n /** The indexing mode (consistent or lazy) {@link IndexingMode}. */\n indexingMode?: keyof typeof IndexingMode;\n automatic?: boolean;\n /** An array of {@link IncludedPath} represents the paths to be included for indexing. */\n includedPaths?: IndexedPath[];\n /** An array of {@link IncludedPath} represents the paths to be excluded for indexing. */\n excludedPaths?: IndexedPath[];\n spatialIndexes?: SpatialIndex[];\n}\n\n/* The target data type of a spatial path */\nexport enum SpatialType {\n LineString = \"LineString\",\n MultiPolygon = \"MultiPolygon\",\n Point = \"Point\",\n Polygon = \"Polygon\",\n}\n\nexport interface SpatialIndex {\n /* Path in JSON document to index */\n path: string;\n types: SpatialType[];\n /* Bounding box for geometry spatial path */\n boundingBox: {\n /* X-coordinate of the lower-left corner of the bounding box. */\n xmin: number;\n /* Y-coordinate of the lower-left corner of the bounding box. */\n ymin: number;\n /* X-coordinate of the upper-right corner of the bounding box. */\n xmax: number;\n /* Y-coordinate of the upper-right corner of the bounding box. */\n ymax: number;\n };\n}\n\nexport interface IndexedPath {\n path: string;\n indexes?: Index[];\n}\n\nexport interface Index {\n kind: keyof typeof IndexKind;\n dataType: keyof typeof DataType;\n precision?: number;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Specifies the supported Index types.\n */\nexport enum IndexKind {\n /**\n * This is supplied for a path which requires sorting.\n */\n Range = \"Range\",\n /**\n * This is supplied for a path which requires geospatial indexing.\n */\n Spatial = \"Spatial\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for permission mode values.\n */\nexport enum PermissionMode {\n /** Permission not valid. */\n None = \"none\",\n /** Permission applicable for read operations only. */\n Read = \"read\",\n /** Permission applicable for all operations. */\n All = \"all\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for trigger operation values.\n * specifies the operations on which a trigger should be executed.\n */\nexport enum TriggerOperation {\n /** All operations. */\n All = \"all\",\n /** Create operations only. */\n Create = \"create\",\n /** Update operations only. */\n Update = \"update\",\n /** Delete operations only. */\n Delete = \"delete\",\n /** Replace operations only. */\n Replace = \"replace\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for trigger type values.\n * Specifies the type of the trigger.\n */\nexport enum TriggerType {\n /** Trigger should be executed before the associated operation(s). */\n Pre = \"pre\",\n /** Trigger should be executed after the associated operation(s). */\n Post = \"post\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Enum for udf type values.\n * Specifies the types of user defined functions.\n */\nexport enum UserDefinedFunctionType {\n /** The User Defined Function is written in JavaScript. This is currently the only option. */\n Javascript = \"Javascript\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport enum GeospatialType {\n /** Represents data in round-earth coordinate system. */\n Geography = \"Geography\",\n /** Represents data in Eucledian(flat) coordinate system. */\n Geometry = \"Geometry\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../index\";\n\nexport interface ErrorBody {\n code: string;\n message: string;\n /**\n * @hidden\n */\n additionalErrorInfo?: PartitionedQueryExecutionInfo;\n}\n\n/**\n * @hidden\n */\nexport interface PartitionedQueryExecutionInfo {\n partitionedQueryExecutionInfoVersion: number;\n queryInfo: QueryInfo;\n queryRanges: QueryRange[];\n}\n\n/**\n * @hidden\n */\nexport interface QueryRange {\n min: string;\n max: string;\n isMinInclusive: boolean;\n isMaxInclusive: boolean;\n}\n\n/**\n * @hidden\n */\nexport interface QueryInfo {\n top?: any;\n orderBy?: any[];\n orderByExpressions?: any[];\n offset?: number;\n limit?: number;\n aggregates?: AggregateType[];\n groupByExpressions?: GroupByExpressions;\n groupByAliasToAggregateType: GroupByAliasToAggregateType;\n rewrittenQuery?: any;\n distinctType: string;\n hasSelectValue: boolean;\n}\n\nexport type GroupByExpressions = string[];\n\nexport type AggregateType = \"Average\" | \"Count\" | \"Max\" | \"Min\" | \"Sum\";\n\nexport interface GroupByAliasToAggregateType {\n [key: string]: AggregateType;\n}\n\nexport class ErrorResponse extends Error {\n code?: number;\n substatus?: number;\n body?: ErrorBody;\n headers?: CosmosHeaders;\n activityId?: string;\n retryAfterInMs?: number;\n retryAfterInMilliseconds?: number;\n [key: string]: any;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext/CosmosHeaders\";\nimport { StatusCode, SubStatusCode } from \"./StatusCodes\";\n\nexport class ResourceResponse {\n constructor(\n public readonly resource: TResource | undefined,\n public readonly headers: CosmosHeaders,\n public readonly statusCode: StatusCode,\n public readonly substatus?: SubStatusCode\n ) {}\n public get requestCharge(): number {\n return Number(this.headers[Constants.HttpHeaders.RequestCharge]) || 0;\n }\n public get activityId(): string {\n return this.headers[Constants.HttpHeaders.ActivityId] as string;\n }\n public get etag(): string {\n return this.headers[Constants.HttpHeaders.ETag] as string;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\n\nexport class FeedResponse {\n constructor(\n public readonly resources: TResource[],\n private readonly headers: CosmosHeaders,\n public readonly hasMoreResults: boolean\n ) {}\n public get continuation(): string {\n return this.continuationToken;\n }\n public get continuationToken(): string {\n return this.headers[Constants.HttpHeaders.Continuation];\n }\n public get queryMetrics(): string {\n return this.headers[Constants.HttpHeaders.QueryMetrics];\n }\n public get requestCharge(): number {\n return this.headers[Constants.HttpHeaders.RequestCharge];\n }\n public get activityId(): string {\n return this.headers[Constants.HttpHeaders.ActivityId];\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * @hidden\n */\nexport const TimeoutErrorCode = \"TimeoutError\";\n\nexport class TimeoutError extends Error {\n public readonly code: string = TimeoutErrorCode;\n constructor(message: string = \"Timeout Error\") {\n super(message);\n this.name = TimeoutErrorCode;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport class ClientSideMetrics {\n constructor(public readonly requestCharge: number) {}\n\n /**\n * Adds one or more ClientSideMetrics to a copy of this instance and returns the result.\n */\n public add(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics {\n let requestCharge = this.requestCharge;\n for (const clientSideMetrics of clientSideMetricsArray) {\n if (clientSideMetrics == null) {\n throw new Error(\"clientSideMetrics has null or undefined item(s)\");\n }\n\n requestCharge += clientSideMetrics.requestCharge;\n }\n\n return new ClientSideMetrics(requestCharge);\n }\n\n public static readonly zero = new ClientSideMetrics(0);\n\n public static createFromArray(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics {\n if (clientSideMetricsArray == null) {\n throw new Error(\"clientSideMetricsArray is null or undefined item(s)\");\n }\n\n return this.zero.add(...clientSideMetricsArray);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport default {\n // QueryMetrics\n RetrievedDocumentCount: \"retrievedDocumentCount\",\n RetrievedDocumentSize: \"retrievedDocumentSize\",\n OutputDocumentCount: \"outputDocumentCount\",\n OutputDocumentSize: \"outputDocumentSize\",\n IndexHitRatio: \"indexUtilizationRatio\",\n IndexHitDocumentCount: \"indexHitDocumentCount\",\n TotalQueryExecutionTimeInMs: \"totalExecutionTimeInMs\",\n\n // QueryPreparationTimes\n QueryCompileTimeInMs: \"queryCompileTimeInMs\",\n LogicalPlanBuildTimeInMs: \"queryLogicalPlanBuildTimeInMs\",\n PhysicalPlanBuildTimeInMs: \"queryPhysicalPlanBuildTimeInMs\",\n QueryOptimizationTimeInMs: \"queryOptimizationTimeInMs\",\n\n // QueryTimes\n IndexLookupTimeInMs: \"indexLookupTimeInMs\",\n DocumentLoadTimeInMs: \"documentLoadTimeInMs\",\n VMExecutionTimeInMs: \"VMExecutionTimeInMs\",\n DocumentWriteTimeInMs: \"writeOutputTimeInMs\",\n\n // RuntimeExecutionTimes\n QueryEngineTimes: \"queryEngineTimes\",\n SystemFunctionExecuteTimeInMs: \"systemFunctionExecuteTimeInMs\",\n UserDefinedFunctionExecutionTimeInMs: \"userFunctionExecuteTimeInMs\",\n\n // QueryMetrics Text\n RetrievedDocumentCountText: \"Retrieved Document Count\",\n RetrievedDocumentSizeText: \"Retrieved Document Size\",\n OutputDocumentCountText: \"Output Document Count\",\n OutputDocumentSizeText: \"Output Document Size\",\n IndexUtilizationText: \"Index Utilization\",\n TotalQueryExecutionTimeText: \"Total Query Execution Time\",\n\n // QueryPreparationTimes Text\n QueryPreparationTimesText: \"Query Preparation Times\",\n QueryCompileTimeText: \"Query Compilation Time\",\n LogicalPlanBuildTimeText: \"Logical Plan Build Time\",\n PhysicalPlanBuildTimeText: \"Physical Plan Build Time\",\n QueryOptimizationTimeText: \"Query Optimization Time\",\n\n // QueryTimes Text\n QueryEngineTimesText: \"Query Engine Times\",\n IndexLookupTimeText: \"Index Lookup Time\",\n DocumentLoadTimeText: \"Document Load Time\",\n WriteOutputTimeText: \"Document Write Time\",\n\n // RuntimeExecutionTimes Text\n RuntimeExecutionTimesText: \"Runtime Execution Times\",\n TotalExecutionTimeText: \"Query Engine Execution Time\",\n SystemFunctionExecuteTimeText: \"System Function Execution Time\",\n UserDefinedFunctionExecutionTimeText: \"User-defined Function Execution Time\",\n\n // ClientSideQueryMetrics Text\n ClientSideQueryMetricsText: \"Client Side Metrics\",\n RetriesText: \"Retry Count\",\n RequestChargeText: \"Request Charge\",\n FetchExecutionRangesText: \"Partition Execution Timeline\",\n SchedulingMetricsText: \"Scheduling Metrics\",\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// Ported this implementation to javascript:\n// https://referencesource.microsoft.com/#mscorlib/system/timespan.cs,83e476c1ae112117\n/** @hidden */\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst ticksPerMillisecond = 10000;\n/** @hidden */\nconst millisecondsPerTick = 1.0 / ticksPerMillisecond;\n\n/** @hidden */\nconst ticksPerSecond = ticksPerMillisecond * 1000; // 10,000,000\n/** @hidden */\nconst secondsPerTick = 1.0 / ticksPerSecond; // 0.0001\n\n/** @hidden */\nconst ticksPerMinute = ticksPerSecond * 60; // 600,000,000\n/** @hidden */\nconst minutesPerTick = 1.0 / ticksPerMinute; // 1.6666666666667e-9\n\n/** @hidden */\nconst ticksPerHour = ticksPerMinute * 60; // 36,000,000,000\n/** @hidden */\nconst hoursPerTick = 1.0 / ticksPerHour; // 2.77777777777777778e-11\n\n/** @hidden */\nconst ticksPerDay = ticksPerHour * 24; // 864,000,000,000\n/** @hidden */\nconst daysPerTick = 1.0 / ticksPerDay; // 1.1574074074074074074e-12\n\n/** @hidden */\nconst millisPerSecond = 1000;\n/** @hidden */\nconst millisPerMinute = millisPerSecond * 60; // 60,000\n/** @hidden */\nconst millisPerHour = millisPerMinute * 60; // 3,600,000\n/** @hidden */\nconst millisPerDay = millisPerHour * 24; // 86,400,000\n\n/** @hidden */\nconst maxMilliSeconds = Number.MAX_SAFE_INTEGER / ticksPerMillisecond;\n/** @hidden */\nconst minMilliSeconds = Number.MIN_SAFE_INTEGER / ticksPerMillisecond;\n\n/**\n * Represents a time interval.\n *\n * @param days - Number of days.\n * @param hours - Number of hours.\n * @param minutes - Number of minutes.\n * @param seconds - Number of seconds.\n * @param milliseconds - Number of milliseconds.\n * @hidden\n */\nexport class TimeSpan {\n protected _ticks: number;\n constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number) {\n // Constructor\n if (!Number.isInteger(days)) {\n throw new Error(\"days is not an integer\");\n }\n\n if (!Number.isInteger(hours)) {\n throw new Error(\"hours is not an integer\");\n }\n\n if (!Number.isInteger(minutes)) {\n throw new Error(\"minutes is not an integer\");\n }\n\n if (!Number.isInteger(seconds)) {\n throw new Error(\"seconds is not an integer\");\n }\n\n if (!Number.isInteger(milliseconds)) {\n throw new Error(\"milliseconds is not an integer\");\n }\n\n const totalMilliSeconds =\n (days * 3600 * 24 + hours * 3600 + minutes * 60 + seconds) * 1000 + milliseconds;\n if (totalMilliSeconds > maxMilliSeconds || totalMilliSeconds < minMilliSeconds) {\n throw new Error(\"Total number of milliseconds was either too large or too small\");\n }\n\n this._ticks = totalMilliSeconds * ticksPerMillisecond;\n }\n\n /**\n * Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.\n * @param ts - The time interval to add.\n */\n public add(ts: TimeSpan): TimeSpan {\n if (TimeSpan.additionDoesOverflow(this._ticks, ts._ticks)) {\n throw new Error(\"Adding the two timestamps causes an overflow.\");\n }\n\n const results = this._ticks + ts._ticks;\n return TimeSpan.fromTicks(results);\n }\n\n /**\n * Returns a new TimeSpan object whose value is the difference of the specified TimeSpan object and this instance.\n * @param ts - The time interval to subtract.\n */\n public subtract(ts: TimeSpan): TimeSpan {\n if (TimeSpan.subtractionDoesUnderflow(this._ticks, ts._ticks)) {\n throw new Error(\"Subtracting the two timestamps causes an underflow.\");\n }\n\n const results = this._ticks - ts._ticks;\n return TimeSpan.fromTicks(results);\n }\n\n /**\n * Compares this instance to a specified object and returns an integer that indicates whether this\n * instance is shorter than, equal to, or longer than the specified object.\n * @param value - The time interval to add.\n */\n public compareTo(value: TimeSpan): 1 | -1 | 0 {\n if (value == null) {\n return 1;\n }\n\n if (!TimeSpan.isTimeSpan(value)) {\n throw new Error(\"Argument must be a TimeSpan object\");\n }\n\n return TimeSpan.compare(this, value);\n }\n\n /**\n * Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.\n */\n public duration(): TimeSpan {\n return TimeSpan.fromTicks(this._ticks >= 0 ? this._ticks : -this._ticks);\n }\n\n /**\n * Returns a value indicating whether this instance is equal to a specified object.\n * @param value - The time interval to check for equality.\n */\n public equals(value: TimeSpan): boolean {\n if (TimeSpan.isTimeSpan(value)) {\n return this._ticks === value._ticks;\n }\n\n return false;\n }\n\n /**\n * Returns a new TimeSpan object whose value is the negated value of this instance.\n * @param value - The time interval to check for equality.\n */\n public negate(): TimeSpan {\n return TimeSpan.fromTicks(-this._ticks);\n }\n\n public days(): number {\n return Math.floor(this._ticks / ticksPerDay);\n }\n\n public hours(): number {\n return Math.floor(this._ticks / ticksPerHour);\n }\n\n public milliseconds(): number {\n return Math.floor(this._ticks / ticksPerMillisecond);\n }\n\n public seconds(): number {\n return Math.floor(this._ticks / ticksPerSecond);\n }\n\n public ticks(): number {\n return this._ticks;\n }\n\n public totalDays(): number {\n return this._ticks * daysPerTick;\n }\n public totalHours(): number {\n return this._ticks * hoursPerTick;\n }\n\n public totalMilliseconds(): number {\n return this._ticks * millisecondsPerTick;\n }\n\n public totalMinutes(): number {\n return this._ticks * minutesPerTick;\n }\n\n public totalSeconds(): number {\n return this._ticks * secondsPerTick;\n }\n\n public static fromTicks(value: number): TimeSpan {\n const timeSpan = new TimeSpan(0, 0, 0, 0, 0);\n timeSpan._ticks = value;\n return timeSpan;\n }\n\n public static readonly zero = new TimeSpan(0, 0, 0, 0, 0);\n public static readonly maxValue = TimeSpan.fromTicks(Number.MAX_SAFE_INTEGER);\n public static readonly minValue = TimeSpan.fromTicks(Number.MIN_SAFE_INTEGER);\n\n public static isTimeSpan(timespan: TimeSpan): number {\n return timespan._ticks;\n }\n\n public static additionDoesOverflow(a: number, b: number): boolean {\n const c = a + b;\n return a !== c - b || b !== c - a;\n }\n\n public static subtractionDoesUnderflow(a: number, b: number): boolean {\n const c = a - b;\n return a !== c + b || b !== a - c;\n }\n\n public static compare(t1: TimeSpan, t2: TimeSpan): 1 | 0 | -1 {\n if (t1._ticks > t2._ticks) {\n return 1;\n }\n if (t1._ticks < t2._ticks) {\n return -1;\n }\n return 0;\n }\n\n public static interval(value: number, scale: number): TimeSpan {\n if (isNaN(value)) {\n throw new Error(\"value must be a number\");\n }\n\n const milliseconds = value * scale;\n if (milliseconds > maxMilliSeconds || milliseconds < minMilliSeconds) {\n throw new Error(\"timespan too long\");\n }\n\n return TimeSpan.fromTicks(Math.floor(milliseconds * ticksPerMillisecond));\n }\n\n public static fromMilliseconds(value: number): TimeSpan {\n return TimeSpan.interval(value, 1);\n }\n\n public static fromSeconds(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerSecond);\n }\n\n public static fromMinutes(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerMinute);\n }\n\n public static fromHours(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerHour);\n }\n\n public static fromDays(value: number): TimeSpan {\n return TimeSpan.interval(value, millisPerDay);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { TimeSpan } from \"./timeSpan\";\n\n/**\n * @hidden\n */\nexport function parseDelimitedString(delimitedString: string): {\n [key: string]: any;\n} {\n if (delimitedString == null) {\n throw new Error(\"delimitedString is null or undefined\");\n }\n\n const metrics: { [key: string]: any } = {};\n\n const headerAttributes = delimitedString.split(\";\");\n for (const attribute of headerAttributes) {\n const attributeKeyValue = attribute.split(\"=\");\n\n if (attributeKeyValue.length !== 2) {\n throw new Error(\"recieved a malformed delimited string\");\n }\n\n const attributeKey = attributeKeyValue[0];\n const attributeValue = parseFloat(attributeKeyValue[1]);\n\n metrics[attributeKey] = attributeValue;\n }\n\n return metrics;\n}\n\n/**\n * @hidden\n */\nexport function timeSpanFromMetrics(\n metrics: { [key: string]: any } /* TODO: any */,\n key: string\n): TimeSpan {\n if (key in metrics) {\n return TimeSpan.fromMilliseconds(metrics[key]);\n }\n\n return TimeSpan.zero;\n}\n\n/**\n * @hidden\n */\nexport function isNumeric(input: unknown): boolean {\n return !isNaN(parseFloat(input as string)) && isFinite(input as number);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport QueryMetricsConstants from \"./queryMetricsConstants\";\nimport { parseDelimitedString, timeSpanFromMetrics } from \"./queryMetricsUtils\";\nimport { TimeSpan } from \"./timeSpan\";\n\nexport class QueryPreparationTimes {\n constructor(\n public readonly queryCompilationTime: TimeSpan,\n public readonly logicalPlanBuildTime: TimeSpan,\n public readonly physicalPlanBuildTime: TimeSpan,\n public readonly queryOptimizationTime: TimeSpan\n ) {}\n\n /**\n * returns a new QueryPreparationTimes instance that is the addition of this and the arguments.\n */\n public add(...queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes {\n let queryCompilationTime = this.queryCompilationTime;\n let logicalPlanBuildTime = this.logicalPlanBuildTime;\n let physicalPlanBuildTime = this.physicalPlanBuildTime;\n let queryOptimizationTime = this.queryOptimizationTime;\n\n for (const queryPreparationTimes of queryPreparationTimesArray) {\n if (queryPreparationTimes == null) {\n throw new Error(\"queryPreparationTimesArray has null or undefined item(s)\");\n }\n\n queryCompilationTime = queryCompilationTime.add(queryPreparationTimes.queryCompilationTime);\n logicalPlanBuildTime = logicalPlanBuildTime.add(queryPreparationTimes.logicalPlanBuildTime);\n physicalPlanBuildTime = physicalPlanBuildTime.add(\n queryPreparationTimes.physicalPlanBuildTime\n );\n queryOptimizationTime = queryOptimizationTime.add(\n queryPreparationTimes.queryOptimizationTime\n );\n }\n\n return new QueryPreparationTimes(\n queryCompilationTime,\n logicalPlanBuildTime,\n physicalPlanBuildTime,\n queryOptimizationTime\n );\n }\n\n /**\n * Output the QueryPreparationTimes as a delimited string.\n */\n public toDelimitedString(): string {\n return (\n `${\n QueryMetricsConstants.QueryCompileTimeInMs\n }=${this.queryCompilationTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.LogicalPlanBuildTimeInMs\n }=${this.logicalPlanBuildTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.PhysicalPlanBuildTimeInMs\n }=${this.physicalPlanBuildTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.QueryOptimizationTimeInMs\n }=${this.queryOptimizationTime.totalMilliseconds()}`\n );\n }\n\n public static readonly zero = new QueryPreparationTimes(\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero\n );\n\n /**\n * Returns a new instance of the QueryPreparationTimes class that is the\n * aggregation of an array of QueryPreparationTimes.\n */\n public static createFromArray(\n queryPreparationTimesArray: QueryPreparationTimes[]\n ): QueryPreparationTimes {\n if (queryPreparationTimesArray == null) {\n throw new Error(\"queryPreparationTimesArray is null or undefined item(s)\");\n }\n\n return QueryPreparationTimes.zero.add(...queryPreparationTimesArray);\n }\n\n /**\n * Returns a new instance of the QueryPreparationTimes class this is deserialized from a delimited string.\n */\n public static createFromDelimitedString(delimitedString: string): QueryPreparationTimes {\n const metrics = parseDelimitedString(delimitedString);\n\n return new QueryPreparationTimes(\n timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryCompileTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.LogicalPlanBuildTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.PhysicalPlanBuildTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.QueryOptimizationTimeInMs)\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport QueryMetricsConstants from \"./queryMetricsConstants\";\nimport { parseDelimitedString, timeSpanFromMetrics } from \"./queryMetricsUtils\";\nimport { TimeSpan } from \"./timeSpan\";\n\nexport class RuntimeExecutionTimes {\n constructor(\n public readonly queryEngineExecutionTime: TimeSpan,\n public readonly systemFunctionExecutionTime: TimeSpan,\n public readonly userDefinedFunctionExecutionTime: TimeSpan\n ) {}\n\n /**\n * returns a new RuntimeExecutionTimes instance that is the addition of this and the arguments.\n */\n public add(...runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes {\n let queryEngineExecutionTime = this.queryEngineExecutionTime;\n let systemFunctionExecutionTime = this.systemFunctionExecutionTime;\n let userDefinedFunctionExecutionTime = this.userDefinedFunctionExecutionTime;\n\n for (const runtimeExecutionTimes of runtimeExecutionTimesArray) {\n if (runtimeExecutionTimes == null) {\n throw new Error(\"runtimeExecutionTimes has null or undefined item(s)\");\n }\n\n queryEngineExecutionTime = queryEngineExecutionTime.add(\n runtimeExecutionTimes.queryEngineExecutionTime\n );\n systemFunctionExecutionTime = systemFunctionExecutionTime.add(\n runtimeExecutionTimes.systemFunctionExecutionTime\n );\n userDefinedFunctionExecutionTime = userDefinedFunctionExecutionTime.add(\n runtimeExecutionTimes.userDefinedFunctionExecutionTime\n );\n }\n\n return new RuntimeExecutionTimes(\n queryEngineExecutionTime,\n systemFunctionExecutionTime,\n userDefinedFunctionExecutionTime\n );\n }\n\n /**\n * Output the RuntimeExecutionTimes as a delimited string.\n */\n public toDelimitedString(): string {\n return (\n `${\n QueryMetricsConstants.SystemFunctionExecuteTimeInMs\n }=${this.systemFunctionExecutionTime.totalMilliseconds()};` +\n `${\n QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs\n }=${this.userDefinedFunctionExecutionTime.totalMilliseconds()}`\n );\n }\n\n public static readonly zero = new RuntimeExecutionTimes(\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero\n );\n\n /**\n * Returns a new instance of the RuntimeExecutionTimes class that is\n * the aggregation of an array of RuntimeExecutionTimes.\n */\n public static createFromArray(\n runtimeExecutionTimesArray: RuntimeExecutionTimes[]\n ): RuntimeExecutionTimes {\n if (runtimeExecutionTimesArray == null) {\n throw new Error(\"runtimeExecutionTimesArray is null or undefined item(s)\");\n }\n\n return RuntimeExecutionTimes.zero.add(...runtimeExecutionTimesArray);\n }\n\n /**\n * Returns a new instance of the RuntimeExecutionTimes class this is deserialized from a delimited string.\n */\n public static createFromDelimitedString(delimitedString: string): RuntimeExecutionTimes {\n const metrics = parseDelimitedString(delimitedString);\n\n const vmExecutionTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs);\n const indexLookupTime = timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs);\n const documentLoadTime = timeSpanFromMetrics(\n metrics,\n QueryMetricsConstants.DocumentLoadTimeInMs\n );\n const documentWriteTime = timeSpanFromMetrics(\n metrics,\n QueryMetricsConstants.DocumentWriteTimeInMs\n );\n\n let queryEngineExecutionTime = TimeSpan.zero;\n queryEngineExecutionTime = queryEngineExecutionTime.add(vmExecutionTime);\n queryEngineExecutionTime = queryEngineExecutionTime.subtract(indexLookupTime);\n queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentLoadTime);\n queryEngineExecutionTime = queryEngineExecutionTime.subtract(documentWriteTime);\n return new RuntimeExecutionTimes(\n queryEngineExecutionTime,\n timeSpanFromMetrics(metrics, QueryMetricsConstants.SystemFunctionExecuteTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.UserDefinedFunctionExecutionTimeInMs)\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientSideMetrics } from \"./clientSideMetrics\";\nimport QueryMetricsConstants from \"./queryMetricsConstants\";\nimport { parseDelimitedString, timeSpanFromMetrics } from \"./queryMetricsUtils\";\nimport { QueryPreparationTimes } from \"./queryPreparationTime\";\nimport { RuntimeExecutionTimes } from \"./runtimeExecutionTimes\";\nimport { TimeSpan } from \"./timeSpan\";\n\nexport class QueryMetrics {\n constructor(\n public readonly retrievedDocumentCount: number,\n public readonly retrievedDocumentSize: number,\n public readonly outputDocumentCount: number,\n public readonly outputDocumentSize: number,\n public readonly indexHitDocumentCount: number,\n public readonly totalQueryExecutionTime: TimeSpan,\n public readonly queryPreparationTimes: QueryPreparationTimes,\n public readonly indexLookupTime: TimeSpan,\n public readonly documentLoadTime: TimeSpan,\n public readonly vmExecutionTime: TimeSpan,\n public readonly runtimeExecutionTimes: RuntimeExecutionTimes,\n public readonly documentWriteTime: TimeSpan,\n public readonly clientSideMetrics: ClientSideMetrics\n ) {}\n\n /**\n * Gets the IndexHitRatio\n * @hidden\n */\n public get indexHitRatio(): number {\n return this.retrievedDocumentCount === 0\n ? 1\n : this.indexHitDocumentCount / this.retrievedDocumentCount;\n }\n\n /**\n * returns a new QueryMetrics instance that is the addition of this and the arguments.\n */\n public add(queryMetricsArray: QueryMetrics[]): QueryMetrics {\n let retrievedDocumentCount = 0;\n let retrievedDocumentSize = 0;\n let outputDocumentCount = 0;\n let outputDocumentSize = 0;\n let indexHitDocumentCount = 0;\n let totalQueryExecutionTime = TimeSpan.zero;\n const queryPreparationTimesArray = [];\n let indexLookupTime = TimeSpan.zero;\n let documentLoadTime = TimeSpan.zero;\n let vmExecutionTime = TimeSpan.zero;\n const runtimeExecutionTimesArray = [];\n let documentWriteTime = TimeSpan.zero;\n const clientSideQueryMetricsArray = [];\n\n queryMetricsArray.push(this);\n\n for (const queryMetrics of queryMetricsArray) {\n if (queryMetrics) {\n retrievedDocumentCount += queryMetrics.retrievedDocumentCount;\n retrievedDocumentSize += queryMetrics.retrievedDocumentSize;\n outputDocumentCount += queryMetrics.outputDocumentCount;\n outputDocumentSize += queryMetrics.outputDocumentSize;\n indexHitDocumentCount += queryMetrics.indexHitDocumentCount;\n totalQueryExecutionTime = totalQueryExecutionTime.add(queryMetrics.totalQueryExecutionTime);\n queryPreparationTimesArray.push(queryMetrics.queryPreparationTimes);\n indexLookupTime = indexLookupTime.add(queryMetrics.indexLookupTime);\n documentLoadTime = documentLoadTime.add(queryMetrics.documentLoadTime);\n vmExecutionTime = vmExecutionTime.add(queryMetrics.vmExecutionTime);\n runtimeExecutionTimesArray.push(queryMetrics.runtimeExecutionTimes);\n documentWriteTime = documentWriteTime.add(queryMetrics.documentWriteTime);\n clientSideQueryMetricsArray.push(queryMetrics.clientSideMetrics);\n }\n }\n\n return new QueryMetrics(\n retrievedDocumentCount,\n retrievedDocumentSize,\n outputDocumentCount,\n outputDocumentSize,\n indexHitDocumentCount,\n totalQueryExecutionTime,\n QueryPreparationTimes.createFromArray(queryPreparationTimesArray),\n indexLookupTime,\n documentLoadTime,\n vmExecutionTime,\n RuntimeExecutionTimes.createFromArray(runtimeExecutionTimesArray),\n documentWriteTime,\n ClientSideMetrics.createFromArray(...clientSideQueryMetricsArray)\n );\n }\n\n /**\n * Output the QueryMetrics as a delimited string.\n * @hidden\n */\n public toDelimitedString(): string {\n return (\n QueryMetricsConstants.RetrievedDocumentCount +\n \"=\" +\n this.retrievedDocumentCount +\n \";\" +\n QueryMetricsConstants.RetrievedDocumentSize +\n \"=\" +\n this.retrievedDocumentSize +\n \";\" +\n QueryMetricsConstants.OutputDocumentCount +\n \"=\" +\n this.outputDocumentCount +\n \";\" +\n QueryMetricsConstants.OutputDocumentSize +\n \"=\" +\n this.outputDocumentSize +\n \";\" +\n QueryMetricsConstants.IndexHitRatio +\n \"=\" +\n this.indexHitRatio +\n \";\" +\n QueryMetricsConstants.TotalQueryExecutionTimeInMs +\n \"=\" +\n this.totalQueryExecutionTime.totalMilliseconds() +\n \";\" +\n this.queryPreparationTimes.toDelimitedString() +\n \";\" +\n QueryMetricsConstants.IndexLookupTimeInMs +\n \"=\" +\n this.indexLookupTime.totalMilliseconds() +\n \";\" +\n QueryMetricsConstants.DocumentLoadTimeInMs +\n \"=\" +\n this.documentLoadTime.totalMilliseconds() +\n \";\" +\n QueryMetricsConstants.VMExecutionTimeInMs +\n \"=\" +\n this.vmExecutionTime.totalMilliseconds() +\n \";\" +\n this.runtimeExecutionTimes.toDelimitedString() +\n \";\" +\n QueryMetricsConstants.DocumentWriteTimeInMs +\n \"=\" +\n this.documentWriteTime.totalMilliseconds()\n );\n }\n\n public static readonly zero = new QueryMetrics(\n 0,\n 0,\n 0,\n 0,\n 0,\n TimeSpan.zero,\n QueryPreparationTimes.zero,\n TimeSpan.zero,\n TimeSpan.zero,\n TimeSpan.zero,\n RuntimeExecutionTimes.zero,\n TimeSpan.zero,\n ClientSideMetrics.zero\n );\n\n /**\n * Returns a new instance of the QueryMetrics class that is the aggregation of an array of query metrics.\n */\n public static createFromArray(queryMetricsArray: QueryMetrics[]): QueryMetrics {\n if (!queryMetricsArray) {\n throw new Error(\"queryMetricsArray is null or undefined item(s)\");\n }\n\n return QueryMetrics.zero.add(queryMetricsArray);\n }\n\n /**\n * Returns a new instance of the QueryMetrics class this is deserialized from a delimited string.\n */\n public static createFromDelimitedString(\n delimitedString: string,\n clientSideMetrics?: ClientSideMetrics\n ): QueryMetrics {\n const metrics = parseDelimitedString(delimitedString);\n\n const indexHitRatio = metrics[QueryMetricsConstants.IndexHitRatio] || 0;\n const retrievedDocumentCount = metrics[QueryMetricsConstants.RetrievedDocumentCount] || 0;\n const indexHitCount = indexHitRatio * retrievedDocumentCount;\n const outputDocumentCount = metrics[QueryMetricsConstants.OutputDocumentCount] || 0;\n const outputDocumentSize = metrics[QueryMetricsConstants.OutputDocumentSize] || 0;\n const retrievedDocumentSize = metrics[QueryMetricsConstants.RetrievedDocumentSize] || 0;\n const totalQueryExecutionTime = timeSpanFromMetrics(\n metrics,\n QueryMetricsConstants.TotalQueryExecutionTimeInMs\n );\n return new QueryMetrics(\n retrievedDocumentCount,\n retrievedDocumentSize,\n outputDocumentCount,\n outputDocumentSize,\n indexHitCount,\n totalQueryExecutionTime,\n QueryPreparationTimes.createFromDelimitedString(delimitedString),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.IndexLookupTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentLoadTimeInMs),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.VMExecutionTimeInMs),\n RuntimeExecutionTimes.createFromDelimitedString(delimitedString),\n timeSpanFromMetrics(metrics, QueryMetricsConstants.DocumentWriteTimeInMs),\n clientSideMetrics || ClientSideMetrics.zero\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common\";\nimport { QueryMetrics } from \"../queryMetrics/queryMetrics\";\n\nexport interface CosmosHeaders {\n [key: string]: any;\n}\n\n/** @hidden */\n// TODO: docs\nexport function getRequestChargeIfAny(headers: CosmosHeaders | number): number {\n if (typeof headers === \"number\") {\n return headers;\n } else if (typeof headers === \"string\") {\n return parseFloat(headers);\n }\n\n if (headers) {\n const rc = headers[Constants.HttpHeaders.RequestCharge];\n if (rc) {\n return parseFloat(rc as string);\n } else {\n return 0;\n }\n } else {\n return 0;\n }\n}\n\n/**\n * @hidden\n */\nexport function getInitialHeader(): CosmosHeaders {\n const headers: CosmosHeaders = {};\n headers[Constants.HttpHeaders.RequestCharge] = 0;\n headers[Constants.HttpHeaders.QueryMetrics] = {};\n return headers;\n}\n\n/**\n * @hidden\n */\n// TODO: The name of this method isn't very accurate to what it does\nexport function mergeHeaders(headers: CosmosHeaders, toBeMergedHeaders: CosmosHeaders): void {\n if (headers[Constants.HttpHeaders.RequestCharge] === undefined) {\n headers[Constants.HttpHeaders.RequestCharge] = 0;\n }\n\n if (headers[Constants.HttpHeaders.QueryMetrics] === undefined) {\n headers[Constants.HttpHeaders.QueryMetrics] = QueryMetrics.zero;\n }\n\n if (!toBeMergedHeaders) {\n return;\n }\n\n headers[Constants.HttpHeaders.RequestCharge] += getRequestChargeIfAny(toBeMergedHeaders);\n if (toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed]) {\n headers[Constants.HttpHeaders.IsRUPerMinuteUsed] =\n toBeMergedHeaders[Constants.HttpHeaders.IsRUPerMinuteUsed];\n }\n\n if (Constants.HttpHeaders.QueryMetrics in toBeMergedHeaders) {\n const headerQueryMetrics = headers[Constants.HttpHeaders.QueryMetrics];\n const toBeMergedHeaderQueryMetrics = toBeMergedHeaders[Constants.HttpHeaders.QueryMetrics];\n\n for (const partitionId in toBeMergedHeaderQueryMetrics) {\n if (headerQueryMetrics[partitionId]) {\n const combinedQueryMetrics = headerQueryMetrics[partitionId].add([\n toBeMergedHeaderQueryMetrics[partitionId],\n ]);\n headerQueryMetrics[partitionId] = combinedQueryMetrics;\n } else {\n headerQueryMetrics[partitionId] = toBeMergedHeaderQueryMetrics[partitionId];\n }\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\nimport { Constants } from \"../common\";\nimport { ClientSideMetrics, QueryMetrics } from \"../queryMetrics\";\nimport { FeedOptions, Response } from \"../request\";\nimport { getInitialHeader } from \"./headerUtils\";\nimport { ExecutionContext } from \"./index\";\n\nconst logger: AzureLogger = createClientLogger(\"ClientContext\");\n/** @hidden */\nexport type FetchFunctionCallback = (options: FeedOptions) => Promise>;\n\n/** @hidden */\nenum STATES {\n start = \"start\",\n inProgress = \"inProgress\",\n ended = \"ended\",\n}\n\n/** @hidden */\nexport class DefaultQueryExecutionContext implements ExecutionContext {\n private static readonly STATES = STATES;\n private resources: any[]; // TODO: any resources\n private currentIndex: number;\n private currentPartitionIndex: number;\n private fetchFunctions: FetchFunctionCallback[];\n private options: FeedOptions; // TODO: any options\n public continuationToken: string; // TODO: any continuation\n public get continuation(): string {\n return this.continuationToken;\n }\n private state: STATES;\n private nextFetchFunction: Promise>;\n /**\n * Provides the basic Query Execution Context.\n * This wraps the internal logic query execution using provided fetch functions\n *\n * @param clientContext - Is used to read the partitionKeyRanges for split proofing\n * @param query - A SQL query.\n * @param options - Represents the feed options.\n * @param fetchFunctions - A function to retrieve each page of data.\n * An array of functions may be used to query more than one partition.\n * @hidden\n */\n constructor(\n options: FeedOptions,\n fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[]\n ) {\n this.resources = [];\n this.currentIndex = 0;\n this.currentPartitionIndex = 0;\n this.fetchFunctions = Array.isArray(fetchFunctions) ? fetchFunctions : [fetchFunctions];\n this.options = options || {};\n this.continuationToken = this.options.continuationToken || this.options.continuation || null;\n this.state = DefaultQueryExecutionContext.STATES.start;\n }\n\n /**\n * Execute a provided callback on the next element in the execution context.\n */\n public async nextItem(): Promise> {\n ++this.currentIndex;\n const response = await this.current();\n return response;\n }\n\n /**\n * Retrieve the current element on the execution context.\n */\n public async current(): Promise> {\n if (this.currentIndex < this.resources.length) {\n return {\n result: this.resources[this.currentIndex],\n headers: getInitialHeader(),\n };\n }\n\n if (this._canFetchMore()) {\n const { result: resources, headers } = await this.fetchMore();\n this.resources = resources;\n if (this.resources.length === 0) {\n if (!this.continuationToken && this.currentPartitionIndex >= this.fetchFunctions.length) {\n this.state = DefaultQueryExecutionContext.STATES.ended;\n return { result: undefined, headers };\n } else {\n return this.current();\n }\n }\n return { result: this.resources[this.currentIndex], headers };\n } else {\n this.state = DefaultQueryExecutionContext.STATES.ended;\n return { result: undefined, headers: getInitialHeader() };\n }\n }\n\n /**\n * Determine if there are still remaining resources to processs based on\n * the value of the continuation token or the elements remaining on the current batch in the execution context.\n *\n * @returns true if there is other elements to process in the DefaultQueryExecutionContext.\n */\n public hasMoreResults(): boolean {\n return (\n this.state === DefaultQueryExecutionContext.STATES.start ||\n this.continuationToken !== undefined ||\n this.currentIndex < this.resources.length - 1 ||\n this.currentPartitionIndex < this.fetchFunctions.length\n );\n }\n\n /**\n * Fetches the next batch of the feed and pass them as an array to a callback\n */\n public async fetchMore(): Promise> {\n if (this.currentPartitionIndex >= this.fetchFunctions.length) {\n return { headers: getInitialHeader(), result: undefined };\n }\n\n // Keep to the original continuation and to restore the value after fetchFunction call\n const originalContinuation = this.options.continuationToken || this.options.continuation;\n this.options.continuationToken = this.continuationToken;\n\n // Return undefined if there is no more results\n if (this.currentPartitionIndex >= this.fetchFunctions.length) {\n return { headers: getInitialHeader(), result: undefined };\n }\n\n let resources;\n let responseHeaders;\n try {\n let p: Promise>;\n if (this.nextFetchFunction !== undefined) {\n logger.verbose(\"using prefetch\");\n p = this.nextFetchFunction;\n this.nextFetchFunction = undefined;\n } else {\n logger.verbose(\"using fresh fetch\");\n p = this.fetchFunctions[this.currentPartitionIndex](this.options);\n }\n const response = await p;\n resources = response.result;\n responseHeaders = response.headers;\n\n this.continuationToken = responseHeaders[Constants.HttpHeaders.Continuation];\n if (!this.continuationToken) {\n ++this.currentPartitionIndex;\n }\n\n if (this.options && this.options.bufferItems === true) {\n const fetchFunction = this.fetchFunctions[this.currentPartitionIndex];\n this.nextFetchFunction = fetchFunction\n ? fetchFunction({ ...this.options, continuationToken: this.continuationToken })\n : undefined;\n }\n } catch (err: any) {\n this.state = DefaultQueryExecutionContext.STATES.ended;\n // return callback(err, undefined, responseHeaders);\n // TODO: Error and data being returned is an antipattern, this might broken\n throw err;\n }\n\n this.state = DefaultQueryExecutionContext.STATES.inProgress;\n this.currentIndex = 0;\n this.options.continuationToken = originalContinuation;\n this.options.continuation = originalContinuation;\n\n // deserializing query metrics so that we aren't working with delimited strings in the rest of the code base\n if (Constants.HttpHeaders.QueryMetrics in responseHeaders) {\n const delimitedString = responseHeaders[Constants.HttpHeaders.QueryMetrics];\n let queryMetrics = QueryMetrics.createFromDelimitedString(delimitedString);\n\n // Add the request charge to the query metrics so that we can have per partition request charge.\n if (Constants.HttpHeaders.RequestCharge in responseHeaders) {\n const requestCharge = Number(responseHeaders[Constants.HttpHeaders.RequestCharge]) || 0;\n queryMetrics = new QueryMetrics(\n queryMetrics.retrievedDocumentCount,\n queryMetrics.retrievedDocumentSize,\n queryMetrics.outputDocumentCount,\n queryMetrics.outputDocumentSize,\n queryMetrics.indexHitDocumentCount,\n queryMetrics.totalQueryExecutionTime,\n queryMetrics.queryPreparationTimes,\n queryMetrics.indexLookupTime,\n queryMetrics.documentLoadTime,\n queryMetrics.vmExecutionTime,\n queryMetrics.runtimeExecutionTimes,\n queryMetrics.documentWriteTime,\n new ClientSideMetrics(requestCharge)\n );\n }\n\n // Wraping query metrics in a object where the key is '0' just so single partition\n // and partition queries have the same response schema\n responseHeaders[Constants.HttpHeaders.QueryMetrics] = {};\n responseHeaders[Constants.HttpHeaders.QueryMetrics][\"0\"] = queryMetrics;\n }\n\n return { result: resources, headers: responseHeaders };\n }\n\n private _canFetchMore(): boolean {\n const res =\n this.state === DefaultQueryExecutionContext.STATES.start ||\n (this.continuationToken && this.state === DefaultQueryExecutionContext.STATES.inProgress) ||\n (this.currentPartitionIndex < this.fetchFunctions.length &&\n this.state === DefaultQueryExecutionContext.STATES.inProgress);\n return res;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport interface AverageAggregateResult {\n sum: number;\n count: number;\n}\n\n/** @hidden */\nexport class AverageAggregator implements Aggregator {\n public sum: number;\n public count: number;\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: AverageAggregateResult): void {\n if (other == null || other.sum == null) {\n return;\n }\n if (this.sum == null) {\n this.sum = 0.0;\n this.count = 0;\n }\n this.sum += other.sum;\n this.count += other.count;\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n if (this.sum == null || this.count <= 0) {\n return undefined;\n }\n return this.sum / this.count;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport class CountAggregator implements Aggregator {\n public value: number;\n /**\n * Represents an aggregator for COUNT operator.\n * @hidden\n */\n constructor() {\n this.value = 0;\n }\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: number): void {\n this.value += other;\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.value;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { DocumentProducer } from \"./documentProducer\";\n\n// TODO: this smells funny\n/** @hidden */\nconst TYPEORDCOMPARATOR: {\n [type: string]: { ord: number; compFunc?: (a: any, b: any) => number };\n} = Object.freeze({\n NoValue: {\n ord: 0,\n },\n undefined: {\n ord: 1,\n },\n boolean: {\n ord: 2,\n compFunc: (a: boolean, b: boolean) => {\n return a === b ? 0 : a > b ? 1 : -1;\n },\n },\n number: {\n ord: 4,\n compFunc: (a: number, b: number) => {\n return a === b ? 0 : a > b ? 1 : -1;\n },\n },\n string: {\n ord: 5,\n compFunc: (a: string, b: string) => {\n return a === b ? 0 : a > b ? 1 : -1;\n },\n },\n});\n\n/** @hidden */\nexport class OrderByDocumentProducerComparator {\n constructor(public sortOrder: string[]) {} // TODO: This should be an enum\n\n private targetPartitionKeyRangeDocProdComparator(\n docProd1: DocumentProducer,\n docProd2: DocumentProducer\n ): 0 | 1 | -1 {\n const a = docProd1.getTargetParitionKeyRange()[\"minInclusive\"];\n const b = docProd2.getTargetParitionKeyRange()[\"minInclusive\"];\n return a === b ? 0 : a > b ? 1 : -1;\n }\n\n public compare(docProd1: DocumentProducer, docProd2: DocumentProducer): number {\n // Need to check for split, since we don't want to dereference \"item\" of undefined / exception\n if (docProd1.gotSplit()) {\n return -1;\n }\n if (docProd2.gotSplit()) {\n return 1;\n }\n\n const orderByItemsRes1 = this.getOrderByItems(docProd1.peekBufferedItems()[0]);\n const orderByItemsRes2 = this.getOrderByItems(docProd2.peekBufferedItems()[0]);\n\n // validate order by items and types\n // TODO: once V1 order by on different types is fixed this need to change\n this.validateOrderByItems(orderByItemsRes1, orderByItemsRes2);\n\n // no async call in the for loop\n for (let i = 0; i < orderByItemsRes1.length; i++) {\n // compares the orderby items one by one\n const compRes = this.compareOrderByItem(orderByItemsRes1[i], orderByItemsRes2[i]);\n if (compRes !== 0) {\n if (this.sortOrder[i] === \"Ascending\") {\n return compRes;\n } else if (this.sortOrder[i] === \"Descending\") {\n return -compRes;\n }\n }\n }\n\n return this.targetPartitionKeyRangeDocProdComparator(docProd1, docProd2);\n }\n\n // TODO: This smells funny\n public compareValue(item1: unknown, type1: string, item2: unknown, type2: string): number {\n if (type1 === \"object\" || type2 === \"object\") {\n throw new Error(\"Tried to compare an object type\");\n }\n const type1Ord = TYPEORDCOMPARATOR[type1].ord;\n const type2Ord = TYPEORDCOMPARATOR[type2].ord;\n const typeCmp = type1Ord - type2Ord;\n\n if (typeCmp !== 0) {\n // if the types are different, use type ordinal\n return typeCmp;\n }\n\n // both are of the same type\n if (\n type1Ord === TYPEORDCOMPARATOR[\"undefined\"].ord ||\n type1Ord === TYPEORDCOMPARATOR[\"NoValue\"].ord\n ) {\n // if both types are undefined or Null they are equal\n return 0;\n }\n\n const compFunc = TYPEORDCOMPARATOR[type1].compFunc;\n if (typeof compFunc === \"undefined\") {\n throw new Error(\"Cannot find the comparison function\");\n }\n // same type and type is defined compare the items\n return compFunc(item1, item2);\n }\n\n private compareOrderByItem(orderByItem1: any, orderByItem2: any): number {\n const type1 = this.getType(orderByItem1);\n const type2 = this.getType(orderByItem2);\n return this.compareValue(orderByItem1[\"item\"], type1, orderByItem2[\"item\"], type2);\n }\n\n private validateOrderByItems(res1: string[], res2: string[]): void {\n if (res1.length !== res2.length) {\n throw new Error(`Expected ${res1.length}, but got ${res2.length}.`);\n }\n if (res1.length !== this.sortOrder.length) {\n throw new Error(\"orderByItems cannot have a different size than sort orders.\");\n }\n\n for (let i = 0; i < this.sortOrder.length; i++) {\n const type1 = this.getType(res1[i]);\n const type2 = this.getType(res2[i]);\n if (type1 !== type2) {\n throw new Error(\n `Expected ${type1}, but got ${type2}. Cannot execute cross partition order-by queries on mixed types. Consider filtering your query using IS_STRING or IS_NUMBER to get around this exception.`\n );\n }\n }\n }\n\n private getType(\n orderByItem: any\n ):\n | \"string\"\n | \"number\"\n | \"bigint\"\n | \"boolean\"\n | \"symbol\"\n | \"undefined\"\n | \"object\"\n | \"function\"\n | \"NoValue\" {\n // TODO: any item?\n if (orderByItem === undefined || orderByItem.item === undefined) {\n return \"NoValue\";\n }\n const type = typeof orderByItem.item;\n if (TYPEORDCOMPARATOR[type] === undefined) {\n throw new Error(`unrecognizable type ${type}`);\n }\n return type;\n }\n\n private getOrderByItems(res: any): any {\n // TODO: any res?\n return res[\"orderByItems\"];\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OrderByDocumentProducerComparator } from \"../orderByDocumentProducerComparator\";\nimport { Aggregator } from \"./Aggregator\";\n\ninterface MaxAggregateResult {\n count: number;\n max?: number;\n}\n\n/** @hidden */\nexport class MaxAggregator implements Aggregator {\n private value: number;\n private comparer: OrderByDocumentProducerComparator;\n /**\n * Represents an aggregator for MAX operator.\n * @hidden\n */\n constructor() {\n this.value = undefined;\n this.comparer = new OrderByDocumentProducerComparator([\"Ascending\"]);\n }\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: MaxAggregateResult): void {\n if (this.value === undefined) {\n this.value = other.max;\n } else if (\n this.comparer.compareValue(other.max, typeof other.max, this.value, typeof this.value) > 0\n ) {\n this.value = other.max;\n }\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.value;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OrderByDocumentProducerComparator } from \"../orderByDocumentProducerComparator\";\nimport { Aggregator } from \"./Aggregator\";\n\nexport interface MinAggregateResult {\n min: number;\n count: number;\n}\n\n/** @hidden */\nexport class MinAggregator implements Aggregator {\n private value: number;\n private comparer: OrderByDocumentProducerComparator;\n /**\n * Represents an aggregator for MIN operator.\n * @hidden\n */\n constructor() {\n this.value = undefined;\n this.comparer = new OrderByDocumentProducerComparator([\"Ascending\"]);\n }\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: MinAggregateResult): void {\n if (this.value === undefined) {\n // || typeof this.value === \"object\"\n this.value = other.min;\n } else {\n const otherType = other.min === null ? \"NoValue\" : typeof other.min; // || typeof other === \"object\"\n const thisType = this.value === null ? \"NoValue\" : typeof this.value;\n if (this.comparer.compareValue(other.min, otherType, this.value, thisType) < 0) {\n this.value = other.min;\n }\n }\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.value;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport class SumAggregator implements Aggregator {\n public sum: number;\n /**\n * Add the provided item to aggregation result.\n */\n public aggregate(other: number): void {\n if (other === undefined) {\n return;\n }\n if (this.sum === undefined) {\n this.sum = other;\n } else {\n this.sum += other;\n }\n }\n\n /**\n * Get the aggregation result.\n */\n public getResult(): number {\n return this.sum;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Aggregator } from \"./Aggregator\";\n\n/** @hidden */\nexport class StaticValueAggregator implements Aggregator {\n public value: any;\n public aggregate(other: unknown): void {\n if (this.value === undefined) {\n this.value = other;\n }\n }\n\n public getResult(): any {\n return this.value;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AverageAggregator } from \"./AverageAggregator\";\nimport { CountAggregator } from \"./CountAggregator\";\nimport { MaxAggregator } from \"./MaxAggregator\";\nimport { MinAggregator } from \"./MinAggregator\";\nimport { SumAggregator } from \"./SumAggregator\";\nimport { StaticValueAggregator } from \"./StaticValueAggregator\";\nimport { AggregateType } from \"../../request/ErrorResponse\";\n\nexport function createAggregator(\n aggregateType: AggregateType\n):\n | AverageAggregator\n | CountAggregator\n | MaxAggregator\n | MinAggregator\n | SumAggregator\n | StaticValueAggregator {\n switch (aggregateType) {\n case \"Average\":\n return new AverageAggregator();\n case \"Count\":\n return new CountAggregator();\n case \"Max\":\n return new MaxAggregator();\n case \"Min\":\n return new MinAggregator();\n case \"Sum\":\n return new SumAggregator();\n default:\n return new StaticValueAggregator();\n }\n}\n\nexport { AverageAggregator, CountAggregator, MaxAggregator, MinAggregator, SumAggregator };\nexport { Aggregator } from \"./Aggregator\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** @hidden */\nexport enum FetchResultType {\n \"Done\" = 0,\n \"Exception\" = 1,\n \"Result\" = 2,\n}\n\n/** @hidden */\nexport class FetchResult {\n public feedResponse: any;\n public fetchResultType: FetchResultType;\n public error: any;\n /**\n * Wraps fetch results for the document producer.\n * This allows the document producer to buffer exceptions so that actual results don't get flushed during splits.\n *\n * @param feedReponse - The response the document producer got back on a successful fetch\n * @param error - The exception meant to be buffered on an unsuccessful fetch\n * @hidden\n */\n constructor(feedResponse: unknown, error: unknown) {\n // TODO: feedResponse/error\n if (feedResponse !== undefined) {\n this.feedResponse = feedResponse;\n this.fetchResultType = FetchResultType.Result;\n } else {\n this.error = error;\n this.fetchResultType = FetchResultType.Exception;\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyRange, Resource } from \"../client\";\nimport { ClientContext } from \"../ClientContext\";\nimport {\n Constants,\n getIdFromLink,\n getPathFromLink,\n ResourceType,\n StatusCodes,\n SubStatusCodes,\n} from \"../common\";\nimport { FeedOptions } from \"../request\";\nimport { Response } from \"../request\";\nimport { DefaultQueryExecutionContext } from \"./defaultQueryExecutionContext\";\nimport { FetchResult, FetchResultType } from \"./FetchResult\";\nimport { CosmosHeaders, getInitialHeader, mergeHeaders } from \"./headerUtils\";\nimport { SqlQuerySpec } from \"./index\";\n\n/** @hidden */\nexport class DocumentProducer {\n private collectionLink: string;\n private query: string | SqlQuerySpec;\n public targetPartitionKeyRange: PartitionKeyRange;\n public fetchResults: FetchResult[];\n public allFetched: boolean;\n private err: Error;\n public previousContinuationToken: string;\n public continuationToken: string;\n public generation: number = 0;\n private respHeaders: CosmosHeaders;\n private internalExecutionContext: DefaultQueryExecutionContext;\n\n /**\n * Provides the Target Partition Range Query Execution Context.\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - Represents collection link\n * @param query - A SQL query.\n * @param targetPartitionKeyRange - Query Target Partition key Range\n * @hidden\n */\n constructor(\n private clientContext: ClientContext,\n collectionLink: string,\n query: SqlQuerySpec,\n targetPartitionKeyRange: PartitionKeyRange,\n options: FeedOptions\n ) {\n // TODO: any options\n this.collectionLink = collectionLink;\n this.query = query;\n this.targetPartitionKeyRange = targetPartitionKeyRange;\n this.fetchResults = [];\n\n this.allFetched = false;\n this.err = undefined;\n\n this.previousContinuationToken = undefined;\n this.continuationToken = undefined;\n this.respHeaders = getInitialHeader();\n\n this.internalExecutionContext = new DefaultQueryExecutionContext(options, this.fetchFunction);\n }\n /**\n * Synchronously gives the contiguous buffered results (stops at the first non result) if any\n * @returns buffered current items if any\n * @hidden\n */\n public peekBufferedItems(): any[] {\n const bufferedResults = [];\n for (let i = 0, done = false; i < this.fetchResults.length && !done; i++) {\n const fetchResult = this.fetchResults[i];\n switch (fetchResult.fetchResultType) {\n case FetchResultType.Done:\n done = true;\n break;\n case FetchResultType.Exception:\n done = true;\n break;\n case FetchResultType.Result:\n bufferedResults.push(fetchResult.feedResponse);\n break;\n }\n }\n return bufferedResults;\n }\n\n public fetchFunction = async (options: FeedOptions): Promise> => {\n const path = getPathFromLink(this.collectionLink, ResourceType.item);\n\n const id = getIdFromLink(this.collectionLink);\n\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n resultFn: (result: any) => result.Documents,\n\n query: this.query,\n options,\n\n partitionKeyRangeId: this.targetPartitionKeyRange[\"id\"],\n });\n };\n\n public hasMoreResults(): boolean {\n return this.internalExecutionContext.hasMoreResults() || this.fetchResults.length !== 0;\n }\n\n public gotSplit(): boolean {\n const fetchResult = this.fetchResults[0];\n if (fetchResult.fetchResultType === FetchResultType.Exception) {\n if (DocumentProducer._needPartitionKeyRangeCacheRefresh(fetchResult.error)) {\n return true;\n }\n }\n\n return false;\n }\n\n private _getAndResetActiveResponseHeaders(): CosmosHeaders {\n const ret = this.respHeaders;\n this.respHeaders = getInitialHeader();\n return ret;\n }\n\n private _updateStates(err: any, allFetched: boolean): void {\n // TODO: any Error\n if (err) {\n this.err = err;\n return;\n }\n if (allFetched) {\n this.allFetched = true;\n }\n if (this.internalExecutionContext.continuationToken === this.continuationToken) {\n // nothing changed\n return;\n }\n this.previousContinuationToken = this.continuationToken;\n this.continuationToken = this.internalExecutionContext.continuationToken;\n }\n\n private static _needPartitionKeyRangeCacheRefresh(error: any): boolean {\n // TODO: error\n return (\n error.code === StatusCodes.Gone &&\n \"substatus\" in error &&\n error[\"substatus\"] === SubStatusCodes.PartitionKeyRangeGone\n );\n }\n\n /**\n * Fetches and bufferes the next page of results and executes the given callback\n */\n public async bufferMore(): Promise> {\n if (this.err) {\n throw this.err;\n }\n\n try {\n const { result: resources, headers: headerResponse } =\n await this.internalExecutionContext.fetchMore();\n ++this.generation;\n this._updateStates(undefined, resources === undefined);\n if (resources !== undefined) {\n // some more results\n resources.forEach((element: any) => {\n // TODO: resources any\n this.fetchResults.push(new FetchResult(element, undefined));\n });\n }\n\n // need to modify the header response so that the query metrics are per partition\n if (headerResponse != null && Constants.HttpHeaders.QueryMetrics in headerResponse) {\n // \"0\" is the default partition before one is actually assigned.\n const queryMetrics = headerResponse[Constants.HttpHeaders.QueryMetrics][\"0\"];\n\n // Wraping query metrics in a object where the keys are the partition key range.\n headerResponse[Constants.HttpHeaders.QueryMetrics] = {};\n headerResponse[Constants.HttpHeaders.QueryMetrics][this.targetPartitionKeyRange.id] =\n queryMetrics;\n }\n\n return { result: resources, headers: headerResponse };\n } catch (err: any) {\n // TODO: any error\n if (DocumentProducer._needPartitionKeyRangeCacheRefresh(err)) {\n // Split just happend\n // Buffer the error so the execution context can still get the feedResponses in the itemBuffer\n const bufferedError = new FetchResult(undefined, err);\n this.fetchResults.push(bufferedError);\n // Putting a dummy result so that the rest of code flows\n return { result: [bufferedError], headers: err.headers };\n } else {\n this._updateStates(err, err.resources === undefined);\n throw err;\n }\n }\n }\n\n /**\n * Synchronously gives the bufferend current item if any\n * @returns buffered current item if any\n * @hidden\n */\n public getTargetParitionKeyRange(): PartitionKeyRange {\n return this.targetPartitionKeyRange;\n }\n\n /**\n * Fetches the next element in the DocumentProducer.\n */\n public async nextItem(): Promise> {\n if (this.err) {\n this._updateStates(this.err, undefined);\n throw this.err;\n }\n\n try {\n const { result, headers } = await this.current();\n\n const fetchResult = this.fetchResults.shift();\n this._updateStates(undefined, result === undefined);\n if (fetchResult.feedResponse !== result) {\n throw new Error(`Expected ${fetchResult.feedResponse} to equal ${result}`);\n }\n switch (fetchResult.fetchResultType) {\n case FetchResultType.Done:\n return { result: undefined, headers };\n case FetchResultType.Exception:\n fetchResult.error.headers = headers;\n throw fetchResult.error;\n case FetchResultType.Result:\n return { result: fetchResult.feedResponse, headers };\n }\n } catch (err: any) {\n this._updateStates(err, err.item === undefined);\n throw err;\n }\n }\n\n /**\n * Retrieve the current element on the DocumentProducer.\n */\n public async current(): Promise> {\n // If something is buffered just give that\n if (this.fetchResults.length > 0) {\n const fetchResult = this.fetchResults[0];\n // Need to unwrap fetch results\n switch (fetchResult.fetchResultType) {\n case FetchResultType.Done:\n return {\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n };\n case FetchResultType.Exception:\n fetchResult.error.headers = this._getAndResetActiveResponseHeaders();\n throw fetchResult.error;\n case FetchResultType.Result:\n return {\n result: fetchResult.feedResponse,\n headers: this._getAndResetActiveResponseHeaders(),\n };\n }\n }\n\n // If there isn't anymore items left to fetch then let the user know.\n if (this.allFetched) {\n return {\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n };\n }\n\n // If there are no more bufferd items and there are still items to be fetched then buffer more\n const { result, headers } = await this.bufferMore();\n mergeHeaders(this.respHeaders, headers);\n if (result === undefined) {\n return { result: undefined, headers: this.respHeaders };\n }\n return this.current();\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyRange } from \"../client/Container/PartitionKeyRange\";\nimport { Constants } from \"../common\";\nimport { QueryRange as ResponseQueryRange } from \"../request/ErrorResponse\";\n\n/** @hidden */\nexport class QueryRange {\n public min: string;\n public max: string;\n public isMinInclusive: boolean;\n public isMaxInclusive: boolean;\n\n /**\n * Represents a QueryRange.\n *\n * @param rangeMin - min\n * @param rangeMin - max\n * @param isMinInclusive - isMinInclusive\n * @param isMaxInclusive - isMaxInclusive\n * @hidden\n */\n constructor(\n rangeMin: string,\n rangeMax: string,\n isMinInclusive: boolean,\n isMaxInclusive: boolean\n ) {\n this.min = rangeMin;\n this.max = rangeMax;\n this.isMinInclusive = isMinInclusive;\n this.isMaxInclusive = isMaxInclusive;\n }\n public overlaps(other: QueryRange): boolean {\n const range1 = this; // eslint-disable-line @typescript-eslint/no-this-alias\n const range2 = other;\n if (range1 === undefined || range2 === undefined) {\n return false;\n }\n if (range1.isEmpty() || range2.isEmpty()) {\n return false;\n }\n\n if (range1.min <= range2.max || range2.min <= range1.max) {\n if (\n (range1.min === range2.max && !(range1.isMinInclusive && range2.isMaxInclusive)) ||\n (range2.min === range1.max && !(range2.isMinInclusive && range1.isMaxInclusive))\n ) {\n return false;\n }\n return true;\n }\n return false;\n }\n\n public isFullRange(): boolean {\n return (\n this.min === Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey &&\n this.max === Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey &&\n this.isMinInclusive === true &&\n this.isMaxInclusive === false\n );\n }\n\n public isEmpty(): boolean {\n return !(this.isMinInclusive && this.isMaxInclusive) && this.min === this.max;\n }\n /**\n * Parse a QueryRange from a partitionKeyRange\n * @returns QueryRange\n * @hidden\n */\n public static parsePartitionKeyRange(partitionKeyRange: PartitionKeyRange): QueryRange {\n return new QueryRange(\n partitionKeyRange[Constants.PartitionKeyRange.MinInclusive],\n partitionKeyRange[Constants.PartitionKeyRange.MaxExclusive],\n true,\n false\n );\n }\n /**\n * Parse a QueryRange from a dictionary\n * @returns QueryRange\n * @hidden\n */\n public static parseFromDict(queryRangeDict: ResponseQueryRange): QueryRange {\n return new QueryRange(\n queryRangeDict.min,\n queryRangeDict.max,\n queryRangeDict.isMinInclusive,\n queryRangeDict.isMaxInclusive\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyRange } from \"../client\";\nimport { Constants } from \"../common\";\nimport { QueryRange } from \"./QueryRange\";\n\n/** @hidden */\nexport class InMemoryCollectionRoutingMap {\n private orderedPartitionKeyRanges: PartitionKeyRange[];\n private orderedRanges: QueryRange[];\n // TODO: chrande made this public, even though it is implementation detail for a test\n public orderedPartitionInfo: unknown;\n\n /**\n * Represents a InMemoryCollectionRoutingMap Object,\n * Stores partition key ranges in an efficient way with some additional information and provides\n * convenience methods for working with set of ranges.\n */\n constructor(orderedPartitionKeyRanges: PartitionKeyRange[], orderedPartitionInfo: unknown) {\n this.orderedPartitionKeyRanges = orderedPartitionKeyRanges;\n this.orderedRanges = orderedPartitionKeyRanges.map((pkr) => {\n return new QueryRange(\n pkr[Constants.PartitionKeyRange.MinInclusive],\n pkr[Constants.PartitionKeyRange.MaxExclusive],\n true,\n false\n );\n });\n this.orderedPartitionInfo = orderedPartitionInfo;\n }\n public getOrderedParitionKeyRanges(): PartitionKeyRange[] {\n return this.orderedPartitionKeyRanges;\n }\n\n public getOverlappingRanges(providedQueryRanges: QueryRange | QueryRange[]): PartitionKeyRange[] {\n // TODO This code has all kinds of smells. Multiple iterations and sorts just to grab overlapping ranges\n // stfaul attempted to bring it down to one for-loop and failed\n const pqr: QueryRange[] = Array.isArray(providedQueryRanges)\n ? providedQueryRanges\n : [providedQueryRanges];\n const minToPartitionRange: any = {}; // TODO: any\n\n // this for loop doesn't invoke any async callback\n for (const queryRange of pqr) {\n if (queryRange.isEmpty()) {\n continue;\n }\n\n if (queryRange.isFullRange()) {\n return this.orderedPartitionKeyRanges;\n }\n\n const minIndex = this.orderedRanges.findIndex((range) => {\n if (queryRange.min > range.min && queryRange.min < range.max) {\n return true;\n }\n if (queryRange.min === range.min) {\n return true;\n }\n if (queryRange.min === range.max) {\n return true;\n }\n });\n\n if (minIndex < 0) {\n throw new Error(\n \"error in collection routing map, queried value is less than the start range.\"\n );\n }\n\n // Start at the end and work backwards\n let maxIndex: number;\n for (let i = this.orderedRanges.length - 1; i >= 0; i--) {\n const range = this.orderedRanges[i];\n if (queryRange.max > range.min && queryRange.max < range.max) {\n maxIndex = i;\n break;\n }\n if (queryRange.max === range.min) {\n maxIndex = i;\n break;\n }\n if (queryRange.max === range.max) {\n maxIndex = i;\n break;\n }\n }\n\n if (maxIndex > this.orderedRanges.length) {\n throw new Error(\n \"error in collection routing map, queried value is greater than the end range.\"\n );\n }\n\n for (let j = minIndex; j < maxIndex + 1; j++) {\n if (queryRange.overlaps(this.orderedRanges[j])) {\n minToPartitionRange[\n this.orderedPartitionKeyRanges[j][Constants.PartitionKeyRange.MinInclusive]\n ] = this.orderedPartitionKeyRanges[j];\n }\n }\n }\n\n const overlappingPartitionKeyRanges = Object.keys(minToPartitionRange).map(\n (k) => minToPartitionRange[k]\n );\n\n return overlappingPartitionKeyRanges.sort((a, b) => {\n return a[Constants.PartitionKeyRange.MinInclusive].localeCompare(\n b[Constants.PartitionKeyRange.MinInclusive]\n );\n });\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common/constants\";\nimport { InMemoryCollectionRoutingMap } from \"./inMemoryCollectionRoutingMap\";\n\n/**\n * @hidden\n */\nfunction compareRanges(a: any, b: any): 0 | 1 | -1 {\n const aVal = a[0][Constants.PartitionKeyRange.MinInclusive];\n const bVal = b[0][Constants.PartitionKeyRange.MinInclusive];\n if (aVal > bVal) {\n return 1;\n }\n if (aVal < bVal) {\n return -1;\n }\n return 0;\n}\n\n/** @hidden */\nexport function createCompleteRoutingMap(\n partitionKeyRangeInfoTuppleList: any[]\n): InMemoryCollectionRoutingMap {\n const rangeById: any = {}; // TODO: any\n const rangeByInfo: any = {}; // TODO: any\n\n let sortedRanges = [];\n\n // the for loop doesn't invoke any async callback\n for (const r of partitionKeyRangeInfoTuppleList) {\n rangeById[r[0][Constants.PartitionKeyRange.Id]] = r;\n rangeByInfo[r[1]] = r[0];\n sortedRanges.push(r);\n }\n\n sortedRanges = sortedRanges.sort(compareRanges);\n const partitionKeyOrderedRange = sortedRanges.map((r) => r[0]);\n const orderedPartitionInfo = sortedRanges.map((r) => r[1]);\n\n if (!isCompleteSetOfRange(partitionKeyOrderedRange)) {\n return undefined;\n }\n return new InMemoryCollectionRoutingMap(partitionKeyOrderedRange, orderedPartitionInfo);\n}\n\n/**\n * @hidden\n */\nfunction isCompleteSetOfRange(partitionKeyOrderedRange: any): boolean {\n // TODO: any\n let isComplete = false;\n if (partitionKeyOrderedRange.length > 0) {\n const firstRange = partitionKeyOrderedRange[0];\n const lastRange = partitionKeyOrderedRange[partitionKeyOrderedRange.length - 1];\n isComplete =\n firstRange[Constants.PartitionKeyRange.MinInclusive] ===\n Constants.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey;\n isComplete =\n isComplete &&\n lastRange[Constants.PartitionKeyRange.MaxExclusive] ===\n Constants.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey;\n\n for (let i = 1; i < partitionKeyOrderedRange.length; i++) {\n const previousRange = partitionKeyOrderedRange[i - 1];\n const currentRange = partitionKeyOrderedRange[i];\n isComplete =\n isComplete &&\n previousRange[Constants.PartitionKeyRange.MaxExclusive] ===\n currentRange[Constants.PartitionKeyRange.MinInclusive];\n\n if (!isComplete) {\n if (\n previousRange[Constants.PartitionKeyRange.MaxExclusive] >\n currentRange[Constants.PartitionKeyRange.MinInclusive]\n ) {\n throw Error(\"Ranges overlap\");\n }\n break;\n }\n }\n }\n return isComplete;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { PartitionKeyRange } from \"../client/Container/PartitionKeyRange\";\nimport { ClientContext } from \"../ClientContext\";\nimport { getIdFromLink } from \"../common/helper\";\nimport { createCompleteRoutingMap } from \"./CollectionRoutingMapFactory\";\nimport { InMemoryCollectionRoutingMap } from \"./inMemoryCollectionRoutingMap\";\nimport { QueryRange } from \"./QueryRange\";\n\n/** @hidden */\nexport class PartitionKeyRangeCache {\n private collectionRoutingMapByCollectionId: {\n [key: string]: Promise;\n };\n\n constructor(private clientContext: ClientContext) {\n this.collectionRoutingMapByCollectionId = {};\n }\n /**\n * Finds or Instantiates the requested Collection Routing Map\n * @param collectionLink - Requested collectionLink\n * @hidden\n */\n public async onCollectionRoutingMap(\n collectionLink: string\n ): Promise {\n const collectionId = getIdFromLink(collectionLink);\n if (this.collectionRoutingMapByCollectionId[collectionId] === undefined) {\n this.collectionRoutingMapByCollectionId[collectionId] =\n this.requestCollectionRoutingMap(collectionLink);\n }\n return this.collectionRoutingMapByCollectionId[collectionId];\n }\n\n /**\n * Given the query ranges and a collection, invokes the callback on the list of overlapping partition key ranges\n * @hidden\n */\n public async getOverlappingRanges(\n collectionLink: string,\n queryRange: QueryRange\n ): Promise {\n const crm = await this.onCollectionRoutingMap(collectionLink);\n return crm.getOverlappingRanges(queryRange);\n }\n\n private async requestCollectionRoutingMap(\n collectionLink: string\n ): Promise {\n const { resources } = await this.clientContext\n .queryPartitionKeyRanges(collectionLink)\n .fetchAll();\n return createCompleteRoutingMap(resources.map((r) => [r, true]));\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../ClientContext\";\nimport { Constants } from \"../common/constants\";\nimport { PartitionKeyRangeCache } from \"./partitionKeyRangeCache\";\nimport { QueryRange } from \"./QueryRange\";\n\n/** @hidden */\nexport const PARITIONKEYRANGE = Constants.PartitionKeyRange;\n\n/** @hidden */\nexport class SmartRoutingMapProvider {\n private partitionKeyRangeCache: PartitionKeyRangeCache;\n\n constructor(clientContext: ClientContext) {\n this.partitionKeyRangeCache = new PartitionKeyRangeCache(clientContext);\n }\n private static _secondRangeIsAfterFirstRange(range1: QueryRange, range2: QueryRange): boolean {\n if (typeof range1.max === \"undefined\") {\n throw new Error(\"range1 must have max\");\n }\n\n if (typeof range2.min === \"undefined\") {\n throw new Error(\"range2 must have min\");\n }\n\n if (range1.max > range2.min) {\n // r.min < #previous_r.max\n return false;\n } else {\n if (range1.max === range2.min && range1.isMaxInclusive && range2.isMinInclusive) {\n // the inclusive ending endpoint of previous_r is the same as the inclusive beginning endpoint of r\n // they share a point\n return false;\n }\n return true;\n }\n }\n\n private static _isSortedAndNonOverlapping(ranges: QueryRange[]): boolean {\n for (let idx = 1; idx < ranges.length; idx++) {\n const previousR = ranges[idx - 1];\n const r = ranges[idx];\n if (!this._secondRangeIsAfterFirstRange(previousR, r)) {\n return false;\n }\n }\n return true;\n }\n\n private static _stringMax(a: string, b: string): string {\n return a >= b ? a : b;\n }\n\n private static _stringCompare(a: string, b: string): 1 | 0 | -1 {\n return a === b ? 0 : a > b ? 1 : -1;\n }\n\n private static _subtractRange(r: QueryRange, partitionKeyRange: any): QueryRange {\n const left = this._stringMax(partitionKeyRange[PARITIONKEYRANGE.MaxExclusive], r.min);\n const leftInclusive = this._stringCompare(left, r.min) === 0 ? r.isMinInclusive : false;\n return new QueryRange(left, r.max, leftInclusive, r.isMaxInclusive);\n }\n\n /**\n * Given the sorted ranges and a collection, invokes the callback on the list of overlapping partition key ranges\n * @param callback - Function execute on the overlapping partition key ranges result,\n * takes two parameters error, partition key ranges\n * @hidden\n */\n public async getOverlappingRanges(\n collectionLink: string,\n sortedRanges: QueryRange[]\n ): Promise {\n // validate if the list is non- overlapping and sorted TODO: any PartitionKeyRanges\n if (!SmartRoutingMapProvider._isSortedAndNonOverlapping(sortedRanges)) {\n throw new Error(\"the list of ranges is not a non-overlapping sorted ranges\");\n }\n\n let partitionKeyRanges: any[] = []; // TODO: any ParitionKeyRanges\n\n if (sortedRanges.length === 0) {\n return partitionKeyRanges;\n }\n\n const collectionRoutingMap = await this.partitionKeyRangeCache.onCollectionRoutingMap(\n collectionLink\n );\n\n let index = 0;\n let currentProvidedRange = sortedRanges[index];\n for (;;) {\n if (currentProvidedRange.isEmpty()) {\n // skip and go to the next item\n if (++index >= sortedRanges.length) {\n return partitionKeyRanges;\n }\n currentProvidedRange = sortedRanges[index];\n continue;\n }\n\n let queryRange;\n if (partitionKeyRanges.length > 0) {\n queryRange = SmartRoutingMapProvider._subtractRange(\n currentProvidedRange,\n partitionKeyRanges[partitionKeyRanges.length - 1]\n );\n } else {\n queryRange = currentProvidedRange;\n }\n\n const overlappingRanges = collectionRoutingMap.getOverlappingRanges(queryRange);\n if (overlappingRanges.length <= 0) {\n throw new Error(`error: returned overlapping ranges for queryRange ${queryRange} is empty`);\n }\n partitionKeyRanges = partitionKeyRanges.concat(overlappingRanges);\n\n const lastKnownTargetRange = QueryRange.parsePartitionKeyRange(\n partitionKeyRanges[partitionKeyRanges.length - 1]\n );\n if (!lastKnownTargetRange) {\n throw new Error(\"expected lastKnowTargetRange to be truthy\");\n }\n // the overlapping ranges must contain the requested range\n\n if (\n SmartRoutingMapProvider._stringCompare(currentProvidedRange.max, lastKnownTargetRange.max) >\n 0\n ) {\n throw new Error(`error: returned overlapping ranges ${overlappingRanges} \\\n does not contain the requested range ${queryRange}`);\n }\n\n // the current range is contained in partitionKeyRanges just move forward\n if (++index >= sortedRanges.length) {\n return partitionKeyRanges;\n }\n currentProvidedRange = sortedRanges[index];\n\n while (\n SmartRoutingMapProvider._stringCompare(\n currentProvidedRange.max,\n lastKnownTargetRange.max\n ) <= 0\n ) {\n // the current range is covered too.just move forward\n if (++index >= sortedRanges.length) {\n return partitionKeyRanges;\n }\n currentProvidedRange = sortedRanges[index];\n }\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport PriorityQueue from \"priorityqueuejs\";\nimport semaphore from \"semaphore\";\nimport { ClientContext } from \"../ClientContext\";\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\nimport { StatusCodes, SubStatusCodes } from \"../common/statusCodes\";\nimport { FeedOptions, Response } from \"../request\";\nimport { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse\";\nimport { QueryRange } from \"../routing/QueryRange\";\nimport { SmartRoutingMapProvider } from \"../routing/smartRoutingMapProvider\";\nimport { CosmosHeaders } from \"./CosmosHeaders\";\nimport { DocumentProducer } from \"./documentProducer\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { getInitialHeader, mergeHeaders } from \"./headerUtils\";\nimport { SqlQuerySpec } from \"./SqlQuerySpec\";\n\n/** @hidden */\nconst logger: AzureLogger = createClientLogger(\"parallelQueryExecutionContextBase\");\n\n/** @hidden */\nexport enum ParallelQueryExecutionContextBaseStates {\n started = \"started\",\n inProgress = \"inProgress\",\n ended = \"ended\",\n}\n\n/** @hidden */\nexport abstract class ParallelQueryExecutionContextBase implements ExecutionContext {\n private err: any;\n private state: any;\n private static STATES = ParallelQueryExecutionContextBaseStates;\n private routingProvider: SmartRoutingMapProvider;\n protected sortOrders: any;\n private requestContinuation: any;\n private respHeaders: CosmosHeaders;\n private orderByPQ: PriorityQueue;\n private sem: any;\n private waitingForInternalExecutionContexts: number;\n /**\n * Provides the ParallelQueryExecutionContextBase.\n * This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from.\n *\n * When handling a parallelized query, it instantiates one instance of\n * DocumentProcuder per target partition key range and aggregates the result of each.\n *\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - The Collection Link\n * @param options - Represents the feed options.\n * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo\n * @hidden\n */\n constructor(\n private clientContext: ClientContext,\n private collectionLink: string,\n private query: string | SqlQuerySpec,\n private options: FeedOptions,\n private partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo\n ) {\n this.clientContext = clientContext;\n this.collectionLink = collectionLink;\n this.query = query;\n this.options = options;\n this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;\n\n this.err = undefined;\n this.state = ParallelQueryExecutionContextBase.STATES.started;\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n this.sortOrders = this.partitionedQueryExecutionInfo.queryInfo.orderBy;\n\n this.requestContinuation = options ? options.continuationToken || options.continuation : null;\n // response headers of undergoing operation\n this.respHeaders = getInitialHeader();\n\n // Make priority queue for documentProducers\n // The comparator is supplied by the derived class\n this.orderByPQ = new PriorityQueue(\n (a: DocumentProducer, b: DocumentProducer) => this.documentProducerComparator(b, a)\n );\n // Creating the documentProducers\n this.sem = semaphore(1);\n // Creating callback for semaphore\n // TODO: Code smell\n const createDocumentProducersAndFillUpPriorityQueueFunc = async (): Promise => {\n // ensure the lock is released after finishing up\n try {\n const targetPartitionRanges = await this._onTargetPartitionRanges();\n this.waitingForInternalExecutionContexts = targetPartitionRanges.length;\n\n const maxDegreeOfParallelism =\n options.maxDegreeOfParallelism === undefined || options.maxDegreeOfParallelism < 1\n ? targetPartitionRanges.length\n : Math.min(options.maxDegreeOfParallelism, targetPartitionRanges.length);\n\n logger.info(\n \"Query starting against \" +\n targetPartitionRanges.length +\n \" ranges with parallelism of \" +\n maxDegreeOfParallelism\n );\n\n const parallelismSem = semaphore(maxDegreeOfParallelism);\n let filteredPartitionKeyRanges = [];\n // The document producers generated from filteredPartitionKeyRanges\n const targetPartitionQueryExecutionContextList: DocumentProducer[] = [];\n\n if (this.requestContinuation) {\n throw new Error(\"Continuation tokens are not yet supported for cross partition queries\");\n } else {\n filteredPartitionKeyRanges = targetPartitionRanges;\n }\n\n // Create one documentProducer for each partitionTargetRange\n filteredPartitionKeyRanges.forEach((partitionTargetRange: any) => {\n // TODO: any partitionTargetRange\n // no async callback\n targetPartitionQueryExecutionContextList.push(\n this._createTargetPartitionQueryExecutionContext(partitionTargetRange)\n );\n });\n\n // Fill up our priority queue with documentProducers\n targetPartitionQueryExecutionContextList.forEach((documentProducer): void => {\n // has async callback\n const throttledFunc = async (): Promise => {\n try {\n const { result: document, headers } = await documentProducer.current();\n this._mergeWithActiveResponseHeaders(headers);\n if (document === undefined) {\n // no results on this one\n return;\n }\n // if there are matching results in the target ex range add it to the priority queue\n try {\n this.orderByPQ.enq(documentProducer);\n } catch (e: any) {\n this.err = e;\n }\n } catch (err: any) {\n this._mergeWithActiveResponseHeaders(err.headers);\n this.err = err;\n } finally {\n parallelismSem.leave();\n this._decrementInitiationLock();\n }\n };\n parallelismSem.take(throttledFunc);\n });\n } catch (err: any) {\n this.err = err;\n // release the lock\n this.sem.leave();\n return;\n }\n };\n this.sem.take(createDocumentProducersAndFillUpPriorityQueueFunc);\n }\n\n protected abstract documentProducerComparator(\n dp1: DocumentProducer,\n dp2: DocumentProducer\n ): number;\n\n private _decrementInitiationLock(): void {\n // decrements waitingForInternalExecutionContexts\n // if waitingForInternalExecutionContexts reaches 0 releases the semaphore and changes the state\n this.waitingForInternalExecutionContexts = this.waitingForInternalExecutionContexts - 1;\n if (this.waitingForInternalExecutionContexts === 0) {\n this.sem.leave();\n if (this.orderByPQ.size() === 0) {\n this.state = ParallelQueryExecutionContextBase.STATES.inProgress;\n }\n }\n }\n\n private _mergeWithActiveResponseHeaders(headers: CosmosHeaders): void {\n mergeHeaders(this.respHeaders, headers);\n }\n\n private _getAndResetActiveResponseHeaders(): CosmosHeaders {\n const ret = this.respHeaders;\n this.respHeaders = getInitialHeader();\n return ret;\n }\n\n private async _onTargetPartitionRanges(): Promise {\n // invokes the callback when the target partition ranges are ready\n const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges;\n const queryRanges = parsedRanges.map((item) => QueryRange.parseFromDict(item));\n return this.routingProvider.getOverlappingRanges(this.collectionLink, queryRanges);\n }\n\n /**\n * Gets the replacement ranges for a partitionkeyrange that has been split\n */\n private async _getReplacementPartitionKeyRanges(\n documentProducer: DocumentProducer\n ): Promise {\n const partitionKeyRange = documentProducer.targetPartitionKeyRange;\n // Download the new routing map\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n // Get the queryRange that relates to this partitionKeyRange\n const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange);\n return this.routingProvider.getOverlappingRanges(this.collectionLink, [queryRange]);\n }\n\n // TODO: P0 Code smell - can barely tell what this is doing\n /**\n * Removes the current document producer from the priqueue,\n * replaces that document producer with child document producers,\n * then reexecutes the originFunction with the corrrected executionContext\n */\n private async _repairExecutionContext(originFunction: any): Promise {\n // TODO: any\n // Get the replacement ranges\n // Removing the invalid documentProducer from the orderByPQ\n const parentDocumentProducer = this.orderByPQ.deq();\n try {\n const replacementPartitionKeyRanges: any[] = await this._getReplacementPartitionKeyRanges(\n parentDocumentProducer\n );\n const replacementDocumentProducers: DocumentProducer[] = [];\n // Create the replacement documentProducers\n replacementPartitionKeyRanges.forEach((partitionKeyRange) => {\n // Create replacment document producers with the parent's continuationToken\n const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(\n partitionKeyRange,\n parentDocumentProducer.continuationToken\n );\n replacementDocumentProducers.push(replacementDocumentProducer);\n });\n // We need to check if the documentProducers even has anything left to fetch from before enqueing them\n const checkAndEnqueueDocumentProducer = async (\n documentProducerToCheck: DocumentProducer,\n checkNextDocumentProducerCallback: any\n ): Promise => {\n try {\n const { result: afterItem } = await documentProducerToCheck.current();\n if (afterItem === undefined) {\n // no more results left in this document producer, so we don't enqueue it\n } else {\n // Safe to put document producer back in the queue\n this.orderByPQ.enq(documentProducerToCheck);\n }\n\n await checkNextDocumentProducerCallback();\n } catch (err: any) {\n this.err = err;\n return;\n }\n };\n const checkAndEnqueueDocumentProducers = async (rdp: DocumentProducer[]): Promise => {\n if (rdp.length > 0) {\n // We still have a replacementDocumentProducer to check\n const replacementDocumentProducer = rdp.shift();\n await checkAndEnqueueDocumentProducer(replacementDocumentProducer, async () => {\n await checkAndEnqueueDocumentProducers(rdp);\n });\n } else {\n // reexecutes the originFunction with the corrrected executionContext\n return originFunction();\n }\n };\n // Invoke the recursive function to get the ball rolling\n await checkAndEnqueueDocumentProducers(replacementDocumentProducers);\n } catch (err: any) {\n this.err = err;\n throw err;\n }\n }\n\n private static _needPartitionKeyRangeCacheRefresh(error: any): boolean {\n // TODO: any error\n return (\n error.code === StatusCodes.Gone &&\n \"substatus\" in error &&\n error[\"substatus\"] === SubStatusCodes.PartitionKeyRangeGone\n );\n }\n\n /**\n * Checks to see if the executionContext needs to be repaired.\n * if so it repairs the execution context and executes the ifCallback,\n * else it continues with the current execution context and executes the elseCallback\n */\n private async _repairExecutionContextIfNeeded(ifCallback: any, elseCallback: any): Promise {\n const documentProducer = this.orderByPQ.peek();\n // Check if split happened\n try {\n await documentProducer.current();\n elseCallback();\n } catch (err: any) {\n if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {\n // Split has happened so we need to repair execution context before continueing\n return this._repairExecutionContext(ifCallback);\n } else {\n // Something actually bad happened ...\n this.err = err;\n throw err;\n }\n }\n }\n\n /**\n * Fetches the next element in the ParallelQueryExecutionContextBase.\n */\n public async nextItem(): Promise> {\n if (this.err) {\n // if there is a prior error return error\n throw this.err;\n }\n return new Promise>((resolve, reject) => {\n this.sem.take(() => {\n // NOTE: lock must be released before invoking quitting\n if (this.err) {\n // release the lock before invoking callback\n this.sem.leave();\n // if there is a prior error return error\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n if (this.orderByPQ.size() === 0) {\n // there is no more results\n this.state = ParallelQueryExecutionContextBase.STATES.ended;\n // release the lock before invoking callback\n this.sem.leave();\n return resolve({\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n }\n\n const ifCallback = (): void => {\n // Release the semaphore to avoid deadlock\n this.sem.leave();\n // Reexcute the function\n return resolve(this.nextItem());\n };\n const elseCallback = async (): Promise => {\n let documentProducer: DocumentProducer;\n try {\n documentProducer = this.orderByPQ.deq();\n } catch (e: any) {\n // if comparing elements of the priority queue throws exception\n // set that error and return error\n this.err = e;\n // release the lock before invoking callback\n this.sem.leave();\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n let item: any;\n let headers: CosmosHeaders;\n try {\n const response = await documentProducer.nextItem();\n item = response.result;\n headers = response.headers;\n this._mergeWithActiveResponseHeaders(headers);\n if (item === undefined) {\n // this should never happen\n // because the documentProducer already has buffered an item\n // assert item !== undefined\n this.err = new Error(\n `Extracted DocumentProducer from the priority queue \\\n doesn't have any buffered item!`\n );\n // release the lock before invoking callback\n this.sem.leave();\n return resolve({\n result: undefined,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n }\n } catch (err: any) {\n this.err = new Error(\n `Extracted DocumentProducer from the priority queue fails to get the \\\n buffered item. Due to ${JSON.stringify(err)}`\n );\n this.err.headers = this._getAndResetActiveResponseHeaders();\n // release the lock before invoking callback\n this.sem.leave();\n reject(this.err);\n return;\n }\n\n // we need to put back the document producer to the queue if it has more elements.\n // the lock will be released after we know document producer must be put back in the queue or not\n try {\n const { result: afterItem, headers: otherHeaders } = await documentProducer.current();\n this._mergeWithActiveResponseHeaders(otherHeaders);\n if (afterItem === undefined) {\n // no more results is left in this document producer\n } else {\n try {\n const headItem = documentProducer.fetchResults[0];\n if (typeof headItem === \"undefined\") {\n throw new Error(\n \"Extracted DocumentProducer from PQ is invalid state with no result!\"\n );\n }\n this.orderByPQ.enq(documentProducer);\n } catch (e: any) {\n // if comparing elements in priority queue throws exception\n // set error\n this.err = e;\n }\n }\n } catch (err: any) {\n if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {\n // We want the document producer enqueued\n // So that later parts of the code can repair the execution context\n this.orderByPQ.enq(documentProducer);\n } else {\n // Something actually bad happened\n this.err = err;\n reject(this.err);\n }\n } finally {\n // release the lock before returning\n this.sem.leave();\n }\n // invoke the callback on the item\n return resolve({\n result: item,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n };\n this._repairExecutionContextIfNeeded(ifCallback, elseCallback).catch(reject);\n });\n });\n }\n\n /**\n * Determine if there are still remaining resources to processs based on the value of the continuation\n * token or the elements remaining on the current batch in the QueryIterator.\n * @returns true if there is other elements to process in the ParallelQueryExecutionContextBase.\n */\n public hasMoreResults(): boolean {\n return !(\n this.state === ParallelQueryExecutionContextBase.STATES.ended || this.err !== undefined\n );\n }\n\n /**\n * Creates document producers\n */\n private _createTargetPartitionQueryExecutionContext(\n partitionKeyTargetRange: any,\n continuationToken?: any\n ): DocumentProducer {\n // TODO: any\n // creates target partition range Query Execution Context\n let rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery;\n let sqlQuerySpec: SqlQuerySpec;\n const query = this.query;\n if (typeof query === \"string\") {\n sqlQuerySpec = { query };\n } else {\n sqlQuerySpec = query;\n }\n\n const formatPlaceHolder = \"{documentdb-formattableorderbyquery-filter}\";\n if (rewrittenQuery) {\n sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec));\n // We hardcode the formattable filter to true for now\n rewrittenQuery = rewrittenQuery.replace(formatPlaceHolder, \"true\");\n sqlQuerySpec[\"query\"] = rewrittenQuery;\n }\n\n const options = { ...this.options };\n options.continuationToken = continuationToken;\n\n return new DocumentProducer(\n this.clientContext,\n this.collectionLink,\n sqlQuerySpec,\n partitionKeyTargetRange,\n options\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { DocumentProducer } from \"./documentProducer\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { ParallelQueryExecutionContextBase } from \"./parallelQueryExecutionContextBase\";\n\n/**\n * Provides the ParallelQueryExecutionContext.\n * This class is capable of handling parallelized queries and derives from ParallelQueryExecutionContextBase.\n * @hidden\n */\nexport class ParallelQueryExecutionContext\n extends ParallelQueryExecutionContextBase\n implements ExecutionContext\n{\n // Instance members are inherited\n\n // Overriding documentProducerComparator for ParallelQueryExecutionContexts\n /**\n * Provides a Comparator for document producers using the min value of the corresponding target partition.\n * @returns Comparator Function\n * @hidden\n */\n public documentProducerComparator(\n docProd1: DocumentProducer,\n docProd2: DocumentProducer\n ): number {\n return docProd1.generation - docProd2.generation;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../ClientContext\";\nimport { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse\";\nimport { FeedOptions } from \"../request/FeedOptions\";\nimport { DocumentProducer } from \"./documentProducer\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { OrderByDocumentProducerComparator } from \"./orderByDocumentProducerComparator\";\nimport { ParallelQueryExecutionContextBase } from \"./parallelQueryExecutionContextBase\";\nimport { SqlQuerySpec } from \"./SqlQuerySpec\";\n\n/** @hidden */\nexport class OrderByQueryExecutionContext\n extends ParallelQueryExecutionContextBase\n implements ExecutionContext\n{\n private orderByComparator: any;\n /**\n * Provides the OrderByQueryExecutionContext.\n * This class is capable of handling orderby queries and dervives from ParallelQueryExecutionContextBase.\n *\n * When handling a parallelized query, it instantiates one instance of\n * DocumentProcuder per target partition key range and aggregates the result of each.\n *\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - The Collection Link\n * @param options - Represents the feed options.\n * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo\n * @hidden\n */\n constructor(\n clientContext: ClientContext,\n collectionLink: string,\n query: string | SqlQuerySpec,\n options: FeedOptions,\n partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo\n ) {\n // Calling on base class constructor\n super(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo);\n this.orderByComparator = new OrderByDocumentProducerComparator(this.sortOrders);\n }\n // Instance members are inherited\n\n // Overriding documentProducerComparator for OrderByQueryExecutionContexts\n /**\n * Provides a Comparator for document producers which respects orderby sort order.\n * @returns Comparator Function\n * @hidden\n */\n public documentProducerComparator(docProd1: DocumentProducer, docProd2: DocumentProducer): any {\n return this.orderByComparator.compare(docProd1, docProd2);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { getInitialHeader, mergeHeaders } from \"../headerUtils\";\n\n/** @hidden */\nexport class OffsetLimitEndpointComponent implements ExecutionContext {\n constructor(\n private executionContext: ExecutionContext,\n private offset: number,\n private limit: number\n ) {}\n\n public async nextItem(): Promise> {\n const aggregateHeaders = getInitialHeader();\n while (this.offset > 0) {\n // Grab next item but ignore the result. We only need the headers\n const { headers } = await this.executionContext.nextItem();\n this.offset--;\n mergeHeaders(aggregateHeaders, headers);\n }\n if (this.limit > 0) {\n const { result, headers } = await this.executionContext.nextItem();\n this.limit--;\n mergeHeaders(aggregateHeaders, headers);\n return { result, headers: aggregateHeaders };\n }\n // If both limit and offset are 0, return nothing\n return { result: undefined, headers: getInitialHeader() };\n }\n\n public hasMoreResults(): boolean {\n return (this.offset > 0 || this.limit > 0) && this.executionContext.hasMoreResults();\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\n\n/** @hidden */\nexport class OrderByEndpointComponent implements ExecutionContext {\n /**\n * Represents an endpoint in handling an order by query. For each processed orderby\n * result it returns 'payload' item of the result\n *\n * @param executionContext - Underlying Execution Context\n * @hidden\n */\n constructor(private executionContext: ExecutionContext) {}\n /**\n * Execute a provided function on the next element in the OrderByEndpointComponent.\n */\n public async nextItem(): Promise> {\n const { result: item, headers } = await this.executionContext.nextItem();\n return {\n result: item !== undefined ? item.payload : undefined,\n headers,\n };\n }\n\n /**\n * Determine if there are still remaining resources to processs.\n * @returns true if there is other elements to process in the OrderByEndpointComponent.\n */\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults();\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createHash } from \"crypto\";\n\nexport async function digest(str: string): Promise {\n const hash = createHash(\"sha256\");\n hash.update(str, \"utf8\");\n return hash.digest(\"hex\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { digest } from \"./digest\";\nimport stableStringify from \"fast-json-stable-stringify\";\n\nexport async function hashObject(object: unknown): Promise {\n const stringifiedObject = stableStringify(object);\n return digest(stringifiedObject);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { hashObject } from \"../../utils/hashObject\";\n\n/** @hidden */\nexport class OrderedDistinctEndpointComponent implements ExecutionContext {\n private hashedLastResult: string;\n constructor(private executionContext: ExecutionContext) {}\n\n public async nextItem(): Promise> {\n const { headers, result } = await this.executionContext.nextItem();\n if (result) {\n const hashedResult = await hashObject(result);\n if (hashedResult === this.hashedLastResult) {\n return { result: undefined, headers };\n }\n this.hashedLastResult = hashedResult;\n }\n return { result, headers };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults();\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { hashObject } from \"../../utils/hashObject\";\n\n/** @hidden */\nexport class UnorderedDistinctEndpointComponent implements ExecutionContext {\n private hashedResults: Set;\n constructor(private executionContext: ExecutionContext) {\n this.hashedResults = new Set();\n }\n\n public async nextItem(): Promise> {\n const { headers, result } = await this.executionContext.nextItem();\n if (result) {\n const hashedResult = await hashObject(result);\n if (this.hashedResults.has(hashedResult)) {\n return { result: undefined, headers };\n }\n this.hashedResults.add(hashedResult);\n }\n return { result, headers };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults();\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// All aggregates are effectively a group by operation\n// The empty group is used for aggregates without a GROUP BY clause\nexport const emptyGroup = \"__empty__\";\n\n// Newer API versions rewrite the query to return `item2`. It fixes some legacy issues with the original `item` result\n// Aggregator code should use item2 when available\nexport const extractAggregateResult = (payload: { item2?: unknown; item: unknown }): any =>\n Object.keys(payload).length > 0 ? (payload.item2 ? payload.item2 : payload.item) : null;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { CosmosHeaders } from \"../CosmosHeaders\";\nimport { QueryInfo } from \"../../request/ErrorResponse\";\nimport { hashObject } from \"../../utils/hashObject\";\nimport { Aggregator, createAggregator } from \"../Aggregators\";\nimport { getInitialHeader, mergeHeaders } from \"../headerUtils\";\nimport { emptyGroup, extractAggregateResult } from \"./emptyGroup\";\n\ninterface GroupByResponse {\n result: GroupByResult;\n headers: CosmosHeaders;\n}\n\ninterface GroupByResult {\n groupByItems: any[];\n payload: any;\n}\n\n/** @hidden */\nexport class GroupByEndpointComponent implements ExecutionContext {\n constructor(private executionContext: ExecutionContext, private queryInfo: QueryInfo) {}\n\n private readonly groupings: Map> = new Map();\n private readonly aggregateResultArray: any[] = [];\n private completed: boolean = false;\n\n public async nextItem(): Promise> {\n // If we have a full result set, begin returning results\n if (this.aggregateResultArray.length > 0) {\n return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() };\n }\n\n if (this.completed) {\n return { result: undefined, headers: getInitialHeader() };\n }\n\n const aggregateHeaders = getInitialHeader();\n\n while (this.executionContext.hasMoreResults()) {\n // Grab the next result\n const { result, headers } = (await this.executionContext.nextItem()) as GroupByResponse;\n mergeHeaders(aggregateHeaders, headers);\n\n // If it exists, process it via aggregators\n if (result) {\n const group = result.groupByItems ? await hashObject(result.groupByItems) : emptyGroup;\n const aggregators = this.groupings.get(group);\n const payload = result.payload;\n if (aggregators) {\n // Iterator over all results in the payload\n Object.keys(payload).map((key) => {\n // in case the value of a group is null make sure we create a dummy payload with item2==null\n const effectiveGroupByValue = payload[key]\n ? payload[key]\n : new Map().set(\"item2\", null);\n const aggregateResult = extractAggregateResult(effectiveGroupByValue);\n aggregators.get(key).aggregate(aggregateResult);\n });\n } else {\n // This is the first time we have seen a grouping. Setup the initial result without aggregate values\n const grouping = new Map();\n this.groupings.set(group, grouping);\n // Iterator over all results in the payload\n Object.keys(payload).map((key) => {\n const aggregateType = this.queryInfo.groupByAliasToAggregateType[key];\n // Create a new aggregator for this specific aggregate field\n const aggregator = createAggregator(aggregateType);\n grouping.set(key, aggregator);\n if (aggregateType) {\n const aggregateResult = extractAggregateResult(payload[key]);\n aggregator.aggregate(aggregateResult);\n } else {\n aggregator.aggregate(payload[key]);\n }\n });\n }\n }\n }\n\n for (const grouping of this.groupings.values()) {\n const groupResult: any = {};\n for (const [aggregateKey, aggregator] of grouping.entries()) {\n groupResult[aggregateKey] = aggregator.getResult();\n }\n this.aggregateResultArray.push(groupResult);\n }\n this.completed = true;\n return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Response } from \"../../request\";\nimport { ExecutionContext } from \"../ExecutionContext\";\nimport { CosmosHeaders } from \"../CosmosHeaders\";\nimport { AggregateType, QueryInfo } from \"../../request/ErrorResponse\";\nimport { hashObject } from \"../../utils/hashObject\";\nimport { Aggregator, createAggregator } from \"../Aggregators\";\nimport { getInitialHeader, mergeHeaders } from \"../headerUtils\";\nimport { emptyGroup, extractAggregateResult } from \"./emptyGroup\";\n\ninterface GroupByResponse {\n result: GroupByResult;\n headers: CosmosHeaders;\n}\n\ninterface GroupByResult {\n groupByItems: any[];\n payload: any;\n}\n\n/** @hidden */\nexport class GroupByValueEndpointComponent implements ExecutionContext {\n private readonly aggregators: Map = new Map();\n private readonly aggregateResultArray: any[] = [];\n private aggregateType: AggregateType;\n private completed: boolean = false;\n\n constructor(private executionContext: ExecutionContext, private queryInfo: QueryInfo) {\n // VALUE queries will only every have a single grouping\n this.aggregateType = this.queryInfo.aggregates[0];\n }\n\n public async nextItem(): Promise> {\n // Start returning results if we have processed a full results set\n if (this.aggregateResultArray.length > 0) {\n return { result: this.aggregateResultArray.pop(), headers: getInitialHeader() };\n }\n\n if (this.completed) {\n return { result: undefined, headers: getInitialHeader() };\n }\n\n const aggregateHeaders = getInitialHeader();\n\n while (this.executionContext.hasMoreResults()) {\n // Grab the next result\n const { result, headers } = (await this.executionContext.nextItem()) as GroupByResponse;\n mergeHeaders(aggregateHeaders, headers);\n\n // If it exists, process it via aggregators\n if (result) {\n let grouping: string = emptyGroup;\n let payload: any = result;\n if (result.groupByItems) {\n // If the query contains a GROUP BY clause, it will have a payload property and groupByItems\n payload = result.payload;\n grouping = await hashObject(result.groupByItems);\n }\n\n const aggregator = this.aggregators.get(grouping);\n if (!aggregator) {\n // This is the first time we have seen a grouping so create a new aggregator\n this.aggregators.set(grouping, createAggregator(this.aggregateType));\n }\n\n if (this.aggregateType) {\n const aggregateResult = extractAggregateResult(payload[0]);\n // if aggregate result is null, we need to short circuit aggregation and return undefined\n if (aggregateResult === null) {\n this.completed = true;\n }\n this.aggregators.get(grouping).aggregate(aggregateResult);\n } else {\n // Queries with no aggregates pass the payload directly to the aggregator\n // Example: SELECT VALUE c.team FROM c GROUP BY c.team\n this.aggregators.get(grouping).aggregate(payload);\n }\n }\n }\n\n // We bail early since we got an undefined result back `[{}]`\n if (this.completed) {\n return { result: undefined, headers: aggregateHeaders };\n }\n // If no results are left in the underlying execution context, convert our aggregate results to an array\n for (const aggregator of this.aggregators.values()) {\n this.aggregateResultArray.push(aggregator.getResult());\n }\n this.completed = true;\n return { result: this.aggregateResultArray.pop(), headers: aggregateHeaders };\n }\n\n public hasMoreResults(): boolean {\n return this.executionContext.hasMoreResults() || this.aggregateResultArray.length > 0;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../ClientContext\";\nimport { Response, FeedOptions } from \"../request\";\nimport { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse\";\nimport { CosmosHeaders } from \"./CosmosHeaders\";\nimport { OffsetLimitEndpointComponent } from \"./EndpointComponent/OffsetLimitEndpointComponent\";\nimport { OrderByEndpointComponent } from \"./EndpointComponent/OrderByEndpointComponent\";\nimport { OrderedDistinctEndpointComponent } from \"./EndpointComponent/OrderedDistinctEndpointComponent\";\nimport { UnorderedDistinctEndpointComponent } from \"./EndpointComponent/UnorderedDistinctEndpointComponent\";\nimport { GroupByEndpointComponent } from \"./EndpointComponent/GroupByEndpointComponent\";\nimport { ExecutionContext } from \"./ExecutionContext\";\nimport { getInitialHeader, mergeHeaders } from \"./headerUtils\";\nimport { OrderByQueryExecutionContext } from \"./orderByQueryExecutionContext\";\nimport { ParallelQueryExecutionContext } from \"./parallelQueryExecutionContext\";\nimport { GroupByValueEndpointComponent } from \"./EndpointComponent/GroupByValueEndpointComponent\";\nimport { SqlQuerySpec } from \"./SqlQuerySpec\";\n\n/** @hidden */\nexport class PipelinedQueryExecutionContext implements ExecutionContext {\n private fetchBuffer: any[];\n private fetchMoreRespHeaders: CosmosHeaders;\n private endpoint: ExecutionContext;\n private pageSize: number;\n private static DEFAULT_PAGE_SIZE = 10;\n constructor(\n private clientContext: ClientContext,\n private collectionLink: string,\n private query: string | SqlQuerySpec,\n private options: FeedOptions,\n private partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo\n ) {\n this.endpoint = null;\n this.pageSize = options[\"maxItemCount\"];\n if (this.pageSize === undefined) {\n this.pageSize = PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE;\n }\n\n // Pick between parallel vs order by execution context\n const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy;\n if (Array.isArray(sortOrders) && sortOrders.length > 0) {\n // Need to wrap orderby execution context in endpoint component, since the data is nested as a \\\n // \"payload\" property.\n this.endpoint = new OrderByEndpointComponent(\n new OrderByQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo\n )\n );\n } else {\n this.endpoint = new ParallelQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo\n );\n }\n if (\n Object.keys(partitionedQueryExecutionInfo.queryInfo.groupByAliasToAggregateType).length > 0 ||\n partitionedQueryExecutionInfo.queryInfo.aggregates.length > 0 ||\n partitionedQueryExecutionInfo.queryInfo.groupByExpressions.length > 0\n ) {\n if (partitionedQueryExecutionInfo.queryInfo.hasSelectValue) {\n this.endpoint = new GroupByValueEndpointComponent(\n this.endpoint,\n partitionedQueryExecutionInfo.queryInfo\n );\n } else {\n this.endpoint = new GroupByEndpointComponent(\n this.endpoint,\n partitionedQueryExecutionInfo.queryInfo\n );\n }\n }\n // If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N\n const top = partitionedQueryExecutionInfo.queryInfo.top;\n if (typeof top === \"number\") {\n this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top);\n }\n\n // If offset+limit then add that to the pipeline\n const limit = partitionedQueryExecutionInfo.queryInfo.limit;\n const offset = partitionedQueryExecutionInfo.queryInfo.offset;\n if (typeof limit === \"number\" && typeof offset === \"number\") {\n this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit);\n }\n\n // If distinct then add that to the pipeline\n const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;\n if (distinctType === \"Ordered\") {\n this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint);\n }\n if (distinctType === \"Unordered\") {\n this.endpoint = new UnorderedDistinctEndpointComponent(this.endpoint);\n }\n }\n\n public async nextItem(): Promise> {\n return this.endpoint.nextItem();\n }\n\n // Removed callback here beacuse it wouldn't have ever worked...\n public hasMoreResults(): boolean {\n return this.endpoint.hasMoreResults();\n }\n\n public async fetchMore(): Promise> {\n // if the wrapped endpoint has different implementation for fetchMore use that\n // otherwise use the default implementation\n if (typeof this.endpoint.fetchMore === \"function\") {\n return this.endpoint.fetchMore();\n } else {\n this.fetchBuffer = [];\n this.fetchMoreRespHeaders = getInitialHeader();\n return this._fetchMoreImplementation();\n }\n }\n\n private async _fetchMoreImplementation(): Promise> {\n try {\n const { result: item, headers } = await this.endpoint.nextItem();\n mergeHeaders(this.fetchMoreRespHeaders, headers);\n if (item === undefined) {\n // no more results\n if (this.fetchBuffer.length === 0) {\n return {\n result: undefined,\n headers: this.fetchMoreRespHeaders,\n };\n } else {\n // Just give what we have\n const temp = this.fetchBuffer;\n this.fetchBuffer = [];\n return { result: temp, headers: this.fetchMoreRespHeaders };\n }\n } else {\n // append the result\n this.fetchBuffer.push(item);\n if (this.fetchBuffer.length >= this.pageSize) {\n // fetched enough results\n const temp = this.fetchBuffer.slice(0, this.pageSize);\n this.fetchBuffer = this.fetchBuffer.splice(this.pageSize);\n return { result: temp, headers: this.fetchMoreRespHeaders };\n } else {\n // recursively fetch more\n // TODO: is recursion a good idea?\n return this._fetchMoreImplementation();\n }\n }\n } catch (err: any) {\n mergeHeaders(this.fetchMoreRespHeaders, err.headers);\n err.headers = this.fetchMoreRespHeaders;\n if (err) {\n throw err;\n }\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// \n\nimport { ClientContext } from \"./ClientContext\";\nimport { getPathFromLink, ResourceType, StatusCodes } from \"./common\";\nimport {\n CosmosHeaders,\n DefaultQueryExecutionContext,\n ExecutionContext,\n FetchFunctionCallback,\n getInitialHeader,\n mergeHeaders,\n PipelinedQueryExecutionContext,\n SqlQuerySpec,\n} from \"./queryExecutionContext\";\nimport { Response } from \"./request\";\nimport { ErrorResponse, PartitionedQueryExecutionInfo } from \"./request/ErrorResponse\";\nimport { FeedOptions } from \"./request/FeedOptions\";\nimport { FeedResponse } from \"./request/FeedResponse\";\n\n/**\n * Represents a QueryIterator Object, an implementation of feed or query response that enables\n * traversal and iterating over the response\n * in the Azure Cosmos DB database service.\n */\nexport class QueryIterator {\n private fetchAllTempResources: T[]; // TODO\n private fetchAllLastResHeaders: CosmosHeaders;\n private queryExecutionContext: ExecutionContext;\n private queryPlanPromise: Promise>;\n private isInitialized: boolean;\n /**\n * @hidden\n */\n constructor(\n private clientContext: ClientContext,\n private query: SqlQuerySpec | string,\n private options: FeedOptions,\n private fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[],\n private resourceLink?: string,\n private resourceType?: ResourceType\n ) {\n this.query = query;\n this.fetchFunctions = fetchFunctions;\n this.options = options || {};\n this.resourceLink = resourceLink;\n this.fetchAllLastResHeaders = getInitialHeader();\n this.reset();\n this.isInitialized = false;\n }\n\n /**\n * Gets an async iterator that will yield results until completion.\n *\n * NOTE: AsyncIterators are a very new feature and you might need to\n * use polyfils/etc. in order to use them in your code.\n *\n * If you're using TypeScript, you can use the following polyfill as long\n * as you target ES6 or higher and are running on Node 6 or higher.\n *\n * ```typescript\n * if (!Symbol || !Symbol.asyncIterator) {\n * (Symbol as any).asyncIterator = Symbol.for(\"Symbol.asyncIterator\");\n * }\n * ```\n *\n * @example Iterate over all databases\n * ```typescript\n * for await(const { resources: db } of client.databases.readAll().getAsyncIterator()) {\n * console.log(`Got ${db} from AsyncIterator`);\n * }\n * ```\n */\n public async *getAsyncIterator(): AsyncIterable> {\n this.reset();\n this.queryPlanPromise = this.fetchQueryPlan();\n while (this.queryExecutionContext.hasMoreResults()) {\n let response: Response;\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (error: any) {\n if (this.needsQueryPlan(error)) {\n await this.createPipelinedExecutionContext();\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (queryError: any) {\n this.handleSplitError(queryError);\n }\n } else {\n throw error;\n }\n }\n const feedResponse = new FeedResponse(\n response.result,\n response.headers,\n this.queryExecutionContext.hasMoreResults()\n );\n if (response.result !== undefined) {\n yield feedResponse;\n }\n }\n }\n\n /**\n * Determine if there are still remaining resources to processs based on the value of the continuation token or the\n * elements remaining on the current batch in the QueryIterator.\n * @returns true if there is other elements to process in the QueryIterator.\n */\n public hasMoreResults(): boolean {\n return this.queryExecutionContext.hasMoreResults();\n }\n\n /**\n * Fetch all pages for the query and return a single FeedResponse.\n */\n\n public async fetchAll(): Promise> {\n this.reset();\n this.fetchAllTempResources = [];\n let response: FeedResponse;\n try {\n response = await this.toArrayImplementation();\n } catch (error: any) {\n this.handleSplitError(error);\n }\n return response;\n }\n\n /**\n * Retrieve the next batch from the feed.\n *\n * This may or may not fetch more pages from the backend depending on your settings\n * and the type of query. Aggregate queries will generally fetch all backend pages\n * before returning the first batch of responses.\n */\n public async fetchNext(): Promise> {\n this.queryPlanPromise = this.fetchQueryPlan();\n if (!this.isInitialized) {\n await this.init();\n }\n\n let response: Response;\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (error: any) {\n if (this.needsQueryPlan(error)) {\n await this.createPipelinedExecutionContext();\n try {\n response = await this.queryExecutionContext.fetchMore();\n } catch (queryError: any) {\n this.handleSplitError(queryError);\n }\n } else {\n throw error;\n }\n }\n return new FeedResponse(\n response.result,\n response.headers,\n this.queryExecutionContext.hasMoreResults()\n );\n }\n\n /**\n * Reset the QueryIterator to the beginning and clear all the resources inside it\n */\n public reset(): void {\n this.queryPlanPromise = undefined;\n this.queryExecutionContext = new DefaultQueryExecutionContext(\n this.options,\n this.fetchFunctions\n );\n }\n\n private async toArrayImplementation(): Promise> {\n this.queryPlanPromise = this.fetchQueryPlan();\n if (!this.isInitialized) {\n await this.init();\n }\n while (this.queryExecutionContext.hasMoreResults()) {\n let response: Response;\n try {\n response = await this.queryExecutionContext.nextItem();\n } catch (error: any) {\n if (this.needsQueryPlan(error)) {\n await this.createPipelinedExecutionContext();\n response = await this.queryExecutionContext.nextItem();\n } else {\n throw error;\n }\n }\n const { result, headers } = response;\n // concatenate the results and fetch more\n mergeHeaders(this.fetchAllLastResHeaders, headers);\n\n if (result !== undefined) {\n this.fetchAllTempResources.push(result);\n }\n }\n return new FeedResponse(\n this.fetchAllTempResources,\n this.fetchAllLastResHeaders,\n this.queryExecutionContext.hasMoreResults()\n );\n }\n\n private async createPipelinedExecutionContext(): Promise {\n const queryPlanResponse = await this.queryPlanPromise;\n\n // We always coerce queryPlanPromise to resolved. So if it errored, we need to manually inspect the resolved value\n if (queryPlanResponse instanceof Error) {\n throw queryPlanResponse;\n }\n\n const queryPlan = queryPlanResponse.result;\n const queryInfo = queryPlan.queryInfo;\n if (queryInfo.aggregates.length > 0 && queryInfo.hasSelectValue === false) {\n throw new Error(\"Aggregate queries must use the VALUE keyword\");\n }\n this.queryExecutionContext = new PipelinedQueryExecutionContext(\n this.clientContext,\n this.resourceLink,\n this.query,\n this.options,\n queryPlan\n );\n }\n\n private async fetchQueryPlan(): Promise {\n if (!this.queryPlanPromise && this.resourceType === ResourceType.item) {\n return this.clientContext\n .getQueryPlan(\n getPathFromLink(this.resourceLink) + \"/docs\",\n ResourceType.item,\n this.resourceLink,\n this.query,\n this.options\n )\n .catch((error: any) => error); // Without this catch, node reports an unhandled rejection. So we stash the promise as resolved even if it errored.\n }\n return this.queryPlanPromise;\n }\n\n private needsQueryPlan(error: ErrorResponse): error is ErrorResponse {\n if (\n error.body?.additionalErrorInfo ||\n error.message.includes(\"Cross partition query only supports\")\n ) {\n return error.code === StatusCodes.BadRequest && this.resourceType === ResourceType.item;\n } else {\n throw error;\n }\n }\n\n private initPromise: Promise;\n private async init(): Promise {\n if (this.isInitialized === true) {\n return;\n }\n if (this.initPromise === undefined) {\n this.initPromise = this._init();\n }\n return this.initPromise;\n }\n private async _init(): Promise {\n if (this.options.forceQueryPlan === true && this.resourceType === ResourceType.item) {\n await this.createPipelinedExecutionContext();\n }\n this.isInitialized = true;\n }\n\n private handleSplitError(err: any): void {\n if (err.code === 410) {\n const error = new Error(\n \"Encountered partition split and could not recover. This request is retryable\"\n ) as any;\n error.code = 503;\n error.originalError = err;\n throw error;\n } else {\n throw err;\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Conflict } from \"./Conflict\";\nimport { ConflictDefinition } from \"./ConflictDefinition\";\n\nexport class ConflictResponse extends ResourceResponse {\n constructor(\n resource: ConflictDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n conflict: Conflict\n ) {\n super(resource, headers, statusCode);\n this.conflict = conflict;\n }\n /** A reference to the {@link Conflict} corresponding to the returned {@link ConflictDefinition}. */\n public readonly conflict: Conflict;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { Constants, getIdFromLink, getPathFromLink, ResourceType } from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { ConflictDefinition } from \"./ConflictDefinition\";\nimport { ConflictResponse } from \"./ConflictResponse\";\nimport { undefinedPartitionKey } from \"../../extractPartitionKey\";\nimport { PartitionKey } from \"../../documents\";\n\n/**\n * Use to read or delete a given {@link Conflict} by id.\n *\n * @see {@link Conflicts} to query or read all conflicts.\n */\nexport class Conflict {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return `/${this.container.url}/${Constants.Path.ConflictsPathSegment}/${this.id}`;\n }\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link Conflict}.\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext,\n private partitionKey?: PartitionKey\n ) {\n this.partitionKey = partitionKey;\n }\n\n /**\n * Read the {@link ConflictDefinition} for the given {@link Conflict}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url, ResourceType.conflicts);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new ConflictResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link ConflictDefinition}.\n */\n public async delete(options?: RequestOptions): Promise {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.conflicts,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ConflictResponse(response.result, response.headers, response.code, this);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { ConflictDefinition } from \"./ConflictDefinition\";\n\n/**\n * Use to query or read all conflicts.\n *\n * @see {@link Conflict} to read or delete a given {@link Conflict} by id.\n */\nexport class Conflicts {\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Queries all conflicts.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time.\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all conflicts.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time.\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.conflicts);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.conflicts,\n resourceId: id,\n resultFn: (result) => result.Conflicts,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Reads all conflicts\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport enum ConflictResolutionMode {\n Custom = \"Custom\",\n LastWriterWins = \"LastWriterWins\",\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request/ResourceResponse\";\nimport { Resource } from \"../Resource\";\nimport { Item } from \"./Item\";\nimport { ItemDefinition } from \"./ItemDefinition\";\n\nexport class ItemResponse extends ResourceResponse {\n constructor(\n resource: T & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n subsstatusCode: number,\n item: Item\n ) {\n super(resource, headers, statusCode, subsstatusCode);\n this.item = item;\n }\n /** Reference to the {@link Item} the response corresponds to. */\n public readonly item: Item;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createDocumentUri,\n getIdFromLink,\n getPathFromLink,\n isItemResourceValid,\n ResourceType,\n StatusCodes,\n} from \"../../common\";\nimport { PartitionKey } from \"../../documents\";\nimport { extractPartitionKey, undefinedPartitionKey } from \"../../extractPartitionKey\";\nimport { RequestOptions, Response } from \"../../request\";\nimport { PatchRequestBody } from \"../../utils/patch\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { ItemDefinition } from \"./ItemDefinition\";\nimport { ItemResponse } from \"./ItemResponse\";\n\n/**\n * Used to perform operations on a specific item.\n *\n * @see {@link Items} for operations on all items; see `container.items`.\n */\nexport class Item {\n private partitionKey: PartitionKey;\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createDocumentUri(this.container.database.id, this.container.id, this.id);\n }\n\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link Item}.\n * @param partitionKey - The primary key of the given {@link Item} (only for partitioned containers).\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n partitionKey: PartitionKey,\n private readonly clientContext: ClientContext\n ) {\n this.partitionKey = partitionKey;\n }\n\n /**\n * Read the item's definition.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n * If the type, T, is a class, it won't pass `typeof` comparisons, because it won't have a match prototype.\n * It's recommended to only use interfaces.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param options - Additional options for the request\n *\n * @example Using custom type for response\n * ```typescript\n * interface TodoItem {\n * title: string;\n * done: bool;\n * id: string;\n * }\n *\n * let item: TodoItem;\n * ({body: item} = await item.read());\n * ```\n */\n public async read(\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n let response: Response;\n try {\n response = await this.clientContext.read({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n } catch (error: any) {\n if (error.code !== StatusCodes.NotFound) {\n throw error;\n }\n response = error;\n }\n\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n\n /**\n * Replace the item's definition.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - The definition to replace the existing {@link Item}'s definition with.\n * @param options - Additional options for the request\n */\n public replace(\n body: ItemDefinition,\n options?: RequestOptions\n ): Promise>;\n /**\n * Replace the item's definition.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - The definition to replace the existing {@link Item}'s definition with.\n * @param options - Additional options for the request\n */\n public replace(\n body: T,\n options?: RequestOptions\n ): Promise>;\n public async replace(\n body: T,\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n }\n\n const err = {};\n if (!isItemResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n\n /**\n * Delete the item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * @param options - Additional options for the request\n */\n public async delete(\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n\n /**\n * Perform a JSONPatch on the item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * @param options - Additional options for the request\n */\n public async patch(\n body: PatchRequestBody,\n options: RequestOptions = {}\n ): Promise> {\n if (this.partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n this.partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.patch({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey: this.partitionKey,\n });\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n this\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"./common\";\nimport { CosmosHeaders } from \"./queryExecutionContext\";\n\n/**\n * A single response page from the Azure Cosmos DB Change Feed\n */\nexport class ChangeFeedResponse {\n /**\n * @internal\n */\n constructor(\n /**\n * Gets the items returned in the response from Azure Cosmos DB\n */\n public readonly result: T,\n /**\n * Gets the number of items returned in the response from Azure Cosmos DB\n */\n public readonly count: number,\n /**\n * Gets the status code of the response from Azure Cosmos DB\n */\n public readonly statusCode: number,\n headers: CosmosHeaders\n ) {\n this.headers = Object.freeze(headers);\n }\n\n /**\n * Gets the request charge for this request from the Azure Cosmos DB service.\n */\n public get requestCharge(): number {\n const rus = this.headers[Constants.HttpHeaders.RequestCharge];\n return rus ? parseInt(rus, 10) : null;\n }\n\n /**\n * Gets the activity ID for the request from the Azure Cosmos DB service.\n */\n public get activityId(): string {\n return this.headers[Constants.HttpHeaders.ActivityId];\n }\n\n /**\n * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service.\n *\n * This is equivalent to the `etag` property.\n */\n public get continuation(): string {\n return this.etag;\n }\n\n /**\n * Gets the session token for use in session consistency reads from the Azure Cosmos DB service.\n */\n public get sessionToken(): string {\n return this.headers[Constants.HttpHeaders.SessionToken];\n }\n\n /**\n * Gets the entity tag associated with last transaction in the Azure Cosmos DB service,\n * which can be used as If-Non-Match Access condition for ReadFeed REST request or\n * `continuation` property of `ChangeFeedOptions` parameter for\n * `Items.changeFeed()`\n * to get feed changes since the transaction specified by this entity tag.\n *\n * This is equivalent to the `continuation` property.\n */\n public get etag(): string {\n return this.headers[Constants.HttpHeaders.ETag];\n }\n\n /**\n * Response headers of the response from Azure Cosmos DB\n */\n public headers: CosmosHeaders;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// \nimport { ChangeFeedOptions } from \"./ChangeFeedOptions\";\nimport { ChangeFeedResponse } from \"./ChangeFeedResponse\";\nimport { Resource } from \"./client\";\nimport { ClientContext } from \"./ClientContext\";\nimport { Constants, ResourceType, StatusCodes } from \"./common\";\nimport { FeedOptions } from \"./request\";\nimport { Response } from \"./request\";\n\n/**\n * Provides iterator for change feed.\n *\n * Use `Items.changeFeed()` to get an instance of the iterator.\n */\nexport class ChangeFeedIterator {\n private static readonly IfNoneMatchAllHeaderValue = \"*\";\n private nextIfNoneMatch: string;\n private ifModifiedSince: string;\n private lastStatusCode: number;\n private isPartitionSpecified: boolean;\n\n /**\n * @internal\n */\n constructor(\n private clientContext: ClientContext,\n private resourceId: string,\n private resourceLink: string,\n private partitionKey: string | number | boolean,\n private changeFeedOptions: ChangeFeedOptions\n ) {\n // partition key XOR partition key range id\n const partitionKeyValid = partitionKey !== undefined;\n this.isPartitionSpecified = partitionKeyValid;\n\n let canUseStartFromBeginning = true;\n if (changeFeedOptions.continuation) {\n this.nextIfNoneMatch = changeFeedOptions.continuation;\n canUseStartFromBeginning = false;\n }\n\n if (changeFeedOptions.startTime) {\n // .toUTCString() is platform specific, but most platforms use RFC 1123.\n // In ECMAScript 2018, this was standardized to RFC 1123.\n // See for more info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString\n this.ifModifiedSince = changeFeedOptions.startTime.toUTCString();\n canUseStartFromBeginning = false;\n }\n\n if (canUseStartFromBeginning && !changeFeedOptions.startFromBeginning) {\n this.nextIfNoneMatch = ChangeFeedIterator.IfNoneMatchAllHeaderValue;\n }\n }\n\n /**\n * Gets a value indicating whether there are potentially additional results that can be retrieved.\n *\n * Initially returns true. This value is set based on whether the last execution returned a continuation token.\n *\n * @returns Boolean value representing if whether there are potentially additional results that can be retrieved.\n */\n get hasMoreResults(): boolean {\n return this.lastStatusCode !== StatusCodes.NotModified;\n }\n\n /**\n * Gets an async iterator which will yield pages of results from Azure Cosmos DB.\n */\n public async *getAsyncIterator(): AsyncIterable>> {\n do {\n const result = await this.fetchNext();\n if (result.count > 0) {\n yield result;\n }\n } while (this.hasMoreResults);\n }\n\n /**\n * Read feed and retrieves the next page of results in Azure Cosmos DB.\n */\n public async fetchNext(): Promise>> {\n const response = await this.getFeedResponse();\n this.lastStatusCode = response.statusCode;\n this.nextIfNoneMatch = response.headers[Constants.HttpHeaders.ETag];\n return response;\n }\n\n private async getFeedResponse(): Promise>> {\n if (!this.isPartitionSpecified) {\n throw new Error(\n \"Container is partitioned, but no partition key or partition key range id was specified.\"\n );\n }\n const feedOptions: FeedOptions = { initialHeaders: {}, useIncrementalFeed: true };\n\n if (typeof this.changeFeedOptions.maxItemCount === \"number\") {\n feedOptions.maxItemCount = this.changeFeedOptions.maxItemCount;\n }\n\n if (this.changeFeedOptions.sessionToken) {\n feedOptions.sessionToken = this.changeFeedOptions.sessionToken;\n }\n\n if (this.nextIfNoneMatch) {\n feedOptions.accessCondition = {\n type: Constants.HttpHeaders.IfNoneMatch,\n condition: this.nextIfNoneMatch,\n };\n }\n\n if (this.ifModifiedSince) {\n feedOptions.initialHeaders[Constants.HttpHeaders.IfModifiedSince] = this.ifModifiedSince;\n }\n\n const response: Response> = await (this.clientContext.queryFeed({\n path: this.resourceLink,\n resourceType: ResourceType.item,\n resourceId: this.resourceId,\n resultFn: (result) => (result ? result.Documents : []),\n query: undefined,\n options: feedOptions,\n partitionKey: this.partitionKey,\n }) as Promise); // TODO: some funky issues with query feed. Probably need to change it up.\n\n return new ChangeFeedResponse(\n response.result,\n response.result ? response.result.length : 0,\n response.code,\n response.headers\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const BytePrefix = {\n Undefined: \"00\",\n Null: \"01\",\n False: \"02\",\n True: \"03\",\n MinNumber: \"04\",\n Number: \"05\",\n MaxNumber: \"06\",\n MinString: \"07\",\n String: \"08\",\n MaxString: \"09\",\n Int64: \"0a\",\n Int32: \"0b\",\n Int16: \"0c\",\n Int8: \"0d\",\n Uint64: \"0e\",\n Uint32: \"0f\",\n Uint16: \"10\",\n Uint8: \"11\",\n Binary: \"12\",\n Guid: \"13\",\n Float: \"14\",\n Infinity: \"FF\",\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport JSBI from \"jsbi\";\nimport { BytePrefix } from \"./prefix\";\n\nexport function writeNumberForBinaryEncodingJSBI(hash: number): Buffer {\n let payload = encodeNumberAsUInt64JSBI(hash);\n let outputStream = Buffer.from(BytePrefix.Number, \"hex\");\n const firstChunk = JSBI.asUintN(64, JSBI.signedRightShift(payload, JSBI.BigInt(56)));\n\n outputStream = Buffer.concat([outputStream, Buffer.from(firstChunk.toString(16), \"hex\")]);\n payload = JSBI.asUintN(64, JSBI.leftShift(JSBI.BigInt(payload), JSBI.BigInt(0x8)));\n\n let byteToWrite = JSBI.BigInt(0);\n let firstIteration = false;\n let shifted: JSBI;\n let padded: string;\n\n do {\n if (!firstIteration) {\n // we pad because after shifting because we will produce characters like \"f\" or similar,\n // which cannot be encoded as hex in a buffer because they are invalid hex\n // https://github.com/nodejs/node/issues/24491\n padded = byteToWrite.toString(16).padStart(2, \"0\");\n if (padded !== \"00\") {\n outputStream = Buffer.concat([outputStream, Buffer.from(padded, \"hex\")]);\n }\n } else {\n firstIteration = false;\n }\n\n shifted = JSBI.asUintN(64, JSBI.signedRightShift(payload, JSBI.BigInt(56)));\n byteToWrite = JSBI.asUintN(64, JSBI.bitwiseOr(shifted, JSBI.BigInt(0x01)));\n payload = JSBI.asUintN(64, JSBI.leftShift(payload, JSBI.BigInt(7)));\n } while (JSBI.notEqual(payload, JSBI.BigInt(0)));\n\n const lastChunk = JSBI.asUintN(64, JSBI.bitwiseAnd(byteToWrite, JSBI.BigInt(0xfe)));\n // we pad because after shifting because we will produce characters like \"f\" or similar,\n // which cannot be encoded as hex in a buffer because they are invalid hex\n // https://github.com/nodejs/node/issues/24491\n padded = lastChunk.toString(16).padStart(2, \"0\");\n if (padded !== \"00\") {\n outputStream = Buffer.concat([outputStream, Buffer.from(padded, \"hex\")]);\n }\n\n return outputStream;\n}\n\nfunction encodeNumberAsUInt64JSBI(value: number): JSBI {\n const rawValueBits = getRawBitsJSBI(value);\n const mask = JSBI.BigInt(0x8000000000000000);\n const returned =\n rawValueBits < mask\n ? JSBI.bitwiseXor(rawValueBits, mask)\n : JSBI.add(JSBI.bitwiseNot(rawValueBits), JSBI.BigInt(1));\n return returned;\n}\n\nexport function doubleToByteArrayJSBI(double: number): Buffer {\n const output: Buffer = Buffer.alloc(8);\n const lng = getRawBitsJSBI(double);\n for (let i = 0; i < 8; i++) {\n output[i] = JSBI.toNumber(\n JSBI.bitwiseAnd(\n JSBI.signedRightShift(lng, JSBI.multiply(JSBI.BigInt(i), JSBI.BigInt(8))),\n JSBI.BigInt(0xff)\n )\n );\n }\n return output;\n}\n\nfunction getRawBitsJSBI(value: number): JSBI {\n const view = new DataView(new ArrayBuffer(8));\n view.setFloat64(0, value);\n return JSBI.BigInt(`0x${buf2hex(view.buffer)}`);\n}\n\nfunction buf2hex(buffer: ArrayBuffer): string {\n return Array.prototype.map\n .call(new Uint8Array(buffer), (x: number) => (\"00\" + x.toString(16)).slice(-2))\n .join(\"\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BytePrefix } from \"./prefix\";\n\nexport function writeStringForBinaryEncoding(payload: string): Buffer {\n let outputStream = Buffer.from(BytePrefix.String, \"hex\");\n const MAX_STRING_BYTES_TO_APPEND = 100;\n const byteArray = [...Buffer.from(payload)];\n\n const isShortString = payload.length <= MAX_STRING_BYTES_TO_APPEND;\n\n for (\n let index = 0;\n index < (isShortString ? byteArray.length : MAX_STRING_BYTES_TO_APPEND + 1);\n index++\n ) {\n let charByte = byteArray[index];\n if (charByte < 0xff) {\n charByte++;\n }\n outputStream = Buffer.concat([outputStream, Buffer.from(charByte.toString(16), \"hex\")]);\n }\n\n if (isShortString) {\n outputStream = Buffer.concat([outputStream, Buffer.from(BytePrefix.Undefined, \"hex\")]);\n }\n return outputStream;\n}\n","// +----------------------------------------------------------------------+\n// | murmurHash3js.js v3.0.1 // https://github.com/pid/murmurHash3js\n// | A javascript implementation of MurmurHash3's x86 hashing algorithms. |\n// |----------------------------------------------------------------------|\n// | Copyright (c) 2012-2015 Karan Lyons |\n// | https://github.com/karanlyons/murmurHash3.js/blob/c1778f75792abef7bdd74bc85d2d4e1a3d25cfe9/murmurHash3.js |\n// | Freely distributable under the MIT license. |\n// +----------------------------------------------------------------------+\n\n// PRIVATE FUNCTIONS\n// -----------------\n\nfunction _x86Multiply(m: number, n: number) {\n //\n // Given two 32bit ints, returns the two multiplied together as a\n // 32bit int.\n //\n\n return (m & 0xffff) * n + ((((m >>> 16) * n) & 0xffff) << 16);\n}\n\nfunction _x86Rotl(m: number, n: number) {\n //\n // Given a 32bit int and an int representing a number of bit positions,\n // returns the 32bit int rotated left by that number of positions.\n //\n\n return (m << n) | (m >>> (32 - n));\n}\n\nfunction _x86Fmix(h: number) {\n //\n // Given a block, returns murmurHash3's final x86 mix of that block.\n //\n\n h ^= h >>> 16;\n h = _x86Multiply(h, 0x85ebca6b);\n h ^= h >>> 13;\n h = _x86Multiply(h, 0xc2b2ae35);\n h ^= h >>> 16;\n\n return h;\n}\n\nfunction _x64Add(m: number[], n: number[]) {\n //\n // Given two 64bit ints (as an array of two 32bit ints) returns the two\n // added together as a 64bit int (as an array of two 32bit ints).\n //\n\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n const o = [0, 0, 0, 0];\n\n o[3] += m[3] + n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n\n o[2] += m[2] + n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n\n o[1] += m[1] + n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[0] += m[0] + n[0];\n o[0] &= 0xffff;\n\n return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]];\n}\n\nfunction _x64Multiply(m: number[], n: number[]) {\n //\n // Given two 64bit ints (as an array of two 32bit ints) returns the two\n // multiplied together as a 64bit int (as an array of two 32bit ints).\n //\n\n m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff];\n n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff];\n const o = [0, 0, 0, 0];\n\n o[3] += m[3] * n[3];\n o[2] += o[3] >>> 16;\n o[3] &= 0xffff;\n\n o[2] += m[2] * n[3];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n\n o[2] += m[3] * n[2];\n o[1] += o[2] >>> 16;\n o[2] &= 0xffff;\n\n o[1] += m[1] * n[3];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[1] += m[2] * n[2];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[1] += m[3] * n[1];\n o[0] += o[1] >>> 16;\n o[1] &= 0xffff;\n\n o[0] += m[0] * n[3] + m[1] * n[2] + m[2] * n[1] + m[3] * n[0];\n o[0] &= 0xffff;\n\n return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]];\n}\n\nfunction _x64Rotl(m: number[], n: number) {\n //\n // Given a 64bit int (as an array of two 32bit ints) and an int\n // representing a number of bit positions, returns the 64bit int (as an\n // array of two 32bit ints) rotated left by that number of positions.\n //\n\n n %= 64;\n\n if (n === 32) {\n return [m[1], m[0]];\n } else if (n < 32) {\n return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))];\n } else {\n n -= 32;\n return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))];\n }\n}\n\nfunction _x64LeftShift(m: number[], n: number) {\n //\n // Given a 64bit int (as an array of two 32bit ints) and an int\n // representing a number of bit positions, returns the 64bit int (as an\n // array of two 32bit ints) shifted left by that number of positions.\n //\n\n n %= 64;\n\n if (n === 0) {\n return m;\n } else if (n < 32) {\n return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n];\n } else {\n return [m[1] << (n - 32), 0];\n }\n}\n\nfunction _x64Xor(m: number[], n: number[]) {\n //\n // Given two 64bit ints (as an array of two 32bit ints) returns the two\n // xored together as a 64bit int (as an array of two 32bit ints).\n //\n\n return [m[0] ^ n[0], m[1] ^ n[1]];\n}\n\nfunction _x64Fmix(h: number[]) {\n //\n // Given a block, returns murmurHash3's final x64 mix of that block.\n // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the\n // only place where we need to right shift 64bit ints.)\n //\n\n h = _x64Xor(h, [0, h[0] >>> 1]);\n h = _x64Multiply(h, [0xff51afd7, 0xed558ccd]);\n h = _x64Xor(h, [0, h[0] >>> 1]);\n h = _x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]);\n h = _x64Xor(h, [0, h[0] >>> 1]);\n\n return h;\n}\n\n// PUBLIC FUNCTIONS\n// ----------------\n\nfunction x86Hash32(bytes: Buffer, seed?: number) {\n //\n // Given a string and an optional seed as an int, returns a 32 bit hash\n // using the x86 flavor of MurmurHash3, as an unsigned int.\n //\n seed = seed || 0;\n\n const remainder = bytes.length % 4;\n const blocks = bytes.length - remainder;\n\n let h1 = seed;\n\n let k1 = 0;\n\n const c1 = 0xcc9e2d51;\n const c2 = 0x1b873593;\n let j = 0;\n\n for (let i = 0; i < blocks; i = i + 4) {\n k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24);\n\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n\n h1 ^= k1;\n h1 = _x86Rotl(h1, 13);\n h1 = _x86Multiply(h1, 5) + 0xe6546b64;\n j = i + 4;\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3:\n k1 ^= bytes[j + 2] << 16;\n\n case 2:\n k1 ^= bytes[j + 1] << 8;\n\n case 1:\n k1 ^= bytes[j];\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n h1 ^= k1;\n }\n\n h1 ^= bytes.length;\n h1 = _x86Fmix(h1);\n\n return h1 >>> 0;\n}\n\nfunction x86Hash128(bytes: Buffer, seed?: number) {\n //\n // Given a string and an optional seed as an int, returns a 128 bit\n // hash using the x86 flavor of MurmurHash3, as an unsigned hex.\n //\n\n seed = seed || 0;\n const remainder = bytes.length % 16;\n const blocks = bytes.length - remainder;\n\n let h1 = seed;\n let h2 = seed;\n let h3 = seed;\n let h4 = seed;\n\n let k1 = 0;\n let k2 = 0;\n let k3 = 0;\n let k4 = 0;\n\n const c1 = 0x239b961b;\n const c2 = 0xab0e9789;\n const c3 = 0x38b34ae5;\n const c4 = 0xa1e38b93;\n let j = 0;\n\n for (let i = 0; i < blocks; i = i + 16) {\n k1 = bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24);\n k2 = bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24);\n k3 = bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24);\n k4 = bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24);\n\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n h1 ^= k1;\n\n h1 = _x86Rotl(h1, 19);\n h1 += h2;\n h1 = _x86Multiply(h1, 5) + 0x561ccd1b;\n\n k2 = _x86Multiply(k2, c2);\n k2 = _x86Rotl(k2, 16);\n k2 = _x86Multiply(k2, c3);\n h2 ^= k2;\n\n h2 = _x86Rotl(h2, 17);\n h2 += h3;\n h2 = _x86Multiply(h2, 5) + 0x0bcaa747;\n\n k3 = _x86Multiply(k3, c3);\n k3 = _x86Rotl(k3, 17);\n k3 = _x86Multiply(k3, c4);\n h3 ^= k3;\n\n h3 = _x86Rotl(h3, 15);\n h3 += h4;\n h3 = _x86Multiply(h3, 5) + 0x96cd1c35;\n\n k4 = _x86Multiply(k4, c4);\n k4 = _x86Rotl(k4, 18);\n k4 = _x86Multiply(k4, c1);\n h4 ^= k4;\n\n h4 = _x86Rotl(h4, 13);\n h4 += h1;\n h4 = _x86Multiply(h4, 5) + 0x32ac3b17;\n j = i + 16;\n }\n\n k1 = 0;\n k2 = 0;\n k3 = 0;\n k4 = 0;\n\n switch (remainder) {\n case 15:\n k4 ^= bytes[j + 14] << 16;\n\n case 14:\n k4 ^= bytes[j + 13] << 8;\n\n case 13:\n k4 ^= bytes[j + 12];\n k4 = _x86Multiply(k4, c4);\n k4 = _x86Rotl(k4, 18);\n k4 = _x86Multiply(k4, c1);\n h4 ^= k4;\n\n case 12:\n k3 ^= bytes[j + 11] << 24;\n\n case 11:\n k3 ^= bytes[j + 10] << 16;\n\n case 10:\n k3 ^= bytes[j + 9] << 8;\n\n case 9:\n k3 ^= bytes[j + 8];\n k3 = _x86Multiply(k3, c3);\n k3 = _x86Rotl(k3, 17);\n k3 = _x86Multiply(k3, c4);\n h3 ^= k3;\n\n case 8:\n k2 ^= bytes[j + 7] << 24;\n\n case 7:\n k2 ^= bytes[j + 6] << 16;\n\n case 6:\n k2 ^= bytes[j + 5] << 8;\n\n case 5:\n k2 ^= bytes[j + 4];\n k2 = _x86Multiply(k2, c2);\n k2 = _x86Rotl(k2, 16);\n k2 = _x86Multiply(k2, c3);\n h2 ^= k2;\n\n case 4:\n k1 ^= bytes[j + 3] << 24;\n\n case 3:\n k1 ^= bytes[j + 2] << 16;\n\n case 2:\n k1 ^= bytes[j + 1] << 8;\n\n case 1:\n k1 ^= bytes[j];\n k1 = _x86Multiply(k1, c1);\n k1 = _x86Rotl(k1, 15);\n k1 = _x86Multiply(k1, c2);\n h1 ^= k1;\n }\n\n h1 ^= bytes.length;\n h2 ^= bytes.length;\n h3 ^= bytes.length;\n h4 ^= bytes.length;\n\n h1 += h2;\n h1 += h3;\n h1 += h4;\n h2 += h1;\n h3 += h1;\n h4 += h1;\n\n h1 = _x86Fmix(h1);\n h2 = _x86Fmix(h2);\n h3 = _x86Fmix(h3);\n h4 = _x86Fmix(h4);\n\n h1 += h2;\n h1 += h3;\n h1 += h4;\n h2 += h1;\n h3 += h1;\n h4 += h1;\n\n return (\n (\"00000000\" + (h1 >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h2 >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h3 >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h4 >>> 0).toString(16)).slice(-8)\n );\n}\n\nfunction x64Hash128(bytes: Buffer, seed?: number) {\n //\n // Given a string and an optional seed as an int, returns a 128 bit\n // hash using the x64 flavor of MurmurHash3, as an unsigned hex.\n //\n seed = seed || 0;\n\n const remainder = bytes.length % 16;\n const blocks = bytes.length - remainder;\n\n let h1 = [0, seed];\n let h2 = [0, seed];\n\n let k1 = [0, 0];\n let k2 = [0, 0];\n\n const c1 = [0x87c37b91, 0x114253d5];\n const c2 = [0x4cf5ad43, 0x2745937f];\n let j = 0;\n\n for (let i = 0; i < blocks; i = i + 16) {\n k1 = [\n bytes[i + 4] | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24),\n bytes[i] | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24),\n ];\n k2 = [\n bytes[i + 12] | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24),\n bytes[i + 8] | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24),\n ];\n\n k1 = _x64Multiply(k1, c1);\n k1 = _x64Rotl(k1, 31);\n k1 = _x64Multiply(k1, c2);\n h1 = _x64Xor(h1, k1);\n\n h1 = _x64Rotl(h1, 27);\n h1 = _x64Add(h1, h2);\n h1 = _x64Add(_x64Multiply(h1, [0, 5]), [0, 0x52dce729]);\n\n k2 = _x64Multiply(k2, c2);\n k2 = _x64Rotl(k2, 33);\n k2 = _x64Multiply(k2, c1);\n h2 = _x64Xor(h2, k2);\n\n h2 = _x64Rotl(h2, 31);\n h2 = _x64Add(h2, h1);\n h2 = _x64Add(_x64Multiply(h2, [0, 5]), [0, 0x38495ab5]);\n j = i + 16;\n }\n\n k1 = [0, 0];\n k2 = [0, 0];\n\n switch (remainder) {\n case 15:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 14]], 48));\n\n case 14:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 13]], 40));\n\n case 13:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 12]], 32));\n\n case 12:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 11]], 24));\n\n case 11:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 10]], 16));\n\n case 10:\n k2 = _x64Xor(k2, _x64LeftShift([0, bytes[j + 9]], 8));\n\n case 9:\n k2 = _x64Xor(k2, [0, bytes[j + 8]]);\n k2 = _x64Multiply(k2, c2);\n k2 = _x64Rotl(k2, 33);\n k2 = _x64Multiply(k2, c1);\n h2 = _x64Xor(h2, k2);\n\n case 8:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 7]], 56));\n\n case 7:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 6]], 48));\n\n case 6:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 5]], 40));\n\n case 5:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 4]], 32));\n\n case 4:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 3]], 24));\n\n case 3:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 2]], 16));\n\n case 2:\n k1 = _x64Xor(k1, _x64LeftShift([0, bytes[j + 1]], 8));\n\n case 1:\n k1 = _x64Xor(k1, [0, bytes[j]]);\n k1 = _x64Multiply(k1, c1);\n k1 = _x64Rotl(k1, 31);\n k1 = _x64Multiply(k1, c2);\n h1 = _x64Xor(h1, k1);\n }\n\n h1 = _x64Xor(h1, [0, bytes.length]);\n h2 = _x64Xor(h2, [0, bytes.length]);\n\n h1 = _x64Add(h1, h2);\n h2 = _x64Add(h2, h1);\n\n h1 = _x64Fmix(h1);\n h2 = _x64Fmix(h2);\n\n h1 = _x64Add(h1, h2);\n h2 = _x64Add(h2, h1);\n\n // Here we reverse h1 and h2 in Cosmos\n // This is an implementation detail and not part of the public spec\n const h1Buff = Buffer.from(\n (\"00000000\" + (h1[0] >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h1[1] >>> 0).toString(16)).slice(-8),\n \"hex\"\n );\n const h1Reversed = reverse(h1Buff).toString(\"hex\");\n const h2Buff = Buffer.from(\n (\"00000000\" + (h2[0] >>> 0).toString(16)).slice(-8) +\n (\"00000000\" + (h2[1] >>> 0).toString(16)).slice(-8),\n \"hex\"\n );\n const h2Reversed = reverse(h2Buff).toString(\"hex\");\n return h1Reversed + h2Reversed;\n}\n\nexport function reverse(buff: Buffer) {\n const buffer = Buffer.allocUnsafe(buff.length);\n\n for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) {\n buffer[i] = buff[j];\n buffer[j] = buff[i];\n }\n return buffer;\n}\n\nexport default {\n version: \"3.0.0\",\n x86: {\n hash32: x86Hash32,\n hash128: x86Hash128,\n },\n x64: {\n hash128: x64Hash128,\n },\n inputValidation: true,\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { doubleToByteArrayJSBI, writeNumberForBinaryEncodingJSBI } from \"./encoding/number\";\nimport { writeStringForBinaryEncoding } from \"./encoding/string\";\nimport { BytePrefix } from \"./encoding/prefix\";\nimport MurmurHash from \"./murmurHash\";\n\nconst MAX_STRING_CHARS = 100;\n\ntype v1Key = string | number | boolean | null | Record | undefined;\n\nexport function hashV1PartitionKey(partitionKey: v1Key): string {\n const toHash = prefixKeyByType(partitionKey);\n const hash = MurmurHash.x86.hash32(toHash);\n const encodedJSBI = writeNumberForBinaryEncodingJSBI(hash);\n const encodedValue = encodeByType(partitionKey);\n return Buffer.concat([encodedJSBI, encodedValue]).toString(\"hex\").toUpperCase();\n}\n\nfunction prefixKeyByType(key: v1Key): Buffer {\n let bytes: Buffer;\n switch (typeof key) {\n case \"string\": {\n const truncated = key.substr(0, MAX_STRING_CHARS);\n bytes = Buffer.concat([\n Buffer.from(BytePrefix.String, \"hex\"),\n Buffer.from(truncated),\n Buffer.from(BytePrefix.Undefined, \"hex\"),\n ]);\n return bytes;\n }\n case \"number\": {\n const numberBytes = doubleToByteArrayJSBI(key);\n bytes = Buffer.concat([Buffer.from(BytePrefix.Number, \"hex\"), numberBytes]);\n return bytes;\n }\n case \"boolean\": {\n const prefix = key ? BytePrefix.True : BytePrefix.False;\n return Buffer.from(prefix, \"hex\");\n }\n case \"object\": {\n if (key === null) {\n return Buffer.from(BytePrefix.Null, \"hex\");\n }\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n case \"undefined\": {\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n default:\n throw new Error(`Unexpected type: ${typeof key}`);\n }\n}\n\nfunction encodeByType(key: v1Key): Buffer {\n switch (typeof key) {\n case \"string\": {\n const truncated = key.substr(0, MAX_STRING_CHARS);\n return writeStringForBinaryEncoding(truncated);\n }\n case \"number\": {\n const encodedJSBI = writeNumberForBinaryEncodingJSBI(key);\n return encodedJSBI;\n }\n case \"boolean\": {\n const prefix = key ? BytePrefix.True : BytePrefix.False;\n return Buffer.from(prefix, \"hex\");\n }\n case \"object\":\n if (key === null) {\n return Buffer.from(BytePrefix.Null, \"hex\");\n }\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n case \"undefined\":\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n default:\n throw new Error(`Unexpected type: ${typeof key}`);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { doubleToByteArrayJSBI } from \"./encoding/number\";\nimport { BytePrefix } from \"./encoding/prefix\";\nimport MurmurHash from \"./murmurHash\";\n\ntype v2Key = string | number | boolean | null | Record | undefined;\n\nexport function hashV2PartitionKey(partitionKey: v2Key): string {\n const toHash = prefixKeyByType(partitionKey);\n const hash = MurmurHash.x64.hash128(toHash);\n const reverseBuff: Buffer = reverse(Buffer.from(hash, \"hex\"));\n reverseBuff[0] &= 0x3f;\n return reverseBuff.toString(\"hex\").toUpperCase();\n}\n\nfunction prefixKeyByType(key: v2Key): Buffer {\n let bytes: Buffer;\n switch (typeof key) {\n case \"string\": {\n bytes = Buffer.concat([\n Buffer.from(BytePrefix.String, \"hex\"),\n Buffer.from(key),\n Buffer.from(BytePrefix.Infinity, \"hex\"),\n ]);\n return bytes;\n }\n case \"number\": {\n const numberBytes = doubleToByteArrayJSBI(key);\n bytes = Buffer.concat([Buffer.from(BytePrefix.Number, \"hex\"), numberBytes]);\n return bytes;\n }\n case \"boolean\": {\n const prefix = key ? BytePrefix.True : BytePrefix.False;\n return Buffer.from(prefix, \"hex\");\n }\n case \"object\": {\n if (key === null) {\n return Buffer.from(BytePrefix.Null, \"hex\");\n }\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n case \"undefined\": {\n return Buffer.from(BytePrefix.Undefined, \"hex\");\n }\n default:\n throw new Error(`Unexpected type: ${typeof key}`);\n }\n}\n\nexport function reverse(buff: Buffer): Buffer {\n const buffer = Buffer.allocUnsafe(buff.length);\n\n for (let i = 0, j = buff.length - 1; i <= j; ++i, --j) {\n buffer[i] = buff[j];\n buffer[j] = buff[i];\n }\n return buffer;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { v4 } from \"uuid\";\nconst uuid = v4;\nimport { ChangeFeedIterator } from \"../../ChangeFeedIterator\";\nimport { ChangeFeedOptions } from \"../../ChangeFeedOptions\";\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isItemResourceValid, ResourceType } from \"../../common\";\nimport { extractPartitionKey } from \"../../extractPartitionKey\";\nimport { FetchFunctionCallback, SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions, Response } from \"../../request\";\nimport { Container, PartitionKeyRange } from \"../Container\";\nimport { Item } from \"./Item\";\nimport { ItemDefinition } from \"./ItemDefinition\";\nimport { ItemResponse } from \"./ItemResponse\";\nimport {\n Batch,\n isKeyInRange,\n Operation,\n getPartitionKeyToHash,\n decorateOperation,\n OperationResponse,\n OperationInput,\n BulkOptions,\n decorateBatchOperation,\n splitBatchBasedOnBodySize,\n} from \"../../utils/batch\";\nimport { hashV1PartitionKey } from \"../../utils/hashing/v1\";\nimport { hashV2PartitionKey } from \"../../utils/hashing/v2\";\n\n/**\n * @hidden\n */\nfunction isChangeFeedOptions(options: unknown): options is ChangeFeedOptions {\n const optionsType = typeof options;\n return (\n options && !(optionsType === \"string\" || optionsType === \"boolean\" || optionsType === \"number\")\n );\n}\n\n/**\n * Operations for creating new items, and reading/querying all items\n *\n * @see {@link Item} for reading, replacing, or deleting an existing container; use `.item(id)`.\n */\nexport class Items {\n /**\n * Create an instance of {@link Items} linked to the parent {@link Container}.\n * @param container - The parent container.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Queries all items.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM Families f WHERE f.lastName = @lastName\",\n * parameters: [\n * {name: \"@lastName\", value: \"Hendricks\"}\n * ]\n * };\n * const {result: items} = await items.query(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all items.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT firstname FROM Families f WHERE f.lastName = @lastName\",\n * parameters: [\n * {name: \"@lastName\", value: \"Hendricks\"}\n * ]\n * };\n * const {result: items} = await items.query<{firstName: string}>(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: string | SqlQuerySpec, options: FeedOptions = {}): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n\n const fetchFunction: FetchFunctionCallback = (innerOptions: FeedOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n resultFn: (result) => (result ? result.Documents : []),\n query,\n options: innerOptions,\n partitionKey: options.partitionKey,\n });\n };\n\n return new QueryIterator(\n this.clientContext,\n query,\n options,\n fetchFunction,\n this.container.url,\n ResourceType.item\n );\n }\n\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n *\n * @deprecated Use `changeFeed` instead.\n *\n * @example Read from the beginning of the change feed.\n * ```javascript\n * const iterator = items.readChangeFeed({ startFromBeginning: true });\n * const firstPage = await iterator.fetchNext();\n * const firstPageResults = firstPage.result\n * const secondPage = await iterator.fetchNext();\n * ```\n */\n public readChangeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n * @deprecated Use `changeFeed` instead.\n *\n */\n public readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n * @deprecated Use `changeFeed` instead.\n */\n public readChangeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n * @deprecated Use `changeFeed` instead.\n */\n public readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n public readChangeFeed(\n partitionKeyOrChangeFeedOptions?: string | number | boolean | ChangeFeedOptions,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator {\n if (isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) {\n return this.changeFeed(partitionKeyOrChangeFeedOptions);\n } else {\n return this.changeFeed(partitionKeyOrChangeFeedOptions, changeFeedOptions);\n }\n }\n\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n *\n * @example Read from the beginning of the change feed.\n * ```javascript\n * const iterator = items.readChangeFeed({ startFromBeginning: true });\n * const firstPage = await iterator.fetchNext();\n * const firstPageResults = firstPage.result\n * const secondPage = await iterator.fetchNext();\n * ```\n */\n public changeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n */\n public changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n */\n public changeFeed(\n partitionKey: string | number | boolean,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator;\n /**\n * Create a `ChangeFeedIterator` to iterate over pages of changes\n */\n public changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator;\n public changeFeed(\n partitionKeyOrChangeFeedOptions?: string | number | boolean | ChangeFeedOptions,\n changeFeedOptions?: ChangeFeedOptions\n ): ChangeFeedIterator {\n let partitionKey: string | number | boolean;\n if (!changeFeedOptions && isChangeFeedOptions(partitionKeyOrChangeFeedOptions)) {\n partitionKey = undefined;\n changeFeedOptions = partitionKeyOrChangeFeedOptions;\n } else if (\n partitionKeyOrChangeFeedOptions !== undefined &&\n !isChangeFeedOptions(partitionKeyOrChangeFeedOptions)\n ) {\n partitionKey = partitionKeyOrChangeFeedOptions;\n }\n\n if (!changeFeedOptions) {\n changeFeedOptions = {};\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n return new ChangeFeedIterator(this.clientContext, id, path, partitionKey, changeFeedOptions);\n }\n\n /**\n * Read all items.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const {body: containerList} = await items.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator;\n /**\n * Read all items.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n * @example Read all items to array.\n * ```typescript\n * const {body: containerList} = await items.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator;\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(\"SELECT * from c\", options);\n }\n\n /**\n * Create an item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - Represents the body of the item. Can contain any number of user defined properties.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n */\n public async create(\n body: T,\n options: RequestOptions = {}\n ): Promise> {\n // Generate random document id if the id is missing in the payload and\n // options.disableAutomaticIdGeneration != true\n if ((body.id === undefined || body.id === \"\") && !options.disableAutomaticIdGeneration) {\n body.id = uuid();\n }\n\n const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition();\n const partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n\n const err = {};\n if (!isItemResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey,\n });\n\n const ref = new Item(\n this.container,\n (response.result as any).id,\n partitionKey,\n this.clientContext\n );\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n ref\n );\n }\n\n /**\n * Upsert an item.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - Represents the body of the item. Can contain any number of user defined properties.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n */\n public async upsert(\n body: unknown,\n options?: RequestOptions\n ): Promise>;\n /**\n * Upsert an item.\n *\n * Any provided type, T, is not necessarily enforced by the SDK.\n * You may get more or less properties and it's up to your logic to enforce it.\n *\n * There is no set schema for JSON items. They may contain any number of custom properties.\n *\n * @param body - Represents the body of the item. Can contain any number of user defined properties.\n * @param options - Used for modifying the request (for instance, specifying the partition key).\n */\n public async upsert(\n body: T,\n options?: RequestOptions\n ): Promise>;\n public async upsert(\n body: T,\n options: RequestOptions = {}\n ): Promise> {\n const { resource: partitionKeyDefinition } = await this.container.readPartitionKeyDefinition();\n const partitionKey = extractPartitionKey(body, partitionKeyDefinition);\n\n // Generate random document id if the id is missing in the payload and\n // options.disableAutomaticIdGeneration != true\n if ((body.id === undefined || body.id === \"\") && !options.disableAutomaticIdGeneration) {\n body.id = uuid();\n }\n\n const err = {};\n if (!isItemResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.upsert({\n body,\n path,\n resourceType: ResourceType.item,\n resourceId: id,\n options,\n partitionKey,\n });\n\n const ref = new Item(\n this.container,\n (response.result as any).id,\n partitionKey,\n this.clientContext\n );\n return new ItemResponse(\n response.result,\n response.headers,\n response.code,\n response.substatus,\n ref\n );\n }\n\n /**\n * Execute bulk operations on items.\n *\n * Bulk takes an array of Operations which are typed based on what the operation does.\n * The choices are: Create, Upsert, Read, Replace, and Delete\n *\n * Usage example:\n * ```typescript\n * // partitionKey is optional at the top level if present in the resourceBody\n * const operations: OperationInput[] = [\n * {\n * operationType: \"Create\",\n * resourceBody: { id: \"doc1\", name: \"sample\", key: \"A\" }\n * },\n * {\n * operationType: \"Upsert\",\n * partitionKey: 'A',\n * resourceBody: { id: \"doc2\", name: \"other\", key: \"A\" }\n * }\n * ]\n *\n * await database.container.items.bulk(operations)\n * ```\n *\n * @param operations - List of operations. Limit 100\n * @param bulkOptions - Optional options object to modify bulk behavior. Pass \\{ continueOnError: true \\} to continue executing operations when one fails. (Defaults to false) ** NOTE: THIS WILL DEFAULT TO TRUE IN THE 4.0 RELEASE\n * @param options - Used for modifying the request.\n */\n public async bulk(\n operations: OperationInput[],\n bulkOptions?: BulkOptions,\n options?: RequestOptions\n ): Promise {\n const { resources: partitionKeyRanges } = await this.container\n .readPartitionKeyRanges()\n .fetchAll();\n const { resource: definition } = await this.container.getPartitionKeyDefinition();\n const batches: Batch[] = partitionKeyRanges.map((keyRange: PartitionKeyRange) => {\n return {\n min: keyRange.minInclusive,\n max: keyRange.maxExclusive,\n rangeId: keyRange.id,\n indexes: [],\n operations: [],\n };\n });\n operations\n .map((operation) => decorateOperation(operation, definition, options))\n .forEach((operation: Operation, index: number) => {\n const partitionProp = definition.paths[0].replace(\"/\", \"\");\n const isV2 = definition.version && definition.version === 2;\n const toHashKey = getPartitionKeyToHash(operation, partitionProp);\n const hashed = isV2 ? hashV2PartitionKey(toHashKey) : hashV1PartitionKey(toHashKey);\n const batchForKey = batches.find((batch: Batch) => {\n return isKeyInRange(batch.min, batch.max, hashed);\n });\n batchForKey.operations.push(operation);\n batchForKey.indexes.push(index);\n });\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n\n const orderedResponses: OperationResponse[] = [];\n await Promise.all(\n batches\n .filter((batch: Batch) => batch.operations.length)\n .flatMap((batch: Batch) => splitBatchBasedOnBodySize(batch))\n .map(async (batch: Batch) => {\n if (batch.operations.length > 100) {\n throw new Error(\"Cannot run bulk request with more than 100 operations per partition\");\n }\n try {\n const response = await this.clientContext.bulk({\n body: batch.operations,\n partitionKeyRangeId: batch.rangeId,\n path,\n resourceId: this.container.url,\n bulkOptions,\n options,\n });\n response.result.forEach((operationResponse: OperationResponse, index: number) => {\n orderedResponses[batch.indexes[index]] = operationResponse;\n });\n } catch (err: any) {\n // In the case of 410 errors, we need to recompute the partition key ranges\n // and redo the batch request, however, 410 errors occur for unsupported\n // partition key types as well since we don't support them, so for now we throw\n if (err.code === 410) {\n throw new Error(\n \"Partition key error. Either the partitions have split or an operation has an unsupported partitionKey type\"\n );\n }\n throw new Error(`Bulk request errored with: ${err.message}`);\n }\n })\n );\n return orderedResponses;\n }\n\n /**\n * Execute transactional batch operations on items.\n *\n * Batch takes an array of Operations which are typed based on what the operation does. Batch is transactional and will rollback all operations if one fails.\n * The choices are: Create, Upsert, Read, Replace, and Delete\n *\n * Usage example:\n * ```typescript\n * // partitionKey is required as a second argument to batch, but defaults to the default partition key\n * const operations: OperationInput[] = [\n * {\n * operationType: \"Create\",\n * resourceBody: { id: \"doc1\", name: \"sample\", key: \"A\" }\n * },\n * {\n * operationType: \"Upsert\",\n * partitionKey: 'A',\n * resourceBody: { id: \"doc2\", name: \"other\", key: \"A\" }\n * }\n * ]\n *\n * await database.container.items.batch(operations)\n * ```\n *\n * @param operations - List of operations. Limit 100\n * @param options - Used for modifying the request\n */\n public async batch(\n operations: OperationInput[],\n partitionKey: string = \"[{}]\",\n options?: RequestOptions\n ): Promise> {\n operations.map((operation) => decorateBatchOperation(operation, options));\n\n const path = getPathFromLink(this.container.url, ResourceType.item);\n\n if (operations.length > 100) {\n throw new Error(\"Cannot run batch request with more than 100 operations per partition\");\n }\n try {\n const response: Response = await this.clientContext.batch({\n body: operations,\n partitionKey,\n path,\n resourceId: this.container.url,\n options,\n });\n return response;\n } catch (err: any) {\n throw new Error(`Batch request error: ${err.message}`);\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { StoredProcedure } from \"./StoredProcedure\";\nimport { StoredProcedureDefinition } from \"./StoredProcedureDefinition\";\n\nexport class StoredProcedureResponse extends ResourceResponse<\n StoredProcedureDefinition & Resource\n> {\n constructor(\n resource: StoredProcedureDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n storedProcedure: StoredProcedure\n ) {\n super(resource, headers, statusCode);\n this.storedProcedure = storedProcedure;\n }\n /**\n * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to.\n */\n public readonly storedProcedure: StoredProcedure;\n\n /**\n * Alias for storedProcedure.\n *\n * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to.\n */\n public get sproc(): StoredProcedure {\n return this.storedProcedure;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createStoredProcedureUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { PartitionKey } from \"../../documents/PartitionKey\";\nimport { undefinedPartitionKey } from \"../../extractPartitionKey\";\nimport { RequestOptions, ResourceResponse } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { StoredProcedureDefinition } from \"./StoredProcedureDefinition\";\nimport { StoredProcedureResponse } from \"./StoredProcedureResponse\";\n\n/**\n * Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id.\n *\n * For operations to create, read all, or query Stored Procedures,\n */\nexport class StoredProcedure {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createStoredProcedureUri(this.container.database.id, this.container.id, this.id);\n }\n /**\n * Creates a new instance of {@link StoredProcedure} linked to the parent {@link Container}.\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link StoredProcedure}.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link StoredProcedureDefinition} for the given {@link StoredProcedure}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n return new StoredProcedureResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link StoredProcedure} with the specified {@link StoredProcedureDefinition}.\n * @param body - The specified {@link StoredProcedureDefinition} to replace the existing definition.\n */\n public async replace(\n body: StoredProcedureDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n return new StoredProcedureResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link StoredProcedure}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n return new StoredProcedureResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Execute the given {@link StoredProcedure}.\n *\n * The specified type, T, is not enforced by the client.\n * Be sure to validate the response from the stored procedure matches the type, T, you provide.\n *\n * @param partitionKey - The partition key to use when executing the stored procedure\n * @param params - Array of parameters to pass as arguments to the given {@link StoredProcedure}.\n * @param options - Additional options, such as the partition key to invoke the {@link StoredProcedure} on.\n */\n public async execute(\n partitionKey: PartitionKey,\n params?: any[],\n options?: RequestOptions\n ): Promise> {\n if (partitionKey === undefined) {\n const { resource: partitionKeyDefinition } =\n await this.container.readPartitionKeyDefinition();\n partitionKey = undefinedPartitionKey(partitionKeyDefinition);\n }\n const response = await this.clientContext.execute({\n sprocLink: this.url,\n params,\n options,\n partitionKey,\n });\n return new ResourceResponse(response.result, response.headers, response.code);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { StoredProcedure } from \"./StoredProcedure\";\nimport { StoredProcedureDefinition } from \"./StoredProcedureDefinition\";\nimport { StoredProcedureResponse } from \"./StoredProcedureResponse\";\n\n/**\n * Operations for creating, upserting, or reading/querying all Stored Procedures.\n *\n * For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see `container.storedProcedure()`.\n */\nexport class StoredProcedures {\n /**\n * @param container - The parent {@link Container}.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all Stored Procedures.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @example Read all stored procedures to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @sproc\",\n * parameters: [\n * {name: \"@sproc\", value: \"Todo\"}\n * ]\n * };\n * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all Stored Procedures.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @example Read all stored procedures to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @sproc\",\n * parameters: [\n * {name: \"@sproc\", value: \"Todo\"}\n * ]\n * };\n * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.sproc);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n resultFn: (result) => result.StoredProcedures,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all stored procedures.\n * @example Read all stored procedures to array.\n * ```typescript\n * const {body: sprocList} = await containers.storedProcedures.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a StoredProcedure.\n *\n * Azure Cosmos DB allows stored procedures to be executed in the storage tier,\n * directly against an item container. The script\n * gets executed under ACID transactions on the primary storage partition of the\n * specified container. For additional details,\n * refer to the server-side JavaScript API documentation.\n */\n public async create(\n body: StoredProcedureDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.sproc);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.sproc,\n resourceId: id,\n options,\n });\n const ref = new StoredProcedure(this.container, response.result.id, this.clientContext);\n return new StoredProcedureResponse(response.result, response.headers, response.code, ref);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Trigger } from \"./index\";\nimport { TriggerDefinition } from \"./TriggerDefinition\";\n\nexport class TriggerResponse extends ResourceResponse {\n constructor(\n resource: TriggerDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n trigger: Trigger\n ) {\n super(resource, headers, statusCode);\n this.trigger = trigger;\n }\n /** A reference to the {@link Trigger} corresponding to the returned {@link TriggerDefinition}. */\n public readonly trigger: Trigger;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createTriggerUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { TriggerDefinition } from \"./TriggerDefinition\";\nimport { TriggerResponse } from \"./TriggerResponse\";\n\n/**\n * Operations to read, replace, or delete a {@link Trigger}.\n *\n * Use `container.triggers` to create, upsert, query, or read all.\n */\nexport class Trigger {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createTriggerUri(this.container.database.id, this.container.id, this.id);\n }\n\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link Trigger}.\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link TriggerDefinition} for the given {@link Trigger}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n return new TriggerResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link Trigger} with the specified {@link TriggerDefinition}.\n * @param body - The specified {@link TriggerDefinition} to replace the existing definition with.\n */\n public async replace(\n body: TriggerDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n return new TriggerResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link Trigger}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n return new TriggerResponse(response.result, response.headers, response.code, this);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { Trigger } from \"./Trigger\";\nimport { TriggerDefinition } from \"./TriggerDefinition\";\nimport { TriggerResponse } from \"./TriggerResponse\";\n\n/**\n * Operations to create, upsert, query, and read all triggers.\n *\n * Use `container.triggers` to read, replace, or delete a {@link Trigger}.\n */\nexport class Triggers {\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all Triggers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all Triggers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.trigger);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n resultFn: (result) => result.Triggers,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all Triggers.\n * @example Read all trigger to array.\n * ```typescript\n * const {body: triggerList} = await container.triggers.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n /**\n * Create a trigger.\n *\n * Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed\n * on creates, updates and deletes.\n *\n * For additional details, refer to the server-side JavaScript API documentation.\n */\n public async create(body: TriggerDefinition, options?: RequestOptions): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.trigger);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.trigger,\n resourceId: id,\n options,\n });\n const ref = new Trigger(this.container, response.result.id, this.clientContext);\n return new TriggerResponse(response.result, response.headers, response.code, ref);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { UserDefinedFunction } from \"./UserDefinedFunction\";\nimport { UserDefinedFunctionDefinition } from \"./UserDefinedFunctionDefinition\";\n\nexport class UserDefinedFunctionResponse extends ResourceResponse<\n UserDefinedFunctionDefinition & Resource\n> {\n constructor(\n resource: UserDefinedFunctionDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n udf: UserDefinedFunction\n ) {\n super(resource, headers, statusCode);\n this.userDefinedFunction = udf;\n }\n /** A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. */\n public readonly userDefinedFunction: UserDefinedFunction;\n /**\n * Alias for `userDefinedFunction(id)`.\n *\n * A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}.\n */\n public get udf(): UserDefinedFunction {\n return this.userDefinedFunction;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createUserDefinedFunctionUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { UserDefinedFunctionDefinition } from \"./UserDefinedFunctionDefinition\";\nimport { UserDefinedFunctionResponse } from \"./UserDefinedFunctionResponse\";\n\n/**\n * Used to read, replace, or delete a specified User Definied Function by id.\n *\n * @see {@link UserDefinedFunction} to create, upsert, query, read all User Defined Functions.\n */\nexport class UserDefinedFunction {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createUserDefinedFunctionUri(this.container.database.id, this.container.id, this.id);\n }\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n * @param id - The id of the given {@link UserDefinedFunction}.\n */\n constructor(\n public readonly container: Container,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link UserDefinedFunctionDefinition} for the given {@link UserDefinedFunction}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link UserDefinedFunction} with the specified {@link UserDefinedFunctionDefinition}.\n * @param options -\n */\n public async replace(\n body: UserDefinedFunctionDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link UserDefined}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, this);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Container } from \"../Container\";\nimport { Resource } from \"../Resource\";\nimport { UserDefinedFunction } from \"./UserDefinedFunction\";\nimport { UserDefinedFunctionDefinition } from \"./UserDefinedFunctionDefinition\";\nimport { UserDefinedFunctionResponse } from \"./UserDefinedFunctionResponse\";\n\n/**\n * Used to create, upsert, query, or read all User Defined Functions.\n *\n * @see {@link UserDefinedFunction} to read, replace, or delete a given User Defined Function by id.\n */\nexport class UserDefinedFunctions {\n /**\n * @hidden\n * @param container - The parent {@link Container}.\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all User Defined Functions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all User Defined Functions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.container.url, ResourceType.udf);\n const id = getIdFromLink(this.container.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n resultFn: (result) => result.UserDefinedFunctions,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all User Defined Functions.\n * @example Read all User Defined Functions to array.\n * ```typescript\n * const {body: udfList} = await container.userDefinedFunctions.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a UserDefinedFunction.\n *\n * Azure Cosmos DB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers.\n *\n * For additional details, refer to the server-side JavaScript API documentation.\n *\n */\n public async create(\n body: UserDefinedFunctionDefinition,\n options?: RequestOptions\n ): Promise {\n if (body.body) {\n body.body = body.body.toString();\n }\n\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.container.url, ResourceType.udf);\n const id = getIdFromLink(this.container.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.udf,\n resourceId: id,\n options,\n });\n const ref = new UserDefinedFunction(this.container, response.result.id, this.clientContext);\n return new UserDefinedFunctionResponse(response.result, response.headers, response.code, ref);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { StoredProcedures, StoredProcedure } from \"../StoredProcedure\";\nimport { Trigger, Triggers } from \"../Trigger\";\nimport { UserDefinedFunction, UserDefinedFunctions } from \"../UserDefinedFunction\";\nimport { ClientContext } from \"../../ClientContext\";\nimport { Container } from \"../Container/Container\";\n\nexport class Scripts {\n /**\n * @param container - The parent {@link Container}.\n * @hidden\n */\n constructor(\n public readonly container: Container,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Used to read, replace, or delete a specific, existing {@link StoredProcedure} by id.\n *\n * Use `.storedProcedures` for creating new stored procedures, or querying/reading all stored procedures.\n * @param id - The id of the {@link StoredProcedure}.\n */\n public storedProcedure(id: string): StoredProcedure {\n return new StoredProcedure(this.container, id, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Trigger} by id.\n *\n * Use `.triggers` for creating new triggers, or querying/reading all triggers.\n * @param id - The id of the {@link Trigger}.\n */\n public trigger(id: string): Trigger {\n return new Trigger(this.container, id, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link UserDefinedFunction} by id.\n *\n * Use `.userDefinedFunctions` for creating new user defined functions, or querying/reading all user defined functions.\n * @param id - The id of the {@link UserDefinedFunction}.\n */\n public userDefinedFunction(id: string): UserDefinedFunction {\n return new UserDefinedFunction(this.container, id, this.clientContext);\n }\n\n private $sprocs: StoredProcedures;\n /**\n * Operations for creating new stored procedures, and reading/querying all stored procedures.\n *\n * For reading, replacing, or deleting an existing stored procedure, use `.storedProcedure(id)`.\n */\n public get storedProcedures(): StoredProcedures {\n if (!this.$sprocs) {\n this.$sprocs = new StoredProcedures(this.container, this.clientContext);\n }\n return this.$sprocs;\n }\n\n private $triggers: Triggers;\n /**\n * Operations for creating new triggers, and reading/querying all triggers.\n *\n * For reading, replacing, or deleting an existing trigger, use `.trigger(id)`.\n */\n public get triggers(): Triggers {\n if (!this.$triggers) {\n this.$triggers = new Triggers(this.container, this.clientContext);\n }\n return this.$triggers;\n }\n\n private $udfs: UserDefinedFunctions;\n /**\n * Operations for creating new user defined functions, and reading/querying all user defined functions.\n *\n * For reading, replacing, or deleting an existing user defined function, use `.userDefinedFunction(id)`.\n */\n public get userDefinedFunctions(): UserDefinedFunctions {\n if (!this.$udfs) {\n this.$udfs = new UserDefinedFunctions(this.container, this.clientContext);\n }\n return this.$udfs;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request/ResourceResponse\";\nimport { Resource } from \"../Resource\";\nimport { ContainerDefinition } from \"./ContainerDefinition\";\nimport { Container } from \"./index\";\n\n/** Response object for Container operations */\nexport class ContainerResponse extends ResourceResponse {\n constructor(\n resource: ContainerDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n container: Container\n ) {\n super(resource, headers, statusCode);\n this.container = container;\n }\n /** A reference to the {@link Container} that the returned {@link ContainerDefinition} corresponds to. */\n public readonly container: Container;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Offer } from \"./Offer\";\nimport { OfferDefinition } from \"./OfferDefinition\";\n\nexport class OfferResponse extends ResourceResponse {\n constructor(\n resource: OfferDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n offer?: Offer\n ) {\n super(resource, headers, statusCode);\n this.offer = offer;\n }\n /** A reference to the {@link Offer} corresponding to the returned {@link OfferDefinition}. */\n public readonly offer: Offer;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { Constants, isResourceValid, ResourceType } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { RequestOptions } from \"../../request\";\nimport { OfferDefinition } from \"./OfferDefinition\";\nimport { OfferResponse } from \"./OfferResponse\";\n\n/**\n * Use to read or replace an existing {@link Offer} by id.\n *\n * @see {@link Offers} to query or read all offers.\n */\nexport class Offer {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return `/${Constants.Path.OffersPathSegment}/${this.id}`;\n }\n /**\n * @hidden\n * @param client - The parent {@link CosmosClient} for the Database Account.\n * @param id - The id of the given {@link Offer}.\n */\n constructor(\n public readonly client: CosmosClient,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link OfferDefinition} for the given {@link Offer}.\n */\n public async read(options?: RequestOptions): Promise {\n const response = await this.clientContext.read({\n path: this.url,\n resourceType: ResourceType.offer,\n resourceId: this.id,\n options,\n });\n return new OfferResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link Offer} with the specified {@link OfferDefinition}.\n * @param body - The specified {@link OfferDefinition}\n */\n public async replace(body: OfferDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n const response = await this.clientContext.replace({\n body,\n path: this.url,\n resourceType: ResourceType.offer,\n resourceId: this.id,\n options,\n });\n return new OfferResponse(response.result, response.headers, response.code, this);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { ResourceType } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { OfferDefinition } from \"./OfferDefinition\";\n\n/**\n * Use to query or read all Offers.\n *\n * @see {@link Offer} to read or replace an existing {@link Offer} by id.\n */\nexport class Offers {\n /**\n * @hidden\n * @param client - The parent {@link CosmosClient} for the offers.\n */\n constructor(\n public readonly client: CosmosClient,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Query all offers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all offers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path: \"/offers\",\n resourceType: ResourceType.offer,\n resourceId: \"\",\n resultFn: (result) => result.Offers,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all offers.\n * @example Read all offers to array.\n * ```typescript\n * const {body: offerList} = await client.offers.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createDocumentCollectionUri,\n getIdFromLink,\n getPathFromLink,\n HTTPMethod,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { PartitionKey, PartitionKeyDefinition } from \"../../documents\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions, ResourceResponse, Response } from \"../../request\";\nimport { PartitionedQueryExecutionInfo } from \"../../request/ErrorResponse\";\nimport { Conflict, Conflicts } from \"../Conflict\";\nimport { Database } from \"../Database\";\nimport { Item, Items } from \"../Item\";\nimport { Scripts } from \"../Script/Scripts\";\nimport { ContainerDefinition } from \"./ContainerDefinition\";\nimport { ContainerResponse } from \"./ContainerResponse\";\nimport { PartitionKeyRange } from \"./PartitionKeyRange\";\nimport { Offer, OfferDefinition } from \"../Offer\";\nimport { OfferResponse } from \"../Offer/OfferResponse\";\nimport { Resource } from \"../Resource\";\n\n/**\n * Operations for reading, replacing, or deleting a specific, existing container by id.\n *\n * @see {@link Containers} for creating new containers, and reading/querying all containers; use `.containers`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `container(id).read()` before every single `item.read()` call, to ensure the container exists;\n * do this once on application start up.\n */\nexport class Container {\n private $items: Items;\n /**\n * Operations for creating new items, and reading/querying all items\n *\n * For reading, replacing, or deleting an existing item, use `.item(id)`.\n *\n * @example Create a new item\n * ```typescript\n * const {body: createdItem} = await container.items.create({id: \"\", properties: {}});\n * ```\n */\n public get items(): Items {\n if (!this.$items) {\n this.$items = new Items(this, this.clientContext);\n }\n return this.$items;\n }\n\n private $scripts: Scripts;\n /**\n * All operations for Stored Procedures, Triggers, and User Defined Functions\n */\n public get scripts(): Scripts {\n if (!this.$scripts) {\n this.$scripts = new Scripts(this, this.clientContext);\n }\n return this.$scripts;\n }\n\n private $conflicts: Conflicts;\n /**\n * Operations for reading and querying conflicts for the given container.\n *\n * For reading or deleting a specific conflict, use `.conflict(id)`.\n */\n public get conflicts(): Conflicts {\n if (!this.$conflicts) {\n this.$conflicts = new Conflicts(this, this.clientContext);\n }\n return this.$conflicts;\n }\n\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createDocumentCollectionUri(this.database.id, this.id);\n }\n\n /**\n * Returns a container instance. Note: You should get this from `database.container(id)`, rather than creating your own object.\n * @param database - The parent {@link Database}.\n * @param id - The id of the given container.\n * @hidden\n */\n constructor(\n public readonly database: Database,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Item} by id.\n *\n * Use `.items` for creating new items, or querying/reading all items.\n *\n * @param id - The id of the {@link Item}.\n * @param partitionKeyValue - The value of the {@link Item} partition key\n * @example Replace an item\n * `const {body: replacedItem} = await container.item(\"\", \"\").replace({id: \"\", title: \"Updated post\", authorID: 5});`\n */\n public item(id: string, partitionKeyValue?: PartitionKey): Item {\n return new Item(this, id, partitionKeyValue, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Conflict} by id.\n *\n * Use `.conflicts` for creating new conflicts, or querying/reading all conflicts.\n * @param id - The id of the {@link Conflict}.\n */\n public conflict(id: string, partitionKey?: PartitionKey): Conflict {\n return new Conflict(this, id, this.clientContext, partitionKey);\n }\n\n /** Read the container's definition */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n this.clientContext.partitionKeyDefinitionCache[this.url] = response.result.partitionKey;\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n\n /** Replace the container's definition */\n public async replace(\n body: ContainerDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n\n /** Delete the container */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Gets the partition key definition first by looking into the cache otherwise by reading the collection.\n * @deprecated This method has been renamed to readPartitionKeyDefinition.\n */\n public async getPartitionKeyDefinition(): Promise> {\n return this.readPartitionKeyDefinition();\n }\n\n /**\n * Gets the partition key definition first by looking into the cache otherwise by reading the collection.\n * @hidden\n */\n public async readPartitionKeyDefinition(): Promise> {\n // $ISSUE-felixfan-2016-03-17: Make name based path and link based path use the same key\n // $ISSUE-felixfan-2016-03-17: Refresh partitionKeyDefinitionCache when necessary\n if (this.url in this.clientContext.partitionKeyDefinitionCache) {\n return new ResourceResponse(\n this.clientContext.partitionKeyDefinitionCache[this.url],\n {},\n 0\n );\n }\n\n const { headers, statusCode } = await this.read();\n return new ResourceResponse(\n this.clientContext.partitionKeyDefinitionCache[this.url],\n headers,\n statusCode\n );\n }\n\n /**\n * Gets offer on container. If none exists, returns an OfferResponse with undefined.\n */\n public async readOffer(options: RequestOptions = {}): Promise {\n const { resource: container } = await this.read();\n const path = \"/offers\";\n const url = container._self;\n const response = await this.clientContext.queryFeed({\n path,\n resourceId: \"\",\n resourceType: ResourceType.offer,\n query: `SELECT * from root where root.resource = \"${url}\"`,\n resultFn: (result) => result.Offers,\n options,\n });\n const offer = response.result[0]\n ? new Offer(this.database.client, response.result[0].id, this.clientContext)\n : undefined;\n return new OfferResponse(response.result[0], response.headers, response.code, offer);\n }\n\n public async getQueryPlan(\n query: string | SqlQuerySpec\n ): Promise> {\n const path = getPathFromLink(this.url);\n return this.clientContext.getQueryPlan(\n path + \"/docs\",\n ResourceType.item,\n getIdFromLink(this.url),\n query\n );\n }\n\n public readPartitionKeyRanges(feedOptions?: FeedOptions): QueryIterator {\n feedOptions = feedOptions || {};\n return this.clientContext.queryPartitionKeyRanges(this.url, undefined, feedOptions);\n }\n\n /**\n * Delete all documents belong to the container for the provided partition key value\n * @param partitionKey - The partition key value of the items to be deleted\n */\n public async deleteAllItemsForPartitionKey(\n partitionKey: PartitionKey,\n options?: RequestOptions\n ): Promise {\n let path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n path = path + \"/operations/partitionkeydelete\";\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n partitionKey: partitionKey,\n method: HTTPMethod.post,\n });\n return new ContainerResponse(response.result, response.headers, response.code, this);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ContainerRequest } from \"../client/Container/ContainerRequest\";\n\nexport function validateOffer(body: ContainerRequest): void {\n if (body.throughput) {\n if (body.maxThroughput) {\n console.log(\"should be erroring\");\n throw new Error(\"Cannot specify `throughput` with `maxThroughput`\");\n }\n if (body.autoUpgradePolicy) {\n throw new Error(\n \"Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead\"\n );\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n Constants,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n StatusCodes,\n} from \"../../common\";\nimport { DEFAULT_PARTITION_KEY_PATH } from \"../../common/partitionKeys\";\nimport { mergeHeaders, SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Database } from \"../Database\";\nimport { Resource } from \"../Resource\";\nimport { Container } from \"./Container\";\nimport { ContainerDefinition } from \"./ContainerDefinition\";\nimport { ContainerRequest } from \"./ContainerRequest\";\nimport { ContainerResponse } from \"./ContainerResponse\";\nimport { validateOffer } from \"../../utils/offers\";\n\n/**\n * Operations for creating new containers, and reading/querying all containers\n *\n * @see {@link Container} for reading, replacing, or deleting an existing container; use `.container(id)`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `containers.readAll()` before every single `item.read()` call, to ensure the container exists;\n * do this once on application start up.\n */\nexport class Containers {\n constructor(public readonly database: Database, private readonly clientContext: ClientContext) {}\n\n /**\n * Queries all containers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time.\n * @example Read all containers to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @container\",\n * parameters: [\n * {name: \"@container\", value: \"Todo\"}\n * ]\n * };\n * const {body: containerList} = await client.database(\"\").containers.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all containers.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time.\n * @example Read all containers to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @container\",\n * parameters: [\n * {name: \"@container\", value: \"Todo\"}\n * ]\n * };\n * const {body: containerList} = await client.database(\"\").containers.query(querySpec).fetchAll();\n * ```\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.database.url, ResourceType.container);\n const id = getIdFromLink(this.database.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n resultFn: (result) => result.DocumentCollections,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Creates a container.\n *\n * A container is a named logical container for items.\n *\n * A database may contain zero or more named containers and each container consists of\n * zero or more JSON items.\n *\n * Being schema-free, the items in a container do not need to share the same structure or fields.\n *\n *\n * Since containers are application resources, they can be authorized using either the\n * master key or resource keys.\n *\n * @param body - Represents the body of the container.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public async create(\n body: ContainerRequest,\n options: RequestOptions = {}\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n const path = getPathFromLink(this.database.url, ResourceType.container);\n const id = getIdFromLink(this.database.url);\n\n validateOffer(body);\n\n if (body.maxThroughput) {\n const autoscaleParams: {\n maxThroughput: number;\n autoUpgradePolicy?: {\n throughputPolicy: {\n incrementPercent: number;\n };\n };\n } = {\n maxThroughput: body.maxThroughput,\n };\n if (body.autoUpgradePolicy) {\n autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy;\n }\n const autoscaleHeader = JSON.stringify(autoscaleParams);\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeader,\n });\n delete body.maxThroughput;\n delete body.autoUpgradePolicy;\n }\n\n if (body.throughput) {\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.OfferThroughput]: body.throughput,\n });\n delete body.throughput;\n }\n\n if (typeof body.partitionKey === \"string\") {\n if (!body.partitionKey.startsWith(\"/\")) {\n throw new Error(\"Partition key must start with '/'\");\n }\n body.partitionKey = {\n paths: [body.partitionKey],\n };\n }\n\n // If they don't specify a partition key, use the default path\n if (!body.partitionKey || !body.partitionKey.paths) {\n body.partitionKey = {\n paths: [DEFAULT_PARTITION_KEY_PATH],\n };\n }\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.container,\n resourceId: id,\n options,\n });\n const ref = new Container(this.database, response.result.id, this.clientContext);\n return new ContainerResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Checks if a Container exists, and, if it doesn't, creates it.\n * This will make a read operation based on the id in the `body`, then if it is not found, a create operation.\n * You should confirm that the output matches the body you passed in for non-default properties (i.e. indexing policy/etc.)\n *\n * A container is a named logical container for items.\n *\n * A database may contain zero or more named containers and each container consists of\n * zero or more JSON items.\n *\n * Being schema-free, the items in a container do not need to share the same structure or fields.\n *\n *\n * Since containers are application resources, they can be authorized using either the\n * master key or resource keys.\n *\n * @param body - Represents the body of the container.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public async createIfNotExists(\n body: ContainerRequest,\n options?: RequestOptions\n ): Promise {\n if (!body || body.id === null || body.id === undefined) {\n throw new Error(\"body parameter must be an object with an id property\");\n }\n /*\n 1. Attempt to read the Container (based on an assumption that most containers will already exist, so its faster)\n 2. If it fails with NotFound error, attempt to create the container. Else, return the read results.\n */\n try {\n const readResponse = await this.database.container(body.id).read(options);\n return readResponse;\n } catch (err: any) {\n if (err.code === StatusCodes.NotFound) {\n const createResponse = await this.create(body, options);\n // Must merge the headers to capture RU costskaty\n mergeHeaders(createResponse.headers, err.headers);\n return createResponse;\n } else {\n throw err;\n }\n }\n }\n\n /**\n * Read all containers.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all containers in an array or iterate over them one at a time.\n * @example Read all containers to array.\n * ```typescript\n * const {body: containerList} = await client.database(\"\").containers.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Permission } from \"./Permission\";\nimport { PermissionBody } from \"./PermissionBody\";\nimport { PermissionDefinition } from \"./PermissionDefinition\";\n\nexport class PermissionResponse extends ResourceResponse<\n PermissionDefinition & PermissionBody & Resource\n> {\n constructor(\n resource: PermissionDefinition & PermissionBody & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n permission: Permission\n ) {\n super(resource, headers, statusCode);\n this.permission = permission;\n }\n /** A reference to the {@link Permission} corresponding to the returned {@link PermissionDefinition}. */\n public readonly permission: Permission;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createPermissionUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request/RequestOptions\";\nimport { User } from \"../User\";\nimport { PermissionBody } from \"./PermissionBody\";\nimport { PermissionDefinition } from \"./PermissionDefinition\";\nimport { PermissionResponse } from \"./PermissionResponse\";\n\n/**\n * Use to read, replace, or delete a given {@link Permission} by id.\n *\n * @see {@link Permissions} to create, upsert, query, or read all Permissions.\n */\nexport class Permission {\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createPermissionUri(this.user.database.id, this.user.id, this.id);\n }\n /**\n * @hidden\n * @param user - The parent {@link User}.\n * @param id - The id of the given {@link Permission}.\n */\n constructor(\n public readonly user: User,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Read the {@link PermissionDefinition} of the given {@link Permission}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n return new PermissionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link Permission} with the specified {@link PermissionDefinition}.\n * @param body - The specified {@link PermissionDefinition}.\n */\n public async replace(\n body: PermissionDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n return new PermissionResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link Permission}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n return new PermissionResponse(response.result, response.headers, response.code, this);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { User } from \"../User\";\nimport { Permission } from \"./Permission\";\nimport { PermissionBody } from \"./PermissionBody\";\nimport { PermissionDefinition } from \"./PermissionDefinition\";\nimport { PermissionResponse } from \"./PermissionResponse\";\n\n/**\n * Use to create, replace, query, and read all Permissions.\n *\n * @see {@link Permission} to read, replace, or delete a specific permission by id.\n */\nexport class Permissions {\n /**\n * @hidden\n * @param user - The parent {@link User}.\n */\n constructor(public readonly user: User, private readonly clientContext: ClientContext) {}\n\n /**\n * Query all permissions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all permissions.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.user.url, ResourceType.permission);\n const id = getIdFromLink(this.user.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n resultFn: (result) => result.Permissions,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all permissions.\n * @example Read all permissions to array.\n * ```typescript\n * const {body: permissionList} = await user.permissions.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a permission.\n *\n * A permission represents a per-User Permission to access a specific resource\n * e.g. Item or Container.\n * @param body - Represents the body of the permission.\n */\n public async create(\n body: PermissionDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.user.url, ResourceType.permission);\n const id = getIdFromLink(this.user.url);\n\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n const ref = new Permission(this.user, response.result.id, this.clientContext);\n return new PermissionResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Upsert a permission.\n *\n * A permission represents a per-User Permission to access a\n * specific resource e.g. Item or Container.\n */\n public async upsert(\n body: PermissionDefinition,\n options?: RequestOptions\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.user.url, ResourceType.permission);\n const id = getIdFromLink(this.user.url);\n\n const response = await this.clientContext.upsert({\n body,\n path,\n resourceType: ResourceType.permission,\n resourceId: id,\n options,\n });\n const ref = new Permission(this.user, response.result.id, this.clientContext);\n return new PermissionResponse(response.result, response.headers, response.code, ref);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { User } from \"./User\";\nimport { UserDefinition } from \"./UserDefinition\";\n\nexport class UserResponse extends ResourceResponse {\n constructor(\n resource: UserDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n user: User\n ) {\n super(resource, headers, statusCode);\n this.user = user;\n }\n /** A reference to the {@link User} corresponding to the returned {@link UserDefinition}. */\n public readonly user: User;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport {\n createUserUri,\n getIdFromLink,\n getPathFromLink,\n isResourceValid,\n ResourceType,\n} from \"../../common\";\nimport { RequestOptions } from \"../../request\";\nimport { Database } from \"../Database\";\nimport { Permission, Permissions } from \"../Permission\";\nimport { UserDefinition } from \"./UserDefinition\";\nimport { UserResponse } from \"./UserResponse\";\n\n/**\n * Used to read, replace, and delete Users.\n *\n * Additionally, you can access the permissions for a given user via `user.permission` and `user.permissions`.\n *\n * @see {@link Users} to create, upsert, query, or read all.\n */\nexport class User {\n /**\n * Operations for creating, upserting, querying, or reading all operations.\n *\n * See `client.permission(id)` to read, replace, or delete a specific Permission by id.\n */\n public readonly permissions: Permissions;\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createUserUri(this.database.id, this.id);\n }\n /**\n * @hidden\n * @param database - The parent {@link Database}.\n */\n constructor(\n public readonly database: Database,\n public readonly id: string,\n private readonly clientContext: ClientContext\n ) {\n this.permissions = new Permissions(this, this.clientContext);\n }\n\n /**\n * Operations to read, replace, or delete a specific Permission by id.\n *\n * See `client.permissions` for creating, upserting, querying, or reading all operations.\n */\n public permission(id: string): Permission {\n return new Permission(this, id, this.clientContext);\n }\n\n /**\n * Read the {@link UserDefinition} for the given {@link User}.\n */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new UserResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Replace the given {@link User}'s definition with the specified {@link UserDefinition}.\n * @param body - The specified {@link UserDefinition} to replace the definition.\n */\n public async replace(body: UserDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.replace({\n body,\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new UserResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Delete the given {@link User}.\n */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n return new UserResponse(response.result, response.headers, response.code, this);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { getIdFromLink, getPathFromLink, isResourceValid, ResourceType } from \"../../common\";\nimport { SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Database } from \"../Database\";\nimport { Resource } from \"../Resource\";\nimport { User } from \"./User\";\nimport { UserDefinition } from \"./UserDefinition\";\nimport { UserResponse } from \"./UserResponse\";\n\n/**\n * Used to create, upsert, query, and read all users.\n *\n * @see {@link User} to read, replace, or delete a specific User by id.\n */\nexport class Users {\n /**\n * @hidden\n * @param database - The parent {@link Database}.\n */\n constructor(public readonly database: Database, private readonly clientContext: ClientContext) {}\n\n /**\n * Query all users.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Query all users.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n */\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const path = getPathFromLink(this.database.url, ResourceType.user);\n const id = getIdFromLink(this.database.url);\n\n return new QueryIterator(this.clientContext, query, options, (innerOptions) => {\n return this.clientContext.queryFeed({\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n resultFn: (result) => result.Users,\n query,\n options: innerOptions,\n });\n });\n }\n\n /**\n * Read all users.-\n * @example Read all users to array.\n * ```typescript\n * const {body: usersList} = await database.users.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n\n /**\n * Create a database user with the specified {@link UserDefinition}.\n * @param body - The specified {@link UserDefinition}.\n */\n public async create(body: UserDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.database.url, ResourceType.user);\n const id = getIdFromLink(this.database.url);\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n const ref = new User(this.database, response.result.id, this.clientContext);\n return new UserResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Upsert a database user with a specified {@link UserDefinition}.\n * @param body - The specified {@link UserDefinition}.\n */\n public async upsert(body: UserDefinition, options?: RequestOptions): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n const path = getPathFromLink(this.database.url, ResourceType.user);\n const id = getIdFromLink(this.database.url);\n\n const response = await this.clientContext.upsert({\n body,\n path,\n resourceType: ResourceType.user,\n resourceId: id,\n options,\n });\n const ref = new User(this.database, response.result.id, this.clientContext);\n return new UserResponse(response.result, response.headers, response.code, ref);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CosmosHeaders } from \"../../queryExecutionContext\";\nimport { ResourceResponse } from \"../../request/ResourceResponse\";\nimport { Resource } from \"../Resource\";\nimport { Database } from \"./Database\";\nimport { DatabaseDefinition } from \"./DatabaseDefinition\";\n\n/** Response object for Database operations */\nexport class DatabaseResponse extends ResourceResponse {\n constructor(\n resource: DatabaseDefinition & Resource,\n headers: CosmosHeaders,\n statusCode: number,\n database: Database\n ) {\n super(resource, headers, statusCode);\n this.database = database;\n }\n /** A reference to the {@link Database} that the returned {@link DatabaseDefinition} corresponds to. */\n public readonly database: Database;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { createDatabaseUri, getIdFromLink, getPathFromLink, ResourceType } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { RequestOptions } from \"../../request\";\nimport { Container, Containers } from \"../Container\";\nimport { User, Users } from \"../User\";\nimport { DatabaseDefinition } from \"./DatabaseDefinition\";\nimport { DatabaseResponse } from \"./DatabaseResponse\";\nimport { OfferResponse, OfferDefinition, Offer } from \"../Offer\";\nimport { Resource } from \"../Resource\";\n\n/**\n * Operations for reading or deleting an existing database.\n *\n * @see {@link Databases} for creating new databases, and reading/querying all databases; use `client.databases`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `database.read()` before every single `item.read()` call, to ensure the database exists;\n * do this once on application start up.\n */\nexport class Database {\n /**\n * Used for creating new containers, or querying/reading all containers.\n *\n * Use `.database(id)` to read, replace, or delete a specific, existing {@link Database} by id.\n *\n * @example Create a new container\n * ```typescript\n * const {body: containerDefinition, container} = await client.database(\"\").containers.create({id: \"\"});\n * ```\n */\n public readonly containers: Containers;\n /**\n * Used for creating new users, or querying/reading all users.\n *\n * Use `.user(id)` to read, replace, or delete a specific, existing {@link User} by id.\n */\n public readonly users: Users;\n\n /**\n * Returns a reference URL to the resource. Used for linking in Permissions.\n */\n public get url(): string {\n return createDatabaseUri(this.id);\n }\n\n /** Returns a new {@link Database} instance.\n *\n * Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself.\n */\n constructor(\n public readonly client: CosmosClient,\n public readonly id: string,\n private clientContext: ClientContext\n ) {\n this.containers = new Containers(this, this.clientContext);\n this.users = new Users(this, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link Database} by id.\n *\n * Use `.containers` creating new containers, or querying/reading all containers.\n *\n * @example Delete a container\n * ```typescript\n * await client.database(\"\").container(\"\").delete();\n * ```\n */\n public container(id: string): Container {\n return new Container(this, id, this.clientContext);\n }\n\n /**\n * Used to read, replace, or delete a specific, existing {@link User} by id.\n *\n * Use `.users` for creating new users, or querying/reading all users.\n */\n public user(id: string): User {\n return new User(this, id, this.clientContext);\n }\n\n /** Read the definition of the given Database. */\n public async read(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.read({\n path,\n resourceType: ResourceType.database,\n resourceId: id,\n options,\n });\n return new DatabaseResponse(response.result, response.headers, response.code, this);\n }\n\n /** Delete the given Database. */\n public async delete(options?: RequestOptions): Promise {\n const path = getPathFromLink(this.url);\n const id = getIdFromLink(this.url);\n const response = await this.clientContext.delete({\n path,\n resourceType: ResourceType.database,\n resourceId: id,\n options,\n });\n return new DatabaseResponse(response.result, response.headers, response.code, this);\n }\n\n /**\n * Gets offer on database. If none exists, returns an OfferResponse with undefined.\n */\n public async readOffer(options: RequestOptions = {}): Promise {\n const { resource: record } = await this.read();\n const path = \"/offers\";\n const url = record._self;\n const response = await this.clientContext.queryFeed({\n path,\n resourceId: \"\",\n resourceType: ResourceType.offer,\n query: `SELECT * from root where root.resource = \"${url}\"`,\n resultFn: (result) => result.Offers,\n options,\n });\n const offer = response.result[0]\n ? new Offer(this.client, response.result[0].id, this.clientContext)\n : undefined;\n return new OfferResponse(response.result[0], response.headers, response.code, offer);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ClientContext } from \"../../ClientContext\";\nimport { Constants, isResourceValid, ResourceType, StatusCodes } from \"../../common\";\nimport { CosmosClient } from \"../../CosmosClient\";\nimport { FetchFunctionCallback, mergeHeaders, SqlQuerySpec } from \"../../queryExecutionContext\";\nimport { QueryIterator } from \"../../queryIterator\";\nimport { FeedOptions, RequestOptions } from \"../../request\";\nimport { Resource } from \"../Resource\";\nimport { Database } from \"./Database\";\nimport { DatabaseDefinition } from \"./DatabaseDefinition\";\nimport { DatabaseRequest } from \"./DatabaseRequest\";\nimport { DatabaseResponse } from \"./DatabaseResponse\";\nimport { validateOffer } from \"../../utils/offers\";\n\n/**\n * Operations for creating new databases, and reading/querying all databases\n *\n * @see {@link Database} for reading or deleting an existing database; use `client.database(id)`.\n *\n * Note: all these operations make calls against a fixed budget.\n * You should design your system such that these calls scale sublinearly with your application.\n * For instance, do not call `databases.readAll()` before every single `item.read()` call, to ensure the database exists;\n * do this once on application start up.\n */\nexport class Databases {\n /**\n * @hidden\n * @param client - The parent {@link CosmosClient} for the Database.\n */\n constructor(\n public readonly client: CosmosClient,\n private readonly clientContext: ClientContext\n ) {}\n\n /**\n * Queries all databases.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time.\n * @example Read all databases to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @db\",\n * parameters: [\n * {name: \"@db\", value: \"Todo\"}\n * ]\n * };\n * const {body: databaseList} = await client.databases.query(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n /**\n * Queries all databases.\n * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time.\n * @example Read all databases to array.\n * ```typescript\n * const querySpec: SqlQuerySpec = {\n * query: \"SELECT * FROM root r WHERE r.id = @db\",\n * parameters: [\n * {name: \"@db\", value: \"Todo\"}\n * ]\n * };\n * const {body: databaseList} = await client.databases.query(querySpec).fetchAll();\n * ```\n */\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator;\n public query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator {\n const cb: FetchFunctionCallback = (innerOptions) => {\n return this.clientContext.queryFeed({\n path: \"/dbs\",\n resourceType: ResourceType.database,\n resourceId: \"\",\n resultFn: (result) => result.Databases,\n query,\n options: innerOptions,\n });\n };\n return new QueryIterator(this.clientContext, query, options, cb);\n }\n\n /**\n * Send a request for creating a database.\n *\n * A database manages users, permissions and a set of containers.\n * Each Azure Cosmos DB Database Account is able to support multiple independent named databases,\n * with the database being the logical container for data.\n *\n * Each Database consists of one or more containers, each of which in turn contain one or more\n * documents. Since databases are an administrative resource, the Service Master Key will be\n * required in order to access and successfully complete any action using the User APIs.\n *\n * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n */\n public async create(\n body: DatabaseRequest,\n options: RequestOptions = {}\n ): Promise {\n const err = {};\n if (!isResourceValid(body, err)) {\n throw err;\n }\n\n validateOffer(body);\n\n if (body.maxThroughput) {\n const autoscaleParams: {\n maxThroughput: number;\n autoUpgradePolicy?: {\n throughputPolicy: {\n incrementPercent: number;\n };\n };\n } = {\n maxThroughput: body.maxThroughput,\n };\n if (body.autoUpgradePolicy) {\n autoscaleParams.autoUpgradePolicy = body.autoUpgradePolicy;\n }\n const autoscaleHeaders = JSON.stringify(autoscaleParams);\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.AutoscaleSettings]: autoscaleHeaders,\n });\n delete body.maxThroughput;\n delete body.autoUpgradePolicy;\n }\n\n if (body.throughput) {\n options.initialHeaders = Object.assign({}, options.initialHeaders, {\n [Constants.HttpHeaders.OfferThroughput]: body.throughput,\n });\n delete body.throughput;\n }\n\n const path = \"/dbs\"; // TODO: constant\n const response = await this.clientContext.create({\n body,\n path,\n resourceType: ResourceType.database,\n resourceId: undefined,\n options,\n });\n const ref = new Database(this.client, body.id, this.clientContext);\n return new DatabaseResponse(response.result, response.headers, response.code, ref);\n }\n\n /**\n * Check if a database exists, and if it doesn't, create it.\n * This will make a read operation based on the id in the `body`, then if it is not found, a create operation.\n *\n * A database manages users, permissions and a set of containers.\n * Each Azure Cosmos DB Database Account is able to support multiple independent named databases,\n * with the database being the logical container for data.\n *\n * Each Database consists of one or more containers, each of which in turn contain one or more\n * documents. Since databases are an an administrative resource, the Service Master Key will be\n * required in order to access and successfully complete any action using the User APIs.\n *\n * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created.\n * @param options - Additional options for the request\n */\n public async createIfNotExists(\n body: DatabaseRequest,\n options?: RequestOptions\n ): Promise {\n if (!body || body.id === null || body.id === undefined) {\n throw new Error(\"body parameter must be an object with an id property\");\n }\n /*\n 1. Attempt to read the Database (based on an assumption that most databases will already exist, so its faster)\n 2. If it fails with NotFound error, attempt to create the db. Else, return the read results.\n */\n try {\n const readResponse = await this.client.database(body.id).read(options);\n return readResponse;\n } catch (err: any) {\n if (err.code === StatusCodes.NotFound) {\n const createResponse = await this.create(body, options);\n // Must merge the headers to capture RU costskaty\n mergeHeaders(createResponse.headers, err.headers);\n return createResponse;\n } else {\n throw err;\n }\n }\n }\n\n // TODO: DatabaseResponse for QueryIterator?\n /**\n * Reads all databases.\n * @param options - Use to set options like response page size, continuation tokens, etc.\n * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time.\n * @example Read all databases to array.\n * ```typescript\n * const {body: databaseList} = await client.databases.readAll().fetchAll();\n * ```\n */\n public readAll(options?: FeedOptions): QueryIterator {\n return this.query(undefined, options);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { RequestContext } from \"../request/RequestContext\";\nimport { Response } from \"../request/Response\";\n\n/**\n * Used to specify which type of events to execute this plug in on.\n *\n * @hidden\n */\nexport enum PluginOn {\n /**\n * Will be executed per network request\n */\n request = \"request\",\n /**\n * Will be executed per API operation\n */\n operation = \"operation\",\n}\n\n/**\n * Specifies which event to run for the specified plugin\n *\n * @hidden\n */\nexport interface PluginConfig {\n /**\n * The event to run the plugin on\n */\n on: keyof typeof PluginOn;\n /**\n * The plugin to run\n */\n plugin: Plugin;\n}\n\n/**\n * Plugins allow you to customize the behavior of the SDk with additional logging, retry, or additional functionality.\n *\n * A plugin is a function which returns a `Promise>`, and is passed a RequestContext and Next object.\n *\n * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins,\n * allowing you to log those results or handle errors.\n *\n * RequestContext is an object which controls what operation is happening, against which endpoint, and more. Modifying this and passing it along via next is how\n * you modify future SDK behavior.\n *\n * @hidden\n */\nexport type Plugin = (context: RequestContext, next: Next) => Promise>;\n\n/**\n * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins,\n * allowing you to log those results or handle errors.\n * @hidden\n */\nexport type Next = (context: RequestContext) => Promise>;\n\n/**\n * @internal\n */\nexport async function executePlugins(\n requestContext: RequestContext,\n next: Plugin,\n on: PluginOn\n): Promise> {\n if (!requestContext.plugins) {\n return next(requestContext, undefined);\n }\n let level = 0;\n const _: Next = (inner: RequestContext): Promise> => {\n if (++level >= inner.plugins.length) {\n return next(requestContext, undefined);\n } else if (inner.plugins[level].on !== on) {\n return _(requestContext);\n } else {\n return inner.plugins[level].plugin(inner, _);\n }\n };\n if (requestContext.plugins[level].on !== on) {\n return _(requestContext);\n } else {\n return requestContext.plugins[level].plugin(requestContext, _);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType } from \"../common\";\nimport { ErrorResponse } from \"../request\";\nimport { TimeoutErrorCode } from \"../request/TimeoutError\";\nimport { RetryPolicy } from \"./RetryPolicy\";\n\n/**\n * @hidden\n */\n// Windows Socket Error Codes\nconst WindowsInterruptedFunctionCall = 10004;\n/**\n * @hidden\n */\nconst WindowsFileHandleNotValid = 10009;\n/**\n * @hidden\n */\nconst WindowsPermissionDenied = 10013;\n/**\n * @hidden\n */\nconst WindowsBadAddress = 10014;\n/**\n * @hidden\n */\nconst WindowsInvalidArgumnet = 10022;\n/**\n * @hidden\n */\nconst WindowsResourceTemporarilyUnavailable = 10035;\n/**\n * @hidden\n */\nconst WindowsOperationNowInProgress = 10036;\n/**\n * @hidden\n */\nconst WindowsAddressAlreadyInUse = 10048;\n/**\n * @hidden\n */\nconst WindowsConnectionResetByPeer = 10054;\n/**\n * @hidden\n */\nconst WindowsCannotSendAfterSocketShutdown = 10058;\n/**\n * @hidden\n */\nconst WindowsConnectionTimedOut = 10060;\n/**\n * @hidden\n */\nconst WindowsConnectionRefused = 10061;\n/**\n * @hidden\n */\nconst WindowsNameTooLong = 10063;\n/**\n * @hidden\n */\nconst WindowsHostIsDown = 10064;\n/**\n * @hidden\n */\nconst WindowsNoRouteTohost = 10065;\n/**\n * @hidden\n */\n\n// Linux Error Codes\n/**\n * @hidden\n */\nconst LinuxConnectionReset = \"ECONNRESET\";\n\n// Node Error Codes\n/**\n * @hidden\n */\nconst BrokenPipe = \"EPIPE\";\n\n/**\n * @hidden\n */\nconst CONNECTION_ERROR_CODES = [\n WindowsInterruptedFunctionCall,\n WindowsFileHandleNotValid,\n WindowsPermissionDenied,\n WindowsBadAddress,\n WindowsInvalidArgumnet,\n WindowsResourceTemporarilyUnavailable,\n WindowsOperationNowInProgress,\n WindowsAddressAlreadyInUse,\n WindowsConnectionResetByPeer,\n WindowsCannotSendAfterSocketShutdown,\n WindowsConnectionTimedOut,\n WindowsConnectionRefused,\n WindowsNameTooLong,\n WindowsHostIsDown,\n WindowsNoRouteTohost,\n LinuxConnectionReset,\n TimeoutErrorCode,\n BrokenPipe,\n];\n\n/**\n * @hidden\n */\nfunction needsRetry(operationType: OperationType, code: number | string): boolean {\n if (\n (operationType === OperationType.Read || operationType === OperationType.Query) &&\n CONNECTION_ERROR_CODES.indexOf(code) !== -1\n ) {\n return true;\n } else {\n return false;\n }\n}\n\n/**\n * This class implements the default connection retry policy for requests.\n * @hidden\n */\nexport class DefaultRetryPolicy implements RetryPolicy {\n private maxTries: number = 10;\n private currentRetryAttemptCount: number = 0;\n public retryAfterInMs: number = 1000;\n\n constructor(private operationType: OperationType) {}\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n */\n public async shouldRetry(err: ErrorResponse): Promise {\n if (err) {\n if (\n this.currentRetryAttemptCount < this.maxTries &&\n needsRetry(this.operationType, err.code)\n ) {\n this.currentRetryAttemptCount++;\n return true;\n }\n }\n return false;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType } from \"../common\";\nimport { isReadRequest } from \"../common/helper\";\nimport { GlobalEndpointManager } from \"../globalEndpointManager\";\nimport { ErrorResponse } from \"../request\";\nimport { RetryContext } from \"./RetryContext\";\nimport { RetryPolicy } from \"./RetryPolicy\";\n\n/**\n * This class implements the retry policy for endpoint discovery.\n * @hidden\n */\nexport class EndpointDiscoveryRetryPolicy implements RetryPolicy {\n /** Current retry attempt count. */\n public currentRetryAttemptCount: number;\n /** Retry interval in milliseconds. */\n public retryAfterInMs: number;\n\n /** Max number of retry attempts to perform. */\n private maxTries: number;\n private static readonly maxTries = 120; // TODO: Constant?\n private static readonly retryAfterInMs = 1000;\n\n /**\n * @param globalEndpointManager - The GlobalEndpointManager instance.\n */\n constructor(\n private globalEndpointManager: GlobalEndpointManager,\n private operationType: OperationType\n ) {\n this.maxTries = EndpointDiscoveryRetryPolicy.maxTries;\n this.currentRetryAttemptCount = 0;\n this.retryAfterInMs = EndpointDiscoveryRetryPolicy.retryAfterInMs;\n }\n\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n */\n public async shouldRetry(\n err: ErrorResponse,\n retryContext?: RetryContext,\n locationEndpoint?: string\n ): Promise {\n if (!err) {\n return false;\n }\n\n if (!retryContext || !locationEndpoint) {\n return false;\n }\n\n if (!this.globalEndpointManager.enableEndpointDiscovery) {\n return false;\n }\n\n if (this.currentRetryAttemptCount >= this.maxTries) {\n return false;\n }\n\n this.currentRetryAttemptCount++;\n\n if (isReadRequest(this.operationType)) {\n await this.globalEndpointManager.markCurrentLocationUnavailableForRead(locationEndpoint);\n } else {\n await this.globalEndpointManager.markCurrentLocationUnavailableForWrite(locationEndpoint);\n }\n\n retryContext.retryCount = this.currentRetryAttemptCount;\n retryContext.clearSessionTokenNotAvailable = false;\n retryContext.retryRequestOnPreferredLocations = false;\n\n return true;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { ErrorResponse } from \"../request\";\n\n/**\n * This class implements the resource throttle retry policy for requests.\n * @hidden\n */\nexport class ResourceThrottleRetryPolicy {\n /** Current retry attempt count. */\n public currentRetryAttemptCount: number = 0;\n /** Cummulative wait time in milliseconds for a request while the retries are happening. */\n public cummulativeWaitTimeinMs: number = 0;\n /** Retry interval in milliseconds to wait before the next request will be sent. */\n public retryAfterInMs: number = 0;\n\n /** Max wait time in milliseconds to wait for a request while the retries are happening. */\n private timeoutInMs: number;\n /**\n * @param maxTries - Max number of retries to be performed for a request.\n * @param fixedRetryIntervalInMs - Fixed retry interval in milliseconds to wait between each\n * retry ignoring the retryAfter returned as part of the response.\n * @param timeoutInSeconds - Max wait time in seconds to wait for a request while the\n * retries are happening.\n */\n constructor(\n private maxTries: number = 9,\n private fixedRetryIntervalInMs: number = 0,\n timeoutInSeconds: number = 30\n ) {\n this.timeoutInMs = timeoutInSeconds * 1000;\n this.currentRetryAttemptCount = 0;\n this.cummulativeWaitTimeinMs = 0;\n }\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n */\n public async shouldRetry(err: ErrorResponse): Promise {\n // TODO: any custom error object\n if (err) {\n if (this.currentRetryAttemptCount < this.maxTries) {\n this.currentRetryAttemptCount++;\n this.retryAfterInMs = 0;\n\n if (this.fixedRetryIntervalInMs) {\n this.retryAfterInMs = this.fixedRetryIntervalInMs;\n } else if (err.retryAfterInMs) {\n this.retryAfterInMs = err.retryAfterInMs;\n }\n\n if (this.cummulativeWaitTimeinMs < this.timeoutInMs) {\n this.cummulativeWaitTimeinMs += this.retryAfterInMs;\n return true;\n }\n }\n }\n return false;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isReadRequest, OperationType, ResourceType } from \"../common\";\nimport { ConnectionPolicy } from \"../documents\";\nimport { GlobalEndpointManager } from \"../globalEndpointManager\";\nimport { ErrorResponse } from \"../request\";\nimport { RetryContext } from \"./RetryContext\";\nimport { RetryPolicy } from \"./RetryPolicy\";\n\n/**\n * This class implements the retry policy for session consistent reads.\n * @hidden\n */\nexport class SessionRetryPolicy implements RetryPolicy {\n /** Current retry attempt count. */\n public currentRetryAttemptCount = 0;\n /** Retry interval in milliseconds. */\n public retryAfterInMs = 0;\n\n /**\n * @param globalEndpointManager - The GlobalEndpointManager instance.\n */\n constructor(\n private globalEndpointManager: GlobalEndpointManager,\n private resourceType: ResourceType,\n private operationType: OperationType,\n private connectionPolicy: ConnectionPolicy\n ) {}\n\n /**\n * Determines whether the request should be retried or not.\n * @param err - Error returned by the request.\n * @param callback - The callback function which takes bool argument which specifies whether the request\n * will be retried or not.\n */\n public async shouldRetry(err: ErrorResponse, retryContext?: RetryContext): Promise {\n if (!err) {\n return false;\n }\n\n if (!retryContext) {\n return false;\n }\n\n if (!this.connectionPolicy.enableEndpointDiscovery) {\n return false;\n }\n\n if (\n this.globalEndpointManager.canUseMultipleWriteLocations(this.resourceType, this.operationType)\n ) {\n // If we can write to multiple locations, we should against every write endpoint until we succeed\n const endpoints = isReadRequest(this.operationType)\n ? await this.globalEndpointManager.getReadEndpoints()\n : await this.globalEndpointManager.getWriteEndpoints();\n if (this.currentRetryAttemptCount > endpoints.length) {\n return false;\n } else {\n this.currentRetryAttemptCount++;\n retryContext.retryCount++;\n retryContext.retryRequestOnPreferredLocations = this.currentRetryAttemptCount > 1;\n retryContext.clearSessionTokenNotAvailable =\n this.currentRetryAttemptCount === endpoints.length;\n return true;\n }\n } else {\n if (this.currentRetryAttemptCount > 1) {\n return false;\n } else {\n this.currentRetryAttemptCount++;\n retryContext.retryCount++;\n retryContext.retryRequestOnPreferredLocations = false; // Forces all operations to primary write endpoint\n retryContext.clearSessionTokenNotAvailable = true;\n return true;\n }\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Constants } from \"../common/constants\";\nimport { sleep } from \"../common/helper\";\nimport { StatusCodes, SubStatusCodes } from \"../common/statusCodes\";\nimport { Response } from \"../request\";\nimport { RequestContext } from \"../request/RequestContext\";\nimport { DefaultRetryPolicy } from \"./defaultRetryPolicy\";\nimport { EndpointDiscoveryRetryPolicy } from \"./endpointDiscoveryRetryPolicy\";\nimport { ResourceThrottleRetryPolicy } from \"./resourceThrottleRetryPolicy\";\nimport { RetryContext } from \"./RetryContext\";\nimport { RetryPolicy } from \"./RetryPolicy\";\nimport { SessionRetryPolicy } from \"./sessionRetryPolicy\";\n\n/**\n * @hidden\n */\ninterface ExecuteArgs {\n retryContext?: RetryContext;\n retryPolicies?: RetryPolicies;\n requestContext: RequestContext;\n executeRequest: (requestContext: RequestContext) => Promise>;\n}\n\n/**\n * @hidden\n */\ninterface RetryPolicies {\n endpointDiscoveryRetryPolicy: EndpointDiscoveryRetryPolicy;\n resourceThrottleRetryPolicy: ResourceThrottleRetryPolicy;\n sessionReadRetryPolicy: SessionRetryPolicy;\n defaultRetryPolicy: DefaultRetryPolicy;\n}\n\n/**\n * @hidden\n */\nexport async function execute({\n retryContext = { retryCount: 0 },\n retryPolicies,\n requestContext,\n executeRequest,\n}: ExecuteArgs): Promise> {\n // TODO: any response\n if (!retryPolicies) {\n retryPolicies = {\n endpointDiscoveryRetryPolicy: new EndpointDiscoveryRetryPolicy(\n requestContext.globalEndpointManager,\n requestContext.operationType\n ),\n resourceThrottleRetryPolicy: new ResourceThrottleRetryPolicy(\n requestContext.connectionPolicy.retryOptions.maxRetryAttemptCount,\n requestContext.connectionPolicy.retryOptions.fixedRetryIntervalInMilliseconds,\n requestContext.connectionPolicy.retryOptions.maxWaitTimeInSeconds\n ),\n sessionReadRetryPolicy: new SessionRetryPolicy(\n requestContext.globalEndpointManager,\n requestContext.resourceType,\n requestContext.operationType,\n requestContext.connectionPolicy\n ),\n defaultRetryPolicy: new DefaultRetryPolicy(requestContext.operationType),\n };\n }\n if (retryContext && retryContext.clearSessionTokenNotAvailable) {\n requestContext.client.clearSessionToken(requestContext.path);\n delete requestContext.headers[\"x-ms-session-token\"];\n }\n requestContext.endpoint = await requestContext.globalEndpointManager.resolveServiceEndpoint(\n requestContext.resourceType,\n requestContext.operationType\n );\n try {\n const response = await executeRequest(requestContext);\n response.headers[Constants.ThrottleRetryCount] =\n retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount;\n response.headers[Constants.ThrottleRetryWaitTimeInMs] =\n retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs;\n return response;\n } catch (err: any) {\n // TODO: any error\n let retryPolicy: RetryPolicy = null;\n const headers = err.headers || {};\n if (\n err.code === StatusCodes.ENOTFOUND ||\n err.code === \"REQUEST_SEND_ERROR\" ||\n (err.code === StatusCodes.Forbidden &&\n (err.substatus === SubStatusCodes.DatabaseAccountNotFound ||\n err.substatus === SubStatusCodes.WriteForbidden))\n ) {\n retryPolicy = retryPolicies.endpointDiscoveryRetryPolicy;\n } else if (err.code === StatusCodes.TooManyRequests) {\n retryPolicy = retryPolicies.resourceThrottleRetryPolicy;\n } else if (\n err.code === StatusCodes.NotFound &&\n err.substatus === SubStatusCodes.ReadSessionNotAvailable\n ) {\n retryPolicy = retryPolicies.sessionReadRetryPolicy;\n } else {\n retryPolicy = retryPolicies.defaultRetryPolicy;\n }\n const results = await retryPolicy.shouldRetry(err, retryContext, requestContext.endpoint);\n if (!results) {\n headers[Constants.ThrottleRetryCount] =\n retryPolicies.resourceThrottleRetryPolicy.currentRetryAttemptCount;\n headers[Constants.ThrottleRetryWaitTimeInMs] =\n retryPolicies.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs;\n err.headers = { ...err.headers, ...headers };\n throw err;\n } else {\n requestContext.retryCount++;\n const newUrl = (results as any)[1]; // TODO: any hack\n if (newUrl !== undefined) {\n requestContext.endpoint = newUrl;\n }\n await sleep(retryPolicy.retryAfterInMs);\n return execute({\n executeRequest,\n requestContext,\n retryContext,\n retryPolicies,\n });\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Agent } from \"http\";\n\n/**\n * @hidden\n */\nexport let defaultHttpsAgent: Agent;\n\nconst https = require(\"https\"); // eslint-disable-line @typescript-eslint/no-require-imports\nconst tls = require(\"tls\"); // eslint-disable-line @typescript-eslint/no-require-imports\n\n// minVersion only available in Node 10+\nif (tls.DEFAULT_MIN_VERSION) {\n defaultHttpsAgent = new https.Agent({\n keepAlive: true,\n minVersion: \"TLSv1.2\",\n });\n} else {\n // Remove when Node 8 support has been dropped\n defaultHttpsAgent = new https.Agent({\n keepAlive: true,\n secureProtocol: \"TLSv1_2_method\",\n });\n}\nconst http = require(\"http\"); // eslint-disable-line @typescript-eslint/no-require-imports\n/**\n * @internal\n */\nexport const defaultHttpAgent: Agent = new http.Agent({\n keepAlive: true,\n});\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient, createDefaultHttpClient } from \"@azure/core-rest-pipeline\";\n\nlet cachedHttpClient: HttpClient | undefined;\n\nexport function getCachedDefaultHttpClient(): HttpClient {\n if (!cachedHttpClient) {\n cachedHttpClient = createDefaultHttpClient();\n }\n\n return cachedHttpClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortController } from \"node-abort-controller\";\nimport {\n createPipelineRequest,\n createHttpHeaders,\n PipelineResponse,\n} from \"@azure/core-rest-pipeline\";\nimport { trimSlashes } from \"../common\";\nimport { Constants } from \"../common/constants\";\nimport { executePlugins, PluginOn } from \"../plugins/Plugin\";\nimport * as RetryUtility from \"../retry/retryUtility\";\nimport { defaultHttpAgent, defaultHttpsAgent } from \"./defaultAgent\";\nimport { ErrorResponse } from \"./ErrorResponse\";\nimport { bodyFromData } from \"./request\";\nimport { RequestContext } from \"./RequestContext\";\nimport { Response as CosmosResponse } from \"./Response\";\nimport { TimeoutError } from \"./TimeoutError\";\nimport { getCachedDefaultHttpClient } from \"../utils/cachedClient\";\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\n\nconst logger: AzureLogger = createClientLogger(\"RequestHandler\");\n\nasync function executeRequest(requestContext: RequestContext): Promise> {\n return executePlugins(requestContext, httpRequest, PluginOn.request);\n}\n\n/**\n * @hidden\n */\nasync function httpRequest(requestContext: RequestContext): Promise<{\n headers: any;\n result: any;\n code: number;\n substatus: number;\n}> {\n const controller = new AbortController();\n const signal = controller.signal;\n\n // Wrap users passed abort events and call our own internal abort()\n const userSignal = requestContext.options && requestContext.options.abortSignal;\n if (userSignal) {\n if (userSignal.aborted) {\n controller.abort();\n } else {\n userSignal.addEventListener(\"abort\", () => {\n controller.abort();\n });\n }\n }\n\n const timeout = setTimeout(() => {\n controller.abort();\n }, requestContext.connectionPolicy.requestTimeout);\n\n let response: PipelineResponse;\n\n if (requestContext.body) {\n requestContext.body = bodyFromData(requestContext.body);\n }\n\n const httpsClient = getCachedDefaultHttpClient();\n const url = trimSlashes(requestContext.endpoint) + requestContext.path;\n const reqHeaders = createHttpHeaders(requestContext.headers as any);\n const pipelineRequest = createPipelineRequest({\n url,\n headers: reqHeaders,\n method: requestContext.method,\n abortSignal: signal,\n body: requestContext.body,\n });\n if (requestContext.requestAgent) {\n pipelineRequest.agent = requestContext.requestAgent;\n } else {\n const parsedUrl = new URL(url);\n pipelineRequest.agent = parsedUrl.protocol === \"http\" ? defaultHttpAgent : defaultHttpsAgent;\n }\n\n try {\n if (requestContext.pipeline) {\n response = await requestContext.pipeline.sendRequest(httpsClient, pipelineRequest);\n } else {\n response = await httpsClient.sendRequest(pipelineRequest);\n }\n } catch (error: any) {\n if (error.name === \"AbortError\") {\n // If the user passed signal caused the abort, cancel the timeout and rethrow the error\n if (userSignal && userSignal.aborted === true) {\n clearTimeout(timeout);\n throw error;\n }\n // If the user didn't cancel, it must be an abort we called due to timeout\n throw new TimeoutError(\n `Timeout Error! Request took more than ${requestContext.connectionPolicy.requestTimeout} ms`\n );\n }\n throw error;\n }\n\n clearTimeout(timeout);\n const result =\n response.status === 204 || response.status === 304 || response.bodyAsText === \"\"\n ? null\n : JSON.parse(response.bodyAsText);\n const headers = response.headers.toJSON();\n\n const substatus = headers[Constants.HttpHeaders.SubStatus]\n ? parseInt(headers[Constants.HttpHeaders.SubStatus], 10)\n : undefined;\n\n if (response.status >= 400) {\n const errorResponse: ErrorResponse = new ErrorResponse(result.message);\n\n logger.warning(\n response.status +\n \" \" +\n requestContext.endpoint +\n \" \" +\n requestContext.path +\n \" \" +\n result.message\n );\n\n errorResponse.code = response.status;\n errorResponse.body = result;\n errorResponse.headers = headers;\n\n if (Constants.HttpHeaders.ActivityId in headers) {\n errorResponse.activityId = headers[Constants.HttpHeaders.ActivityId];\n }\n\n if (Constants.HttpHeaders.SubStatus in headers) {\n errorResponse.substatus = substatus;\n }\n\n if (Constants.HttpHeaders.RetryAfterInMs in headers) {\n errorResponse.retryAfterInMs = parseInt(headers[Constants.HttpHeaders.RetryAfterInMs], 10);\n Object.defineProperty(errorResponse, \"retryAfterInMilliseconds\", {\n get: () => {\n return errorResponse.retryAfterInMs;\n },\n });\n }\n\n throw errorResponse;\n }\n return {\n headers,\n result,\n code: response.status,\n substatus,\n };\n}\n\n/**\n * @hidden\n */\nasync function request(requestContext: RequestContext): Promise> {\n if (requestContext.body) {\n requestContext.body = bodyFromData(requestContext.body);\n if (!requestContext.body) {\n throw new Error(\"parameter data must be a javascript object, string, or Buffer\");\n }\n }\n\n return RetryUtility.execute({\n requestContext,\n executeRequest,\n });\n}\n\nexport const RequestHandler = {\n request,\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport default function atob(str: string): string {\n return Buffer.from(str, \"base64\").toString(\"binary\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Models vector clock bases session token. Session token has the following format:\n * `{Version}#{GlobalLSN}#{RegionId1}={LocalLsn1}#{RegionId2}={LocalLsn2}....#{RegionIdN}={LocalLsnN}`\n * 'Version' captures the configuration number of the partition which returned this session token.\n * 'Version' is incremented everytime topology of the partition is updated (say due to Add/Remove/Failover).\n *\n * The choice of separators '#' and '=' is important. Separators ';' and ',' are used to delimit\n * per-partitionKeyRange session token\n * @hidden\n *\n */\nexport class VectorSessionToken {\n private static readonly SEGMENT_SEPARATOR = \"#\";\n private static readonly REGION_PROGRESS_SEPARATOR = \"=\";\n\n constructor(\n private readonly version: number,\n private readonly globalLsn: number,\n private readonly localLsnByregion: Map,\n private readonly sessionToken?: string\n ) {\n if (!this.sessionToken) {\n const regionAndLocalLsn = [];\n for (const [key, value] of this.localLsnByregion.entries()) {\n regionAndLocalLsn.push(`${key}${VectorSessionToken.REGION_PROGRESS_SEPARATOR}${value}`);\n }\n const regionProgress = regionAndLocalLsn.join(VectorSessionToken.SEGMENT_SEPARATOR);\n if (regionProgress === \"\") {\n this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}`;\n } else {\n this.sessionToken = `${this.version}${VectorSessionToken.SEGMENT_SEPARATOR}${this.globalLsn}${VectorSessionToken.SEGMENT_SEPARATOR}${regionProgress}`;\n }\n }\n }\n\n public static create(sessionToken: string): VectorSessionToken | null {\n const [versionStr, globalLsnStr, ...regionSegments] = sessionToken.split(\n VectorSessionToken.SEGMENT_SEPARATOR\n );\n\n const version = parseInt(versionStr, 10);\n const globalLsn = parseFloat(globalLsnStr);\n\n if (typeof version !== \"number\" || typeof globalLsn !== \"number\") {\n return null;\n }\n\n const lsnByRegion = new Map();\n for (const regionSegment of regionSegments) {\n const [regionIdStr, localLsnStr] = regionSegment.split(\n VectorSessionToken.REGION_PROGRESS_SEPARATOR\n );\n\n if (!regionIdStr || !localLsnStr) {\n return null;\n }\n\n const regionId = parseInt(regionIdStr, 10);\n let localLsn: string;\n try {\n localLsn = localLsnStr;\n } catch (err: any) {\n // TODO: log error\n return null;\n }\n if (typeof regionId !== \"number\") {\n return null;\n }\n\n lsnByRegion.set(regionId, localLsn);\n }\n\n return new VectorSessionToken(version, globalLsn, lsnByRegion, sessionToken);\n }\n\n public equals(other: VectorSessionToken): boolean {\n return !other\n ? false\n : this.version === other.version &&\n this.globalLsn === other.globalLsn &&\n this.areRegionProgressEqual(other.localLsnByregion);\n }\n\n public merge(other: VectorSessionToken): VectorSessionToken {\n if (other == null) {\n throw new Error(\"other (Vector Session Token) must not be null\");\n }\n\n if (\n this.version === other.version &&\n this.localLsnByregion.size !== other.localLsnByregion.size\n ) {\n throw new Error(\n `Compared session tokens ${this.sessionToken} and ${other.sessionToken} have unexpected regions`\n );\n }\n\n const [higherVersionSessionToken, lowerVersionSessionToken]: [\n VectorSessionToken,\n VectorSessionToken\n ] = this.version < other.version ? [other, this] : [this, other];\n\n const highestLocalLsnByRegion = new Map();\n\n for (const [regionId, highLocalLsn] of higherVersionSessionToken.localLsnByregion.entries()) {\n const lowLocalLsn = lowerVersionSessionToken.localLsnByregion.get(regionId);\n if (lowLocalLsn) {\n highestLocalLsnByRegion.set(regionId, max(highLocalLsn, lowLocalLsn));\n } else if (this.version === other.version) {\n throw new Error(\n `Compared session tokens have unexpected regions. Session 1: ${this.sessionToken} - Session 2: ${this.sessionToken}`\n );\n } else {\n highestLocalLsnByRegion.set(regionId, highLocalLsn);\n }\n }\n\n return new VectorSessionToken(\n Math.max(this.version, other.version),\n Math.max(this.globalLsn, other.globalLsn),\n highestLocalLsnByRegion\n );\n }\n\n public toString(): string | undefined {\n return this.sessionToken;\n }\n\n private areRegionProgressEqual(other: Map): boolean {\n if (this.localLsnByregion.size !== other.size) {\n return false;\n }\n\n for (const [regionId, localLsn] of this.localLsnByregion.entries()) {\n const otherLocalLsn = other.get(regionId);\n\n if (localLsn !== otherLocalLsn) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * @hidden\n */\nfunction max(int1: string, int2: string): string {\n // NOTE: This only works for positive numbers\n if (int1.length === int2.length) {\n return int1 > int2 ? int1 : int2;\n } else if (int1.length > int2.length) {\n return int1;\n } else {\n return int2;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport atob from \"../utils/atob\";\nimport { Constants, getContainerLink, OperationType, ResourceType, trimSlashes } from \"../common\";\nimport { CosmosHeaders } from \"../queryExecutionContext\";\nimport { SessionContext } from \"./SessionContext\";\nimport { VectorSessionToken } from \"./VectorSessionToken\";\n\n/** @hidden */\nexport class SessionContainer {\n private static readonly EMPTY_SESSION_TOKEN = \"\";\n private static readonly SESSION_TOKEN_SEPARATOR = \",\";\n private static readonly SESSION_TOKEN_PARTITION_SPLITTER = \":\";\n constructor(\n private collectionNameToCollectionResourceId = new Map(),\n private collectionResourceIdToSessionTokens = new Map>()\n ) {}\n\n public get(request: SessionContext): string {\n if (!request) {\n throw new Error(\"request cannot be null\");\n }\n const collectionName = getContainerLink(trimSlashes(request.resourceAddress));\n const rangeIdToTokenMap = this.getPartitionKeyRangeIdToTokenMap(collectionName);\n return SessionContainer.getCombinedSessionTokenString(rangeIdToTokenMap);\n }\n\n public remove(request: SessionContext): void {\n let collectionResourceId: string;\n const resourceAddress = trimSlashes(request.resourceAddress);\n const collectionName = getContainerLink(resourceAddress);\n if (collectionName) {\n collectionResourceId = this.collectionNameToCollectionResourceId.get(collectionName);\n this.collectionNameToCollectionResourceId.delete(collectionName);\n }\n if (collectionResourceId !== undefined) {\n this.collectionResourceIdToSessionTokens.delete(collectionResourceId);\n }\n }\n\n public set(request: SessionContext, resHeaders: CosmosHeaders): void {\n // TODO: we check the master logic a few different places. Might not need it.\n if (\n !resHeaders ||\n SessionContainer.isReadingFromMaster(request.resourceType, request.operationType)\n ) {\n return;\n }\n\n const sessionTokenString = resHeaders[Constants.HttpHeaders.SessionToken];\n if (!sessionTokenString) {\n return;\n }\n\n const containerName = this.getContainerName(request, resHeaders);\n\n const ownerId = !request.isNameBased\n ? request.resourceId\n : resHeaders[Constants.HttpHeaders.OwnerId] || request.resourceId;\n\n if (!ownerId) {\n return;\n }\n\n if (containerName && this.validateOwnerID(ownerId)) {\n if (!this.collectionResourceIdToSessionTokens.has(ownerId)) {\n this.collectionResourceIdToSessionTokens.set(ownerId, new Map());\n }\n\n if (!this.collectionNameToCollectionResourceId.has(containerName)) {\n this.collectionNameToCollectionResourceId.set(containerName, ownerId);\n }\n\n const containerSessionContainer = this.collectionResourceIdToSessionTokens.get(ownerId);\n SessionContainer.compareAndSetToken(sessionTokenString, containerSessionContainer);\n }\n }\n\n private validateOwnerID(ownerId: string): boolean {\n // If ownerId contains exactly 8 bytes it represents a unique database+collection identifier. Otherwise it represents another resource\n // The first 4 bytes are the database. The last 4 bytes are the collection.\n // Cosmos rids potentially contain \"-\" which is an invalid character in the browser atob implementation\n // See https://en.wikipedia.org/wiki/Base64#Filenames\n return atob(ownerId.replace(/-/g, \"/\")).length === 8;\n }\n\n private getPartitionKeyRangeIdToTokenMap(\n collectionName: string\n ): Map {\n let rangeIdToTokenMap: Map = null;\n if (collectionName && this.collectionNameToCollectionResourceId.has(collectionName)) {\n rangeIdToTokenMap = this.collectionResourceIdToSessionTokens.get(\n this.collectionNameToCollectionResourceId.get(collectionName)\n );\n }\n\n return rangeIdToTokenMap;\n }\n\n private static getCombinedSessionTokenString(tokens: Map): string {\n if (!tokens || tokens.size === 0) {\n return SessionContainer.EMPTY_SESSION_TOKEN;\n }\n\n let result = \"\";\n for (const [range, token] of tokens.entries()) {\n result +=\n range +\n SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER +\n token.toString() +\n SessionContainer.SESSION_TOKEN_SEPARATOR;\n }\n return result.slice(0, -1);\n }\n\n private static compareAndSetToken(\n newTokenString: string,\n containerSessionTokens: Map\n ): void {\n if (!newTokenString) {\n return;\n }\n\n const partitionsParts = newTokenString.split(SessionContainer.SESSION_TOKEN_SEPARATOR);\n for (const partitionPart of partitionsParts) {\n const newTokenParts = partitionPart.split(SessionContainer.SESSION_TOKEN_PARTITION_SPLITTER);\n if (newTokenParts.length !== 2) {\n return;\n }\n\n const range = newTokenParts[0];\n const newToken = VectorSessionToken.create(newTokenParts[1]);\n const tokenForRange = !containerSessionTokens.get(range)\n ? newToken\n : containerSessionTokens.get(range).merge(newToken);\n containerSessionTokens.set(range, tokenForRange);\n }\n }\n\n // TODO: have a assert if the type doesn't mastch known types\n private static isReadingFromMaster(\n resourceType: ResourceType,\n operationType: OperationType\n ): boolean {\n if (\n resourceType === Constants.Path.OffersPathSegment ||\n resourceType === Constants.Path.DatabasesPathSegment ||\n resourceType === Constants.Path.UsersPathSegment ||\n resourceType === Constants.Path.PermissionsPathSegment ||\n resourceType === Constants.Path.TopologyPathSegment ||\n resourceType === Constants.Path.DatabaseAccountPathSegment ||\n resourceType === Constants.Path.PartitionKeyRangesPathSegment ||\n (resourceType === Constants.Path.CollectionsPathSegment &&\n operationType === OperationType.Query)\n ) {\n return true;\n }\n\n return false;\n }\n\n private getContainerName(request: SessionContext, headers: CosmosHeaders): string {\n let ownerFullName = headers[Constants.HttpHeaders.OwnerFullName];\n if (!ownerFullName) {\n ownerFullName = trimSlashes(request.resourceAddress);\n }\n\n return getContainerLink(ownerFullName as string);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport function checkURL(testString: string): URL {\n return new URL(testString);\n}\n\nexport function sanitizeEndpoint(url: string): string {\n return new URL(url).href.replace(/\\/$/, \"\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { v4 } from \"uuid\";\nconst uuid = v4;\nimport {\n Pipeline,\n bearerTokenAuthenticationPolicy,\n createEmptyPipeline,\n} from \"@azure/core-rest-pipeline\";\nimport { PartitionKeyRange } from \"./client/Container/PartitionKeyRange\";\nimport { Resource } from \"./client/Resource\";\nimport { Constants, HTTPMethod, OperationType, ResourceType } from \"./common/constants\";\nimport { getIdFromLink, getPathFromLink, parseLink } from \"./common/helper\";\nimport { StatusCodes, SubStatusCodes } from \"./common/statusCodes\";\nimport { Agent, CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { ConnectionPolicy, ConsistencyLevel, DatabaseAccount, PartitionKey } from \"./documents\";\nimport { GlobalEndpointManager } from \"./globalEndpointManager\";\nimport { PluginConfig, PluginOn, executePlugins } from \"./plugins/Plugin\";\nimport { FetchFunctionCallback, SqlQuerySpec } from \"./queryExecutionContext\";\nimport { CosmosHeaders } from \"./queryExecutionContext/CosmosHeaders\";\nimport { QueryIterator } from \"./queryIterator\";\nimport { ErrorResponse } from \"./request\";\nimport { FeedOptions, RequestOptions, Response } from \"./request\";\nimport { PartitionedQueryExecutionInfo } from \"./request/ErrorResponse\";\nimport { getHeaders } from \"./request/request\";\nimport { RequestContext } from \"./request/RequestContext\";\nimport { RequestHandler } from \"./request/RequestHandler\";\nimport { SessionContainer } from \"./session/sessionContainer\";\nimport { SessionContext } from \"./session/SessionContext\";\nimport { BulkOptions } from \"./utils/batch\";\nimport { sanitizeEndpoint } from \"./utils/checkURL\";\nimport { AzureLogger, createClientLogger } from \"@azure/logger\";\n\nconst logger: AzureLogger = createClientLogger(\"ClientContext\");\n\nconst QueryJsonContentType = \"application/query+json\";\n\n/**\n * @hidden\n * @hidden\n */\nexport class ClientContext {\n private readonly sessionContainer: SessionContainer;\n private connectionPolicy: ConnectionPolicy;\n private pipeline: Pipeline;\n public partitionKeyDefinitionCache: { [containerUrl: string]: any }; // TODO: PartitionKeyDefinitionCache\n public constructor(\n private cosmosClientOptions: CosmosClientOptions,\n private globalEndpointManager: GlobalEndpointManager\n ) {\n this.connectionPolicy = cosmosClientOptions.connectionPolicy;\n this.sessionContainer = new SessionContainer();\n this.partitionKeyDefinitionCache = {};\n this.pipeline = null;\n if (cosmosClientOptions.aadCredentials) {\n this.pipeline = createEmptyPipeline();\n const hrefEndpoint = sanitizeEndpoint(cosmosClientOptions.endpoint);\n const scope = `${hrefEndpoint}/.default`;\n this.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential: cosmosClientOptions.aadCredentials,\n scopes: scope,\n challengeCallbacks: {\n async authorizeRequest({ request, getAccessToken }) {\n const tokenResponse = await getAccessToken([scope], {});\n const AUTH_PREFIX = `type=aad&ver=1.0&sig=`;\n const authorizationToken = `${AUTH_PREFIX}${tokenResponse.token}`;\n request.headers.set(\"Authorization\", authorizationToken);\n },\n },\n })\n );\n }\n }\n /** @hidden */\n public async read({\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.get,\n path,\n operationType: OperationType.Read,\n resourceId,\n options,\n resourceType,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n\n // read will use ReadEndpoint since it uses GET operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Read, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async queryFeed({\n path,\n resourceType,\n resourceId,\n resultFn,\n query,\n options,\n partitionKeyRangeId,\n partitionKey,\n }: {\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n resultFn: (result: { [key: string]: any }) => any[];\n query: SqlQuerySpec | string;\n options: FeedOptions;\n partitionKeyRangeId?: string;\n partitionKey?: PartitionKey;\n }): Promise> {\n // Query operations will use ReadEndpoint even though it uses\n // GET(for queryFeed) and POST(for regular query operations)\n\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.get,\n path,\n operationType: OperationType.Query,\n partitionKeyRangeId,\n resourceId,\n resourceType,\n options,\n body: query,\n partitionKey,\n };\n const requestId = uuid();\n if (query !== undefined) {\n request.method = HTTPMethod.post;\n }\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n request.headers = await this.buildHeaders(request);\n if (query !== undefined) {\n request.headers[Constants.HttpHeaders.IsQuery] = \"true\";\n request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType;\n if (typeof query === \"string\") {\n request.body = { query }; // Converts query text to query object.\n }\n }\n this.applySessionToken(request);\n logger.info(\n \"query \" +\n requestId +\n \" started\" +\n (request.partitionKeyRangeId ? \" pkrid: \" + request.partitionKeyRangeId : \"\")\n );\n logger.verbose(request);\n const start = Date.now();\n const response = await RequestHandler.request(request);\n logger.info(\"query \" + requestId + \" finished - \" + (Date.now() - start) + \"ms\");\n this.captureSessionToken(undefined, path, OperationType.Query, response.headers);\n return this.processQueryFeedResponse(response, !!query, resultFn);\n }\n\n public async getQueryPlan(\n path: string,\n resourceType: ResourceType,\n resourceId: string,\n query: SqlQuerySpec | string,\n options: FeedOptions = {}\n ): Promise> {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n path,\n operationType: OperationType.Read,\n resourceId,\n resourceType,\n options,\n body: query,\n };\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsQueryPlan] = \"True\";\n request.headers[Constants.HttpHeaders.QueryVersion] = \"1.4\";\n request.headers[Constants.HttpHeaders.SupportedQueryFeatures] =\n \"NonValueAggregate, Aggregate, Distinct, MultipleOrderBy, OffsetAndLimit, OrderBy, Top, CompositeAggregate, GroupBy, MultipleAggregates\";\n request.headers[Constants.HttpHeaders.ContentType] = QueryJsonContentType;\n if (typeof query === \"string\") {\n request.body = { query }; // Converts query text to query object.\n }\n\n this.applySessionToken(request);\n const response = await RequestHandler.request(request);\n this.captureSessionToken(undefined, path, OperationType.Query, response.headers);\n return response as any;\n }\n\n public queryPartitionKeyRanges(\n collectionLink: string,\n query?: string | SqlQuerySpec,\n options?: FeedOptions\n ): QueryIterator {\n const path = getPathFromLink(collectionLink, ResourceType.pkranges);\n const id = getIdFromLink(collectionLink);\n const cb: FetchFunctionCallback = (innerOptions) => {\n return this.queryFeed({\n path,\n resourceType: ResourceType.pkranges,\n resourceId: id,\n resultFn: (result) => result.PartitionKeyRanges,\n query,\n options: innerOptions,\n });\n };\n return new QueryIterator(this, query, options, cb);\n }\n\n public async delete({\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n method = HTTPMethod.delete,\n }: {\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n method?: HTTPMethod;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: method,\n operationType: OperationType.Delete,\n path,\n resourceType,\n options,\n resourceId,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n // deleteResource will use WriteEndpoint since it uses DELETE operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n if (parseLink(path).type !== \"colls\") {\n this.captureSessionToken(undefined, path, OperationType.Delete, response.headers);\n } else {\n this.clearSessionToken(path);\n }\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async patch({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: any;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.patch,\n operationType: OperationType.Patch,\n path,\n resourceType,\n body,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n\n // patch will use WriteEndpoint\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Patch, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async create({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: T;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Create,\n path,\n resourceType,\n resourceId,\n body,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n // create will use WriteEndpoint since it uses POST operation\n this.applySessionToken(request);\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Create, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n private processQueryFeedResponse(\n res: Response,\n isQuery: boolean,\n resultFn: (result: { [key: string]: any }) => any[]\n ): Response {\n if (isQuery) {\n return { result: resultFn(res.result), headers: res.headers, code: res.code };\n } else {\n const newResult = resultFn(res.result).map((body: any) => body);\n return { result: newResult, headers: res.headers, code: res.code };\n }\n }\n\n private applySessionToken(requestContext: RequestContext): void {\n const request = this.getSessionParams(requestContext.path);\n\n if (requestContext.headers && requestContext.headers[Constants.HttpHeaders.SessionToken]) {\n return;\n }\n\n const sessionConsistency: ConsistencyLevel = requestContext.headers[\n Constants.HttpHeaders.ConsistencyLevel\n ] as ConsistencyLevel;\n if (!sessionConsistency) {\n return;\n }\n\n if (sessionConsistency !== ConsistencyLevel.Session) {\n return;\n }\n\n if (request.resourceAddress) {\n const sessionToken = this.sessionContainer.get(request);\n if (sessionToken) {\n requestContext.headers[Constants.HttpHeaders.SessionToken] = sessionToken;\n }\n }\n }\n\n public async replace({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: any;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.put,\n operationType: OperationType.Replace,\n path,\n resourceType,\n body,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n this.applySessionToken(request);\n\n // replace will use WriteEndpoint since it uses PUT operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Replace, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async upsert({\n body,\n path,\n resourceType,\n resourceId,\n options = {},\n partitionKey,\n }: {\n body: T;\n path: string;\n resourceType: ResourceType;\n resourceId: string;\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Upsert,\n path,\n resourceType,\n body,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsUpsert] = true;\n this.applySessionToken(request);\n\n // upsert will use WriteEndpoint since it uses POST operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Upsert, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async execute({\n sprocLink,\n params,\n options = {},\n partitionKey,\n }: {\n sprocLink: string;\n params?: any[];\n options?: RequestOptions;\n partitionKey?: PartitionKey;\n }): Promise> {\n // Accept a single parameter or an array of parameters.\n // Didn't add type annotation for this because we should legacy this behavior\n if (params !== null && params !== undefined && !Array.isArray(params)) {\n params = [params];\n }\n const path = getPathFromLink(sprocLink);\n const id = getIdFromLink(sprocLink);\n\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Execute,\n path,\n resourceType: ResourceType.sproc,\n options,\n resourceId: id,\n body: params,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n // executeStoredProcedure will use WriteEndpoint since it uses POST operation\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n return executePlugins(request, RequestHandler.request, PluginOn.operation);\n }\n\n /**\n * Gets the Database account information.\n * @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved.\n * If not present, current client's url will be used.\n */\n public async getDatabaseAccount(\n options: RequestOptions = {}\n ): Promise> {\n const endpoint = options.urlConnection || this.cosmosClientOptions.endpoint;\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n endpoint,\n method: HTTPMethod.get,\n operationType: OperationType.Read,\n path: \"\",\n resourceType: ResourceType.none,\n options,\n };\n\n request.headers = await this.buildHeaders(request);\n // await options.beforeOperation({ endpoint, request, headers: requestHeaders });\n const { result, headers } = await executePlugins(\n request,\n RequestHandler.request,\n PluginOn.operation\n );\n\n const databaseAccount = new DatabaseAccount(result, headers);\n\n return { result: databaseAccount, headers };\n }\n\n public getWriteEndpoint(): Promise {\n return this.globalEndpointManager.getWriteEndpoint();\n }\n\n public getReadEndpoint(): Promise {\n return this.globalEndpointManager.getReadEndpoint();\n }\n\n public getWriteEndpoints(): Promise {\n return this.globalEndpointManager.getWriteEndpoints();\n }\n\n public getReadEndpoints(): Promise {\n return this.globalEndpointManager.getReadEndpoints();\n }\n\n public async batch({\n body,\n path,\n partitionKey,\n resourceId,\n options = {},\n }: {\n body: T;\n path: string;\n partitionKey: string;\n resourceId: string;\n options?: RequestOptions;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Batch,\n path,\n body,\n resourceType: ResourceType.item,\n resourceId,\n options,\n partitionKey,\n };\n\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsBatchRequest] = true;\n request.headers[Constants.HttpHeaders.IsBatchAtomic] = true;\n\n this.applySessionToken(request);\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Batch, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n public async bulk({\n body,\n path,\n partitionKeyRangeId,\n resourceId,\n bulkOptions = {},\n options = {},\n }: {\n body: T;\n path: string;\n partitionKeyRangeId: string;\n resourceId: string;\n bulkOptions?: BulkOptions;\n options?: RequestOptions;\n }): Promise> {\n try {\n const request: RequestContext = {\n ...this.getContextDerivedPropsForRequestCreation(),\n method: HTTPMethod.post,\n operationType: OperationType.Batch,\n path,\n body,\n resourceType: ResourceType.item,\n resourceId,\n options,\n };\n\n request.headers = await this.buildHeaders(request);\n request.headers[Constants.HttpHeaders.IsBatchRequest] = true;\n request.headers[Constants.HttpHeaders.PartitionKeyRangeID] = partitionKeyRangeId;\n request.headers[Constants.HttpHeaders.IsBatchAtomic] = false;\n request.headers[Constants.HttpHeaders.BatchContinueOnError] =\n bulkOptions.continueOnError || false;\n\n this.applySessionToken(request);\n\n request.endpoint = await this.globalEndpointManager.resolveServiceEndpoint(\n request.resourceType,\n request.operationType\n );\n const response = await executePlugins(request, RequestHandler.request, PluginOn.operation);\n this.captureSessionToken(undefined, path, OperationType.Batch, response.headers);\n return response;\n } catch (err: any) {\n this.captureSessionToken(err, path, OperationType.Upsert, (err as ErrorResponse).headers);\n throw err;\n }\n }\n\n private captureSessionToken(\n err: ErrorResponse,\n path: string,\n operationType: OperationType,\n resHeaders: CosmosHeaders\n ): void {\n const request = this.getSessionParams(path);\n request.operationType = operationType;\n if (\n !err ||\n (!this.isMasterResource(request.resourceType) &&\n (err.code === StatusCodes.PreconditionFailed ||\n err.code === StatusCodes.Conflict ||\n (err.code === StatusCodes.NotFound &&\n err.substatus !== SubStatusCodes.ReadSessionNotAvailable)))\n ) {\n this.sessionContainer.set(request, resHeaders);\n }\n }\n\n public clearSessionToken(path: string): void {\n const request = this.getSessionParams(path);\n this.sessionContainer.remove(request);\n }\n\n private getSessionParams(resourceLink: string): SessionContext {\n const resourceId: string = null;\n let resourceAddress: string = null;\n const parserOutput = parseLink(resourceLink);\n\n resourceAddress = parserOutput.objectBody.self;\n\n const resourceType = parserOutput.type;\n return {\n resourceId,\n resourceAddress,\n resourceType,\n isNameBased: true,\n };\n }\n\n private isMasterResource(resourceType: string): boolean {\n if (\n resourceType === Constants.Path.OffersPathSegment ||\n resourceType === Constants.Path.DatabasesPathSegment ||\n resourceType === Constants.Path.UsersPathSegment ||\n resourceType === Constants.Path.PermissionsPathSegment ||\n resourceType === Constants.Path.TopologyPathSegment ||\n resourceType === Constants.Path.DatabaseAccountPathSegment ||\n resourceType === Constants.Path.PartitionKeyRangesPathSegment ||\n resourceType === Constants.Path.CollectionsPathSegment\n ) {\n return true;\n }\n\n return false;\n }\n\n private buildHeaders(requestContext: RequestContext): Promise {\n return getHeaders({\n clientOptions: this.cosmosClientOptions,\n defaultHeaders: {\n ...this.cosmosClientOptions.defaultHeaders,\n ...requestContext.options.initialHeaders,\n },\n verb: requestContext.method,\n path: requestContext.path,\n resourceId: requestContext.resourceId,\n resourceType: requestContext.resourceType,\n options: requestContext.options,\n partitionKeyRangeId: requestContext.partitionKeyRangeId,\n useMultipleWriteLocations: this.connectionPolicy.useMultipleWriteLocations,\n partitionKey: requestContext.partitionKey,\n });\n }\n\n /**\n * Returns collection of properties which are derived from the context for Request Creation\n * @returns\n */\n private getContextDerivedPropsForRequestCreation(): {\n globalEndpointManager: GlobalEndpointManager;\n connectionPolicy: ConnectionPolicy;\n requestAgent: Agent;\n client?: ClientContext;\n pipeline?: Pipeline;\n plugins: PluginConfig[];\n } {\n return {\n globalEndpointManager: this.globalEndpointManager,\n requestAgent: this.cosmosClientOptions.agent,\n connectionPolicy: this.connectionPolicy,\n client: this,\n plugins: this.cosmosClientOptions.plugins,\n pipeline: this.pipeline,\n };\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getUserAgent as userAgent } from \"universal-user-agent\";\nimport { Constants } from \"./constants\";\n\n/**\n * @hidden\n */\nexport function getUserAgent(suffix?: string): string {\n const ua = `${userAgent()} ${Constants.SDKName}/${Constants.SDKVersion}`;\n if (suffix) {\n return ua + \" \" + suffix;\n }\n return ua;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { OperationType, ResourceType, isReadRequest } from \"./common\";\nimport { CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { Location, DatabaseAccount } from \"./documents\";\nimport { RequestOptions } from \"./index\";\nimport { Constants } from \"./common/constants\";\nimport { ResourceResponse } from \"./request\";\n\n/**\n * @hidden\n * This internal class implements the logic for endpoint management for geo-replicated database accounts.\n */\nexport class GlobalEndpointManager {\n /**\n * The endpoint used to create the client instance.\n */\n private defaultEndpoint: string;\n /**\n * Flag to enable/disable automatic redirecting of requests based on read/write operations.\n */\n public enableEndpointDiscovery: boolean;\n private isRefreshing: boolean;\n private options: CosmosClientOptions;\n /**\n * List of azure regions to be used as preferred locations for read requests.\n */\n private preferredLocations: string[];\n private writeableLocations: Location[] = [];\n private readableLocations: Location[] = [];\n private unavailableReadableLocations: Location[] = [];\n private unavailableWriteableLocations: Location[] = [];\n\n /**\n * @param options - The document client instance.\n */\n constructor(\n options: CosmosClientOptions,\n private readDatabaseAccount: (\n opts: RequestOptions\n ) => Promise>\n ) {\n this.options = options;\n this.defaultEndpoint = options.endpoint;\n this.enableEndpointDiscovery = options.connectionPolicy.enableEndpointDiscovery;\n this.isRefreshing = false;\n this.preferredLocations = this.options.connectionPolicy.preferredLocations;\n }\n\n /**\n * Gets the current read endpoint from the endpoint cache.\n */\n public async getReadEndpoint(): Promise {\n return this.resolveServiceEndpoint(ResourceType.item, OperationType.Read);\n }\n\n /**\n * Gets the current write endpoint from the endpoint cache.\n */\n public async getWriteEndpoint(): Promise {\n return this.resolveServiceEndpoint(ResourceType.item, OperationType.Replace);\n }\n\n public async getReadEndpoints(): Promise> {\n return this.readableLocations.map((loc) => loc.databaseAccountEndpoint);\n }\n\n public async getWriteEndpoints(): Promise> {\n return this.writeableLocations.map((loc) => loc.databaseAccountEndpoint);\n }\n\n public async markCurrentLocationUnavailableForRead(endpoint: string): Promise {\n await this.refreshEndpointList();\n const location = this.readableLocations.find((loc) => loc.databaseAccountEndpoint === endpoint);\n if (location) {\n location.unavailable = true;\n location.lastUnavailabilityTimestampInMs = Date.now();\n this.unavailableReadableLocations.push(location);\n }\n }\n\n public async markCurrentLocationUnavailableForWrite(endpoint: string): Promise {\n await this.refreshEndpointList();\n const location = this.writeableLocations.find(\n (loc) => loc.databaseAccountEndpoint === endpoint\n );\n if (location) {\n location.unavailable = true;\n location.lastUnavailabilityTimestampInMs = Date.now();\n this.unavailableWriteableLocations.push(location);\n }\n }\n\n public canUseMultipleWriteLocations(\n resourceType?: ResourceType,\n operationType?: OperationType\n ): boolean {\n let canUse = this.options.connectionPolicy.useMultipleWriteLocations;\n\n if (resourceType) {\n canUse =\n canUse &&\n (resourceType === ResourceType.item ||\n (resourceType === ResourceType.sproc && operationType === OperationType.Execute));\n }\n\n return canUse;\n }\n\n public async resolveServiceEndpoint(\n resourceType: ResourceType,\n operationType: OperationType\n ): Promise {\n // If endpoint discovery is disabled, always use the user provided endpoint\n if (!this.options.connectionPolicy.enableEndpointDiscovery) {\n return this.defaultEndpoint;\n }\n\n // If getting the database account, always use the user provided endpoint\n if (resourceType === ResourceType.none) {\n return this.defaultEndpoint;\n }\n\n if (this.readableLocations.length === 0 || this.writeableLocations.length === 0) {\n const { resource: databaseAccount } = await this.readDatabaseAccount({\n urlConnection: this.defaultEndpoint,\n });\n this.writeableLocations = databaseAccount.writableLocations;\n this.readableLocations = databaseAccount.readableLocations;\n }\n\n const locations = isReadRequest(operationType)\n ? this.readableLocations\n : this.writeableLocations;\n\n let location;\n // If we have preferred locations, try each one in order and use the first available one\n if (this.preferredLocations && this.preferredLocations.length > 0) {\n for (const preferredLocation of this.preferredLocations) {\n location = locations.find(\n (loc) =>\n loc.unavailable !== true &&\n normalizeEndpoint(loc.name) === normalizeEndpoint(preferredLocation)\n );\n if (location) {\n break;\n }\n }\n }\n\n // If no preferred locations or one did not match, just grab the first one that is available\n if (!location) {\n location = locations.find((loc) => {\n return loc.unavailable !== true;\n });\n }\n return location ? location.databaseAccountEndpoint : this.defaultEndpoint;\n }\n\n /**\n * Refreshes the endpoint list by clearning stale unavailability and then\n * retrieving the writable and readable locations from the geo-replicated database account\n * and then updating the locations cache.\n * We skip the refreshing if enableEndpointDiscovery is set to False\n */\n public async refreshEndpointList(): Promise {\n if (!this.isRefreshing && this.enableEndpointDiscovery) {\n this.isRefreshing = true;\n const databaseAccount = await this.getDatabaseAccountFromAnyEndpoint();\n if (databaseAccount) {\n this.refreshStaleUnavailableLocations();\n this.refreshEndpoints(databaseAccount);\n }\n this.isRefreshing = false;\n }\n }\n\n private refreshEndpoints(databaseAccount: DatabaseAccount): void {\n for (const location of databaseAccount.writableLocations) {\n const existingLocation = this.writeableLocations.find((loc) => loc.name === location.name);\n if (!existingLocation) {\n this.writeableLocations.push(location);\n }\n }\n for (const location of databaseAccount.readableLocations) {\n const existingLocation = this.readableLocations.find((loc) => loc.name === location.name);\n if (!existingLocation) {\n this.readableLocations.push(location);\n }\n }\n }\n\n private refreshStaleUnavailableLocations(): void {\n const now = Date.now();\n this.updateLocation(now, this.unavailableReadableLocations, this.readableLocations);\n this.unavailableReadableLocations = this.cleanUnavailableLocationList(\n now,\n this.unavailableReadableLocations\n );\n\n this.updateLocation(now, this.unavailableWriteableLocations, this.writeableLocations);\n this.unavailableWriteableLocations = this.cleanUnavailableLocationList(\n now,\n this.unavailableWriteableLocations\n );\n }\n\n /**\n * update the locationUnavailability to undefined if the location is available again\n * @param now - current time\n * @param unavailableLocations - list of unavailable locations\n * @param allLocations - list of all locations\n */\n private updateLocation(now: number, unavailableLocations: Location[], allLocations: Location[]) {\n for (const location of unavailableLocations) {\n const unavaialableLocation = allLocations.find((loc) => loc.name === location.name);\n if (\n unavaialableLocation &&\n now - unavaialableLocation.lastUnavailabilityTimestampInMs >\n Constants.LocationUnavailableExpirationTimeInMs\n ) {\n unavaialableLocation.unavailable = false;\n }\n }\n }\n\n private cleanUnavailableLocationList(now: number, unavailableLocations: Location[]): Location[] {\n return unavailableLocations.filter((loc) => {\n if (\n loc &&\n now - loc.lastUnavailabilityTimestampInMs >= Constants.LocationUnavailableExpirationTimeInMs\n ) {\n return false;\n }\n return true;\n });\n }\n\n /**\n * Gets the database account first by using the default endpoint, and if that doesn't returns\n * use the endpoints for the preferred locations in the order they are specified to get\n * the database account.\n */\n private async getDatabaseAccountFromAnyEndpoint(): Promise {\n try {\n const options = { urlConnection: this.defaultEndpoint };\n const { resource: databaseAccount } = await this.readDatabaseAccount(options);\n return databaseAccount;\n // If for any reason(non - globaldb related), we are not able to get the database\n // account from the above call to readDatabaseAccount,\n // we would try to get this information from any of the preferred locations that the user\n // might have specified (by creating a locational endpoint)\n // and keeping eating the exception until we get the database account and return None at the end,\n // if we are not able to get that info from any endpoints\n } catch (err: any) {\n // TODO: Tracing\n }\n\n if (this.preferredLocations) {\n for (const location of this.preferredLocations) {\n try {\n const locationalEndpoint = GlobalEndpointManager.getLocationalEndpoint(\n this.defaultEndpoint,\n location\n );\n const options = { urlConnection: locationalEndpoint };\n const { resource: databaseAccount } = await this.readDatabaseAccount(options);\n if (databaseAccount) {\n return databaseAccount;\n }\n } catch (err: any) {\n // TODO: Tracing\n }\n }\n }\n }\n\n /**\n * Gets the locational endpoint using the location name passed to it using the default endpoint.\n *\n * @param defaultEndpoint - The default endpoint to use for the endpoint.\n * @param locationName - The location name for the azure region like \"East US\".\n */\n private static getLocationalEndpoint(defaultEndpoint: string, locationName: string): string {\n // For defaultEndpoint like 'https://contoso.documents.azure.com:443/' parse it to generate URL format\n // This defaultEndpoint should be global endpoint(and cannot be a locational endpoint)\n // and we agreed to document that\n const endpointUrl = new URL(defaultEndpoint);\n\n // hostname attribute in endpointUrl will return 'contoso.documents.azure.com'\n if (endpointUrl.hostname) {\n const hostnameParts = endpointUrl.hostname.toString().toLowerCase().split(\".\");\n if (hostnameParts) {\n // globalDatabaseAccountName will return 'contoso'\n const globalDatabaseAccountName = hostnameParts[0];\n\n // Prepare the locationalDatabaseAccountName as contoso-EastUS for location_name 'East US'\n const locationalDatabaseAccountName =\n globalDatabaseAccountName + \"-\" + locationName.replace(\" \", \"\");\n\n // Replace 'contoso' with 'contoso-EastUS' and\n // return locationalEndpoint as https://contoso-EastUS.documents.azure.com:443/\n const locationalEndpoint = defaultEndpoint\n .toLowerCase()\n .replace(globalDatabaseAccountName, locationalDatabaseAccountName);\n return locationalEndpoint;\n }\n }\n\n return null;\n }\n}\n\nfunction normalizeEndpoint(endpoint: string): string {\n return endpoint.split(\" \").join(\"\").toLowerCase();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Database, Databases } from \"./client/Database\";\nimport { Offer, Offers } from \"./client/Offer\";\nimport { ClientContext } from \"./ClientContext\";\nimport { parseConnectionString } from \"./common\";\nimport { Constants } from \"./common/constants\";\nimport { getUserAgent } from \"./common/platform\";\nimport { CosmosClientOptions } from \"./CosmosClientOptions\";\nimport { DatabaseAccount, defaultConnectionPolicy } from \"./documents\";\nimport { GlobalEndpointManager } from \"./globalEndpointManager\";\nimport { RequestOptions, ResourceResponse } from \"./request\";\nimport { checkURL } from \"./utils/checkURL\";\n\n/**\n * Provides a client-side logical representation of the Azure Cosmos DB database account.\n * This client is used to configure and execute requests in the Azure Cosmos DB database service.\n * @example Instantiate a client and create a new database\n * ```typescript\n * const client = new CosmosClient({endpoint: \"\", auth: {masterKey: \"\"}});\n * await client.databases.create({id: \"\"});\n * ```\n * @example Instantiate a client with custom Connection Policy\n * ```typescript\n * const connectionPolicy = new ConnectionPolicy();\n * connectionPolicy.RequestTimeout = 10000;\n * const client = new CosmosClient({\n * endpoint: \"\",\n * auth: {masterKey: \"\"},\n * connectionPolicy\n * });\n * ```\n */\nexport class CosmosClient {\n /**\n * Used for creating new databases, or querying/reading all databases.\n *\n * Use `.database(id)` to read, replace, or delete a specific, existing database by id.\n *\n * @example Create a new database\n * ```typescript\n * const {resource: databaseDefinition, database} = await client.databases.create({id: \"\"});\n * ```\n */\n public readonly databases: Databases;\n /**\n * Used for querying & reading all offers.\n *\n * Use `.offer(id)` to read, or replace existing offers.\n */\n public readonly offers: Offers;\n private clientContext: ClientContext;\n private endpointRefresher: NodeJS.Timer;\n /**\n * Creates a new {@link CosmosClient} object from a connection string. Your database connection string can be found in the Azure Portal\n */\n constructor(connectionString: string);\n /**\n * Creates a new {@link CosmosClient} object. See {@link CosmosClientOptions} for more details on what options you can use.\n * @param options - bag of options; require at least endpoint and auth to be configured\n */\n constructor(options: CosmosClientOptions);\n constructor(optionsOrConnectionString: string | CosmosClientOptions) {\n if (typeof optionsOrConnectionString === \"string\") {\n optionsOrConnectionString = parseConnectionString(optionsOrConnectionString);\n }\n\n const endpoint = checkURL(optionsOrConnectionString.endpoint);\n if (!endpoint) {\n throw new Error(\"Invalid endpoint specified\");\n }\n\n optionsOrConnectionString.connectionPolicy = Object.assign(\n {},\n defaultConnectionPolicy,\n optionsOrConnectionString.connectionPolicy\n );\n\n optionsOrConnectionString.defaultHeaders = optionsOrConnectionString.defaultHeaders || {};\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.CacheControl] = \"no-cache\";\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.Version] =\n Constants.CurrentVersion;\n if (optionsOrConnectionString.consistencyLevel !== undefined) {\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.ConsistencyLevel] =\n optionsOrConnectionString.consistencyLevel;\n }\n\n optionsOrConnectionString.defaultHeaders[Constants.HttpHeaders.UserAgent] = getUserAgent(\n optionsOrConnectionString.userAgentSuffix\n );\n\n const globalEndpointManager = new GlobalEndpointManager(\n optionsOrConnectionString,\n async (opts: RequestOptions) => this.getDatabaseAccount(opts)\n );\n this.clientContext = new ClientContext(optionsOrConnectionString, globalEndpointManager);\n if (\n optionsOrConnectionString.connectionPolicy?.enableEndpointDiscovery &&\n optionsOrConnectionString.connectionPolicy?.enableBackgroundEndpointRefreshing\n ) {\n this.backgroundRefreshEndpointList(\n globalEndpointManager,\n optionsOrConnectionString.connectionPolicy.endpointRefreshRateInMs ||\n defaultConnectionPolicy.endpointRefreshRateInMs\n );\n }\n\n this.databases = new Databases(this, this.clientContext);\n this.offers = new Offers(this, this.clientContext);\n }\n\n /**\n * Get information about the current {@link DatabaseAccount} (including which regions are supported, etc.)\n */\n public async getDatabaseAccount(\n options?: RequestOptions\n ): Promise> {\n const response = await this.clientContext.getDatabaseAccount(options);\n return new ResourceResponse(response.result, response.headers, response.code);\n }\n\n /**\n * Gets the currently used write endpoint url. Useful for troubleshooting purposes.\n *\n * The url may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getWriteEndpoint(): Promise {\n return this.clientContext.getWriteEndpoint();\n }\n\n /**\n * Gets the currently used read endpoint. Useful for troubleshooting purposes.\n *\n * The url may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getReadEndpoint(): Promise {\n return this.clientContext.getReadEndpoint();\n }\n\n /**\n * Gets the known write endpoints. Useful for troubleshooting purposes.\n *\n * The urls may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getWriteEndpoints(): Promise {\n return this.clientContext.getWriteEndpoints();\n }\n\n /**\n * Gets the currently used read endpoint. Useful for troubleshooting purposes.\n *\n * The url may contain a region suffix (e.g. \"-eastus\") if we're using location specific endpoints.\n */\n public getReadEndpoints(): Promise {\n return this.clientContext.getReadEndpoints();\n }\n\n /**\n * Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database.\n *\n * This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object.\n *\n * @param id - The id of the database.\n * @example Create a new container off of an existing database\n * ```typescript\n * const container = client.database(\"\").containers.create(\"\");\n * ```\n *\n * @example Delete an existing database\n * ```typescript\n * await client.database(\"\").delete();\n * ```\n */\n public database(id: string): Database {\n return new Database(this, id, this.clientContext);\n }\n\n /**\n * Used for reading, or updating a existing offer by id.\n * @param id - The id of the offer.\n */\n public offer(id: string): Offer {\n return new Offer(this, id, this.clientContext);\n }\n\n /**\n * Clears background endpoint refresher. Use client.dispose() when destroying the CosmosClient within another process.\n */\n public dispose(): void {\n clearTimeout(this.endpointRefresher);\n }\n\n private async backgroundRefreshEndpointList(\n globalEndpointManager: GlobalEndpointManager,\n refreshRate: number\n ) {\n this.endpointRefresher = setInterval(() => {\n try {\n globalEndpointManager.refreshEndpointList();\n } catch (e: any) {\n console.warn(\"Failed to refresh endpoints\", e);\n }\n }, refreshRate);\n if (this.endpointRefresher.unref && typeof this.endpointRefresher.unref === \"function\") {\n this.endpointRefresher.unref();\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CosmosContainerChildResourceKind } from \"../../common/constants\";\nimport { CosmosKeyType } from \"../../common/constants\";\n\nexport class SasTokenProperties {\n user: string;\n userTag: string;\n databaseName: string;\n containerName: string;\n resourceName: string;\n resourcePath: string;\n resourceKind: CosmosContainerChildResourceKind;\n partitionKeyValueRanges: string[];\n startTime: Date;\n expiryTime: Date;\n keyType: CosmosKeyType | number;\n controlPlaneReaderScope: number;\n controlPlaneWriterScope: number;\n dataPlaneReaderScope: number;\n dataPlaneWriterScope: number;\n cosmosContainerChildResourceKind: CosmosContainerChildResourceKind;\n cosmosKeyType: CosmosKeyType;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// \n\nexport function encodeUTF8(str: string): Uint8Array {\n const bytes = new Uint8Array(str.length);\n for (let i = 0; i < str.length; i++) {\n bytes[i] = str.charCodeAt(i);\n }\n return bytes;\n}\n\nexport function encodeBase64(value: ArrayBuffer): string {\n if (\"function\" !== typeof btoa) {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n\n let binary = \"\";\n const bytes = new Uint8Array(value);\n const len = bytes.byteLength;\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SasTokenProperties } from \"../client/SasToken/SasTokenProperties\";\nimport { Constants, CosmosKeyType, SasTokenPermissionKind } from \"../common\";\nimport { encodeUTF8 } from \"./encode\";\nimport { hmac } from \"./hmac\";\n\n/**\n * Experimental internal only\n * Generates the payload representing the permission configuration for the sas token.\n */\n\nexport async function createAuthorizationSasToken(\n masterKey: string,\n sasTokenProperties: SasTokenProperties\n): Promise {\n let resourcePrefixPath = \"\";\n if (\n typeof sasTokenProperties.databaseName === \"string\" &&\n sasTokenProperties.databaseName !== \"\"\n ) {\n resourcePrefixPath += `/${Constants.Path.DatabasesPathSegment}/${sasTokenProperties.databaseName}`;\n }\n\n if (\n typeof sasTokenProperties.containerName === \"string\" &&\n sasTokenProperties.containerName !== \"\"\n ) {\n if (sasTokenProperties.databaseName === \"\") {\n throw new Error(`illegalArgumentException : ${sasTokenProperties.databaseName} \\\n is an invalid database name`);\n }\n resourcePrefixPath += `/${Constants.Path.CollectionsPathSegment}/${sasTokenProperties.containerName}`;\n }\n\n if (\n typeof sasTokenProperties.resourceName === \"string\" &&\n sasTokenProperties.resourceName !== \"\"\n ) {\n if (sasTokenProperties.containerName === \"\") {\n throw new Error(`illegalArgumentException : ${sasTokenProperties.containerName} \\\n is an invalid container name`);\n }\n switch (sasTokenProperties.resourceKind) {\n case \"ITEM\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.DocumentsPathSegment}`;\n break;\n case \"STORED_PROCEDURE\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.StoredProceduresPathSegment}`;\n break;\n case \"USER_DEFINED_FUNCTION\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.UserDefinedFunctionsPathSegment}`;\n break;\n case \"TRIGGER\":\n resourcePrefixPath += `${Constants.Path.Root}${Constants.Path.TriggersPathSegment}`;\n break;\n default:\n throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \\\n is an invalid resource kind`);\n break;\n }\n resourcePrefixPath += `${Constants.Path.Root}${sasTokenProperties.resourceName}${Constants.Path.Root}`;\n }\n sasTokenProperties.resourcePath = resourcePrefixPath.toString();\n\n let partitionRanges = \"\";\n\n if (\n sasTokenProperties.partitionKeyValueRanges !== undefined &&\n sasTokenProperties.partitionKeyValueRanges.length > 0\n ) {\n if (\n typeof sasTokenProperties.resourceKind !== \"string\" &&\n sasTokenProperties.resourceKind !== \"ITEM\"\n ) {\n throw new Error(`illegalArgumentException : ${sasTokenProperties.resourceKind} \\\n is an invalid partition key value range`);\n }\n sasTokenProperties.partitionKeyValueRanges.forEach((range) => {\n partitionRanges += `${encodeUTF8(range)},`;\n });\n }\n\n if (sasTokenProperties.controlPlaneReaderScope === 0) {\n sasTokenProperties.controlPlaneReaderScope += SasTokenPermissionKind.ContainerReadAny;\n sasTokenProperties.controlPlaneWriterScope += SasTokenPermissionKind.ContainerReadAny;\n }\n\n if (\n sasTokenProperties.dataPlaneReaderScope === 0 &&\n sasTokenProperties.dataPlaneWriterScope === 0\n ) {\n sasTokenProperties.dataPlaneReaderScope = SasTokenPermissionKind.ContainerFullAccess;\n sasTokenProperties.dataPlaneWriterScope = SasTokenPermissionKind.ContainerFullAccess;\n }\n\n if (\n typeof sasTokenProperties.keyType !== \"number\" ||\n typeof sasTokenProperties.keyType === undefined\n ) {\n switch (sasTokenProperties.keyType) {\n case CosmosKeyType.PrimaryMaster:\n sasTokenProperties.keyType = 1;\n break;\n case CosmosKeyType.SecondaryMaster:\n sasTokenProperties.keyType = 2;\n break;\n case CosmosKeyType.PrimaryReadOnly:\n sasTokenProperties.keyType = 3;\n break;\n case CosmosKeyType.SecondaryReadOnly:\n sasTokenProperties.keyType = 4;\n break;\n default:\n throw new Error(`illegalArgumentException : ${sasTokenProperties.keyType} \\\n is an invalid key type`);\n break;\n }\n }\n\n const payload =\n sasTokenProperties.user +\n \"\\n\" +\n sasTokenProperties.userTag +\n \"\\n\" +\n sasTokenProperties.resourcePath +\n \"\\n\" +\n partitionRanges +\n \"\\n\" +\n utcsecondsSinceEpoch(sasTokenProperties.startTime).toString(16) +\n \"\\n\" +\n utcsecondsSinceEpoch(sasTokenProperties.expiryTime).toString(16) +\n \"\\n\" +\n sasTokenProperties.keyType +\n \"\\n\" +\n sasTokenProperties.controlPlaneReaderScope.toString(16) +\n \"\\n\" +\n sasTokenProperties.controlPlaneWriterScope.toString(16) +\n \"\\n\" +\n sasTokenProperties.dataPlaneReaderScope.toString(16) +\n \"\\n\" +\n sasTokenProperties.dataPlaneWriterScope.toString(16) +\n \"\\n\";\n\n const signedPayload = await hmac(masterKey, Buffer.from(payload).toString(\"base64\"));\n return \"type=sas&ver=1.0&sig=\" + signedPayload + \";\" + Buffer.from(payload).toString(\"base64\");\n}\n/**\n * @hidden\n */\n// TODO: utcMilllisecondsSinceEpoch\nexport function utcsecondsSinceEpoch(date: Date): number {\n return Math.round(date.getTime() / 1000);\n}\n"],"names":["ResourceType","HTTPMethod","OperationType","SasTokenPermissionKind","createHmac","createClientLogger","uuid","v4","ConnectionMode","ConsistencyLevel","DataType","IndexingMode","SpatialType","IndexKind","PermissionMode","TriggerOperation","TriggerType","UserDefinedFunctionType","GeospatialType","logger","PriorityQueue","semaphore","createHash","stableStringify","__await","ConflictResolutionMode","JSBI","reverse","prefixKeyByType","PluginOn","createDefaultHttpClient","AbortController","createHttpHeaders","createPipelineRequest","RetryUtility.execute","createEmptyPipeline","bearerTokenAuthenticationPolicy","userAgent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACa,MAAA,0BAA0B,GAAG,iBAAqC;;ACF/E;AACA;AASA;;AAEG;AACU,MAAA,SAAS,GAAG;AACvB,IAAA,WAAW,EAAE;AACX,QAAA,aAAa,EAAE,eAAe;AAC9B,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,cAAc,EAAE,eAAe;AAC/B,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,WAAW,EAAE,cAAc;AAC3B,QAAA,YAAY,EAAE,eAAe;AAC7B,QAAA,eAAe,EAAE,kBAAkB;AACnC,QAAA,YAAY,EAAE,cAAc;AAC5B,QAAA,SAAS,EAAE,YAAY;AACvB,QAAA,eAAe,EAAE,mBAAmB;AACpC,QAAA,OAAO,EAAE,UAAU;AACnB,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,aAAa,EAAE,gBAAgB;AAC/B,QAAA,cAAc,EAAE,iBAAiB;AACjC,QAAA,SAAS,EAAE,YAAY;AACvB,QAAA,YAAY,EAAE,eAAe;AAC7B,QAAA,gBAAgB,EAAE,mBAAmB;AACrC,QAAA,eAAe,EAAE,kBAAkB;AACnC,QAAA,eAAe,EAAE,kBAAkB;AACnC,QAAA,UAAU,EAAE,aAAa;AACzB,QAAA,YAAY,EAAE,eAAe;AAC7B,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,aAAa,EAAE,gBAAgB;AAC/B,QAAA,cAAc,EAAE,iBAAiB;AACjC,QAAA,OAAO,EAAE,UAAU;AACnB,QAAA,iBAAiB,EAAE,qBAAqB;AACxC,QAAA,WAAW,EAAE,cAAc;AAC3B,QAAA,kBAAkB,EAAE,qBAAqB;AACzC,QAAA,YAAY,EAAE,eAAe;AAC7B,QAAA,iBAAiB,EAAE,oBAAo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ineering/node_modules/@azure/cosmos/dist/types/4.1/cosmos.d.ts deleted file mode 100644 index ce28d08..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist/types/4.1/cosmos.d.ts +++ /dev/null @@ -1,3420 +0,0 @@ -/// -/// -import { AbortError } from '@azure/abort-controller'; -import { AbortSignal as AbortSignal_2 } from 'node-abort-controller'; -import { Pipeline } from '@azure/core-rest-pipeline'; -import { RestError } from '@azure/core-rest-pipeline'; -import { TokenCredential } from '@azure/core-auth'; -export { AbortError }; -export declare interface Agent { - maxFreeSockets: number; - maxSockets: number; - sockets: any; - requests: any; - destroy(): void; -} -export declare type AggregateType = "Average" | "Count" | "Max" | "Min" | "Sum"; -export declare const BulkOperationType: { - readonly Create: "Create"; - readonly Upsert: "Upsert"; - readonly Read: "Read"; - readonly Delete: "Delete"; - readonly Replace: "Replace"; - readonly Patch: "Patch"; -}; -/** - * Options object used to modify bulk execution. - * continueOnError (Default value: false) - Continues bulk execution when an operation fails ** NOTE THIS WILL DEFAULT TO TRUE IN the 4.0 RELEASE - */ -export declare interface BulkOptions { - continueOnError?: boolean; -} -export declare type BulkPatchOperation = OperationBase & { - operationType: typeof BulkOperationType.Patch; - id: string; -}; -/** - * Provides iterator for change feed. - * - * Use `Items.changeFeed()` to get an instance of the iterator. - */ -export declare class ChangeFeedIterator { - private clientContext; - private resourceId; - private resourceLink; - private partitionKey; - private changeFeedOptions; - private static readonly IfNoneMatchAllHeaderValue; - private nextIfNoneMatch; - private ifModifiedSince; - private lastStatusCode; - private isPartitionSpecified; - /** - * Gets a value indicating whether there are potentially additional results that can be retrieved. - * - * Initially returns true. This value is set based on whether the last execution returned a continuation token. - * - * @returns Boolean value representing if whether there are potentially additional results that can be retrieved. - */ - get hasMoreResults(): boolean; - /** - * Gets an async iterator which will yield pages of results from Azure Cosmos DB. - */ - getAsyncIterator(): AsyncIterable>>; - /** - * Read feed and retrieves the next page of results in Azure Cosmos DB. - */ - fetchNext(): Promise>>; - private getFeedResponse; -} -/** - * Specifies options for the change feed - * - * Some of these options control where and when to start reading from the change feed. The order of precedence is: - * - continuation - * - startTime - * - startFromBeginning - * - * If none of those options are set, it will start reading changes from the first `ChangeFeedIterator.fetchNext()` call. - */ -export declare interface ChangeFeedOptions { - /** - * Max amount of items to return per page - */ - maxItemCount?: number; - /** - * The continuation token to start from. - * - * This is equivalent to the etag and continuation value from the `ChangeFeedResponse` - */ - continuation?: string; - /** - * The session token to use. If not specified, will use the most recent captured session token to start with. - */ - sessionToken?: string; - /** - * Signals whether to start from the beginning or not. - */ - startFromBeginning?: boolean; - /** - * Specified the start time to start reading changes from. - */ - startTime?: Date; -} -/** - * A single response page from the Azure Cosmos DB Change Feed - */ -export declare class ChangeFeedResponse { - /** - * Gets the items returned in the response from Azure Cosmos DB - */ - readonly result: T; - /** - * Gets the number of items returned in the response from Azure Cosmos DB - */ - readonly count: number; - /** - * Gets the status code of the response from Azure Cosmos DB - */ - readonly statusCode: number; - /** - * Gets the request charge for this request from the Azure Cosmos DB service. - */ - get requestCharge(): number; - /** - * Gets the activity ID for the request from the Azure Cosmos DB service. - */ - get activityId(): string; - /** - * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service. - * - * This is equivalent to the `etag` property. - */ - get continuation(): string; - /** - * Gets the session token for use in session consistency reads from the Azure Cosmos DB service. - */ - get sessionToken(): string; - /** - * Gets the entity tag associated with last transaction in the Azure Cosmos DB service, - * which can be used as If-Non-Match Access condition for ReadFeed REST request or - * `continuation` property of `ChangeFeedOptions` parameter for - * `Items.changeFeed()` - * to get feed changes since the transaction specified by this entity tag. - * - * This is equivalent to the `continuation` property. - */ - get etag(): string; - /** - * Response headers of the response from Azure Cosmos DB - */ - headers: CosmosHeaders; -} -/** - * @hidden - * @hidden - */ -export declare class ClientContext { - private cosmosClientOptions; - private globalEndpointManager; - private readonly sessionContainer; - private connectionPolicy; - private pipeline; - partitionKeyDefinitionCache: { - [containerUrl: string]: any; - }; - constructor(cosmosClientOptions: CosmosClientOptions, globalEndpointManager: GlobalEndpointManager); - /** @hidden */ - read({ path, resourceType, resourceId, options, partitionKey, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - queryFeed({ path, resourceType, resourceId, resultFn, query, options, partitionKeyRangeId, partitionKey, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - resultFn: (result: { - [key: string]: any; - }) => any[]; - query: SqlQuerySpec | string; - options: FeedOptions; - partitionKeyRangeId?: string; - partitionKey?: PartitionKey; - }): Promise>; - getQueryPlan(path: string, resourceType: ResourceType, resourceId: string, query: SqlQuerySpec | string, options?: FeedOptions): Promise>; - queryPartitionKeyRanges(collectionLink: string, query?: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - delete({ path, resourceType, resourceId, options, partitionKey, method, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - method?: HTTPMethod; - }): Promise>; - patch({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: any; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - create({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: T; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - private processQueryFeedResponse; - private applySessionToken; - replace({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: any; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - upsert({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: T; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - execute({ sprocLink, params, options, partitionKey, }: { - sprocLink: string; - params?: any[]; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - /** - * Gets the Database account information. - * @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved. - * If not present, current client's url will be used. - */ - getDatabaseAccount(options?: RequestOptions): Promise>; - getWriteEndpoint(): Promise; - getReadEndpoint(): Promise; - getWriteEndpoints(): Promise; - getReadEndpoints(): Promise; - batch({ body, path, partitionKey, resourceId, options, }: { - body: T; - path: string; - partitionKey: string; - resourceId: string; - options?: RequestOptions; - }): Promise>; - bulk({ body, path, partitionKeyRangeId, resourceId, bulkOptions, options, }: { - body: T; - path: string; - partitionKeyRangeId: string; - resourceId: string; - bulkOptions?: BulkOptions; - options?: RequestOptions; - }): Promise>; - private captureSessionToken; - clearSessionToken(path: string): void; - private getSessionParams; - private isMasterResource; - private buildHeaders; - /** - * Returns collection of properties which are derived from the context for Request Creation - * @returns - */ - private getContextDerivedPropsForRequestCreation; -} -export declare class ClientSideMetrics { - readonly requestCharge: number; - constructor(requestCharge: number); - /** - * Adds one or more ClientSideMetrics to a copy of this instance and returns the result. - */ - add(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics; - static readonly zero: ClientSideMetrics; - static createFromArray(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics; -} -/** - * Use to read or delete a given {@link Conflict} by id. - * - * @see {@link Conflicts} to query or read all conflicts. - */ -export declare class Conflict { - readonly container: Container; - readonly id: string; - private readonly clientContext; - private partitionKey?; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Conflict}. - */ - constructor(container: Container, id: string, clientContext: ClientContext, partitionKey?: PartitionKey); - /** - * Read the {@link ConflictDefinition} for the given {@link Conflict}. - */ - read(options?: RequestOptions): Promise; - /** - * Delete the given {@link ConflictDefinition}. - */ - delete(options?: RequestOptions): Promise; -} -export declare interface ConflictDefinition { - /** The id of the conflict */ - id?: string; - /** Source resource id */ - resourceId?: string; - resourceType?: ResourceType; - operationType?: OperationType; - content?: string; -} -export declare enum ConflictResolutionMode { - Custom = "Custom", - LastWriterWins = "LastWriterWins" -} -/** - * Represents the conflict resolution policy configuration for specifying how to resolve conflicts - * in case writes from different regions result in conflicts on documents in the collection in the Azure Cosmos DB service. - */ -export declare interface ConflictResolutionPolicy { - /** - * Gets or sets the in the Azure Cosmos DB service. By default it is {@link ConflictResolutionMode.LastWriterWins}. - */ - mode?: keyof typeof ConflictResolutionMode; - /** - * Gets or sets the path which is present in each document in the Azure Cosmos DB service for last writer wins conflict-resolution. - * This path must be present in each document and must be an integer value. - * In case of a conflict occurring on a document, the document with the higher integer value in the specified path will be picked. - * If the path is unspecified, by default the timestamp path will be used. - * - * This value should only be set when using {@link ConflictResolutionMode.LastWriterWins}. - * - * ```typescript - * conflictResolutionPolicy.ConflictResolutionPath = "/name/first"; - * ``` - * - */ - conflictResolutionPath?: string; - /** - * Gets or sets the {@link StoredProcedure} which is used for conflict resolution in the Azure Cosmos DB service. - * This stored procedure may be created after the {@link Container} is created and can be changed as required. - * - * 1. This value should only be set when using {@link ConflictResolutionMode.Custom}. - * 2. In case the stored procedure fails or throws an exception, the conflict resolution will default to registering conflicts in the conflicts feed. - * - * ```typescript - * conflictResolutionPolicy.ConflictResolutionProcedure = "resolveConflict" - * ``` - */ - conflictResolutionProcedure?: string; -} -export declare class ConflictResponse extends ResourceResponse { - constructor(resource: ConflictDefinition & Resource, headers: CosmosHeaders, statusCode: number, conflict: Conflict); - /** A reference to the {@link Conflict} corresponding to the returned {@link ConflictDefinition}. */ - readonly conflict: Conflict; -} -/** - * Use to query or read all conflicts. - * - * @see {@link Conflict} to read or delete a given {@link Conflict} by id. - */ -export declare class Conflicts { - readonly container: Container; - private readonly clientContext; - constructor(container: Container, clientContext: ClientContext); - /** - * Queries all conflicts. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time. - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all conflicts. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time. - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Reads all conflicts - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - readAll(options?: FeedOptions): QueryIterator; -} -/** Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. */ -export declare enum ConnectionMode { - /** Gateway mode talks to an intermediate gateway which handles the direct communication with your individual partitions. */ - Gateway = 0 -} -/** - * Represents the Connection policy associated with a CosmosClient in the Azure Cosmos DB database service. - */ -export declare interface ConnectionPolicy { - /** Determines which mode to connect to Cosmos with. (Currently only supports Gateway option) */ - connectionMode?: ConnectionMode; - /** Request timeout (time to wait for response from network peer). Represented in milliseconds. */ - requestTimeout?: number; - /** - * Flag to enable/disable automatic redirecting of requests based on read/write operations. Default true. - * Required to call client.dispose() when this is set to true after destroying the CosmosClient inside another process or in the browser. - */ - enableEndpointDiscovery?: boolean; - /** List of azure regions to be used as preferred locations for read requests. */ - preferredLocations?: string[]; - /** RetryOptions object which defines several configurable properties used during retry. */ - retryOptions?: RetryOptions; - /** - * The flag that enables writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. - * Default is `false`. - */ - useMultipleWriteLocations?: boolean; - /** Rate in milliseconds at which the client will refresh the endpoints list in the background */ - endpointRefreshRateInMs?: number; - /** Flag to enable/disable background refreshing of endpoints. Defaults to false. - * Endpoint discovery using `enableEndpointsDiscovery` will still work for failed requests. */ - enableBackgroundEndpointRefreshing?: boolean; -} -/** - * Represents the consistency levels supported for Azure Cosmos DB client operations.
- * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. - * Consistency levels. - * - * Consistency levels by order of strength are Strong, BoundedStaleness, Session, Consistent Prefix, and Eventual. - * - * See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels. - */ -export declare enum ConsistencyLevel { - /** - * Strong Consistency guarantees that read operations always return the value that was last written. - */ - Strong = "Strong", - /** - * Bounded Staleness guarantees that reads are not too out-of-date. - * This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds). - */ - BoundedStaleness = "BoundedStaleness", - /** - * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), - * monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) - * within any single session. - */ - Session = "Session", - /** - * Eventual Consistency guarantees that reads will return a subset of writes. - * All writes will be eventually be available for reads. - */ - Eventual = "Eventual", - /** - * ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. - * All writes will be eventually be available for reads. - */ - ConsistentPrefix = "ConsistentPrefix" -} -/** - * @hidden - */ -export declare const Constants: { - HttpHeaders: { - Authorization: string; - ETag: string; - MethodOverride: string; - Slug: string; - ContentType: string; - LastModified: string; - ContentEncoding: string; - CharacterSet: string; - UserAgent: string; - IfModifiedSince: string; - IfMatch: string; - IfNoneMatch: string; - ContentLength: string; - AcceptEncoding: string; - KeepAlive: string; - CacheControl: string; - TransferEncoding: string; - ContentLanguage: string; - ContentLocation: string; - ContentMd5: string; - ContentRange: string; - Accept: string; - AcceptCharset: string; - AcceptLanguage: string; - IfRange: string; - IfUnmodifiedSince: string; - MaxForwards: string; - ProxyAuthorization: string; - AcceptRanges: string; - ProxyAuthenticate: string; - RetryAfter: string; - SetCookie: string; - WwwAuthenticate: string; - Origin: string; - Host: string; - AccessControlAllowOrigin: string; - AccessControlAllowHeaders: string; - KeyValueEncodingFormat: string; - WrapAssertionFormat: string; - WrapAssertion: string; - WrapScope: string; - SimpleToken: string; - HttpDate: string; - Prefer: string; - Location: string; - Referer: string; - A_IM: string; - Query: string; - IsQuery: string; - IsQueryPlan: string; - SupportedQueryFeatures: string; - QueryVersion: string; - Continuation: string; - PageSize: string; - ItemCount: string; - ActivityId: string; - PreTriggerInclude: string; - PreTriggerExclude: string; - PostTriggerInclude: string; - PostTriggerExclude: string; - IndexingDirective: string; - SessionToken: string; - ConsistencyLevel: string; - XDate: string; - CollectionPartitionInfo: string; - CollectionServiceInfo: string; - RetryAfterInMilliseconds: string; - RetryAfterInMs: string; - IsFeedUnfiltered: string; - ResourceTokenExpiry: string; - EnableScanInQuery: string; - EmitVerboseTracesInQuery: string; - EnableCrossPartitionQuery: string; - ParallelizeCrossPartitionQuery: string; - ResponseContinuationTokenLimitInKB: string; - PopulateQueryMetrics: string; - QueryMetrics: string; - Version: string; - OwnerFullName: string; - OwnerId: string; - PartitionKey: string; - PartitionKeyRangeID: string; - MaxEntityCount: string; - CurrentEntityCount: string; - CollectionQuotaInMb: string; - CollectionCurrentUsageInMb: string; - MaxMediaStorageUsageInMB: string; - CurrentMediaStorageUsageInMB: string; - RequestCharge: string; - PopulateQuotaInfo: string; - MaxResourceQuota: string; - OfferType: string; - OfferThroughput: string; - AutoscaleSettings: string; - DisableRUPerMinuteUsage: string; - IsRUPerMinuteUsed: string; - OfferIsRUPerMinuteThroughputEnabled: string; - IndexTransformationProgress: string; - LazyIndexingProgress: string; - IsUpsert: string; - SubStatus: string; - EnableScriptLogging: string; - ScriptLogResults: string; - ALLOW_MULTIPLE_WRITES: string; - IsBatchRequest: string; - IsBatchAtomic: string; - BatchContinueOnError: string; - DedicatedGatewayPerRequestCacheStaleness: string; - ForceRefresh: string; - }; - WritableLocations: string; - ReadableLocations: string; - LocationUnavailableExpirationTimeInMs: number; - ENABLE_MULTIPLE_WRITABLE_LOCATIONS: string; - DefaultUnavailableLocationExpirationTimeMS: number; - ThrottleRetryCount: string; - ThrottleRetryWaitTimeInMs: string; - CurrentVersion: string; - AzureNamespace: string; - AzurePackageName: string; - SDKName: string; - SDKVersion: string; - DefaultMaxBulkRequestBodySizeInBytes: number; - Quota: { - CollectionSize: string; - }; - Path: { - Root: string; - DatabasesPathSegment: string; - CollectionsPathSegment: string; - UsersPathSegment: string; - DocumentsPathSegment: string; - PermissionsPathSegment: string; - StoredProceduresPathSegment: string; - TriggersPathSegment: string; - UserDefinedFunctionsPathSegment: string; - ConflictsPathSegment: string; - AttachmentsPathSegment: string; - PartitionKeyRangesPathSegment: string; - SchemasPathSegment: string; - OffersPathSegment: string; - TopologyPathSegment: string; - DatabaseAccountPathSegment: string; - }; - PartitionKeyRange: PartitionKeyRangePropertiesNames; - QueryRangeConstants: { - MinInclusive: string; - MaxExclusive: string; - min: string; - }; - /** - * @deprecated Use EffectivePartitionKeyConstants instead - */ - EffectiveParitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: string; - MaximumExclusiveEffectivePartitionKey: string; - }; - EffectivePartitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: string; - MaximumExclusiveEffectivePartitionKey: string; - }; -}; -/** - * Operations for reading, replacing, or deleting a specific, existing container by id. - * - * @see {@link Containers} for creating new containers, and reading/querying all containers; use `.containers`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `container(id).read()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -export declare class Container { - readonly database: Database; - readonly id: string; - private readonly clientContext; - private $items; - /** - * Operations for creating new items, and reading/querying all items - * - * For reading, replacing, or deleting an existing item, use `.item(id)`. - * - * @example Create a new item - * ```typescript - * const {body: createdItem} = await container.items.create({id: "", properties: {}}); - * ``` - */ - get items(): Items; - private $scripts; - /** - * All operations for Stored Procedures, Triggers, and User Defined Functions - */ - get scripts(): Scripts; - private $conflicts; - /** - * Operations for reading and querying conflicts for the given container. - * - * For reading or deleting a specific conflict, use `.conflict(id)`. - */ - get conflicts(): Conflicts; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * Returns a container instance. Note: You should get this from `database.container(id)`, rather than creating your own object. - * @param database - The parent {@link Database}. - * @param id - The id of the given container. - * @hidden - */ - constructor(database: Database, id: string, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link Item} by id. - * - * Use `.items` for creating new items, or querying/reading all items. - * - * @param id - The id of the {@link Item}. - * @param partitionKeyValue - The value of the {@link Item} partition key - * @example Replace an item - * `const {body: replacedItem} = await container.item("", "").replace({id: "", title: "Updated post", authorID: 5});` - */ - item(id: string, partitionKeyValue?: PartitionKey): Item; - /** - * Used to read, replace, or delete a specific, existing {@link Conflict} by id. - * - * Use `.conflicts` for creating new conflicts, or querying/reading all conflicts. - * @param id - The id of the {@link Conflict}. - */ - conflict(id: string, partitionKey?: PartitionKey): Conflict; - /** Read the container's definition */ - read(options?: RequestOptions): Promise; - /** Replace the container's definition */ - replace(body: ContainerDefinition, options?: RequestOptions): Promise; - /** Delete the container */ - delete(options?: RequestOptions): Promise; - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @deprecated This method has been renamed to readPartitionKeyDefinition. - */ - getPartitionKeyDefinition(): Promise>; - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @hidden - */ - readPartitionKeyDefinition(): Promise>; - /** - * Gets offer on container. If none exists, returns an OfferResponse with undefined. - */ - readOffer(options?: RequestOptions): Promise; - getQueryPlan(query: string | SqlQuerySpec): Promise>; - readPartitionKeyRanges(feedOptions?: FeedOptions): QueryIterator; - /** - * Delete all documents belong to the container for the provided partition key value - * @param partitionKey - The partition key value of the items to be deleted - */ - deleteAllItemsForPartitionKey(partitionKey: PartitionKey, options?: RequestOptions): Promise; -} -export declare interface ContainerDefinition { - /** The id of the container. */ - id?: string; - /** The partition key for the container. */ - partitionKey?: PartitionKeyDefinition; - /** The indexing policy associated with the container. */ - indexingPolicy?: IndexingPolicy; - /** The default time to live in seconds for items in a container. */ - defaultTtl?: number; - /** The conflict resolution policy used to resolve conflicts in a container. */ - conflictResolutionPolicy?: ConflictResolutionPolicy; - /** Policy for additional keys that must be unique per partition key */ - uniqueKeyPolicy?: UniqueKeyPolicy; - /** Geospatial configuration for a collection. Type is set to Geography by default */ - geospatialConfig?: { - type: GeospatialType; - }; -} -export declare interface ContainerRequest extends VerboseOmit { - throughput?: number; - maxThroughput?: number; - autoUpgradePolicy?: { - throughputPolicy: { - incrementPercent: number; - }; - }; - partitionKey?: string | PartitionKeyDefinition; -} -/** Response object for Container operations */ -export declare class ContainerResponse extends ResourceResponse { - constructor(resource: ContainerDefinition & Resource, headers: CosmosHeaders, statusCode: number, container: Container); - /** A reference to the {@link Container} that the returned {@link ContainerDefinition} corresponds to. */ - readonly container: Container; -} -/** - * Operations for creating new containers, and reading/querying all containers - * - * @see {@link Container} for reading, replacing, or deleting an existing container; use `.container(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `containers.readAll()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ -export declare class Containers { - readonly database: Database; - private readonly clientContext; - constructor(database: Database, clientContext: ClientContext); - /** - * Queries all containers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @container", - * parameters: [ - * {name: "@container", value: "Todo"} - * ] - * }; - * const {body: containerList} = await client.database("").containers.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all containers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @container", - * parameters: [ - * {name: "@container", value: "Todo"} - * ] - * }; - * const {body: containerList} = await client.database("").containers.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Creates a container. - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - create(body: ContainerRequest, options?: RequestOptions): Promise; - /** - * Checks if a Container exists, and, if it doesn't, creates it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * You should confirm that the output matches the body you passed in for non-default properties (i.e. indexing policy/etc.) - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - createIfNotExists(body: ContainerRequest, options?: RequestOptions): Promise; - /** - * Read all containers. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const {body: containerList} = await client.database("").containers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; -} -/** - * Provides a client-side logical representation of the Azure Cosmos DB database account. - * This client is used to configure and execute requests in the Azure Cosmos DB database service. - * @example Instantiate a client and create a new database - * ```typescript - * const client = new CosmosClient({endpoint: "", auth: {masterKey: ""}}); - * await client.databases.create({id: ""}); - * ``` - * @example Instantiate a client with custom Connection Policy - * ```typescript - * const connectionPolicy = new ConnectionPolicy(); - * connectionPolicy.RequestTimeout = 10000; - * const client = new CosmosClient({ - * endpoint: "", - * auth: {masterKey: ""}, - * connectionPolicy - * }); - * ``` - */ -export declare class CosmosClient { - /** - * Used for creating new databases, or querying/reading all databases. - * - * Use `.database(id)` to read, replace, or delete a specific, existing database by id. - * - * @example Create a new database - * ```typescript - * const {resource: databaseDefinition, database} = await client.databases.create({id: ""}); - * ``` - */ - readonly databases: Databases; - /** - * Used for querying & reading all offers. - * - * Use `.offer(id)` to read, or replace existing offers. - */ - readonly offers: Offers; - private clientContext; - private endpointRefresher; - /** - * Creates a new {@link CosmosClient} object from a connection string. Your database connection string can be found in the Azure Portal - */ - constructor(connectionString: string); - /** - * Creates a new {@link CosmosClient} object. See {@link CosmosClientOptions} for more details on what options you can use. - * @param options - bag of options; require at least endpoint and auth to be configured - */ - constructor(options: CosmosClientOptions); - /** - * Get information about the current {@link DatabaseAccount} (including which regions are supported, etc.) - */ - getDatabaseAccount(options?: RequestOptions): Promise>; - /** - * Gets the currently used write endpoint url. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoint(): Promise; - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoint(): Promise; - /** - * Gets the known write endpoints. Useful for troubleshooting purposes. - * - * The urls may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoints(): Promise; - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoints(): Promise; - /** - * Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database. - * - * This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object. - * - * @param id - The id of the database. - * @example Create a new container off of an existing database - * ```typescript - * const container = client.database("").containers.create(""); - * ``` - * - * @example Delete an existing database - * ```typescript - * await client.database("").delete(); - * ``` - */ - database(id: string): Database; - /** - * Used for reading, or updating a existing offer by id. - * @param id - The id of the offer. - */ - offer(id: string): Offer; - /** - * Clears background endpoint refresher. Use client.dispose() when destroying the CosmosClient within another process. - */ - dispose(): void; - private backgroundRefreshEndpointList; -} -export declare interface CosmosClientOptions { - /** The service endpoint to use to create the client. */ - endpoint: string; - /** The account master or readonly key */ - key?: string; - /** An object that contains resources tokens. - * Keys for the object are resource Ids and values are the resource tokens. - */ - resourceTokens?: { - [resourcePath: string]: string; - }; - /** A user supplied function for resolving header authorization tokens. - * Allows users to generating their own auth tokens, potentially using a separate service - */ - tokenProvider?: TokenProvider; - /** AAD token from `@azure/identity` - * Obtain a credential object by creating an `@azure/identity` credential object - * We will then use your credential object and a scope URL (your cosmos db endpoint) - * to authenticate requests to Cosmos - */ - aadCredentials?: TokenCredential; - /** An array of {@link Permission} objects. */ - permissionFeed?: PermissionDefinition[]; - /** An instance of {@link ConnectionPolicy} class. - * This parameter is optional and the default connectionPolicy will be used if omitted. - */ - connectionPolicy?: ConnectionPolicy; - /** An optional parameter that represents the consistency level. - * It can take any value from {@link ConsistencyLevel}. - */ - consistencyLevel?: keyof typeof ConsistencyLevel; - defaultHeaders?: CosmosHeaders_2; - /** An optional custom http(s) Agent to be used in NodeJS enironments - * Use an agent such as https://github.com/TooTallNate/node-proxy-agent if you need to connect to Cosmos via a proxy - */ - agent?: Agent; - /** A custom string to append to the default SDK user agent. */ - userAgentSuffix?: string; -} -/** - * @hidden - */ -declare enum CosmosContainerChildResourceKind { - Item = "ITEM", - StoredProcedure = "STORED_PROCEDURE", - UserDefinedFunction = "USER_DEFINED_FUNCTION", - Trigger = "TRIGGER" -} -export declare interface CosmosHeaders { - [key: string]: any; -} -declare interface CosmosHeaders_2 { - [key: string]: string | boolean | number; -} -/** - * @hidden - */ -declare enum CosmosKeyType { - PrimaryMaster = "PRIMARY_MASTER", - SecondaryMaster = "SECONDARY_MASTER", - PrimaryReadOnly = "PRIMARY_READONLY", - SecondaryReadOnly = "SECONDARY_READONLY" -} -/** - * Experimental internal only - * Generates the payload representing the permission configuration for the sas token. - */ -export declare function createAuthorizationSasToken(masterKey: string, sasTokenProperties: SasTokenProperties): Promise; -export declare type CreateOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Create; -}; -export declare interface CreateOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Create; - resourceBody: JSONObject; -} -/** - * Operations for reading or deleting an existing database. - * - * @see {@link Databases} for creating new databases, and reading/querying all databases; use `client.databases`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `database.read()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -export declare class Database { - readonly client: CosmosClient; - readonly id: string; - private clientContext; - /** - * Used for creating new containers, or querying/reading all containers. - * - * Use `.database(id)` to read, replace, or delete a specific, existing {@link Database} by id. - * - * @example Create a new container - * ```typescript - * const {body: containerDefinition, container} = await client.database("").containers.create({id: ""}); - * ``` - */ - readonly containers: Containers; - /** - * Used for creating new users, or querying/reading all users. - * - * Use `.user(id)` to read, replace, or delete a specific, existing {@link User} by id. - */ - readonly users: Users; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** Returns a new {@link Database} instance. - * - * Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself. - */ - constructor(client: CosmosClient, id: string, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link Database} by id. - * - * Use `.containers` creating new containers, or querying/reading all containers. - * - * @example Delete a container - * ```typescript - * await client.database("").container("").delete(); - * ``` - */ - container(id: string): Container; - /** - * Used to read, replace, or delete a specific, existing {@link User} by id. - * - * Use `.users` for creating new users, or querying/reading all users. - */ - user(id: string): User; - /** Read the definition of the given Database. */ - read(options?: RequestOptions): Promise; - /** Delete the given Database. */ - delete(options?: RequestOptions): Promise; - /** - * Gets offer on database. If none exists, returns an OfferResponse with undefined. - */ - readOffer(options?: RequestOptions): Promise; -} -/** - * Represents a DatabaseAccount in the Azure Cosmos DB database service. - */ -export declare class DatabaseAccount { - /** The list of writable locations for a geo-replicated database account. */ - readonly writableLocations: Location_2[]; - /** The list of readable locations for a geo-replicated database account. */ - readonly readableLocations: Location_2[]; - /** - * The self-link for Databases in the databaseAccount. - * @deprecated Use `databasesLink` - */ - get DatabasesLink(): string; - /** The self-link for Databases in the databaseAccount. */ - readonly databasesLink: string; - /** - * The self-link for Media in the databaseAccount. - * @deprecated Use `mediaLink` - */ - get MediaLink(): string; - /** The self-link for Media in the databaseAccount. */ - readonly mediaLink: string; - /** - * Attachment content (media) storage quota in MBs ( Retrieved from gateway ). - * @deprecated use `maxMediaStorageUsageInMB` - */ - get MaxMediaStorageUsageInMB(): number; - /** Attachment content (media) storage quota in MBs ( Retrieved from gateway ). */ - readonly maxMediaStorageUsageInMB: number; - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - * - * @deprecated use `currentMediaStorageUsageInMB` - */ - get CurrentMediaStorageUsageInMB(): number; - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - */ - readonly currentMediaStorageUsageInMB: number; - /** - * Gets the UserConsistencyPolicy settings. - * @deprecated use `consistencyPolicy` - */ - get ConsistencyPolicy(): ConsistencyLevel; - /** Gets the UserConsistencyPolicy settings. */ - readonly consistencyPolicy: ConsistencyLevel; - readonly enableMultipleWritableLocations: boolean; - constructor(body: { - [key: string]: any; - }, headers: CosmosHeaders); -} -export declare interface DatabaseDefinition { - /** The id of the database. */ - id?: string; -} -export declare interface DatabaseRequest extends DatabaseDefinition { - /** Throughput for this database. */ - throughput?: number; - maxThroughput?: number; - autoUpgradePolicy?: { - throughputPolicy: { - incrementPercent: number; - }; - }; -} -/** Response object for Database operations */ -export declare class DatabaseResponse extends ResourceResponse { - constructor(resource: DatabaseDefinition & Resource, headers: CosmosHeaders, statusCode: number, database: Database); - /** A reference to the {@link Database} that the returned {@link DatabaseDefinition} corresponds to. */ - readonly database: Database; -} -/** - * Operations for creating new databases, and reading/querying all databases - * - * @see {@link Database} for reading or deleting an existing database; use `client.database(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `databases.readAll()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ -export declare class Databases { - readonly client: CosmosClient; - private readonly clientContext; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database. - */ - constructor(client: CosmosClient, clientContext: ClientContext); - /** - * Queries all databases. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @db", - * parameters: [ - * {name: "@db", value: "Todo"} - * ] - * }; - * const {body: databaseList} = await client.databases.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all databases. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @db", - * parameters: [ - * {name: "@db", value: "Todo"} - * ] - * }; - * const {body: databaseList} = await client.databases.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Send a request for creating a database. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - create(body: DatabaseRequest, options?: RequestOptions): Promise; - /** - * Check if a database exists, and if it doesn't, create it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Additional options for the request - */ - createIfNotExists(body: DatabaseRequest, options?: RequestOptions): Promise; - /** - * Reads all databases. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const {body: databaseList} = await client.databases.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; -} -/** Defines a target data type of an index path specification in the Azure Cosmos DB service. */ -export declare enum DataType { - /** Represents a numeric data type. */ - Number = "Number", - /** Represents a string data type. */ - String = "String", - /** Represents a point data type. */ - Point = "Point", - /** Represents a line string data type. */ - LineString = "LineString", - /** Represents a polygon data type. */ - Polygon = "Polygon", - /** Represents a multi-polygon data type. */ - MultiPolygon = "MultiPolygon" -} -export declare const DEFAULT_PARTITION_KEY_PATH: "/_partitionKey"; -export declare type DeleteOperation = OperationBase & { - operationType: typeof BulkOperationType.Delete; - id: string; -}; -export declare interface DeleteOperationInput { - partitionKey?: string | number | null | Record | undefined; - operationType: typeof BulkOperationType.Delete; - id: string; -} -export declare interface ErrorBody { - code: string; - message: string; - /** - * @hidden - */ - additionalErrorInfo?: PartitionedQueryExecutionInfo; -} -export declare class ErrorResponse extends Error { - code?: number; - substatus?: number; - body?: ErrorBody; - headers?: CosmosHeaders; - activityId?: string; - retryAfterInMs?: number; - retryAfterInMilliseconds?: number; - [key: string]: any; -} -export declare type ExistingKeyOperation = { - op: keyof typeof PatchOperationType; - value: any; - path: string; -}; -/** - * @hidden - */ -export declare function extractPartitionKey(document: unknown, partitionKeyDefinition: PartitionKeyDefinition): PartitionKey[]; -/** - * The feed options and query methods. - */ -export declare interface FeedOptions extends SharedOptions { - /** Opaque token for continuing the enumeration. Default: undefined - * @deprecated Use continuationToken instead. - */ - continuation?: string; - /** Opaque token for continuing the enumeration. Default: undefined */ - continuationToken?: string; - /** - * Limits the size of the continuation token in the response. Default: undefined - * - * Continuation Tokens contain optional data that can be removed from the serialization before writing it out to a header. - * By default we are capping this to 1kb to avoid long headers (Node.js has a global header size limit). - * A user may set this field to allow for longer headers, which can help the backend optimize query execution." - */ - continuationTokenLimitInKB?: number; - /** - * Allow scan on the queries which couldn't be served as indexing was opted out on the requested paths. Default: false - * - * In general, it is best to avoid using this setting. Scans are relatively expensive and take a long time to serve. - */ - enableScanInQuery?: boolean; - /** - * The maximum number of concurrent operations that run client side during parallel query execution in the - * Azure Cosmos DB database service. Negative values make the system automatically decides the number of - * concurrent operations to run. Default: 0 (no parallelism) - */ - maxDegreeOfParallelism?: number; - /** - * Max number of items to be returned in the enumeration operation. Default: undefined (server will defined payload) - * - * Expirimenting with this value can usually result in the biggest performance changes to the query. - * - * The smaller the item count, the faster the first result will be delivered (for non-aggregates). For larger amounts, - * it will take longer to serve the request, but you'll usually get better throughput for large queries (i.e. if you need 1000 items - * before you can do any other actions, set `maxItemCount` to 1000. If you can start doing work after the first 100, set `maxItemCount` to 100.) - */ - maxItemCount?: number; - /** - * Note: consider using changeFeed instead. - * - * Indicates a change feed request. Must be set to "Incremental feed", or omitted otherwise. Default: false - */ - useIncrementalFeed?: boolean; - /** Conditions Associated with the request. */ - accessCondition?: { - /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */ - type: string; - /** Conditional HTTP method header value (the _etag field from the last version you read). */ - condition: string; - }; - /** - * Enable returning query metrics in response headers. Default: false - * - * Used for debugging slow or expensive queries. Also increases response size and if you're using a low max header size in Node.js, - * you can run into issues faster. - */ - populateQueryMetrics?: boolean; - /** - * Enable buffering additional items during queries. Default: false - * - * This will buffer an additional page at a time (multiplied by maxDegreeOfParallelism) from the server in the background. - * This improves latency by fetching pages before they are needed by the client. If you're draining all of the results from the - * server, like `.fetchAll`, you should usually enable this. If you're only fetching one page at a time via continuation token, - * you should avoid this. If you're draining more than one page, but not the entire result set, it may help improve latency, but - * it will increase the total amount of RU/s use to serve the entire query (as some pages will be fetched more than once). - */ - bufferItems?: boolean; - /** - * This setting forces the query to use a query plan. Default: false - * - * Note: this will disable continuation token support, even for single partition queries. - * - * For queries like aggregates and most cross partition queries, this happens anyway. - * However, since the library doesn't know what type of query it is until we get back the first response, - * some optimization can't happen until later. - * - * If this setting is enabled, it will force query plan for the query, which will save some network requests - * and ensure parallelism can happen. Useful for when you know you're doing cross-partition or aggregate queries. - */ - forceQueryPlan?: boolean; - /** Limits the query to a specific partition key. Default: undefined - * - * Scoping a query to a single partition can be accomplished two ways: - * - * `container.items.query('SELECT * from c', { partitionKey: "foo" }).toArray()` - * `container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray()` - * - * The former is useful when the query body is out of your control - * but you still want to restrict it to a single partition. Example: an end user specified query. - */ - partitionKey?: any; -} -export declare class FeedResponse { - readonly resources: TResource[]; - private readonly headers; - readonly hasMoreResults: boolean; - constructor(resources: TResource[], headers: CosmosHeaders, hasMoreResults: boolean); - get continuation(): string; - get continuationToken(): string; - get queryMetrics(): string; - get requestCharge(): number; - get activityId(): string; -} -/** @hidden */ -declare type FetchFunctionCallback = (options: FeedOptions) => Promise>; -export declare enum GeospatialType { - /** Represents data in round-earth coordinate system. */ - Geography = "Geography", - /** Represents data in Eucledian(flat) coordinate system. */ - Geometry = "Geometry" -} -/** - * @hidden - * This internal class implements the logic for endpoint management for geo-replicated database accounts. - */ -export declare class GlobalEndpointManager { - private readDatabaseAccount; - /** - * The endpoint used to create the client instance. - */ - private defaultEndpoint; - /** - * Flag to enable/disable automatic redirecting of requests based on read/write operations. - */ - enableEndpointDiscovery: boolean; - private isRefreshing; - private options; - /** - * List of azure regions to be used as preferred locations for read requests. - */ - private preferredLocations; - private writeableLocations; - private readableLocations; - private unavailableReadableLocations; - private unavailableWriteableLocations; - /** - * @param options - The document client instance. - */ - constructor(options: CosmosClientOptions, readDatabaseAccount: (opts: RequestOptions) => Promise>); - /** - * Gets the current read endpoint from the endpoint cache. - */ - getReadEndpoint(): Promise; - /** - * Gets the current write endpoint from the endpoint cache. - */ - getWriteEndpoint(): Promise; - getReadEndpoints(): Promise>; - getWriteEndpoints(): Promise>; - markCurrentLocationUnavailableForRead(endpoint: string): Promise; - markCurrentLocationUnavailableForWrite(endpoint: string): Promise; - canUseMultipleWriteLocations(resourceType?: ResourceType, operationType?: OperationType): boolean; - resolveServiceEndpoint(resourceType: ResourceType, operationType: OperationType): Promise; - /** - * Refreshes the endpoint list by clearning stale unavailability and then - * retrieving the writable and readable locations from the geo-replicated database account - * and then updating the locations cache. - * We skip the refreshing if enableEndpointDiscovery is set to False - */ - refreshEndpointList(): Promise; - private refreshEndpoints; - private refreshStaleUnavailableLocations; - /** - * update the locationUnavailability to undefined if the location is available again - * @param now - current time - * @param unavailableLocations - list of unavailable locations - * @param allLocations - list of all locations - */ - private updateLocation; - private cleanUnavailableLocationList; - /** - * Gets the database account first by using the default endpoint, and if that doesn't returns - * use the endpoints for the preferred locations in the order they are specified to get - * the database account. - */ - private getDatabaseAccountFromAnyEndpoint; - /** - * Gets the locational endpoint using the location name passed to it using the default endpoint. - * - * @param defaultEndpoint - The default endpoint to use for the endpoint. - * @param locationName - The location name for the azure region like "East US". - */ - private static getLocationalEndpoint; -} -export declare interface GroupByAliasToAggregateType { - [key: string]: AggregateType; -} -export declare type GroupByExpressions = string[]; -/** - * @hidden - */ -export declare enum HTTPMethod { - get = "GET", - patch = "PATCH", - post = "POST", - put = "PUT", - delete = "DELETE" -} -export declare interface Index { - kind: keyof typeof IndexKind; - dataType: keyof typeof DataType; - precision?: number; -} -export declare interface IndexedPath { - path: string; - indexes?: Index[]; -} -/** - * Specifies the supported indexing modes. - */ -export declare enum IndexingMode { - /** - * Index is updated synchronously with a create or update operation. - * - * With consistent indexing, query behavior is the same as the default consistency level for the container. - * The index is always kept up to date with the data. - */ - consistent = "consistent", - /** - * Index is updated asynchronously with respect to a create or update operation. - * - * With lazy indexing, queries are eventually consistent. The index is updated when the container is idle. - */ - lazy = "lazy", - /** No Index is provided. */ - none = "none" -} -export declare interface IndexingPolicy { - /** The indexing mode (consistent or lazy) {@link IndexingMode}. */ - indexingMode?: keyof typeof IndexingMode; - automatic?: boolean; - /** An array of {@link IncludedPath} represents the paths to be included for indexing. */ - includedPaths?: IndexedPath[]; - /** An array of {@link IncludedPath} represents the paths to be excluded for indexing. */ - excludedPaths?: IndexedPath[]; - spatialIndexes?: SpatialIndex[]; -} -/** - * Specifies the supported Index types. - */ -export declare enum IndexKind { - /** - * This is supplied for a path which requires sorting. - */ - Range = "Range", - /** - * This is supplied for a path which requires geospatial indexing. - */ - Spatial = "Spatial" -} -/** - * Used to perform operations on a specific item. - * - * @see {@link Items} for operations on all items; see `container.items`. - */ -export declare class Item { - readonly container: Container; - readonly id: string; - private readonly clientContext; - private partitionKey; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Item}. - * @param partitionKey - The primary key of the given {@link Item} (only for partitioned containers). - */ - constructor(container: Container, id: string, partitionKey: PartitionKey, clientContext: ClientContext); - /** - * Read the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * If the type, T, is a class, it won't pass `typeof` comparisons, because it won't have a match prototype. - * It's recommended to only use interfaces. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Additional options for the request - * - * @example Using custom type for response - * ```typescript - * interface TodoItem { - * title: string; - * done: bool; - * id: string; - * } - * - * let item: TodoItem; - * ({body: item} = await item.read()); - * ``` - */ - read(options?: RequestOptions): Promise>; - /** - * Replace the item's definition. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - The definition to replace the existing {@link Item}'s definition with. - * @param options - Additional options for the request - */ - replace(body: ItemDefinition, options?: RequestOptions): Promise>; - /** - * Replace the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - The definition to replace the existing {@link Item}'s definition with. - * @param options - Additional options for the request - */ - replace(body: T, options?: RequestOptions): Promise>; - /** - * Delete the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - delete(options?: RequestOptions): Promise>; - /** - * Perform a JSONPatch on the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - patch(body: PatchRequestBody, options?: RequestOptions): Promise>; -} -/** - * Items in Cosmos DB are simply JSON objects. - * Most of the Item operations allow for your to provide your own type - * that extends the very simple ItemDefinition. - * - * You cannot use any reserved keys. You can see the reserved key list - * in {@link ItemBody} - */ -export declare interface ItemDefinition { - /** The id of the item. User settable property. Uniquely identifies the item along with the partition key */ - id?: string; - /** Time to live in seconds for collections with TTL enabled */ - ttl?: number; - [key: string]: any; -} -export declare class ItemResponse extends ResourceResponse { - constructor(resource: T & Resource, headers: CosmosHeaders, statusCode: number, subsstatusCode: number, item: Item); - /** Reference to the {@link Item} the response corresponds to. */ - readonly item: Item; -} -/** - * Operations for creating new items, and reading/querying all items - * - * @see {@link Item} for reading, replacing, or deleting an existing container; use `.item(id)`. - */ -export declare class Items { - readonly container: Container; - private readonly clientContext; - /** - * Create an instance of {@link Items} linked to the parent {@link Container}. - * @param container - The parent container. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Queries all items. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM Families f WHERE f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Hendricks"} - * ] - * }; - * const {result: items} = await items.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all items. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT firstname FROM Families f WHERE f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Hendricks"} - * ] - * }; - * const {result: items} = await items.query<{firstName: string}>(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * - * @deprecated Use `changeFeed` instead. - * - * @example Read from the beginning of the change feed. - * ```javascript - * const iterator = items.readChangeFeed({ startFromBeginning: true }); - * const firstPage = await iterator.fetchNext(); - * const firstPageResults = firstPage.result - * const secondPage = await iterator.fetchNext(); - * ``` - */ - readChangeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - * - */ - readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - */ - readChangeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - */ - readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * - * @example Read from the beginning of the change feed. - * ```javascript - * const iterator = items.readChangeFeed({ startFromBeginning: true }); - * const firstPage = await iterator.fetchNext(); - * const firstPageResults = firstPage.result - * const secondPage = await iterator.fetchNext(); - * ``` - */ - changeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Read all items. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const {body: containerList} = await items.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Read all items. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const {body: containerList} = await items.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - create(body: T, options?: RequestOptions): Promise>; - /** - * Upsert an item. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - upsert(body: unknown, options?: RequestOptions): Promise>; - /** - * Upsert an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - upsert(body: T, options?: RequestOptions): Promise>; - /** - * Execute bulk operations on items. - * - * Bulk takes an array of Operations which are typed based on what the operation does. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is optional at the top level if present in the resourceBody - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.bulk(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param bulkOptions - Optional options object to modify bulk behavior. Pass \{ continueOnError: true \} to continue executing operations when one fails. (Defaults to false) ** NOTE: THIS WILL DEFAULT TO TRUE IN THE 4.0 RELEASE - * @param options - Used for modifying the request. - */ - bulk(operations: OperationInput[], bulkOptions?: BulkOptions, options?: RequestOptions): Promise; - /** - * Execute transactional batch operations on items. - * - * Batch takes an array of Operations which are typed based on what the operation does. Batch is transactional and will rollback all operations if one fails. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is required as a second argument to batch, but defaults to the default partition key - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.batch(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param options - Used for modifying the request - */ - batch(operations: OperationInput[], partitionKey?: string, options?: RequestOptions): Promise>; -} -export declare interface JSONArray extends ArrayLike { -} -export declare interface JSONObject { - [key: string]: JSONValue; -} -export declare type JSONValue = boolean | number | string | null | JSONArray | JSONObject; -/** - * Used to specify the locations that are available, read is index 1 and write is index 0. - */ -declare interface Location_2 { - name: string; - databaseAccountEndpoint: string; - unavailable?: boolean; - lastUnavailabilityTimestampInMs?: number; -} -export { Location_2 as Location }; -/** - * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, - * allowing you to log those results or handle errors. - * @hidden - */ -export declare type Next = (context: RequestContext) => Promise>; -/** - * Use to read or replace an existing {@link Offer} by id. - * - * @see {@link Offers} to query or read all offers. - */ -export declare class Offer { - readonly client: CosmosClient; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database Account. - * @param id - The id of the given {@link Offer}. - */ - constructor(client: CosmosClient, id: string, clientContext: ClientContext); - /** - * Read the {@link OfferDefinition} for the given {@link Offer}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Offer} with the specified {@link OfferDefinition}. - * @param body - The specified {@link OfferDefinition} - */ - replace(body: OfferDefinition, options?: RequestOptions): Promise; -} -export declare interface OfferDefinition { - id?: string; - offerType?: string; - offerVersion?: string; - resource?: string; - offerResourceId?: string; - content?: { - offerThroughput: number; - offerIsRUPerMinuteThroughputEnabled: boolean; - offerMinimumThroughputParameters?: { - maxThroughputEverProvisioned: number; - maxConsumedStorageEverInKB: number; - }; - offerAutopilotSettings?: { - tier: number; - maximumTierThroughput: number; - autoUpgrade: boolean; - maxThroughput: number; - }; - }; -} -export declare class OfferResponse extends ResourceResponse { - constructor(resource: OfferDefinition & Resource, headers: CosmosHeaders, statusCode: number, offer?: Offer); - /** A reference to the {@link Offer} corresponding to the returned {@link OfferDefinition}. */ - readonly offer: Offer; -} -/** - * Use to query or read all Offers. - * - * @see {@link Offer} to read or replace an existing {@link Offer} by id. - */ -export declare class Offers { - readonly client: CosmosClient; - private readonly clientContext; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the offers. - */ - constructor(client: CosmosClient, clientContext: ClientContext); - /** - * Query all offers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all offers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all offers. - * @example Read all offers to array. - * ```typescript - * const {body: offerList} = await client.offers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; -} -export declare type Operation = CreateOperation | UpsertOperation | ReadOperation | DeleteOperation | ReplaceOperation | BulkPatchOperation; -export declare interface OperationBase { - partitionKey?: string; - ifMatch?: string; - ifNoneMatch?: string; -} -export declare type OperationInput = CreateOperationInput | UpsertOperationInput | ReadOperationInput | DeleteOperationInput | ReplaceOperationInput | PatchOperationInput; -export declare interface OperationResponse { - statusCode: number; - requestCharge: number; - eTag?: string; - resourceBody?: JSONObject; -} -/** - * @hidden - */ -export declare enum OperationType { - Create = "create", - Replace = "replace", - Upsert = "upsert", - Delete = "delete", - Read = "read", - Query = "query", - Execute = "execute", - Batch = "batch", - Patch = "patch" -} -export declare type OperationWithItem = OperationBase & { - resourceBody: JSONObject; -}; -/** - * @hidden - */ -export declare interface PartitionedQueryExecutionInfo { - partitionedQueryExecutionInfoVersion: number; - queryInfo: QueryInfo; - queryRanges: QueryRange[]; -} -export declare type PartitionKey = PartitionKeyDefinition | string | number | unknown; -export declare interface PartitionKeyDefinition { - /** - * An array of paths for which data within the collection can be partitioned. Paths must not contain a wildcard or - * a trailing slash. For example, the JSON property “AccountNumber” is specified as “/AccountNumber”. The array must - * contain only a single value. - */ - paths: string[]; - /** - * An optional field, if not specified the default value is 1. To use the large partition key set the version to 2. - * To learn about large partition keys, see [how to create containers with large partition key](https://docs.microsoft.com/en-us/azure/cosmos-db/large-partition-keys) article. - */ - version?: number; - systemKey?: boolean; -} -/** - * @hidden - */ -export declare interface PartitionKeyRange { - id: string; - minInclusive: string; - maxExclusive: string; - ridPrefix: number; - throughputFraction: number; - status: string; - parents: string[]; -} -export declare interface PartitionKeyRangePropertiesNames { - MinInclusive: "minInclusive"; - MaxExclusive: "maxExclusive"; - Id: "id"; -} -export declare type PatchOperation = ExistingKeyOperation | RemoveOperation; -export declare interface PatchOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Patch; - resourceBody: PatchRequestBody; - id: string; -} -export declare const PatchOperationType: { - readonly add: "add"; - readonly replace: "replace"; - readonly remove: "remove"; - readonly set: "set"; - readonly incr: "incr"; -}; -export declare type PatchRequestBody = { - operations: PatchOperation[]; - condition?: string; -} | PatchOperation[]; -/** - * Use to read, replace, or delete a given {@link Permission} by id. - * - * @see {@link Permissions} to create, upsert, query, or read all Permissions. - */ -export declare class Permission { - readonly user: User; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param user - The parent {@link User}. - * @param id - The id of the given {@link Permission}. - */ - constructor(user: User, id: string, clientContext: ClientContext); - /** - * Read the {@link PermissionDefinition} of the given {@link Permission}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Permission} with the specified {@link PermissionDefinition}. - * @param body - The specified {@link PermissionDefinition}. - */ - replace(body: PermissionDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link Permission}. - */ - delete(options?: RequestOptions): Promise; -} -export declare interface PermissionBody { - /** System generated resource token for the particular resource and user */ - _token: string; -} -export declare interface PermissionDefinition { - /** The id of the permission */ - id: string; - /** The mode of the permission, must be a value of {@link PermissionMode} */ - permissionMode: PermissionMode; - /** The link of the resource that the permission will be applied to. */ - resource: string; - resourcePartitionKey?: string | any[]; -} -/** - * Enum for permission mode values. - */ -export declare enum PermissionMode { - /** Permission not valid. */ - None = "none", - /** Permission applicable for read operations only. */ - Read = "read", - /** Permission applicable for all operations. */ - All = "all" -} -export declare class PermissionResponse extends ResourceResponse { - constructor(resource: PermissionDefinition & PermissionBody & Resource, headers: CosmosHeaders, statusCode: number, permission: Permission); - /** A reference to the {@link Permission} corresponding to the returned {@link PermissionDefinition}. */ - readonly permission: Permission; -} -/** - * Use to create, replace, query, and read all Permissions. - * - * @see {@link Permission} to read, replace, or delete a specific permission by id. - */ -declare class Permissions_2 { - readonly user: User; - private readonly clientContext; - /** - * @hidden - * @param user - The parent {@link User}. - */ - constructor(user: User, clientContext: ClientContext); - /** - * Query all permissions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all permissions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all permissions. - * @example Read all permissions to array. - * ```typescript - * const {body: permissionList} = await user.permissions.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a permission. - * - * A permission represents a per-User Permission to access a specific resource - * e.g. Item or Container. - * @param body - Represents the body of the permission. - */ - create(body: PermissionDefinition, options?: RequestOptions): Promise; - /** - * Upsert a permission. - * - * A permission represents a per-User Permission to access a - * specific resource e.g. Item or Container. - */ - upsert(body: PermissionDefinition, options?: RequestOptions): Promise; -} -export { Permissions_2 as Permissions }; -/** - * Plugins allow you to customize the behavior of the SDk with additional logging, retry, or additional functionality. - * - * A plugin is a function which returns a `Promise>`, and is passed a RequestContext and Next object. - * - * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, - * allowing you to log those results or handle errors. - * - * RequestContext is an object which controls what operation is happening, against which endpoint, and more. Modifying this and passing it along via next is how - * you modify future SDK behavior. - * - * @hidden - */ -declare type Plugin_2 = (context: RequestContext, next: Next) => Promise>; -export { Plugin_2 as Plugin }; -/** - * Specifies which event to run for the specified plugin - * - * @hidden - */ -export declare interface PluginConfig { - /** - * The event to run the plugin on - */ - on: keyof typeof PluginOn; - /** - * The plugin to run - */ - plugin: Plugin_2; -} -/** - * Used to specify which type of events to execute this plug in on. - * - * @hidden - */ -export declare enum PluginOn { - /** - * Will be executed per network request - */ - request = "request", - /** - * Will be executed per API operation - */ - operation = "operation" -} -/** - * @hidden - */ -export declare interface QueryInfo { - top?: any; - orderBy?: any[]; - orderByExpressions?: any[]; - offset?: number; - limit?: number; - aggregates?: AggregateType[]; - groupByExpressions?: GroupByExpressions; - groupByAliasToAggregateType: GroupByAliasToAggregateType; - rewrittenQuery?: any; - distinctType: string; - hasSelectValue: boolean; -} -/** - * Represents a QueryIterator Object, an implementation of feed or query response that enables - * traversal and iterating over the response - * in the Azure Cosmos DB database service. - */ -export declare class QueryIterator { - private clientContext; - private query; - private options; - private fetchFunctions; - private resourceLink?; - private resourceType?; - private fetchAllTempResources; - private fetchAllLastResHeaders; - private queryExecutionContext; - private queryPlanPromise; - private isInitialized; - /** - * @hidden - */ - constructor(clientContext: ClientContext, query: SqlQuerySpec | string, options: FeedOptions, fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[], resourceLink?: string, resourceType?: ResourceType); - /** - * Gets an async iterator that will yield results until completion. - * - * NOTE: AsyncIterators are a very new feature and you might need to - * use polyfils/etc. in order to use them in your code. - * - * If you're using TypeScript, you can use the following polyfill as long - * as you target ES6 or higher and are running on Node 6 or higher. - * - * ```typescript - * if (!Symbol || !Symbol.asyncIterator) { - * (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); - * } - * ``` - * - * @example Iterate over all databases - * ```typescript - * for await(const { resources: db } of client.databases.readAll().getAsyncIterator()) { - * console.log(`Got ${db} from AsyncIterator`); - * } - * ``` - */ - getAsyncIterator(): AsyncIterable>; - /** - * Determine if there are still remaining resources to processs based on the value of the continuation token or the - * elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the QueryIterator. - */ - hasMoreResults(): boolean; - /** - * Fetch all pages for the query and return a single FeedResponse. - */ - fetchAll(): Promise>; - /** - * Retrieve the next batch from the feed. - * - * This may or may not fetch more pages from the backend depending on your settings - * and the type of query. Aggregate queries will generally fetch all backend pages - * before returning the first batch of responses. - */ - fetchNext(): Promise>; - /** - * Reset the QueryIterator to the beginning and clear all the resources inside it - */ - reset(): void; - private toArrayImplementation; - private createPipelinedExecutionContext; - private fetchQueryPlan; - private needsQueryPlan; - private initPromise; - private init; - private _init; - private handleSplitError; -} -export declare class QueryMetrics { - readonly retrievedDocumentCount: number; - readonly retrievedDocumentSize: number; - readonly outputDocumentCount: number; - readonly outputDocumentSize: number; - readonly indexHitDocumentCount: number; - readonly totalQueryExecutionTime: TimeSpan; - readonly queryPreparationTimes: QueryPreparationTimes; - readonly indexLookupTime: TimeSpan; - readonly documentLoadTime: TimeSpan; - readonly vmExecutionTime: TimeSpan; - readonly runtimeExecutionTimes: RuntimeExecutionTimes; - readonly documentWriteTime: TimeSpan; - readonly clientSideMetrics: ClientSideMetrics; - constructor(retrievedDocumentCount: number, retrievedDocumentSize: number, outputDocumentCount: number, outputDocumentSize: number, indexHitDocumentCount: number, totalQueryExecutionTime: TimeSpan, queryPreparationTimes: QueryPreparationTimes, indexLookupTime: TimeSpan, documentLoadTime: TimeSpan, vmExecutionTime: TimeSpan, runtimeExecutionTimes: RuntimeExecutionTimes, documentWriteTime: TimeSpan, clientSideMetrics: ClientSideMetrics); - /** - * Gets the IndexHitRatio - * @hidden - */ - get indexHitRatio(): number; - /** - * returns a new QueryMetrics instance that is the addition of this and the arguments. - */ - add(queryMetricsArray: QueryMetrics[]): QueryMetrics; - /** - * Output the QueryMetrics as a delimited string. - * @hidden - */ - toDelimitedString(): string; - static readonly zero: QueryMetrics; - /** - * Returns a new instance of the QueryMetrics class that is the aggregation of an array of query metrics. - */ - static createFromArray(queryMetricsArray: QueryMetrics[]): QueryMetrics; - /** - * Returns a new instance of the QueryMetrics class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string, clientSideMetrics?: ClientSideMetrics): QueryMetrics; -} -export declare const QueryMetricsConstants: { - RetrievedDocumentCount: string; - RetrievedDocumentSize: string; - OutputDocumentCount: string; - OutputDocumentSize: string; - IndexHitRatio: string; - IndexHitDocumentCount: string; - TotalQueryExecutionTimeInMs: string; - QueryCompileTimeInMs: string; - LogicalPlanBuildTimeInMs: string; - PhysicalPlanBuildTimeInMs: string; - QueryOptimizationTimeInMs: string; - IndexLookupTimeInMs: string; - DocumentLoadTimeInMs: string; - VMExecutionTimeInMs: string; - DocumentWriteTimeInMs: string; - QueryEngineTimes: string; - SystemFunctionExecuteTimeInMs: string; - UserDefinedFunctionExecutionTimeInMs: string; - RetrievedDocumentCountText: string; - RetrievedDocumentSizeText: string; - OutputDocumentCountText: string; - OutputDocumentSizeText: string; - IndexUtilizationText: string; - TotalQueryExecutionTimeText: string; - QueryPreparationTimesText: string; - QueryCompileTimeText: string; - LogicalPlanBuildTimeText: string; - PhysicalPlanBuildTimeText: string; - QueryOptimizationTimeText: string; - QueryEngineTimesText: string; - IndexLookupTimeText: string; - DocumentLoadTimeText: string; - WriteOutputTimeText: string; - RuntimeExecutionTimesText: string; - TotalExecutionTimeText: string; - SystemFunctionExecuteTimeText: string; - UserDefinedFunctionExecutionTimeText: string; - ClientSideQueryMetricsText: string; - RetriesText: string; - RequestChargeText: string; - FetchExecutionRangesText: string; - SchedulingMetricsText: string; -}; -export declare class QueryPreparationTimes { - readonly queryCompilationTime: TimeSpan; - readonly logicalPlanBuildTime: TimeSpan; - readonly physicalPlanBuildTime: TimeSpan; - readonly queryOptimizationTime: TimeSpan; - constructor(queryCompilationTime: TimeSpan, logicalPlanBuildTime: TimeSpan, physicalPlanBuildTime: TimeSpan, queryOptimizationTime: TimeSpan); - /** - * returns a new QueryPreparationTimes instance that is the addition of this and the arguments. - */ - add(...queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes; - /** - * Output the QueryPreparationTimes as a delimited string. - */ - toDelimitedString(): string; - static readonly zero: QueryPreparationTimes; - /** - * Returns a new instance of the QueryPreparationTimes class that is the - * aggregation of an array of QueryPreparationTimes. - */ - static createFromArray(queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes; - /** - * Returns a new instance of the QueryPreparationTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string): QueryPreparationTimes; -} -/** - * @hidden - */ -export declare interface QueryRange { - min: string; - max: string; - isMinInclusive: boolean; - isMaxInclusive: boolean; -} -export declare type ReadOperation = OperationBase & { - operationType: typeof BulkOperationType.Read; - id: string; -}; -export declare interface ReadOperationInput { - partitionKey?: string | number | boolean | null | Record | undefined; - operationType: typeof BulkOperationType.Read; - id: string; -} -export declare type RemoveOperation = { - op: "remove"; - path: string; -}; -export declare type ReplaceOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Replace; - id: string; -}; -export declare interface ReplaceOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Replace; - resourceBody: JSONObject; - id: string; -} -/** - * @hidden - */ -export declare interface RequestContext { - path?: string; - operationType?: OperationType; - client?: ClientContext; - retryCount?: number; - resourceType?: ResourceType; - resourceId?: string; - globalEndpointManager: GlobalEndpointManager; - connectionPolicy: ConnectionPolicy; - requestAgent: Agent; - body?: any; - headers?: CosmosHeaders_2; - endpoint?: string; - method: HTTPMethod; - partitionKeyRangeId?: string; - options: FeedOptions | RequestOptions; - plugins: PluginConfig[]; - partitionKey?: PartitionKey; - pipeline?: Pipeline; -} -/** @hidden */ -declare interface RequestInfo_2 { - verb: HTTPMethod; - path: string; - resourceId: string; - resourceType: ResourceType; - headers: CosmosHeaders; -} -export { RequestInfo_2 as RequestInfo }; -/** - * Options that can be specified for a requested issued to the Azure Cosmos DB servers.= - */ -export declare interface RequestOptions extends SharedOptions { - /** Conditions Associated with the request. */ - accessCondition?: { - /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */ - type: string; - /** Conditional HTTP method header value (the _etag field from the last version you read). */ - condition: string; - }; - /** Consistency level required by the client. */ - consistencyLevel?: string; - /** - * DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity - * to serve the request if regular provisioned RUs/second is exhausted. - */ - disableRUPerMinuteUsage?: boolean; - /** Enables or disables logging in JavaScript stored procedures. */ - enableScriptLogging?: boolean; - /** Specifies indexing directives (index, do not index .. etc). */ - indexingDirective?: string; - /** The offer throughput provisioned for a container in measurement of Requests-per-Unit. */ - offerThroughput?: number; - /** - * Offer type when creating document containers. - * - * This option is only valid when creating a document container. - */ - offerType?: string; - /** Enables/disables getting document container quota related stats for document container read requests. */ - populateQuotaInfo?: boolean; - /** Indicates what is the post trigger to be invoked after the operation. */ - postTriggerInclude?: string | string[]; - /** Indicates what is the pre trigger to be invoked before the operation. */ - preTriggerInclude?: string | string[]; - /** Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions). */ - resourceTokenExpirySeconds?: number; - /** (Advanced use case) The url to connect to. */ - urlConnection?: string; - /** Disable automatic id generation (will cause creates to fail if id isn't on the definition) */ - disableAutomaticIdGeneration?: boolean; -} -export declare interface Resource { - /** Required. User settable property. Unique name that identifies the item, that is, no two items share the same ID within a database. The id must not exceed 255 characters. */ - id: string; - /** System generated property. The resource ID (_rid) is a unique identifier that is also hierarchical per the resource stack on the resource model. It is used internally for placement and navigation of the item resource. */ - _rid: string; - /** System generated property. Specifies the last updated timestamp of the resource. The value is a timestamp. */ - _ts: number; - /** System generated property. The unique addressable URI for the resource. */ - _self: string; - /** System generated property. Represents the resource etag required for optimistic concurrency control. */ - _etag: string; -} -export declare class ResourceResponse { - readonly resource: TResource | undefined; - readonly headers: CosmosHeaders_2; - readonly statusCode: StatusCode; - readonly substatus?: SubStatusCode; - constructor(resource: TResource | undefined, headers: CosmosHeaders_2, statusCode: StatusCode, substatus?: SubStatusCode); - get requestCharge(): number; - get activityId(): string; - get etag(): string; -} -/** - * @hidden - */ -export declare enum ResourceType { - none = "", - database = "dbs", - offer = "offers", - user = "users", - permission = "permissions", - container = "colls", - conflicts = "conflicts", - sproc = "sprocs", - udf = "udfs", - trigger = "triggers", - item = "docs", - pkranges = "pkranges", - partitionkey = "partitionKey" -} -/** - * @hidden - */ -declare interface Response_2 { - headers: CosmosHeaders; - result?: T; - code?: number; - substatus?: number; -} -export { Response_2 as Response }; -export { RestError }; -/** - * Represents the Retry policy assocated with throttled requests in the Azure Cosmos DB database service. - */ -export declare interface RetryOptions { - /** Max number of retries to be performed for a request. Default value 9. */ - maxRetryAttemptCount: number; - /** Fixed retry interval in milliseconds to wait between each retry ignoring the retryAfter returned as part of the response. */ - fixedRetryIntervalInMilliseconds: number; - /** Max wait time in seconds to wait for a request while the retries are happening. Default value 30 seconds. */ - maxWaitTimeInSeconds: number; -} -export declare class RuntimeExecutionTimes { - readonly queryEngineExecutionTime: TimeSpan; - readonly systemFunctionExecutionTime: TimeSpan; - readonly userDefinedFunctionExecutionTime: TimeSpan; - constructor(queryEngineExecutionTime: TimeSpan, systemFunctionExecutionTime: TimeSpan, userDefinedFunctionExecutionTime: TimeSpan); - /** - * returns a new RuntimeExecutionTimes instance that is the addition of this and the arguments. - */ - add(...runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes; - /** - * Output the RuntimeExecutionTimes as a delimited string. - */ - toDelimitedString(): string; - static readonly zero: RuntimeExecutionTimes; - /** - * Returns a new instance of the RuntimeExecutionTimes class that is - * the aggregation of an array of RuntimeExecutionTimes. - */ - static createFromArray(runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes; - /** - * Returns a new instance of the RuntimeExecutionTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string): RuntimeExecutionTimes; -} -/** - * @hidden - */ -export declare enum SasTokenPermissionKind { - ContainerCreateItems = 1, - ContainerReplaceItems = 2, - ContainerUpsertItems = 4, - ContainerDeleteItems = 128, - ContainerExecuteQueries = 1, - ContainerReadFeeds = 2, - ContainerCreateStoreProcedure = 16, - ContainerReadStoreProcedure = 4, - ContainerReplaceStoreProcedure = 32, - ContainerDeleteStoreProcedure = 64, - ContainerCreateTriggers = 256, - ContainerReadTriggers = 16, - ContainerReplaceTriggers = 512, - ContainerDeleteTriggers = 1024, - ContainerCreateUserDefinedFunctions = 2048, - ContainerReadUserDefinedFunctions = 8, - ContainerReplaceUserDefinedFunctions = 4096, - ContainerDeleteUserDefinedFunctions = 8192, - ContainerExecuteStoredProcedure = 128, - ContainerReadConflicts = 32, - ContainerDeleteConflicts = 16384, - ContainerReadAny = 64, - ContainerFullAccess = 4294967295, - ItemReadAny = 65536, - ItemFullAccess = 65, - ItemRead = 64, - ItemReplace = 65536, - ItemUpsert = 131072, - ItemDelete = 262144, - StoreProcedureRead = 128, - StoreProcedureReplace = 1048576, - StoreProcedureDelete = 2097152, - StoreProcedureExecute = 4194304, - UserDefinedFuntionRead = 256, - UserDefinedFuntionReplace = 8388608, - UserDefinedFuntionDelete = 16777216, - TriggerRead = 512, - TriggerReplace = 33554432, - TriggerDelete = 67108864 -} -export declare class SasTokenProperties { - user: string; - userTag: string; - databaseName: string; - containerName: string; - resourceName: string; - resourcePath: string; - resourceKind: CosmosContainerChildResourceKind; - partitionKeyValueRanges: string[]; - startTime: Date; - expiryTime: Date; - keyType: CosmosKeyType | number; - controlPlaneReaderScope: number; - controlPlaneWriterScope: number; - dataPlaneReaderScope: number; - dataPlaneWriterScope: number; - cosmosContainerChildResourceKind: CosmosContainerChildResourceKind; - cosmosKeyType: CosmosKeyType; -} -export declare class Scripts { - readonly container: Container; - private readonly clientContext; - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link StoredProcedure} by id. - * - * Use `.storedProcedures` for creating new stored procedures, or querying/reading all stored procedures. - * @param id - The id of the {@link StoredProcedure}. - */ - storedProcedure(id: string): StoredProcedure; - /** - * Used to read, replace, or delete a specific, existing {@link Trigger} by id. - * - * Use `.triggers` for creating new triggers, or querying/reading all triggers. - * @param id - The id of the {@link Trigger}. - */ - trigger(id: string): Trigger; - /** - * Used to read, replace, or delete a specific, existing {@link UserDefinedFunction} by id. - * - * Use `.userDefinedFunctions` for creating new user defined functions, or querying/reading all user defined functions. - * @param id - The id of the {@link UserDefinedFunction}. - */ - userDefinedFunction(id: string): UserDefinedFunction; - private $sprocs; - /** - * Operations for creating new stored procedures, and reading/querying all stored procedures. - * - * For reading, replacing, or deleting an existing stored procedure, use `.storedProcedure(id)`. - */ - get storedProcedures(): StoredProcedures; - private $triggers; - /** - * Operations for creating new triggers, and reading/querying all triggers. - * - * For reading, replacing, or deleting an existing trigger, use `.trigger(id)`. - */ - get triggers(): Triggers; - private $udfs; - /** - * Operations for creating new user defined functions, and reading/querying all user defined functions. - * - * For reading, replacing, or deleting an existing user defined function, use `.userDefinedFunction(id)`. - */ - get userDefinedFunctions(): UserDefinedFunctions; -} -/** - * The default function for setting header token using the masterKey - * @hidden - */ -export declare function setAuthorizationTokenHeaderUsingMasterKey(verb: HTTPMethod, resourceId: string, resourceType: ResourceType, headers: CosmosHeaders, masterKey: string): Promise; -/** - * Options that can be specified for a requested issued to the Azure Cosmos DB servers.= - */ -export declare interface SharedOptions { - /** Enables/disables getting document container quota related stats for document container read requests. */ - sessionToken?: string; - /** (Advanced use case) Initial headers to start with when sending requests to Cosmos */ - initialHeaders?: CosmosHeaders; - /** - * abortSignal to pass to all underlying network requests created by this method call. See https://developer.mozilla.org/en-US/docs/Web/API/AbortController - * @example Cancel a read request - * ```typescript - * const controller = new AbortController() - * const {result: item} = await items.query('SELECT * from c', { abortSignal: controller.signal}); - * controller.abort() - * ``` - */ - abortSignal?: AbortSignal_2; - /** - * Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the {@link - * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL} or {@link com.azure.cosmos.ConsistencyLevel#SESSION}, responses from the - * integrated cache are guaranteed to be no staler than value indicated by this maxIntegratedCacheStaleness. When the - * consistency level is not set, this property is ignored. - * - *

Default value is null

- * - *

Cache Staleness is supported in milliseconds granularity. Anything smaller than milliseconds will be ignored.

- */ - maxIntegratedCacheStalenessInMs?: number; -} -export declare interface SpatialIndex { - path: string; - types: SpatialType[]; - boundingBox: { - xmin: number; - ymin: number; - xmax: number; - ymax: number; - }; -} -export declare enum SpatialType { - LineString = "LineString", - MultiPolygon = "MultiPolygon", - Point = "Point", - Polygon = "Polygon" -} -/** - * Represents a parameter in a Parameterized SQL query, specified in {@link SqlQuerySpec} - */ -export declare interface SqlParameter { - /** Name of the parameter. (i.e. `@lastName`) */ - name: string; - /** Value of the parameter (this is safe to come from users, assuming they are authorized) */ - value: JSONValue; -} -/** - * Represents a SQL query in the Azure Cosmos DB service. - * - * Queries with inputs should be parameterized to protect against SQL injection. - * - * @example Parameterized SQL Query - * ```typescript - * const query: SqlQuerySpec = { - * query: "SELECT * FROM Families f where f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Wakefield"} - * ] - * }; - * ``` - */ -export declare interface SqlQuerySpec { - /** The text of the SQL query */ - query: string; - /** The parameters you provide in the query */ - parameters?: SqlParameter[]; -} -/** - * @hidden - */ -export declare type StatusCode = number; -/** - * @hidden - */ -export declare const StatusCodes: StatusCodesType; -/** - * @hidden - */ -export declare interface StatusCodesType { - Ok: 200; - Created: 201; - Accepted: 202; - NoContent: 204; - NotModified: 304; - BadRequest: 400; - Unauthorized: 401; - Forbidden: 403; - NotFound: 404; - MethodNotAllowed: 405; - RequestTimeout: 408; - Conflict: 409; - Gone: 410; - PreconditionFailed: 412; - RequestEntityTooLarge: 413; - TooManyRequests: 429; - RetryWith: 449; - InternalServerError: 500; - ServiceUnavailable: 503; - ENOTFOUND: "ENOTFOUND"; - OperationPaused: 1200; - OperationCancelled: 1201; -} -/** - * Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id. - * - * For operations to create, read all, or query Stored Procedures, - */ -export declare class StoredProcedure { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * Creates a new instance of {@link StoredProcedure} linked to the parent {@link Container}. - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link StoredProcedure}. - * @hidden - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link StoredProcedureDefinition} for the given {@link StoredProcedure}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link StoredProcedure} with the specified {@link StoredProcedureDefinition}. - * @param body - The specified {@link StoredProcedureDefinition} to replace the existing definition. - */ - replace(body: StoredProcedureDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link StoredProcedure}. - */ - delete(options?: RequestOptions): Promise; - /** - * Execute the given {@link StoredProcedure}. - * - * The specified type, T, is not enforced by the client. - * Be sure to validate the response from the stored procedure matches the type, T, you provide. - * - * @param partitionKey - The partition key to use when executing the stored procedure - * @param params - Array of parameters to pass as arguments to the given {@link StoredProcedure}. - * @param options - Additional options, such as the partition key to invoke the {@link StoredProcedure} on. - */ - execute(partitionKey: PartitionKey, params?: any[], options?: RequestOptions): Promise>; -} -export declare interface StoredProcedureDefinition { - /** - * The id of the {@link StoredProcedure}. - */ - id?: string; - /** - * The body of the {@link StoredProcedure}. This is a JavaScript function. - */ - body?: string | ((...inputs: any[]) => void); -} -export declare class StoredProcedureResponse extends ResourceResponse { - constructor(resource: StoredProcedureDefinition & Resource, headers: CosmosHeaders, statusCode: number, storedProcedure: StoredProcedure); - /** - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - readonly storedProcedure: StoredProcedure; - /** - * Alias for storedProcedure. - * - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - get sproc(): StoredProcedure; -} -/** - * Operations for creating, upserting, or reading/querying all Stored Procedures. - * - * For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see `container.storedProcedure()`. - */ -export declare class StoredProcedures { - readonly container: Container; - private readonly clientContext; - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all Stored Procedures. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @example Read all stored procedures to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @sproc", - * parameters: [ - * {name: "@sproc", value: "Todo"} - * ] - * }; - * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all Stored Procedures. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @example Read all stored procedures to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @sproc", - * parameters: [ - * {name: "@sproc", value: "Todo"} - * ] - * }; - * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all stored procedures. - * @example Read all stored procedures to array. - * ```typescript - * const {body: sprocList} = await containers.storedProcedures.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a StoredProcedure. - * - * Azure Cosmos DB allows stored procedures to be executed in the storage tier, - * directly against an item container. The script - * gets executed under ACID transactions on the primary storage partition of the - * specified container. For additional details, - * refer to the server-side JavaScript API documentation. - */ - create(body: StoredProcedureDefinition, options?: RequestOptions): Promise; -} -/** - * @hidden - */ -export declare type SubStatusCode = number; -export declare class TimeoutError extends Error { - readonly code: string; - constructor(message?: string); -} -/** - * Represents a time interval. - * - * @param days - Number of days. - * @param hours - Number of hours. - * @param minutes - Number of minutes. - * @param seconds - Number of seconds. - * @param milliseconds - Number of milliseconds. - * @hidden - */ -export declare class TimeSpan { - protected _ticks: number; - constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number); - /** - * Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance. - * @param ts - The time interval to add. - */ - add(ts: TimeSpan): TimeSpan; - /** - * Returns a new TimeSpan object whose value is the difference of the specified TimeSpan object and this instance. - * @param ts - The time interval to subtract. - */ - subtract(ts: TimeSpan): TimeSpan; - /** - * Compares this instance to a specified object and returns an integer that indicates whether this - * instance is shorter than, equal to, or longer than the specified object. - * @param value - The time interval to add. - */ - compareTo(value: TimeSpan): 1 | -1 | 0; - /** - * Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object. - */ - duration(): TimeSpan; - /** - * Returns a value indicating whether this instance is equal to a specified object. - * @param value - The time interval to check for equality. - */ - equals(value: TimeSpan): boolean; - /** - * Returns a new TimeSpan object whose value is the negated value of this instance. - * @param value - The time interval to check for equality. - */ - negate(): TimeSpan; - days(): number; - hours(): number; - milliseconds(): number; - seconds(): number; - ticks(): number; - totalDays(): number; - totalHours(): number; - totalMilliseconds(): number; - totalMinutes(): number; - totalSeconds(): number; - static fromTicks(value: number): TimeSpan; - static readonly zero: TimeSpan; - static readonly maxValue: TimeSpan; - static readonly minValue: TimeSpan; - static isTimeSpan(timespan: TimeSpan): number; - static additionDoesOverflow(a: number, b: number): boolean; - static subtractionDoesUnderflow(a: number, b: number): boolean; - static compare(t1: TimeSpan, t2: TimeSpan): 1 | 0 | -1; - static interval(value: number, scale: number): TimeSpan; - static fromMilliseconds(value: number): TimeSpan; - static fromSeconds(value: number): TimeSpan; - static fromMinutes(value: number): TimeSpan; - static fromHours(value: number): TimeSpan; - static fromDays(value: number): TimeSpan; -} -export declare type TokenProvider = (requestInfo: RequestInfo_2) => Promise; -/** - * Operations to read, replace, or delete a {@link Trigger}. - * - * Use `container.triggers` to create, upsert, query, or read all. - */ -export declare class Trigger { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Trigger}. - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link TriggerDefinition} for the given {@link Trigger}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Trigger} with the specified {@link TriggerDefinition}. - * @param body - The specified {@link TriggerDefinition} to replace the existing definition with. - */ - replace(body: TriggerDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link Trigger}. - */ - delete(options?: RequestOptions): Promise; -} -export declare interface TriggerDefinition { - /** The id of the trigger. */ - id?: string; - /** The body of the trigger, it can also be passed as a stringifed function */ - body: (() => void) | string; - /** The type of the trigger, should be one of the values of {@link TriggerType}. */ - triggerType: TriggerType; - /** The trigger operation, should be one of the values of {@link TriggerOperation}. */ - triggerOperation: TriggerOperation; -} -/** - * Enum for trigger operation values. - * specifies the operations on which a trigger should be executed. - */ -export declare enum TriggerOperation { - /** All operations. */ - All = "all", - /** Create operations only. */ - Create = "create", - /** Update operations only. */ - Update = "update", - /** Delete operations only. */ - Delete = "delete", - /** Replace operations only. */ - Replace = "replace" -} -export declare class TriggerResponse extends ResourceResponse { - constructor(resource: TriggerDefinition & Resource, headers: CosmosHeaders, statusCode: number, trigger: Trigger); - /** A reference to the {@link Trigger} corresponding to the returned {@link TriggerDefinition}. */ - readonly trigger: Trigger; -} -/** - * Operations to create, upsert, query, and read all triggers. - * - * Use `container.triggers` to read, replace, or delete a {@link Trigger}. - */ -export declare class Triggers { - readonly container: Container; - private readonly clientContext; - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all Triggers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all Triggers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all Triggers. - * @example Read all trigger to array. - * ```typescript - * const {body: triggerList} = await container.triggers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a trigger. - * - * Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed - * on creates, updates and deletes. - * - * For additional details, refer to the server-side JavaScript API documentation. - */ - create(body: TriggerDefinition, options?: RequestOptions): Promise; -} -/** - * Enum for trigger type values. - * Specifies the type of the trigger. - */ -export declare enum TriggerType { - /** Trigger should be executed before the associated operation(s). */ - Pre = "pre", - /** Trigger should be executed after the associated operation(s). */ - Post = "post" -} -/** Interface for a single unique key passed as part of UniqueKeyPolicy */ -export declare interface UniqueKey { - paths: string[]; -} -/** Interface for setting unique keys on container creation */ -export declare interface UniqueKeyPolicy { - uniqueKeys: UniqueKey[]; -} -export declare type UpsertOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Upsert; -}; -export declare interface UpsertOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Upsert; - resourceBody: JSONObject; -} -/** - * Used to read, replace, and delete Users. - * - * Additionally, you can access the permissions for a given user via `user.permission` and `user.permissions`. - * - * @see {@link Users} to create, upsert, query, or read all. - */ -export declare class User { - readonly database: Database; - readonly id: string; - private readonly clientContext; - /** - * Operations for creating, upserting, querying, or reading all operations. - * - * See `client.permission(id)` to read, replace, or delete a specific Permission by id. - */ - readonly permissions: Permissions_2; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database: Database, id: string, clientContext: ClientContext); - /** - * Operations to read, replace, or delete a specific Permission by id. - * - * See `client.permissions` for creating, upserting, querying, or reading all operations. - */ - permission(id: string): Permission; - /** - * Read the {@link UserDefinition} for the given {@link User}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link User}'s definition with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition} to replace the definition. - */ - replace(body: UserDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link User}. - */ - delete(options?: RequestOptions): Promise; -} -/** - * Used to read, replace, or delete a specified User Definied Function by id. - * - * @see {@link UserDefinedFunction} to create, upsert, query, read all User Defined Functions. - */ -export declare class UserDefinedFunction { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link UserDefinedFunction}. - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link UserDefinedFunctionDefinition} for the given {@link UserDefinedFunction}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link UserDefinedFunction} with the specified {@link UserDefinedFunctionDefinition}. - * @param options - - */ - replace(body: UserDefinedFunctionDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link UserDefined}. - */ - delete(options?: RequestOptions): Promise; -} -export declare interface UserDefinedFunctionDefinition { - /** The id of the {@link UserDefinedFunction} */ - id?: string; - /** The body of the user defined function, it can also be passed as a stringifed function */ - body?: string | (() => void); -} -export declare class UserDefinedFunctionResponse extends ResourceResponse { - constructor(resource: UserDefinedFunctionDefinition & Resource, headers: CosmosHeaders, statusCode: number, udf: UserDefinedFunction); - /** A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. */ - readonly userDefinedFunction: UserDefinedFunction; - /** - * Alias for `userDefinedFunction(id)`. - * - * A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. - */ - get udf(): UserDefinedFunction; -} -/** - * Used to create, upsert, query, or read all User Defined Functions. - * - * @see {@link UserDefinedFunction} to read, replace, or delete a given User Defined Function by id. - */ -export declare class UserDefinedFunctions { - readonly container: Container; - private readonly clientContext; - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all User Defined Functions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all User Defined Functions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all User Defined Functions. - * @example Read all User Defined Functions to array. - * ```typescript - * const {body: udfList} = await container.userDefinedFunctions.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a UserDefinedFunction. - * - * Azure Cosmos DB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers. - * - * For additional details, refer to the server-side JavaScript API documentation. - * - */ - create(body: UserDefinedFunctionDefinition, options?: RequestOptions): Promise; -} -/** - * Enum for udf type values. - * Specifies the types of user defined functions. - */ -export declare enum UserDefinedFunctionType { - /** The User Defined Function is written in JavaScript. This is currently the only option. */ - Javascript = "Javascript" -} -export declare interface UserDefinition { - /** The id of the user. */ - id?: string; -} -export declare class UserResponse extends ResourceResponse { - constructor(resource: UserDefinition & Resource, headers: CosmosHeaders, statusCode: number, user: User); - /** A reference to the {@link User} corresponding to the returned {@link UserDefinition}. */ - readonly user: User; -} -/** - * Used to create, upsert, query, and read all users. - * - * @see {@link User} to read, replace, or delete a specific User by id. - */ -export declare class Users { - readonly database: Database; - private readonly clientContext; - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database: Database, clientContext: ClientContext); - /** - * Query all users. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all users. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all users.- - * @example Read all users to array. - * ```typescript - * const {body: usersList} = await database.users.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a database user with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - create(body: UserDefinition, options?: RequestOptions): Promise; - /** - * Upsert a database user with a specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - upsert(body: UserDefinition, options?: RequestOptions): Promise; -} -declare type VerboseOmit = Pick>; -export {}; diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist/types/latest/cosmos.d.ts b/reverse_engineering/node_modules/@azure/cosmos/dist/types/latest/cosmos.d.ts deleted file mode 100644 index e521165..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist/types/latest/cosmos.d.ts +++ /dev/null @@ -1,3582 +0,0 @@ -/// -/// - -import { AbortError } from '@azure/abort-controller'; -import { AbortSignal as AbortSignal_2 } from 'node-abort-controller'; -import { Pipeline } from '@azure/core-rest-pipeline'; -import { RestError } from '@azure/core-rest-pipeline'; -import { TokenCredential } from '@azure/core-auth'; - -export { AbortError } - -export declare interface Agent { - maxFreeSockets: number; - maxSockets: number; - sockets: any; - requests: any; - destroy(): void; -} - -export declare type AggregateType = "Average" | "Count" | "Max" | "Min" | "Sum"; - -export declare const BulkOperationType: { - readonly Create: "Create"; - readonly Upsert: "Upsert"; - readonly Read: "Read"; - readonly Delete: "Delete"; - readonly Replace: "Replace"; - readonly Patch: "Patch"; -}; - -/** - * Options object used to modify bulk execution. - * continueOnError (Default value: false) - Continues bulk execution when an operation fails ** NOTE THIS WILL DEFAULT TO TRUE IN the 4.0 RELEASE - */ -export declare interface BulkOptions { - continueOnError?: boolean; -} - -export declare type BulkPatchOperation = OperationBase & { - operationType: typeof BulkOperationType.Patch; - id: string; -}; - -/** - * Provides iterator for change feed. - * - * Use `Items.changeFeed()` to get an instance of the iterator. - */ -export declare class ChangeFeedIterator { - private clientContext; - private resourceId; - private resourceLink; - private partitionKey; - private changeFeedOptions; - private static readonly IfNoneMatchAllHeaderValue; - private nextIfNoneMatch; - private ifModifiedSince; - private lastStatusCode; - private isPartitionSpecified; - /** - * Gets a value indicating whether there are potentially additional results that can be retrieved. - * - * Initially returns true. This value is set based on whether the last execution returned a continuation token. - * - * @returns Boolean value representing if whether there are potentially additional results that can be retrieved. - */ - get hasMoreResults(): boolean; - /** - * Gets an async iterator which will yield pages of results from Azure Cosmos DB. - */ - getAsyncIterator(): AsyncIterable>>; - /** - * Read feed and retrieves the next page of results in Azure Cosmos DB. - */ - fetchNext(): Promise>>; - private getFeedResponse; -} - -/** - * Specifies options for the change feed - * - * Some of these options control where and when to start reading from the change feed. The order of precedence is: - * - continuation - * - startTime - * - startFromBeginning - * - * If none of those options are set, it will start reading changes from the first `ChangeFeedIterator.fetchNext()` call. - */ -export declare interface ChangeFeedOptions { - /** - * Max amount of items to return per page - */ - maxItemCount?: number; - /** - * The continuation token to start from. - * - * This is equivalent to the etag and continuation value from the `ChangeFeedResponse` - */ - continuation?: string; - /** - * The session token to use. If not specified, will use the most recent captured session token to start with. - */ - sessionToken?: string; - /** - * Signals whether to start from the beginning or not. - */ - startFromBeginning?: boolean; - /** - * Specified the start time to start reading changes from. - */ - startTime?: Date; -} - -/** - * A single response page from the Azure Cosmos DB Change Feed - */ -export declare class ChangeFeedResponse { - /** - * Gets the items returned in the response from Azure Cosmos DB - */ - readonly result: T; - /** - * Gets the number of items returned in the response from Azure Cosmos DB - */ - readonly count: number; - /** - * Gets the status code of the response from Azure Cosmos DB - */ - readonly statusCode: number; - /** - * Gets the request charge for this request from the Azure Cosmos DB service. - */ - get requestCharge(): number; - /** - * Gets the activity ID for the request from the Azure Cosmos DB service. - */ - get activityId(): string; - /** - * Gets the continuation token to be used for continuing enumeration of the Azure Cosmos DB service. - * - * This is equivalent to the `etag` property. - */ - get continuation(): string; - /** - * Gets the session token for use in session consistency reads from the Azure Cosmos DB service. - */ - get sessionToken(): string; - /** - * Gets the entity tag associated with last transaction in the Azure Cosmos DB service, - * which can be used as If-Non-Match Access condition for ReadFeed REST request or - * `continuation` property of `ChangeFeedOptions` parameter for - * `Items.changeFeed()` - * to get feed changes since the transaction specified by this entity tag. - * - * This is equivalent to the `continuation` property. - */ - get etag(): string; - /** - * Response headers of the response from Azure Cosmos DB - */ - headers: CosmosHeaders; -} - -/** - * @hidden - * @hidden - */ -export declare class ClientContext { - private cosmosClientOptions; - private globalEndpointManager; - private readonly sessionContainer; - private connectionPolicy; - private pipeline; - partitionKeyDefinitionCache: { - [containerUrl: string]: any; - }; - constructor(cosmosClientOptions: CosmosClientOptions, globalEndpointManager: GlobalEndpointManager); - /** @hidden */ - read({ path, resourceType, resourceId, options, partitionKey, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - queryFeed({ path, resourceType, resourceId, resultFn, query, options, partitionKeyRangeId, partitionKey, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - resultFn: (result: { - [key: string]: any; - }) => any[]; - query: SqlQuerySpec | string; - options: FeedOptions; - partitionKeyRangeId?: string; - partitionKey?: PartitionKey; - }): Promise>; - getQueryPlan(path: string, resourceType: ResourceType, resourceId: string, query: SqlQuerySpec | string, options?: FeedOptions): Promise>; - queryPartitionKeyRanges(collectionLink: string, query?: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - delete({ path, resourceType, resourceId, options, partitionKey, method, }: { - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - method?: HTTPMethod; - }): Promise>; - patch({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: any; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - create({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: T; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - private processQueryFeedResponse; - private applySessionToken; - replace({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: any; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - upsert({ body, path, resourceType, resourceId, options, partitionKey, }: { - body: T; - path: string; - resourceType: ResourceType; - resourceId: string; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - execute({ sprocLink, params, options, partitionKey, }: { - sprocLink: string; - params?: any[]; - options?: RequestOptions; - partitionKey?: PartitionKey; - }): Promise>; - /** - * Gets the Database account information. - * @param options - `urlConnection` in the options is the endpoint url whose database account needs to be retrieved. - * If not present, current client's url will be used. - */ - getDatabaseAccount(options?: RequestOptions): Promise>; - getWriteEndpoint(): Promise; - getReadEndpoint(): Promise; - getWriteEndpoints(): Promise; - getReadEndpoints(): Promise; - batch({ body, path, partitionKey, resourceId, options, }: { - body: T; - path: string; - partitionKey: string; - resourceId: string; - options?: RequestOptions; - }): Promise>; - bulk({ body, path, partitionKeyRangeId, resourceId, bulkOptions, options, }: { - body: T; - path: string; - partitionKeyRangeId: string; - resourceId: string; - bulkOptions?: BulkOptions; - options?: RequestOptions; - }): Promise>; - private captureSessionToken; - clearSessionToken(path: string): void; - private getSessionParams; - private isMasterResource; - private buildHeaders; - /** - * Returns collection of properties which are derived from the context for Request Creation - * @returns - */ - private getContextDerivedPropsForRequestCreation; -} - -export declare class ClientSideMetrics { - readonly requestCharge: number; - constructor(requestCharge: number); - /** - * Adds one or more ClientSideMetrics to a copy of this instance and returns the result. - */ - add(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics; - static readonly zero: ClientSideMetrics; - static createFromArray(...clientSideMetricsArray: ClientSideMetrics[]): ClientSideMetrics; -} - -/** - * Use to read or delete a given {@link Conflict} by id. - * - * @see {@link Conflicts} to query or read all conflicts. - */ -export declare class Conflict { - readonly container: Container; - readonly id: string; - private readonly clientContext; - private partitionKey?; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Conflict}. - */ - constructor(container: Container, id: string, clientContext: ClientContext, partitionKey?: PartitionKey); - /** - * Read the {@link ConflictDefinition} for the given {@link Conflict}. - */ - read(options?: RequestOptions): Promise; - /** - * Delete the given {@link ConflictDefinition}. - */ - delete(options?: RequestOptions): Promise; -} - -export declare interface ConflictDefinition { - /** The id of the conflict */ - id?: string; - /** Source resource id */ - resourceId?: string; - resourceType?: ResourceType; - operationType?: OperationType; - content?: string; -} - -export declare enum ConflictResolutionMode { - Custom = "Custom", - LastWriterWins = "LastWriterWins" -} - -/** - * Represents the conflict resolution policy configuration for specifying how to resolve conflicts - * in case writes from different regions result in conflicts on documents in the collection in the Azure Cosmos DB service. - */ -export declare interface ConflictResolutionPolicy { - /** - * Gets or sets the in the Azure Cosmos DB service. By default it is {@link ConflictResolutionMode.LastWriterWins}. - */ - mode?: keyof typeof ConflictResolutionMode; - /** - * Gets or sets the path which is present in each document in the Azure Cosmos DB service for last writer wins conflict-resolution. - * This path must be present in each document and must be an integer value. - * In case of a conflict occurring on a document, the document with the higher integer value in the specified path will be picked. - * If the path is unspecified, by default the timestamp path will be used. - * - * This value should only be set when using {@link ConflictResolutionMode.LastWriterWins}. - * - * ```typescript - * conflictResolutionPolicy.ConflictResolutionPath = "/name/first"; - * ``` - * - */ - conflictResolutionPath?: string; - /** - * Gets or sets the {@link StoredProcedure} which is used for conflict resolution in the Azure Cosmos DB service. - * This stored procedure may be created after the {@link Container} is created and can be changed as required. - * - * 1. This value should only be set when using {@link ConflictResolutionMode.Custom}. - * 2. In case the stored procedure fails or throws an exception, the conflict resolution will default to registering conflicts in the conflicts feed. - * - * ```typescript - * conflictResolutionPolicy.ConflictResolutionProcedure = "resolveConflict" - * ``` - */ - conflictResolutionProcedure?: string; -} - -export declare class ConflictResponse extends ResourceResponse { - constructor(resource: ConflictDefinition & Resource, headers: CosmosHeaders, statusCode: number, conflict: Conflict); - /** A reference to the {@link Conflict} corresponding to the returned {@link ConflictDefinition}. */ - readonly conflict: Conflict; -} - -/** - * Use to query or read all conflicts. - * - * @see {@link Conflict} to read or delete a given {@link Conflict} by id. - */ -export declare class Conflicts { - readonly container: Container; - private readonly clientContext; - constructor(container: Container, clientContext: ClientContext); - /** - * Queries all conflicts. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time. - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all conflicts. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return results in an array or iterate over them one at a time. - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Reads all conflicts - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - readAll(options?: FeedOptions): QueryIterator; - } - - /** Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. */ - export declare enum ConnectionMode { - /** Gateway mode talks to an intermediate gateway which handles the direct communication with your individual partitions. */ - Gateway = 0 - } - - /** - * Represents the Connection policy associated with a CosmosClient in the Azure Cosmos DB database service. - */ - export declare interface ConnectionPolicy { - /** Determines which mode to connect to Cosmos with. (Currently only supports Gateway option) */ - connectionMode?: ConnectionMode; - /** Request timeout (time to wait for response from network peer). Represented in milliseconds. */ - requestTimeout?: number; - /** - * Flag to enable/disable automatic redirecting of requests based on read/write operations. Default true. - * Required to call client.dispose() when this is set to true after destroying the CosmosClient inside another process or in the browser. - */ - enableEndpointDiscovery?: boolean; - /** List of azure regions to be used as preferred locations for read requests. */ - preferredLocations?: string[]; - /** RetryOptions object which defines several configurable properties used during retry. */ - retryOptions?: RetryOptions; - /** - * The flag that enables writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. - * Default is `false`. - */ - useMultipleWriteLocations?: boolean; - /** Rate in milliseconds at which the client will refresh the endpoints list in the background */ - endpointRefreshRateInMs?: number; - /** Flag to enable/disable background refreshing of endpoints. Defaults to false. - * Endpoint discovery using `enableEndpointsDiscovery` will still work for failed requests. */ - enableBackgroundEndpointRefreshing?: boolean; - } - - /** - * Represents the consistency levels supported for Azure Cosmos DB client operations.
- * The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. - * Consistency levels. - * - * Consistency levels by order of strength are Strong, BoundedStaleness, Session, Consistent Prefix, and Eventual. - * - * See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels. - */ - export declare enum ConsistencyLevel { - /** - * Strong Consistency guarantees that read operations always return the value that was last written. - */ - Strong = "Strong", - /** - * Bounded Staleness guarantees that reads are not too out-of-date. - * This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds). - */ - BoundedStaleness = "BoundedStaleness", - /** - * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), - * monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) - * within any single session. - */ - Session = "Session", - /** - * Eventual Consistency guarantees that reads will return a subset of writes. - * All writes will be eventually be available for reads. - */ - Eventual = "Eventual", - /** - * ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. - * All writes will be eventually be available for reads. - */ - ConsistentPrefix = "ConsistentPrefix" - } - - /** - * @hidden - */ - export declare const Constants: { - HttpHeaders: { - Authorization: string; - ETag: string; - MethodOverride: string; - Slug: string; - ContentType: string; - LastModified: string; - ContentEncoding: string; - CharacterSet: string; - UserAgent: string; - IfModifiedSince: string; - IfMatch: string; - IfNoneMatch: string; - ContentLength: string; - AcceptEncoding: string; - KeepAlive: string; - CacheControl: string; - TransferEncoding: string; - ContentLanguage: string; - ContentLocation: string; - ContentMd5: string; - ContentRange: string; - Accept: string; - AcceptCharset: string; - AcceptLanguage: string; - IfRange: string; - IfUnmodifiedSince: string; - MaxForwards: string; - ProxyAuthorization: string; - AcceptRanges: string; - ProxyAuthenticate: string; - RetryAfter: string; - SetCookie: string; - WwwAuthenticate: string; - Origin: string; - Host: string; - AccessControlAllowOrigin: string; - AccessControlAllowHeaders: string; - KeyValueEncodingFormat: string; - WrapAssertionFormat: string; - WrapAssertion: string; - WrapScope: string; - SimpleToken: string; - HttpDate: string; - Prefer: string; - Location: string; - Referer: string; - A_IM: string; - Query: string; - IsQuery: string; - IsQueryPlan: string; - SupportedQueryFeatures: string; - QueryVersion: string; - Continuation: string; - PageSize: string; - ItemCount: string; - ActivityId: string; - PreTriggerInclude: string; - PreTriggerExclude: string; - PostTriggerInclude: string; - PostTriggerExclude: string; - IndexingDirective: string; - SessionToken: string; - ConsistencyLevel: string; - XDate: string; - CollectionPartitionInfo: string; - CollectionServiceInfo: string; - RetryAfterInMilliseconds: string; - RetryAfterInMs: string; - IsFeedUnfiltered: string; - ResourceTokenExpiry: string; - EnableScanInQuery: string; - EmitVerboseTracesInQuery: string; - EnableCrossPartitionQuery: string; - ParallelizeCrossPartitionQuery: string; - ResponseContinuationTokenLimitInKB: string; - PopulateQueryMetrics: string; - QueryMetrics: string; - Version: string; - OwnerFullName: string; - OwnerId: string; - PartitionKey: string; - PartitionKeyRangeID: string; - MaxEntityCount: string; - CurrentEntityCount: string; - CollectionQuotaInMb: string; - CollectionCurrentUsageInMb: string; - MaxMediaStorageUsageInMB: string; - CurrentMediaStorageUsageInMB: string; - RequestCharge: string; - PopulateQuotaInfo: string; - MaxResourceQuota: string; - OfferType: string; - OfferThroughput: string; - AutoscaleSettings: string; - DisableRUPerMinuteUsage: string; - IsRUPerMinuteUsed: string; - OfferIsRUPerMinuteThroughputEnabled: string; - IndexTransformationProgress: string; - LazyIndexingProgress: string; - IsUpsert: string; - SubStatus: string; - EnableScriptLogging: string; - ScriptLogResults: string; - ALLOW_MULTIPLE_WRITES: string; - IsBatchRequest: string; - IsBatchAtomic: string; - BatchContinueOnError: string; - DedicatedGatewayPerRequestCacheStaleness: string; - ForceRefresh: string; - }; - WritableLocations: string; - ReadableLocations: string; - LocationUnavailableExpirationTimeInMs: number; - ENABLE_MULTIPLE_WRITABLE_LOCATIONS: string; - DefaultUnavailableLocationExpirationTimeMS: number; - ThrottleRetryCount: string; - ThrottleRetryWaitTimeInMs: string; - CurrentVersion: string; - AzureNamespace: string; - AzurePackageName: string; - SDKName: string; - SDKVersion: string; - DefaultMaxBulkRequestBodySizeInBytes: number; - Quota: { - CollectionSize: string; - }; - Path: { - Root: string; - DatabasesPathSegment: string; - CollectionsPathSegment: string; - UsersPathSegment: string; - DocumentsPathSegment: string; - PermissionsPathSegment: string; - StoredProceduresPathSegment: string; - TriggersPathSegment: string; - UserDefinedFunctionsPathSegment: string; - ConflictsPathSegment: string; - AttachmentsPathSegment: string; - PartitionKeyRangesPathSegment: string; - SchemasPathSegment: string; - OffersPathSegment: string; - TopologyPathSegment: string; - DatabaseAccountPathSegment: string; - }; - PartitionKeyRange: PartitionKeyRangePropertiesNames; - QueryRangeConstants: { - MinInclusive: string; - MaxExclusive: string; - min: string; - }; - /** - * @deprecated Use EffectivePartitionKeyConstants instead - */ - EffectiveParitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: string; - MaximumExclusiveEffectivePartitionKey: string; - }; - EffectivePartitionKeyConstants: { - MinimumInclusiveEffectivePartitionKey: string; - MaximumExclusiveEffectivePartitionKey: string; - }; - }; - - /** - * Operations for reading, replacing, or deleting a specific, existing container by id. - * - * @see {@link Containers} for creating new containers, and reading/querying all containers; use `.containers`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `container(id).read()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ - export declare class Container { - readonly database: Database; - readonly id: string; - private readonly clientContext; - private $items; - /** - * Operations for creating new items, and reading/querying all items - * - * For reading, replacing, or deleting an existing item, use `.item(id)`. - * - * @example Create a new item - * ```typescript - * const {body: createdItem} = await container.items.create({id: "", properties: {}}); - * ``` - */ - get items(): Items; - private $scripts; - /** - * All operations for Stored Procedures, Triggers, and User Defined Functions - */ - get scripts(): Scripts; - private $conflicts; - /** - * Operations for reading and querying conflicts for the given container. - * - * For reading or deleting a specific conflict, use `.conflict(id)`. - */ - get conflicts(): Conflicts; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * Returns a container instance. Note: You should get this from `database.container(id)`, rather than creating your own object. - * @param database - The parent {@link Database}. - * @param id - The id of the given container. - * @hidden - */ - constructor(database: Database, id: string, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link Item} by id. - * - * Use `.items` for creating new items, or querying/reading all items. - * - * @param id - The id of the {@link Item}. - * @param partitionKeyValue - The value of the {@link Item} partition key - * @example Replace an item - * `const {body: replacedItem} = await container.item("", "").replace({id: "", title: "Updated post", authorID: 5});` - */ - item(id: string, partitionKeyValue?: PartitionKey): Item; - /** - * Used to read, replace, or delete a specific, existing {@link Conflict} by id. - * - * Use `.conflicts` for creating new conflicts, or querying/reading all conflicts. - * @param id - The id of the {@link Conflict}. - */ - conflict(id: string, partitionKey?: PartitionKey): Conflict; - /** Read the container's definition */ - read(options?: RequestOptions): Promise; - /** Replace the container's definition */ - replace(body: ContainerDefinition, options?: RequestOptions): Promise; - /** Delete the container */ - delete(options?: RequestOptions): Promise; - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @deprecated This method has been renamed to readPartitionKeyDefinition. - */ - getPartitionKeyDefinition(): Promise>; - /** - * Gets the partition key definition first by looking into the cache otherwise by reading the collection. - * @hidden - */ - readPartitionKeyDefinition(): Promise>; - /** - * Gets offer on container. If none exists, returns an OfferResponse with undefined. - */ - readOffer(options?: RequestOptions): Promise; - getQueryPlan(query: string | SqlQuerySpec): Promise>; - readPartitionKeyRanges(feedOptions?: FeedOptions): QueryIterator; - /** - * Delete all documents belong to the container for the provided partition key value - * @param partitionKey - The partition key value of the items to be deleted - */ - deleteAllItemsForPartitionKey(partitionKey: PartitionKey, options?: RequestOptions): Promise; - } - - export declare interface ContainerDefinition { - /** The id of the container. */ - id?: string; - /** The partition key for the container. */ - partitionKey?: PartitionKeyDefinition; - /** The indexing policy associated with the container. */ - indexingPolicy?: IndexingPolicy; - /** The default time to live in seconds for items in a container. */ - defaultTtl?: number; - /** The conflict resolution policy used to resolve conflicts in a container. */ - conflictResolutionPolicy?: ConflictResolutionPolicy; - /** Policy for additional keys that must be unique per partition key */ - uniqueKeyPolicy?: UniqueKeyPolicy; - /** Geospatial configuration for a collection. Type is set to Geography by default */ - geospatialConfig?: { - type: GeospatialType; - }; - } - - export declare interface ContainerRequest extends VerboseOmit { - throughput?: number; - maxThroughput?: number; - autoUpgradePolicy?: { - throughputPolicy: { - incrementPercent: number; - }; - }; - partitionKey?: string | PartitionKeyDefinition; - } - - /** Response object for Container operations */ - export declare class ContainerResponse extends ResourceResponse { - constructor(resource: ContainerDefinition & Resource, headers: CosmosHeaders, statusCode: number, container: Container); - /** A reference to the {@link Container} that the returned {@link ContainerDefinition} corresponds to. */ - readonly container: Container; - } - - /** - * Operations for creating new containers, and reading/querying all containers - * - * @see {@link Container} for reading, replacing, or deleting an existing container; use `.container(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `containers.readAll()` before every single `item.read()` call, to ensure the container exists; - * do this once on application start up. - */ - export declare class Containers { - readonly database: Database; - private readonly clientContext; - constructor(database: Database, clientContext: ClientContext); - /** - * Queries all containers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @container", - * parameters: [ - * {name: "@container", value: "Todo"} - * ] - * }; - * const {body: containerList} = await client.database("").containers.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all containers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return specific containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @container", - * parameters: [ - * {name: "@container", value: "Todo"} - * ] - * }; - * const {body: containerList} = await client.database("").containers.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Creates a container. - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - create(body: ContainerRequest, options?: RequestOptions): Promise; - /** - * Checks if a Container exists, and, if it doesn't, creates it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * You should confirm that the output matches the body you passed in for non-default properties (i.e. indexing policy/etc.) - * - * A container is a named logical container for items. - * - * A database may contain zero or more named containers and each container consists of - * zero or more JSON items. - * - * Being schema-free, the items in a container do not need to share the same structure or fields. - * - * - * Since containers are application resources, they can be authorized using either the - * master key or resource keys. - * - * @param body - Represents the body of the container. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - createIfNotExists(body: ContainerRequest, options?: RequestOptions): Promise; - /** - * Read all containers. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all containers in an array or iterate over them one at a time. - * @example Read all containers to array. - * ```typescript - * const {body: containerList} = await client.database("").containers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - } - - /** - * Provides a client-side logical representation of the Azure Cosmos DB database account. - * This client is used to configure and execute requests in the Azure Cosmos DB database service. - * @example Instantiate a client and create a new database - * ```typescript - * const client = new CosmosClient({endpoint: "", auth: {masterKey: ""}}); - * await client.databases.create({id: ""}); - * ``` - * @example Instantiate a client with custom Connection Policy - * ```typescript - * const connectionPolicy = new ConnectionPolicy(); - * connectionPolicy.RequestTimeout = 10000; - * const client = new CosmosClient({ - * endpoint: "", - * auth: {masterKey: ""}, - * connectionPolicy - * }); - * ``` - */ - export declare class CosmosClient { - /** - * Used for creating new databases, or querying/reading all databases. - * - * Use `.database(id)` to read, replace, or delete a specific, existing database by id. - * - * @example Create a new database - * ```typescript - * const {resource: databaseDefinition, database} = await client.databases.create({id: ""}); - * ``` - */ - readonly databases: Databases; - /** - * Used for querying & reading all offers. - * - * Use `.offer(id)` to read, or replace existing offers. - */ - readonly offers: Offers; - private clientContext; - private endpointRefresher; - /** - * Creates a new {@link CosmosClient} object from a connection string. Your database connection string can be found in the Azure Portal - */ - constructor(connectionString: string); - /** - * Creates a new {@link CosmosClient} object. See {@link CosmosClientOptions} for more details on what options you can use. - * @param options - bag of options; require at least endpoint and auth to be configured - */ - constructor(options: CosmosClientOptions); - /** - * Get information about the current {@link DatabaseAccount} (including which regions are supported, etc.) - */ - getDatabaseAccount(options?: RequestOptions): Promise>; - /** - * Gets the currently used write endpoint url. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoint(): Promise; - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoint(): Promise; - /** - * Gets the known write endpoints. Useful for troubleshooting purposes. - * - * The urls may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getWriteEndpoints(): Promise; - /** - * Gets the currently used read endpoint. Useful for troubleshooting purposes. - * - * The url may contain a region suffix (e.g. "-eastus") if we're using location specific endpoints. - */ - getReadEndpoints(): Promise; - /** - * Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database. - * - * This does not make a network call. Use `.read` to get info about the database after getting the {@link Database} object. - * - * @param id - The id of the database. - * @example Create a new container off of an existing database - * ```typescript - * const container = client.database("").containers.create(""); - * ``` - * - * @example Delete an existing database - * ```typescript - * await client.database("").delete(); - * ``` - */ - database(id: string): Database; - /** - * Used for reading, or updating a existing offer by id. - * @param id - The id of the offer. - */ - offer(id: string): Offer; - /** - * Clears background endpoint refresher. Use client.dispose() when destroying the CosmosClient within another process. - */ - dispose(): void; - private backgroundRefreshEndpointList; - } - - export declare interface CosmosClientOptions { - /** The service endpoint to use to create the client. */ - endpoint: string; - /** The account master or readonly key */ - key?: string; - /** An object that contains resources tokens. - * Keys for the object are resource Ids and values are the resource tokens. - */ - resourceTokens?: { - [resourcePath: string]: string; - }; - /** A user supplied function for resolving header authorization tokens. - * Allows users to generating their own auth tokens, potentially using a separate service - */ - tokenProvider?: TokenProvider; - /** AAD token from `@azure/identity` - * Obtain a credential object by creating an `@azure/identity` credential object - * We will then use your credential object and a scope URL (your cosmos db endpoint) - * to authenticate requests to Cosmos - */ - aadCredentials?: TokenCredential; - /** An array of {@link Permission} objects. */ - permissionFeed?: PermissionDefinition[]; - /** An instance of {@link ConnectionPolicy} class. - * This parameter is optional and the default connectionPolicy will be used if omitted. - */ - connectionPolicy?: ConnectionPolicy; - /** An optional parameter that represents the consistency level. - * It can take any value from {@link ConsistencyLevel}. - */ - consistencyLevel?: keyof typeof ConsistencyLevel; - defaultHeaders?: CosmosHeaders_2; - /** An optional custom http(s) Agent to be used in NodeJS enironments - * Use an agent such as https://github.com/TooTallNate/node-proxy-agent if you need to connect to Cosmos via a proxy - */ - agent?: Agent; - /** A custom string to append to the default SDK user agent. */ - userAgentSuffix?: string; - } - - /** - * @hidden - */ - declare enum CosmosContainerChildResourceKind { - Item = "ITEM", - StoredProcedure = "STORED_PROCEDURE", - UserDefinedFunction = "USER_DEFINED_FUNCTION", - Trigger = "TRIGGER" - } - - export declare interface CosmosHeaders { - [key: string]: any; - } - - declare interface CosmosHeaders_2 { - [key: string]: string | boolean | number; - } - - /** - * @hidden - */ - declare enum CosmosKeyType { - PrimaryMaster = "PRIMARY_MASTER", - SecondaryMaster = "SECONDARY_MASTER", - PrimaryReadOnly = "PRIMARY_READONLY", - SecondaryReadOnly = "SECONDARY_READONLY" - } - - /** - * Experimental internal only - * Generates the payload representing the permission configuration for the sas token. - */ - export declare function createAuthorizationSasToken(masterKey: string, sasTokenProperties: SasTokenProperties): Promise; - - export declare type CreateOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Create; - }; - - export declare interface CreateOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Create; - resourceBody: JSONObject; - } - - /** - * Operations for reading or deleting an existing database. - * - * @see {@link Databases} for creating new databases, and reading/querying all databases; use `client.databases`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `database.read()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ - export declare class Database { - readonly client: CosmosClient; - readonly id: string; - private clientContext; - /** - * Used for creating new containers, or querying/reading all containers. - * - * Use `.database(id)` to read, replace, or delete a specific, existing {@link Database} by id. - * - * @example Create a new container - * ```typescript - * const {body: containerDefinition, container} = await client.database("").containers.create({id: ""}); - * ``` - */ - readonly containers: Containers; - /** - * Used for creating new users, or querying/reading all users. - * - * Use `.user(id)` to read, replace, or delete a specific, existing {@link User} by id. - */ - readonly users: Users; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** Returns a new {@link Database} instance. - * - * Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself. - */ - constructor(client: CosmosClient, id: string, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link Database} by id. - * - * Use `.containers` creating new containers, or querying/reading all containers. - * - * @example Delete a container - * ```typescript - * await client.database("").container("").delete(); - * ``` - */ - container(id: string): Container; - /** - * Used to read, replace, or delete a specific, existing {@link User} by id. - * - * Use `.users` for creating new users, or querying/reading all users. - */ - user(id: string): User; - /** Read the definition of the given Database. */ - read(options?: RequestOptions): Promise; - /** Delete the given Database. */ - delete(options?: RequestOptions): Promise; - /** - * Gets offer on database. If none exists, returns an OfferResponse with undefined. - */ - readOffer(options?: RequestOptions): Promise; - } - - /** - * Represents a DatabaseAccount in the Azure Cosmos DB database service. - */ - export declare class DatabaseAccount { - /** The list of writable locations for a geo-replicated database account. */ - readonly writableLocations: Location_2[]; - /** The list of readable locations for a geo-replicated database account. */ - readonly readableLocations: Location_2[]; - /** - * The self-link for Databases in the databaseAccount. - * @deprecated Use `databasesLink` - */ - get DatabasesLink(): string; - /** The self-link for Databases in the databaseAccount. */ - readonly databasesLink: string; - /** - * The self-link for Media in the databaseAccount. - * @deprecated Use `mediaLink` - */ - get MediaLink(): string; - /** The self-link for Media in the databaseAccount. */ - readonly mediaLink: string; - /** - * Attachment content (media) storage quota in MBs ( Retrieved from gateway ). - * @deprecated use `maxMediaStorageUsageInMB` - */ - get MaxMediaStorageUsageInMB(): number; - /** Attachment content (media) storage quota in MBs ( Retrieved from gateway ). */ - readonly maxMediaStorageUsageInMB: number; - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - * - * @deprecated use `currentMediaStorageUsageInMB` - */ - get CurrentMediaStorageUsageInMB(): number; - /** - * Current attachment content (media) usage in MBs (Retrieved from gateway ) - * - * Value is returned from cached information updated periodically and is not guaranteed - * to be real time. - */ - readonly currentMediaStorageUsageInMB: number; - /** - * Gets the UserConsistencyPolicy settings. - * @deprecated use `consistencyPolicy` - */ - get ConsistencyPolicy(): ConsistencyLevel; - /** Gets the UserConsistencyPolicy settings. */ - readonly consistencyPolicy: ConsistencyLevel; - readonly enableMultipleWritableLocations: boolean; - constructor(body: { - [key: string]: any; - }, headers: CosmosHeaders); - } - - export declare interface DatabaseDefinition { - /** The id of the database. */ - id?: string; - } - - export declare interface DatabaseRequest extends DatabaseDefinition { - /** Throughput for this database. */ - throughput?: number; - maxThroughput?: number; - autoUpgradePolicy?: { - throughputPolicy: { - incrementPercent: number; - }; - }; - } - - /** Response object for Database operations */ - export declare class DatabaseResponse extends ResourceResponse { - constructor(resource: DatabaseDefinition & Resource, headers: CosmosHeaders, statusCode: number, database: Database); - /** A reference to the {@link Database} that the returned {@link DatabaseDefinition} corresponds to. */ - readonly database: Database; - } - - /** - * Operations for creating new databases, and reading/querying all databases - * - * @see {@link Database} for reading or deleting an existing database; use `client.database(id)`. - * - * Note: all these operations make calls against a fixed budget. - * You should design your system such that these calls scale sublinearly with your application. - * For instance, do not call `databases.readAll()` before every single `item.read()` call, to ensure the database exists; - * do this once on application start up. - */ - export declare class Databases { - readonly client: CosmosClient; - private readonly clientContext; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database. - */ - constructor(client: CosmosClient, clientContext: ClientContext); - /** - * Queries all databases. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @db", - * parameters: [ - * {name: "@db", value: "Todo"} - * ] - * }; - * const {body: databaseList} = await client.databases.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all databases. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @db", - * parameters: [ - * {name: "@db", value: "Todo"} - * ] - * }; - * const {body: databaseList} = await client.databases.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Send a request for creating a database. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Use to set options like response page size, continuation tokens, etc. - */ - create(body: DatabaseRequest, options?: RequestOptions): Promise; - /** - * Check if a database exists, and if it doesn't, create it. - * This will make a read operation based on the id in the `body`, then if it is not found, a create operation. - * - * A database manages users, permissions and a set of containers. - * Each Azure Cosmos DB Database Account is able to support multiple independent named databases, - * with the database being the logical container for data. - * - * Each Database consists of one or more containers, each of which in turn contain one or more - * documents. Since databases are an an administrative resource, the Service Master Key will be - * required in order to access and successfully complete any action using the User APIs. - * - * @param body - The {@link DatabaseDefinition} that represents the {@link Database} to be created. - * @param options - Additional options for the request - */ - createIfNotExists(body: DatabaseRequest, options?: RequestOptions): Promise; - /** - * Reads all databases. - * @param options - Use to set options like response page size, continuation tokens, etc. - * @returns {@link QueryIterator} Allows you to return all databases in an array or iterate over them one at a time. - * @example Read all databases to array. - * ```typescript - * const {body: databaseList} = await client.databases.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - } - - /** Defines a target data type of an index path specification in the Azure Cosmos DB service. */ - export declare enum DataType { - /** Represents a numeric data type. */ - Number = "Number", - /** Represents a string data type. */ - String = "String", - /** Represents a point data type. */ - Point = "Point", - /** Represents a line string data type. */ - LineString = "LineString", - /** Represents a polygon data type. */ - Polygon = "Polygon", - /** Represents a multi-polygon data type. */ - MultiPolygon = "MultiPolygon" - } - - export declare const DEFAULT_PARTITION_KEY_PATH: "/_partitionKey"; - - export declare type DeleteOperation = OperationBase & { - operationType: typeof BulkOperationType.Delete; - id: string; - }; - - export declare interface DeleteOperationInput { - partitionKey?: string | number | null | Record | undefined; - operationType: typeof BulkOperationType.Delete; - id: string; - } - - export declare interface ErrorBody { - code: string; - message: string; - /** - * @hidden - */ - additionalErrorInfo?: PartitionedQueryExecutionInfo; - } - - export declare class ErrorResponse extends Error { - code?: number; - substatus?: number; - body?: ErrorBody; - headers?: CosmosHeaders; - activityId?: string; - retryAfterInMs?: number; - retryAfterInMilliseconds?: number; - [key: string]: any; - } - - export declare type ExistingKeyOperation = { - op: keyof typeof PatchOperationType; - value: any; - path: string; - }; - - /** - * @hidden - */ - export declare function extractPartitionKey(document: unknown, partitionKeyDefinition: PartitionKeyDefinition): PartitionKey[]; - - /** - * The feed options and query methods. - */ - export declare interface FeedOptions extends SharedOptions { - /** Opaque token for continuing the enumeration. Default: undefined - * @deprecated Use continuationToken instead. - */ - continuation?: string; - /** Opaque token for continuing the enumeration. Default: undefined */ - continuationToken?: string; - /** - * Limits the size of the continuation token in the response. Default: undefined - * - * Continuation Tokens contain optional data that can be removed from the serialization before writing it out to a header. - * By default we are capping this to 1kb to avoid long headers (Node.js has a global header size limit). - * A user may set this field to allow for longer headers, which can help the backend optimize query execution." - */ - continuationTokenLimitInKB?: number; - /** - * Allow scan on the queries which couldn't be served as indexing was opted out on the requested paths. Default: false - * - * In general, it is best to avoid using this setting. Scans are relatively expensive and take a long time to serve. - */ - enableScanInQuery?: boolean; - /** - * The maximum number of concurrent operations that run client side during parallel query execution in the - * Azure Cosmos DB database service. Negative values make the system automatically decides the number of - * concurrent operations to run. Default: 0 (no parallelism) - */ - maxDegreeOfParallelism?: number; - /** - * Max number of items to be returned in the enumeration operation. Default: undefined (server will defined payload) - * - * Expirimenting with this value can usually result in the biggest performance changes to the query. - * - * The smaller the item count, the faster the first result will be delivered (for non-aggregates). For larger amounts, - * it will take longer to serve the request, but you'll usually get better throughput for large queries (i.e. if you need 1000 items - * before you can do any other actions, set `maxItemCount` to 1000. If you can start doing work after the first 100, set `maxItemCount` to 100.) - */ - maxItemCount?: number; - /** - * Note: consider using changeFeed instead. - * - * Indicates a change feed request. Must be set to "Incremental feed", or omitted otherwise. Default: false - */ - useIncrementalFeed?: boolean; - /** Conditions Associated with the request. */ - accessCondition?: { - /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */ - type: string; - /** Conditional HTTP method header value (the _etag field from the last version you read). */ - condition: string; - }; - /** - * Enable returning query metrics in response headers. Default: false - * - * Used for debugging slow or expensive queries. Also increases response size and if you're using a low max header size in Node.js, - * you can run into issues faster. - */ - populateQueryMetrics?: boolean; - /** - * Enable buffering additional items during queries. Default: false - * - * This will buffer an additional page at a time (multiplied by maxDegreeOfParallelism) from the server in the background. - * This improves latency by fetching pages before they are needed by the client. If you're draining all of the results from the - * server, like `.fetchAll`, you should usually enable this. If you're only fetching one page at a time via continuation token, - * you should avoid this. If you're draining more than one page, but not the entire result set, it may help improve latency, but - * it will increase the total amount of RU/s use to serve the entire query (as some pages will be fetched more than once). - */ - bufferItems?: boolean; - /** - * This setting forces the query to use a query plan. Default: false - * - * Note: this will disable continuation token support, even for single partition queries. - * - * For queries like aggregates and most cross partition queries, this happens anyway. - * However, since the library doesn't know what type of query it is until we get back the first response, - * some optimization can't happen until later. - * - * If this setting is enabled, it will force query plan for the query, which will save some network requests - * and ensure parallelism can happen. Useful for when you know you're doing cross-partition or aggregate queries. - */ - forceQueryPlan?: boolean; - /** Limits the query to a specific partition key. Default: undefined - * - * Scoping a query to a single partition can be accomplished two ways: - * - * `container.items.query('SELECT * from c', { partitionKey: "foo" }).toArray()` - * `container.items.query('SELECT * from c WHERE c.yourPartitionKey = "foo"').toArray()` - * - * The former is useful when the query body is out of your control - * but you still want to restrict it to a single partition. Example: an end user specified query. - */ - partitionKey?: any; - } - - export declare class FeedResponse { - readonly resources: TResource[]; - private readonly headers; - readonly hasMoreResults: boolean; - constructor(resources: TResource[], headers: CosmosHeaders, hasMoreResults: boolean); - get continuation(): string; - get continuationToken(): string; - get queryMetrics(): string; - get requestCharge(): number; - get activityId(): string; - } - - /** @hidden */ - declare type FetchFunctionCallback = (options: FeedOptions) => Promise>; - - export declare enum GeospatialType { - /** Represents data in round-earth coordinate system. */ - Geography = "Geography", - /** Represents data in Eucledian(flat) coordinate system. */ - Geometry = "Geometry" - } - - /** - * @hidden - * This internal class implements the logic for endpoint management for geo-replicated database accounts. - */ - export declare class GlobalEndpointManager { - private readDatabaseAccount; - /** - * The endpoint used to create the client instance. - */ - private defaultEndpoint; - /** - * Flag to enable/disable automatic redirecting of requests based on read/write operations. - */ - enableEndpointDiscovery: boolean; - private isRefreshing; - private options; - /** - * List of azure regions to be used as preferred locations for read requests. - */ - private preferredLocations; - private writeableLocations; - private readableLocations; - private unavailableReadableLocations; - private unavailableWriteableLocations; - /** - * @param options - The document client instance. - */ - constructor(options: CosmosClientOptions, readDatabaseAccount: (opts: RequestOptions) => Promise>); - /** - * Gets the current read endpoint from the endpoint cache. - */ - getReadEndpoint(): Promise; - /** - * Gets the current write endpoint from the endpoint cache. - */ - getWriteEndpoint(): Promise; - getReadEndpoints(): Promise>; - getWriteEndpoints(): Promise>; - markCurrentLocationUnavailableForRead(endpoint: string): Promise; - markCurrentLocationUnavailableForWrite(endpoint: string): Promise; - canUseMultipleWriteLocations(resourceType?: ResourceType, operationType?: OperationType): boolean; - resolveServiceEndpoint(resourceType: ResourceType, operationType: OperationType): Promise; - /** - * Refreshes the endpoint list by clearning stale unavailability and then - * retrieving the writable and readable locations from the geo-replicated database account - * and then updating the locations cache. - * We skip the refreshing if enableEndpointDiscovery is set to False - */ - refreshEndpointList(): Promise; - private refreshEndpoints; - private refreshStaleUnavailableLocations; - /** - * update the locationUnavailability to undefined if the location is available again - * @param now - current time - * @param unavailableLocations - list of unavailable locations - * @param allLocations - list of all locations - */ - private updateLocation; - private cleanUnavailableLocationList; - /** - * Gets the database account first by using the default endpoint, and if that doesn't returns - * use the endpoints for the preferred locations in the order they are specified to get - * the database account. - */ - private getDatabaseAccountFromAnyEndpoint; - /** - * Gets the locational endpoint using the location name passed to it using the default endpoint. - * - * @param defaultEndpoint - The default endpoint to use for the endpoint. - * @param locationName - The location name for the azure region like "East US". - */ - private static getLocationalEndpoint; - } - - export declare interface GroupByAliasToAggregateType { - [key: string]: AggregateType; - } - - export declare type GroupByExpressions = string[]; - - /** - * @hidden - */ - export declare enum HTTPMethod { - get = "GET", - patch = "PATCH", - post = "POST", - put = "PUT", - delete = "DELETE" - } - - export declare interface Index { - kind: keyof typeof IndexKind; - dataType: keyof typeof DataType; - precision?: number; - } - - export declare interface IndexedPath { - path: string; - indexes?: Index[]; - } - - /** - * Specifies the supported indexing modes. - */ - export declare enum IndexingMode { - /** - * Index is updated synchronously with a create or update operation. - * - * With consistent indexing, query behavior is the same as the default consistency level for the container. - * The index is always kept up to date with the data. - */ - consistent = "consistent", - /** - * Index is updated asynchronously with respect to a create or update operation. - * - * With lazy indexing, queries are eventually consistent. The index is updated when the container is idle. - */ - lazy = "lazy", - /** No Index is provided. */ - none = "none" - } - - export declare interface IndexingPolicy { - /** The indexing mode (consistent or lazy) {@link IndexingMode}. */ - indexingMode?: keyof typeof IndexingMode; - automatic?: boolean; - /** An array of {@link IncludedPath} represents the paths to be included for indexing. */ - includedPaths?: IndexedPath[]; - /** An array of {@link IncludedPath} represents the paths to be excluded for indexing. */ - excludedPaths?: IndexedPath[]; - spatialIndexes?: SpatialIndex[]; - } - - /** - * Specifies the supported Index types. - */ - export declare enum IndexKind { - /** - * This is supplied for a path which requires sorting. - */ - Range = "Range", - /** - * This is supplied for a path which requires geospatial indexing. - */ - Spatial = "Spatial" - } - - /** - * Used to perform operations on a specific item. - * - * @see {@link Items} for operations on all items; see `container.items`. - */ - export declare class Item { - readonly container: Container; - readonly id: string; - private readonly clientContext; - private partitionKey; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Item}. - * @param partitionKey - The primary key of the given {@link Item} (only for partitioned containers). - */ - constructor(container: Container, id: string, partitionKey: PartitionKey, clientContext: ClientContext); - /** - * Read the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * If the type, T, is a class, it won't pass `typeof` comparisons, because it won't have a match prototype. - * It's recommended to only use interfaces. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Additional options for the request - * - * @example Using custom type for response - * ```typescript - * interface TodoItem { - * title: string; - * done: bool; - * id: string; - * } - * - * let item: TodoItem; - * ({body: item} = await item.read()); - * ``` - */ - read(options?: RequestOptions): Promise>; - /** - * Replace the item's definition. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - The definition to replace the existing {@link Item}'s definition with. - * @param options - Additional options for the request - */ - replace(body: ItemDefinition, options?: RequestOptions): Promise>; - /** - * Replace the item's definition. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - The definition to replace the existing {@link Item}'s definition with. - * @param options - Additional options for the request - */ - replace(body: T, options?: RequestOptions): Promise>; - /** - * Delete the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - delete(options?: RequestOptions): Promise>; - /** - * Perform a JSONPatch on the item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * @param options - Additional options for the request - */ - patch(body: PatchRequestBody, options?: RequestOptions): Promise>; - } - - /** - * Items in Cosmos DB are simply JSON objects. - * Most of the Item operations allow for your to provide your own type - * that extends the very simple ItemDefinition. - * - * You cannot use any reserved keys. You can see the reserved key list - * in {@link ItemBody} - */ - export declare interface ItemDefinition { - /** The id of the item. User settable property. Uniquely identifies the item along with the partition key */ - id?: string; - /** Time to live in seconds for collections with TTL enabled */ - ttl?: number; - [key: string]: any; - } - - export declare class ItemResponse extends ResourceResponse { - constructor(resource: T & Resource, headers: CosmosHeaders, statusCode: number, subsstatusCode: number, item: Item); - /** Reference to the {@link Item} the response corresponds to. */ - readonly item: Item; - } - - /** - * Operations for creating new items, and reading/querying all items - * - * @see {@link Item} for reading, replacing, or deleting an existing container; use `.item(id)`. - */ - export declare class Items { - readonly container: Container; - private readonly clientContext; - /** - * Create an instance of {@link Items} linked to the parent {@link Container}. - * @param container - The parent container. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Queries all items. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM Families f WHERE f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Hendricks"} - * ] - * }; - * const {result: items} = await items.query(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Queries all items. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT firstname FROM Families f WHERE f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Hendricks"} - * ] - * }; - * const {result: items} = await items.query<{firstName: string}>(querySpec).fetchAll(); - * ``` - */ - query(query: string | SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * - * @deprecated Use `changeFeed` instead. - * - * @example Read from the beginning of the change feed. - * ```javascript - * const iterator = items.readChangeFeed({ startFromBeginning: true }); - * const firstPage = await iterator.fetchNext(); - * const firstPageResults = firstPage.result - * const secondPage = await iterator.fetchNext(); - * ``` - */ - readChangeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - * - */ - readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - */ - readChangeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * @deprecated Use `changeFeed` instead. - */ - readChangeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - * - * @example Read from the beginning of the change feed. - * ```javascript - * const iterator = items.readChangeFeed({ startFromBeginning: true }); - * const firstPage = await iterator.fetchNext(); - * const firstPageResults = firstPage.result - * const secondPage = await iterator.fetchNext(); - * ``` - */ - changeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(partitionKey: string | number | boolean, changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Create a `ChangeFeedIterator` to iterate over pages of changes - */ - changeFeed(changeFeedOptions?: ChangeFeedOptions): ChangeFeedIterator; - /** - * Read all items. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const {body: containerList} = await items.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Read all items. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param options - Used for modifying the request (for instance, specifying the partition key). - * @example Read all items to array. - * ```typescript - * const {body: containerList} = await items.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - create(body: T, options?: RequestOptions): Promise>; - /** - * Upsert an item. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - upsert(body: unknown, options?: RequestOptions): Promise>; - /** - * Upsert an item. - * - * Any provided type, T, is not necessarily enforced by the SDK. - * You may get more or less properties and it's up to your logic to enforce it. - * - * There is no set schema for JSON items. They may contain any number of custom properties. - * - * @param body - Represents the body of the item. Can contain any number of user defined properties. - * @param options - Used for modifying the request (for instance, specifying the partition key). - */ - upsert(body: T, options?: RequestOptions): Promise>; - /** - * Execute bulk operations on items. - * - * Bulk takes an array of Operations which are typed based on what the operation does. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is optional at the top level if present in the resourceBody - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.bulk(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param bulkOptions - Optional options object to modify bulk behavior. Pass \{ continueOnError: true \} to continue executing operations when one fails. (Defaults to false) ** NOTE: THIS WILL DEFAULT TO TRUE IN THE 4.0 RELEASE - * @param options - Used for modifying the request. - */ - bulk(operations: OperationInput[], bulkOptions?: BulkOptions, options?: RequestOptions): Promise; - /** - * Execute transactional batch operations on items. - * - * Batch takes an array of Operations which are typed based on what the operation does. Batch is transactional and will rollback all operations if one fails. - * The choices are: Create, Upsert, Read, Replace, and Delete - * - * Usage example: - * ```typescript - * // partitionKey is required as a second argument to batch, but defaults to the default partition key - * const operations: OperationInput[] = [ - * { - * operationType: "Create", - * resourceBody: { id: "doc1", name: "sample", key: "A" } - * }, - * { - * operationType: "Upsert", - * partitionKey: 'A', - * resourceBody: { id: "doc2", name: "other", key: "A" } - * } - * ] - * - * await database.container.items.batch(operations) - * ``` - * - * @param operations - List of operations. Limit 100 - * @param options - Used for modifying the request - */ - batch(operations: OperationInput[], partitionKey?: string, options?: RequestOptions): Promise>; - } - - export declare interface JSONArray extends ArrayLike { - } - - export declare interface JSONObject { - [key: string]: JSONValue; - } - - export declare type JSONValue = boolean | number | string | null | JSONArray | JSONObject; - - /** - * Used to specify the locations that are available, read is index 1 and write is index 0. - */ - declare interface Location_2 { - name: string; - databaseAccountEndpoint: string; - unavailable?: boolean; - lastUnavailabilityTimestampInMs?: number; - } - export { Location_2 as Location } - - /** - * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, - * allowing you to log those results or handle errors. - * @hidden - */ - export declare type Next = (context: RequestContext) => Promise>; - - /** - * Use to read or replace an existing {@link Offer} by id. - * - * @see {@link Offers} to query or read all offers. - */ - export declare class Offer { - readonly client: CosmosClient; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the Database Account. - * @param id - The id of the given {@link Offer}. - */ - constructor(client: CosmosClient, id: string, clientContext: ClientContext); - /** - * Read the {@link OfferDefinition} for the given {@link Offer}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Offer} with the specified {@link OfferDefinition}. - * @param body - The specified {@link OfferDefinition} - */ - replace(body: OfferDefinition, options?: RequestOptions): Promise; - } - - export declare interface OfferDefinition { - id?: string; - offerType?: string; - offerVersion?: string; - resource?: string; - offerResourceId?: string; - content?: { - offerThroughput: number; - offerIsRUPerMinuteThroughputEnabled: boolean; - offerMinimumThroughputParameters?: { - maxThroughputEverProvisioned: number; - maxConsumedStorageEverInKB: number; - }; - offerAutopilotSettings?: { - tier: number; - maximumTierThroughput: number; - autoUpgrade: boolean; - maxThroughput: number; - }; - }; - } - - export declare class OfferResponse extends ResourceResponse { - constructor(resource: OfferDefinition & Resource, headers: CosmosHeaders, statusCode: number, offer?: Offer); - /** A reference to the {@link Offer} corresponding to the returned {@link OfferDefinition}. */ - readonly offer: Offer; - } - - /** - * Use to query or read all Offers. - * - * @see {@link Offer} to read or replace an existing {@link Offer} by id. - */ - export declare class Offers { - readonly client: CosmosClient; - private readonly clientContext; - /** - * @hidden - * @param client - The parent {@link CosmosClient} for the offers. - */ - constructor(client: CosmosClient, clientContext: ClientContext); - /** - * Query all offers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all offers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all offers. - * @example Read all offers to array. - * ```typescript - * const {body: offerList} = await client.offers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - } - - export declare type Operation = CreateOperation | UpsertOperation | ReadOperation | DeleteOperation | ReplaceOperation | BulkPatchOperation; - - export declare interface OperationBase { - partitionKey?: string; - ifMatch?: string; - ifNoneMatch?: string; - } - - export declare type OperationInput = CreateOperationInput | UpsertOperationInput | ReadOperationInput | DeleteOperationInput | ReplaceOperationInput | PatchOperationInput; - - export declare interface OperationResponse { - statusCode: number; - requestCharge: number; - eTag?: string; - resourceBody?: JSONObject; - } - - /** - * @hidden - */ - export declare enum OperationType { - Create = "create", - Replace = "replace", - Upsert = "upsert", - Delete = "delete", - Read = "read", - Query = "query", - Execute = "execute", - Batch = "batch", - Patch = "patch" - } - - export declare type OperationWithItem = OperationBase & { - resourceBody: JSONObject; - }; - - /** - * @hidden - */ - export declare interface PartitionedQueryExecutionInfo { - partitionedQueryExecutionInfoVersion: number; - queryInfo: QueryInfo; - queryRanges: QueryRange[]; - } - - export declare type PartitionKey = PartitionKeyDefinition | string | number | unknown; - - export declare interface PartitionKeyDefinition { - /** - * An array of paths for which data within the collection can be partitioned. Paths must not contain a wildcard or - * a trailing slash. For example, the JSON property “AccountNumber” is specified as “/AccountNumber”. The array must - * contain only a single value. - */ - paths: string[]; - /** - * An optional field, if not specified the default value is 1. To use the large partition key set the version to 2. - * To learn about large partition keys, see [how to create containers with large partition key](https://docs.microsoft.com/en-us/azure/cosmos-db/large-partition-keys) article. - */ - version?: number; - systemKey?: boolean; - } - - /** - * @hidden - */ - export declare interface PartitionKeyRange { - id: string; - minInclusive: string; - maxExclusive: string; - ridPrefix: number; - throughputFraction: number; - status: string; - parents: string[]; - } - - export declare interface PartitionKeyRangePropertiesNames { - MinInclusive: "minInclusive"; - MaxExclusive: "maxExclusive"; - Id: "id"; - } - - export declare type PatchOperation = ExistingKeyOperation | RemoveOperation; - - export declare interface PatchOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Patch; - resourceBody: PatchRequestBody; - id: string; - } - - export declare const PatchOperationType: { - readonly add: "add"; - readonly replace: "replace"; - readonly remove: "remove"; - readonly set: "set"; - readonly incr: "incr"; - }; - - export declare type PatchRequestBody = { - operations: PatchOperation[]; - condition?: string; - } | PatchOperation[]; - - /** - * Use to read, replace, or delete a given {@link Permission} by id. - * - * @see {@link Permissions} to create, upsert, query, or read all Permissions. - */ - export declare class Permission { - readonly user: User; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param user - The parent {@link User}. - * @param id - The id of the given {@link Permission}. - */ - constructor(user: User, id: string, clientContext: ClientContext); - /** - * Read the {@link PermissionDefinition} of the given {@link Permission}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Permission} with the specified {@link PermissionDefinition}. - * @param body - The specified {@link PermissionDefinition}. - */ - replace(body: PermissionDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link Permission}. - */ - delete(options?: RequestOptions): Promise; - } - - export declare interface PermissionBody { - /** System generated resource token for the particular resource and user */ - _token: string; - } - - export declare interface PermissionDefinition { - /** The id of the permission */ - id: string; - /** The mode of the permission, must be a value of {@link PermissionMode} */ - permissionMode: PermissionMode; - /** The link of the resource that the permission will be applied to. */ - resource: string; - resourcePartitionKey?: string | any[]; - } - - /** - * Enum for permission mode values. - */ - export declare enum PermissionMode { - /** Permission not valid. */ - None = "none", - /** Permission applicable for read operations only. */ - Read = "read", - /** Permission applicable for all operations. */ - All = "all" - } - - export declare class PermissionResponse extends ResourceResponse { - constructor(resource: PermissionDefinition & PermissionBody & Resource, headers: CosmosHeaders, statusCode: number, permission: Permission); - /** A reference to the {@link Permission} corresponding to the returned {@link PermissionDefinition}. */ - readonly permission: Permission; - } - - /** - * Use to create, replace, query, and read all Permissions. - * - * @see {@link Permission} to read, replace, or delete a specific permission by id. - */ - declare class Permissions_2 { - readonly user: User; - private readonly clientContext; - /** - * @hidden - * @param user - The parent {@link User}. - */ - constructor(user: User, clientContext: ClientContext); - /** - * Query all permissions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all permissions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all permissions. - * @example Read all permissions to array. - * ```typescript - * const {body: permissionList} = await user.permissions.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a permission. - * - * A permission represents a per-User Permission to access a specific resource - * e.g. Item or Container. - * @param body - Represents the body of the permission. - */ - create(body: PermissionDefinition, options?: RequestOptions): Promise; - /** - * Upsert a permission. - * - * A permission represents a per-User Permission to access a - * specific resource e.g. Item or Container. - */ - upsert(body: PermissionDefinition, options?: RequestOptions): Promise; - } - export { Permissions_2 as Permissions } - - /** - * Plugins allow you to customize the behavior of the SDk with additional logging, retry, or additional functionality. - * - * A plugin is a function which returns a `Promise>`, and is passed a RequestContext and Next object. - * - * Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, - * allowing you to log those results or handle errors. - * - * RequestContext is an object which controls what operation is happening, against which endpoint, and more. Modifying this and passing it along via next is how - * you modify future SDK behavior. - * - * @hidden - */ - declare type Plugin_2 = (context: RequestContext, next: Next) => Promise>; - export { Plugin_2 as Plugin } - - /** - * Specifies which event to run for the specified plugin - * - * @hidden - */ - export declare interface PluginConfig { - /** - * The event to run the plugin on - */ - on: keyof typeof PluginOn; - /** - * The plugin to run - */ - plugin: Plugin_2; - } - - /** - * Used to specify which type of events to execute this plug in on. - * - * @hidden - */ - export declare enum PluginOn { - /** - * Will be executed per network request - */ - request = "request", - /** - * Will be executed per API operation - */ - operation = "operation" - } - - /** - * @hidden - */ - export declare interface QueryInfo { - top?: any; - orderBy?: any[]; - orderByExpressions?: any[]; - offset?: number; - limit?: number; - aggregates?: AggregateType[]; - groupByExpressions?: GroupByExpressions; - groupByAliasToAggregateType: GroupByAliasToAggregateType; - rewrittenQuery?: any; - distinctType: string; - hasSelectValue: boolean; - } - - /** - * Represents a QueryIterator Object, an implementation of feed or query response that enables - * traversal and iterating over the response - * in the Azure Cosmos DB database service. - */ - export declare class QueryIterator { - private clientContext; - private query; - private options; - private fetchFunctions; - private resourceLink?; - private resourceType?; - private fetchAllTempResources; - private fetchAllLastResHeaders; - private queryExecutionContext; - private queryPlanPromise; - private isInitialized; - /** - * @hidden - */ - constructor(clientContext: ClientContext, query: SqlQuerySpec | string, options: FeedOptions, fetchFunctions: FetchFunctionCallback | FetchFunctionCallback[], resourceLink?: string, resourceType?: ResourceType); - /** - * Gets an async iterator that will yield results until completion. - * - * NOTE: AsyncIterators are a very new feature and you might need to - * use polyfils/etc. in order to use them in your code. - * - * If you're using TypeScript, you can use the following polyfill as long - * as you target ES6 or higher and are running on Node 6 or higher. - * - * ```typescript - * if (!Symbol || !Symbol.asyncIterator) { - * (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); - * } - * ``` - * - * @example Iterate over all databases - * ```typescript - * for await(const { resources: db } of client.databases.readAll().getAsyncIterator()) { - * console.log(`Got ${db} from AsyncIterator`); - * } - * ``` - */ - getAsyncIterator(): AsyncIterable>; - /** - * Determine if there are still remaining resources to processs based on the value of the continuation token or the - * elements remaining on the current batch in the QueryIterator. - * @returns true if there is other elements to process in the QueryIterator. - */ - hasMoreResults(): boolean; - /** - * Fetch all pages for the query and return a single FeedResponse. - */ - fetchAll(): Promise>; - /** - * Retrieve the next batch from the feed. - * - * This may or may not fetch more pages from the backend depending on your settings - * and the type of query. Aggregate queries will generally fetch all backend pages - * before returning the first batch of responses. - */ - fetchNext(): Promise>; - /** - * Reset the QueryIterator to the beginning and clear all the resources inside it - */ - reset(): void; - private toArrayImplementation; - private createPipelinedExecutionContext; - private fetchQueryPlan; - private needsQueryPlan; - private initPromise; - private init; - private _init; - private handleSplitError; - } - - export declare class QueryMetrics { - readonly retrievedDocumentCount: number; - readonly retrievedDocumentSize: number; - readonly outputDocumentCount: number; - readonly outputDocumentSize: number; - readonly indexHitDocumentCount: number; - readonly totalQueryExecutionTime: TimeSpan; - readonly queryPreparationTimes: QueryPreparationTimes; - readonly indexLookupTime: TimeSpan; - readonly documentLoadTime: TimeSpan; - readonly vmExecutionTime: TimeSpan; - readonly runtimeExecutionTimes: RuntimeExecutionTimes; - readonly documentWriteTime: TimeSpan; - readonly clientSideMetrics: ClientSideMetrics; - constructor(retrievedDocumentCount: number, retrievedDocumentSize: number, outputDocumentCount: number, outputDocumentSize: number, indexHitDocumentCount: number, totalQueryExecutionTime: TimeSpan, queryPreparationTimes: QueryPreparationTimes, indexLookupTime: TimeSpan, documentLoadTime: TimeSpan, vmExecutionTime: TimeSpan, runtimeExecutionTimes: RuntimeExecutionTimes, documentWriteTime: TimeSpan, clientSideMetrics: ClientSideMetrics); - /** - * Gets the IndexHitRatio - * @hidden - */ - get indexHitRatio(): number; - /** - * returns a new QueryMetrics instance that is the addition of this and the arguments. - */ - add(queryMetricsArray: QueryMetrics[]): QueryMetrics; - /** - * Output the QueryMetrics as a delimited string. - * @hidden - */ - toDelimitedString(): string; - static readonly zero: QueryMetrics; - /** - * Returns a new instance of the QueryMetrics class that is the aggregation of an array of query metrics. - */ - static createFromArray(queryMetricsArray: QueryMetrics[]): QueryMetrics; - /** - * Returns a new instance of the QueryMetrics class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string, clientSideMetrics?: ClientSideMetrics): QueryMetrics; - } - - export declare const QueryMetricsConstants: { - RetrievedDocumentCount: string; - RetrievedDocumentSize: string; - OutputDocumentCount: string; - OutputDocumentSize: string; - IndexHitRatio: string; - IndexHitDocumentCount: string; - TotalQueryExecutionTimeInMs: string; - QueryCompileTimeInMs: string; - LogicalPlanBuildTimeInMs: string; - PhysicalPlanBuildTimeInMs: string; - QueryOptimizationTimeInMs: string; - IndexLookupTimeInMs: string; - DocumentLoadTimeInMs: string; - VMExecutionTimeInMs: string; - DocumentWriteTimeInMs: string; - QueryEngineTimes: string; - SystemFunctionExecuteTimeInMs: string; - UserDefinedFunctionExecutionTimeInMs: string; - RetrievedDocumentCountText: string; - RetrievedDocumentSizeText: string; - OutputDocumentCountText: string; - OutputDocumentSizeText: string; - IndexUtilizationText: string; - TotalQueryExecutionTimeText: string; - QueryPreparationTimesText: string; - QueryCompileTimeText: string; - LogicalPlanBuildTimeText: string; - PhysicalPlanBuildTimeText: string; - QueryOptimizationTimeText: string; - QueryEngineTimesText: string; - IndexLookupTimeText: string; - DocumentLoadTimeText: string; - WriteOutputTimeText: string; - RuntimeExecutionTimesText: string; - TotalExecutionTimeText: string; - SystemFunctionExecuteTimeText: string; - UserDefinedFunctionExecutionTimeText: string; - ClientSideQueryMetricsText: string; - RetriesText: string; - RequestChargeText: string; - FetchExecutionRangesText: string; - SchedulingMetricsText: string; - }; - - export declare class QueryPreparationTimes { - readonly queryCompilationTime: TimeSpan; - readonly logicalPlanBuildTime: TimeSpan; - readonly physicalPlanBuildTime: TimeSpan; - readonly queryOptimizationTime: TimeSpan; - constructor(queryCompilationTime: TimeSpan, logicalPlanBuildTime: TimeSpan, physicalPlanBuildTime: TimeSpan, queryOptimizationTime: TimeSpan); - /** - * returns a new QueryPreparationTimes instance that is the addition of this and the arguments. - */ - add(...queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes; - /** - * Output the QueryPreparationTimes as a delimited string. - */ - toDelimitedString(): string; - static readonly zero: QueryPreparationTimes; - /** - * Returns a new instance of the QueryPreparationTimes class that is the - * aggregation of an array of QueryPreparationTimes. - */ - static createFromArray(queryPreparationTimesArray: QueryPreparationTimes[]): QueryPreparationTimes; - /** - * Returns a new instance of the QueryPreparationTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string): QueryPreparationTimes; - } - - /** - * @hidden - */ - export declare interface QueryRange { - min: string; - max: string; - isMinInclusive: boolean; - isMaxInclusive: boolean; - } - - export declare type ReadOperation = OperationBase & { - operationType: typeof BulkOperationType.Read; - id: string; - }; - - export declare interface ReadOperationInput { - partitionKey?: string | number | boolean | null | Record | undefined; - operationType: typeof BulkOperationType.Read; - id: string; - } - - export declare type RemoveOperation = { - op: "remove"; - path: string; - }; - - export declare type ReplaceOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Replace; - id: string; - }; - - export declare interface ReplaceOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Replace; - resourceBody: JSONObject; - id: string; - } - - /** - * @hidden - */ - export declare interface RequestContext { - path?: string; - operationType?: OperationType; - client?: ClientContext; - retryCount?: number; - resourceType?: ResourceType; - resourceId?: string; - globalEndpointManager: GlobalEndpointManager; - connectionPolicy: ConnectionPolicy; - requestAgent: Agent; - body?: any; - headers?: CosmosHeaders_2; - endpoint?: string; - method: HTTPMethod; - partitionKeyRangeId?: string; - options: FeedOptions | RequestOptions; - plugins: PluginConfig[]; - partitionKey?: PartitionKey; - pipeline?: Pipeline; - } - - /** @hidden */ - declare interface RequestInfo_2 { - verb: HTTPMethod; - path: string; - resourceId: string; - resourceType: ResourceType; - headers: CosmosHeaders; - } - export { RequestInfo_2 as RequestInfo } - - /** - * Options that can be specified for a requested issued to the Azure Cosmos DB servers.= - */ - export declare interface RequestOptions extends SharedOptions { - /** Conditions Associated with the request. */ - accessCondition?: { - /** Conditional HTTP method header type (IfMatch or IfNoneMatch). */ - type: string; - /** Conditional HTTP method header value (the _etag field from the last version you read). */ - condition: string; - }; - /** Consistency level required by the client. */ - consistencyLevel?: string; - /** - * DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity - * to serve the request if regular provisioned RUs/second is exhausted. - */ - disableRUPerMinuteUsage?: boolean; - /** Enables or disables logging in JavaScript stored procedures. */ - enableScriptLogging?: boolean; - /** Specifies indexing directives (index, do not index .. etc). */ - indexingDirective?: string; - /** The offer throughput provisioned for a container in measurement of Requests-per-Unit. */ - offerThroughput?: number; - /** - * Offer type when creating document containers. - * - * This option is only valid when creating a document container. - */ - offerType?: string; - /** Enables/disables getting document container quota related stats for document container read requests. */ - populateQuotaInfo?: boolean; - /** Indicates what is the post trigger to be invoked after the operation. */ - postTriggerInclude?: string | string[]; - /** Indicates what is the pre trigger to be invoked before the operation. */ - preTriggerInclude?: string | string[]; - /** Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions). */ - resourceTokenExpirySeconds?: number; - /** (Advanced use case) The url to connect to. */ - urlConnection?: string; - /** Disable automatic id generation (will cause creates to fail if id isn't on the definition) */ - disableAutomaticIdGeneration?: boolean; - } - - export declare interface Resource { - /** Required. User settable property. Unique name that identifies the item, that is, no two items share the same ID within a database. The id must not exceed 255 characters. */ - id: string; - /** System generated property. The resource ID (_rid) is a unique identifier that is also hierarchical per the resource stack on the resource model. It is used internally for placement and navigation of the item resource. */ - _rid: string; - /** System generated property. Specifies the last updated timestamp of the resource. The value is a timestamp. */ - _ts: number; - /** System generated property. The unique addressable URI for the resource. */ - _self: string; - /** System generated property. Represents the resource etag required for optimistic concurrency control. */ - _etag: string; - } - - export declare class ResourceResponse { - readonly resource: TResource | undefined; - readonly headers: CosmosHeaders_2; - readonly statusCode: StatusCode; - readonly substatus?: SubStatusCode; - constructor(resource: TResource | undefined, headers: CosmosHeaders_2, statusCode: StatusCode, substatus?: SubStatusCode); - get requestCharge(): number; - get activityId(): string; - get etag(): string; - } - - /** - * @hidden - */ - export declare enum ResourceType { - none = "", - database = "dbs", - offer = "offers", - user = "users", - permission = "permissions", - container = "colls", - conflicts = "conflicts", - sproc = "sprocs", - udf = "udfs", - trigger = "triggers", - item = "docs", - pkranges = "pkranges", - partitionkey = "partitionKey" - } - - /** - * @hidden - */ - declare interface Response_2 { - headers: CosmosHeaders; - result?: T; - code?: number; - substatus?: number; - } - export { Response_2 as Response } - - export { RestError } - - /** - * Represents the Retry policy assocated with throttled requests in the Azure Cosmos DB database service. - */ - export declare interface RetryOptions { - /** Max number of retries to be performed for a request. Default value 9. */ - maxRetryAttemptCount: number; - /** Fixed retry interval in milliseconds to wait between each retry ignoring the retryAfter returned as part of the response. */ - fixedRetryIntervalInMilliseconds: number; - /** Max wait time in seconds to wait for a request while the retries are happening. Default value 30 seconds. */ - maxWaitTimeInSeconds: number; - } - - export declare class RuntimeExecutionTimes { - readonly queryEngineExecutionTime: TimeSpan; - readonly systemFunctionExecutionTime: TimeSpan; - readonly userDefinedFunctionExecutionTime: TimeSpan; - constructor(queryEngineExecutionTime: TimeSpan, systemFunctionExecutionTime: TimeSpan, userDefinedFunctionExecutionTime: TimeSpan); - /** - * returns a new RuntimeExecutionTimes instance that is the addition of this and the arguments. - */ - add(...runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes; - /** - * Output the RuntimeExecutionTimes as a delimited string. - */ - toDelimitedString(): string; - static readonly zero: RuntimeExecutionTimes; - /** - * Returns a new instance of the RuntimeExecutionTimes class that is - * the aggregation of an array of RuntimeExecutionTimes. - */ - static createFromArray(runtimeExecutionTimesArray: RuntimeExecutionTimes[]): RuntimeExecutionTimes; - /** - * Returns a new instance of the RuntimeExecutionTimes class this is deserialized from a delimited string. - */ - static createFromDelimitedString(delimitedString: string): RuntimeExecutionTimes; - } - - /** - * @hidden - */ - export declare enum SasTokenPermissionKind { - ContainerCreateItems = 1, - ContainerReplaceItems = 2, - ContainerUpsertItems = 4, - ContainerDeleteItems = 128, - ContainerExecuteQueries = 1, - ContainerReadFeeds = 2, - ContainerCreateStoreProcedure = 16, - ContainerReadStoreProcedure = 4, - ContainerReplaceStoreProcedure = 32, - ContainerDeleteStoreProcedure = 64, - ContainerCreateTriggers = 256, - ContainerReadTriggers = 16, - ContainerReplaceTriggers = 512, - ContainerDeleteTriggers = 1024, - ContainerCreateUserDefinedFunctions = 2048, - ContainerReadUserDefinedFunctions = 8, - ContainerReplaceUserDefinedFunctions = 4096, - ContainerDeleteUserDefinedFunctions = 8192, - ContainerExecuteStoredProcedure = 128, - ContainerReadConflicts = 32, - ContainerDeleteConflicts = 16384, - ContainerReadAny = 64, - ContainerFullAccess = 4294967295, - ItemReadAny = 65536, - ItemFullAccess = 65, - ItemRead = 64, - ItemReplace = 65536, - ItemUpsert = 131072, - ItemDelete = 262144, - StoreProcedureRead = 128, - StoreProcedureReplace = 1048576, - StoreProcedureDelete = 2097152, - StoreProcedureExecute = 4194304, - UserDefinedFuntionRead = 256, - UserDefinedFuntionReplace = 8388608, - UserDefinedFuntionDelete = 16777216, - TriggerRead = 512, - TriggerReplace = 33554432, - TriggerDelete = 67108864 - } - - export declare class SasTokenProperties { - user: string; - userTag: string; - databaseName: string; - containerName: string; - resourceName: string; - resourcePath: string; - resourceKind: CosmosContainerChildResourceKind; - partitionKeyValueRanges: string[]; - startTime: Date; - expiryTime: Date; - keyType: CosmosKeyType | number; - controlPlaneReaderScope: number; - controlPlaneWriterScope: number; - dataPlaneReaderScope: number; - dataPlaneWriterScope: number; - cosmosContainerChildResourceKind: CosmosContainerChildResourceKind; - cosmosKeyType: CosmosKeyType; - } - - export declare class Scripts { - readonly container: Container; - private readonly clientContext; - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Used to read, replace, or delete a specific, existing {@link StoredProcedure} by id. - * - * Use `.storedProcedures` for creating new stored procedures, or querying/reading all stored procedures. - * @param id - The id of the {@link StoredProcedure}. - */ - storedProcedure(id: string): StoredProcedure; - /** - * Used to read, replace, or delete a specific, existing {@link Trigger} by id. - * - * Use `.triggers` for creating new triggers, or querying/reading all triggers. - * @param id - The id of the {@link Trigger}. - */ - trigger(id: string): Trigger; - /** - * Used to read, replace, or delete a specific, existing {@link UserDefinedFunction} by id. - * - * Use `.userDefinedFunctions` for creating new user defined functions, or querying/reading all user defined functions. - * @param id - The id of the {@link UserDefinedFunction}. - */ - userDefinedFunction(id: string): UserDefinedFunction; - private $sprocs; - /** - * Operations for creating new stored procedures, and reading/querying all stored procedures. - * - * For reading, replacing, or deleting an existing stored procedure, use `.storedProcedure(id)`. - */ - get storedProcedures(): StoredProcedures; - private $triggers; - /** - * Operations for creating new triggers, and reading/querying all triggers. - * - * For reading, replacing, or deleting an existing trigger, use `.trigger(id)`. - */ - get triggers(): Triggers; - private $udfs; - /** - * Operations for creating new user defined functions, and reading/querying all user defined functions. - * - * For reading, replacing, or deleting an existing user defined function, use `.userDefinedFunction(id)`. - */ - get userDefinedFunctions(): UserDefinedFunctions; - } - - /** - * The default function for setting header token using the masterKey - * @hidden - */ - export declare function setAuthorizationTokenHeaderUsingMasterKey(verb: HTTPMethod, resourceId: string, resourceType: ResourceType, headers: CosmosHeaders, masterKey: string): Promise; - - /** - * Options that can be specified for a requested issued to the Azure Cosmos DB servers.= - */ - export declare interface SharedOptions { - /** Enables/disables getting document container quota related stats for document container read requests. */ - sessionToken?: string; - /** (Advanced use case) Initial headers to start with when sending requests to Cosmos */ - initialHeaders?: CosmosHeaders; - /** - * abortSignal to pass to all underlying network requests created by this method call. See https://developer.mozilla.org/en-US/docs/Web/API/AbortController - * @example Cancel a read request - * ```typescript - * const controller = new AbortController() - * const {result: item} = await items.query('SELECT * from c', { abortSignal: controller.signal}); - * controller.abort() - * ``` - */ - abortSignal?: AbortSignal_2; - /** - * Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the {@link - * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL} or {@link com.azure.cosmos.ConsistencyLevel#SESSION}, responses from the - * integrated cache are guaranteed to be no staler than value indicated by this maxIntegratedCacheStaleness. When the - * consistency level is not set, this property is ignored. - * - *

Default value is null

- * - *

Cache Staleness is supported in milliseconds granularity. Anything smaller than milliseconds will be ignored.

- */ - maxIntegratedCacheStalenessInMs?: number; - } - - export declare interface SpatialIndex { - path: string; - types: SpatialType[]; - boundingBox: { - xmin: number; - ymin: number; - xmax: number; - ymax: number; - }; - } - - export declare enum SpatialType { - LineString = "LineString", - MultiPolygon = "MultiPolygon", - Point = "Point", - Polygon = "Polygon" - } - - /** - * Represents a parameter in a Parameterized SQL query, specified in {@link SqlQuerySpec} - */ - export declare interface SqlParameter { - /** Name of the parameter. (i.e. `@lastName`) */ - name: string; - /** Value of the parameter (this is safe to come from users, assuming they are authorized) */ - value: JSONValue; - } - - /** - * Represents a SQL query in the Azure Cosmos DB service. - * - * Queries with inputs should be parameterized to protect against SQL injection. - * - * @example Parameterized SQL Query - * ```typescript - * const query: SqlQuerySpec = { - * query: "SELECT * FROM Families f where f.lastName = @lastName", - * parameters: [ - * {name: "@lastName", value: "Wakefield"} - * ] - * }; - * ``` - */ - export declare interface SqlQuerySpec { - /** The text of the SQL query */ - query: string; - /** The parameters you provide in the query */ - parameters?: SqlParameter[]; - } - - /** - * @hidden - */ - export declare type StatusCode = number; - - /** - * @hidden - */ - export declare const StatusCodes: StatusCodesType; - - /** - * @hidden - */ - export declare interface StatusCodesType { - Ok: 200; - Created: 201; - Accepted: 202; - NoContent: 204; - NotModified: 304; - BadRequest: 400; - Unauthorized: 401; - Forbidden: 403; - NotFound: 404; - MethodNotAllowed: 405; - RequestTimeout: 408; - Conflict: 409; - Gone: 410; - PreconditionFailed: 412; - RequestEntityTooLarge: 413; - TooManyRequests: 429; - RetryWith: 449; - InternalServerError: 500; - ServiceUnavailable: 503; - ENOTFOUND: "ENOTFOUND"; - OperationPaused: 1200; - OperationCancelled: 1201; - } - - /** - * Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id. - * - * For operations to create, read all, or query Stored Procedures, - */ - export declare class StoredProcedure { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * Creates a new instance of {@link StoredProcedure} linked to the parent {@link Container}. - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link StoredProcedure}. - * @hidden - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link StoredProcedureDefinition} for the given {@link StoredProcedure}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link StoredProcedure} with the specified {@link StoredProcedureDefinition}. - * @param body - The specified {@link StoredProcedureDefinition} to replace the existing definition. - */ - replace(body: StoredProcedureDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link StoredProcedure}. - */ - delete(options?: RequestOptions): Promise; - /** - * Execute the given {@link StoredProcedure}. - * - * The specified type, T, is not enforced by the client. - * Be sure to validate the response from the stored procedure matches the type, T, you provide. - * - * @param partitionKey - The partition key to use when executing the stored procedure - * @param params - Array of parameters to pass as arguments to the given {@link StoredProcedure}. - * @param options - Additional options, such as the partition key to invoke the {@link StoredProcedure} on. - */ - execute(partitionKey: PartitionKey, params?: any[], options?: RequestOptions): Promise>; - } - - export declare interface StoredProcedureDefinition { - /** - * The id of the {@link StoredProcedure}. - */ - id?: string; - /** - * The body of the {@link StoredProcedure}. This is a JavaScript function. - */ - body?: string | ((...inputs: any[]) => void); - } - - export declare class StoredProcedureResponse extends ResourceResponse { - constructor(resource: StoredProcedureDefinition & Resource, headers: CosmosHeaders, statusCode: number, storedProcedure: StoredProcedure); - /** - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - readonly storedProcedure: StoredProcedure; - /** - * Alias for storedProcedure. - * - * A reference to the {@link StoredProcedure} which the {@link StoredProcedureDefinition} corresponds to. - */ - get sproc(): StoredProcedure; - } - - /** - * Operations for creating, upserting, or reading/querying all Stored Procedures. - * - * For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see `container.storedProcedure()`. - */ - export declare class StoredProcedures { - readonly container: Container; - private readonly clientContext; - /** - * @param container - The parent {@link Container}. - * @hidden - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all Stored Procedures. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @example Read all stored procedures to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @sproc", - * parameters: [ - * {name: "@sproc", value: "Todo"} - * ] - * }; - * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all Stored Procedures. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - * @example Read all stored procedures to array. - * ```typescript - * const querySpec: SqlQuerySpec = { - * query: "SELECT * FROM root r WHERE r.id = @sproc", - * parameters: [ - * {name: "@sproc", value: "Todo"} - * ] - * }; - * const {body: sprocList} = await containers.storedProcedures.query(querySpec).fetchAll(); - * ``` - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all stored procedures. - * @example Read all stored procedures to array. - * ```typescript - * const {body: sprocList} = await containers.storedProcedures.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a StoredProcedure. - * - * Azure Cosmos DB allows stored procedures to be executed in the storage tier, - * directly against an item container. The script - * gets executed under ACID transactions on the primary storage partition of the - * specified container. For additional details, - * refer to the server-side JavaScript API documentation. - */ - create(body: StoredProcedureDefinition, options?: RequestOptions): Promise; - } - - /** - * @hidden - */ - export declare type SubStatusCode = number; - - export declare class TimeoutError extends Error { - readonly code: string; - constructor(message?: string); - } - - /** - * Represents a time interval. - * - * @param days - Number of days. - * @param hours - Number of hours. - * @param minutes - Number of minutes. - * @param seconds - Number of seconds. - * @param milliseconds - Number of milliseconds. - * @hidden - */ - export declare class TimeSpan { - protected _ticks: number; - constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number); - /** - * Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance. - * @param ts - The time interval to add. - */ - add(ts: TimeSpan): TimeSpan; - /** - * Returns a new TimeSpan object whose value is the difference of the specified TimeSpan object and this instance. - * @param ts - The time interval to subtract. - */ - subtract(ts: TimeSpan): TimeSpan; - /** - * Compares this instance to a specified object and returns an integer that indicates whether this - * instance is shorter than, equal to, or longer than the specified object. - * @param value - The time interval to add. - */ - compareTo(value: TimeSpan): 1 | -1 | 0; - /** - * Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object. - */ - duration(): TimeSpan; - /** - * Returns a value indicating whether this instance is equal to a specified object. - * @param value - The time interval to check for equality. - */ - equals(value: TimeSpan): boolean; - /** - * Returns a new TimeSpan object whose value is the negated value of this instance. - * @param value - The time interval to check for equality. - */ - negate(): TimeSpan; - days(): number; - hours(): number; - milliseconds(): number; - seconds(): number; - ticks(): number; - totalDays(): number; - totalHours(): number; - totalMilliseconds(): number; - totalMinutes(): number; - totalSeconds(): number; - static fromTicks(value: number): TimeSpan; - static readonly zero: TimeSpan; - static readonly maxValue: TimeSpan; - static readonly minValue: TimeSpan; - static isTimeSpan(timespan: TimeSpan): number; - static additionDoesOverflow(a: number, b: number): boolean; - static subtractionDoesUnderflow(a: number, b: number): boolean; - static compare(t1: TimeSpan, t2: TimeSpan): 1 | 0 | -1; - static interval(value: number, scale: number): TimeSpan; - static fromMilliseconds(value: number): TimeSpan; - static fromSeconds(value: number): TimeSpan; - static fromMinutes(value: number): TimeSpan; - static fromHours(value: number): TimeSpan; - static fromDays(value: number): TimeSpan; - } - - export declare type TokenProvider = (requestInfo: RequestInfo_2) => Promise; - - /** - * Operations to read, replace, or delete a {@link Trigger}. - * - * Use `container.triggers` to create, upsert, query, or read all. - */ - export declare class Trigger { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link Trigger}. - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link TriggerDefinition} for the given {@link Trigger}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link Trigger} with the specified {@link TriggerDefinition}. - * @param body - The specified {@link TriggerDefinition} to replace the existing definition with. - */ - replace(body: TriggerDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link Trigger}. - */ - delete(options?: RequestOptions): Promise; - } - - export declare interface TriggerDefinition { - /** The id of the trigger. */ - id?: string; - /** The body of the trigger, it can also be passed as a stringifed function */ - body: (() => void) | string; - /** The type of the trigger, should be one of the values of {@link TriggerType}. */ - triggerType: TriggerType; - /** The trigger operation, should be one of the values of {@link TriggerOperation}. */ - triggerOperation: TriggerOperation; - } - - /** - * Enum for trigger operation values. - * specifies the operations on which a trigger should be executed. - */ - export declare enum TriggerOperation { - /** All operations. */ - All = "all", - /** Create operations only. */ - Create = "create", - /** Update operations only. */ - Update = "update", - /** Delete operations only. */ - Delete = "delete", - /** Replace operations only. */ - Replace = "replace" - } - - export declare class TriggerResponse extends ResourceResponse { - constructor(resource: TriggerDefinition & Resource, headers: CosmosHeaders, statusCode: number, trigger: Trigger); - /** A reference to the {@link Trigger} corresponding to the returned {@link TriggerDefinition}. */ - readonly trigger: Trigger; - } - - /** - * Operations to create, upsert, query, and read all triggers. - * - * Use `container.triggers` to read, replace, or delete a {@link Trigger}. - */ - export declare class Triggers { - readonly container: Container; - private readonly clientContext; - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all Triggers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all Triggers. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all Triggers. - * @example Read all trigger to array. - * ```typescript - * const {body: triggerList} = await container.triggers.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a trigger. - * - * Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed - * on creates, updates and deletes. - * - * For additional details, refer to the server-side JavaScript API documentation. - */ - create(body: TriggerDefinition, options?: RequestOptions): Promise; - } - - /** - * Enum for trigger type values. - * Specifies the type of the trigger. - */ - export declare enum TriggerType { - /** Trigger should be executed before the associated operation(s). */ - Pre = "pre", - /** Trigger should be executed after the associated operation(s). */ - Post = "post" - } - - /** Interface for a single unique key passed as part of UniqueKeyPolicy */ - export declare interface UniqueKey { - paths: string[]; - } - - /** Interface for setting unique keys on container creation */ - export declare interface UniqueKeyPolicy { - uniqueKeys: UniqueKey[]; - } - - export declare type UpsertOperation = OperationWithItem & { - operationType: typeof BulkOperationType.Upsert; - }; - - export declare interface UpsertOperationInput { - partitionKey?: string | number | null | Record | undefined; - ifMatch?: string; - ifNoneMatch?: string; - operationType: typeof BulkOperationType.Upsert; - resourceBody: JSONObject; - } - - /** - * Used to read, replace, and delete Users. - * - * Additionally, you can access the permissions for a given user via `user.permission` and `user.permissions`. - * - * @see {@link Users} to create, upsert, query, or read all. - */ - export declare class User { - readonly database: Database; - readonly id: string; - private readonly clientContext; - /** - * Operations for creating, upserting, querying, or reading all operations. - * - * See `client.permission(id)` to read, replace, or delete a specific Permission by id. - */ - readonly permissions: Permissions_2; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database: Database, id: string, clientContext: ClientContext); - /** - * Operations to read, replace, or delete a specific Permission by id. - * - * See `client.permissions` for creating, upserting, querying, or reading all operations. - */ - permission(id: string): Permission; - /** - * Read the {@link UserDefinition} for the given {@link User}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link User}'s definition with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition} to replace the definition. - */ - replace(body: UserDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link User}. - */ - delete(options?: RequestOptions): Promise; - } - - /** - * Used to read, replace, or delete a specified User Definied Function by id. - * - * @see {@link UserDefinedFunction} to create, upsert, query, read all User Defined Functions. - */ - export declare class UserDefinedFunction { - readonly container: Container; - readonly id: string; - private readonly clientContext; - /** - * Returns a reference URL to the resource. Used for linking in Permissions. - */ - get url(): string; - /** - * @hidden - * @param container - The parent {@link Container}. - * @param id - The id of the given {@link UserDefinedFunction}. - */ - constructor(container: Container, id: string, clientContext: ClientContext); - /** - * Read the {@link UserDefinedFunctionDefinition} for the given {@link UserDefinedFunction}. - */ - read(options?: RequestOptions): Promise; - /** - * Replace the given {@link UserDefinedFunction} with the specified {@link UserDefinedFunctionDefinition}. - * @param options - - */ - replace(body: UserDefinedFunctionDefinition, options?: RequestOptions): Promise; - /** - * Delete the given {@link UserDefined}. - */ - delete(options?: RequestOptions): Promise; - } - - export declare interface UserDefinedFunctionDefinition { - /** The id of the {@link UserDefinedFunction} */ - id?: string; - /** The body of the user defined function, it can also be passed as a stringifed function */ - body?: string | (() => void); - } - - export declare class UserDefinedFunctionResponse extends ResourceResponse { - constructor(resource: UserDefinedFunctionDefinition & Resource, headers: CosmosHeaders, statusCode: number, udf: UserDefinedFunction); - /** A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. */ - readonly userDefinedFunction: UserDefinedFunction; - /** - * Alias for `userDefinedFunction(id)`. - * - * A reference to the {@link UserDefinedFunction} corresponding to the returned {@link UserDefinedFunctionDefinition}. - */ - get udf(): UserDefinedFunction; - } - - /** - * Used to create, upsert, query, or read all User Defined Functions. - * - * @see {@link UserDefinedFunction} to read, replace, or delete a given User Defined Function by id. - */ - export declare class UserDefinedFunctions { - readonly container: Container; - private readonly clientContext; - /** - * @hidden - * @param container - The parent {@link Container}. - */ - constructor(container: Container, clientContext: ClientContext); - /** - * Query all User Defined Functions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all User Defined Functions. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all User Defined Functions. - * @example Read all User Defined Functions to array. - * ```typescript - * const {body: udfList} = await container.userDefinedFunctions.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a UserDefinedFunction. - * - * Azure Cosmos DB supports JavaScript UDFs which can be used inside queries, stored procedures and triggers. - * - * For additional details, refer to the server-side JavaScript API documentation. - * - */ - create(body: UserDefinedFunctionDefinition, options?: RequestOptions): Promise; - } - - /** - * Enum for udf type values. - * Specifies the types of user defined functions. - */ - export declare enum UserDefinedFunctionType { - /** The User Defined Function is written in JavaScript. This is currently the only option. */ - Javascript = "Javascript" - } - - export declare interface UserDefinition { - /** The id of the user. */ - id?: string; - } - - export declare class UserResponse extends ResourceResponse { - constructor(resource: UserDefinition & Resource, headers: CosmosHeaders, statusCode: number, user: User); - /** A reference to the {@link User} corresponding to the returned {@link UserDefinition}. */ - readonly user: User; - } - - /** - * Used to create, upsert, query, and read all users. - * - * @see {@link User} to read, replace, or delete a specific User by id. - */ - export declare class Users { - readonly database: Database; - private readonly clientContext; - /** - * @hidden - * @param database - The parent {@link Database}. - */ - constructor(database: Database, clientContext: ClientContext); - /** - * Query all users. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Query all users. - * @param query - Query configuration for the operation. See {@link SqlQuerySpec} for more info on how to configure a query. - */ - query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator; - /** - * Read all users.- - * @example Read all users to array. - * ```typescript - * const {body: usersList} = await database.users.readAll().fetchAll(); - * ``` - */ - readAll(options?: FeedOptions): QueryIterator; - /** - * Create a database user with the specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - create(body: UserDefinition, options?: RequestOptions): Promise; - /** - * Upsert a database user with a specified {@link UserDefinition}. - * @param body - The specified {@link UserDefinition}. - */ - upsert(body: UserDefinition, options?: RequestOptions): Promise; - } - - declare type VerboseOmit = Pick>; - - export { } diff --git a/reverse_engineering/node_modules/@azure/cosmos/dist/types/latest/tsdoc-metadata.json b/reverse_engineering/node_modules/@azure/cosmos/dist/types/latest/tsdoc-metadata.json deleted file mode 100644 index d842c0e..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/dist/types/latest/tsdoc-metadata.json +++ /dev/null @@ -1,11 +0,0 @@ -// This file is read by tools that parse documentation comments conforming to the TSDoc standard. -// It should be published with your NPM package. It should not be tracked by Git. -{ - "tsdocVersion": "0.12", - "toolPackages": [ - { - "packageName": "@microsoft/api-extractor", - "packageVersion": "7.34.4" - } - ] -} diff --git a/reverse_engineering/node_modules/@azure/cosmos/package.json b/reverse_engineering/node_modules/@azure/cosmos/package.json deleted file mode 100644 index 6381271..0000000 --- a/reverse_engineering/node_modules/@azure/cosmos/package.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "name": "@azure/cosmos", - "version": "3.17.3", - "description": "Microsoft Azure Cosmos DB Service Node.js SDK for SQL API", - "sdk-type": "client", - "keywords": [ - "cosmosdb", - "cosmos db", - "documentdb", - "document database", - "azure", - "nosql", - "database", - "cloud", - "azure" - ], - "author": "Microsoft Corporation", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "react-native": "./dist-esm/src/index.js", - "browser": { - "./dist-esm/src/request/defaultAgent.js": "./dist-esm/src/request/defaultAgent.browser.js", - "./dist-esm/src/utils/atob.js": "./dist-esm/src/utils/atob.browser.js", - "./dist-esm/src/utils/digest.js": "./dist-esm/src/utils/digest.browser.js", - "./dist-esm/src/utils/hmac.js": "./dist-esm/src/utils/hmac.browser.js" - }, - "files": [ - "changelog.md", - "dist/", - "dist-esm/src/", - "README.md", - "LICENSE" - ], - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/cosmos/README.md", - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/common/constants.ts", - "prefix": "SDKVersion" - } - ] - }, - "types": "./dist/types/latest/cosmos.d.ts", - "typesVersions": { - "<3.6": { - "*": [ - "./dist/types/3.1/cosmos.d.ts" - ] - } - }, - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:samples": "echo Obsolete.", - "check:src:strict": "tsc --pretty --project tsconfig.strict.json", - "build:src": "echo Using TypeScript && tsc --version && tsc -b --pretty", - "build:test": "tsc", - "build:types": "downlevel-dts dist/types/latest dist/types/4.1 --to=4.1", - "build": "npm run clean && npm run extract-api && npm run build:types && npm run bundle", - "bundle": "dev-tool run bundle", - "bundle-types": "node bundle-types.js", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-esm temp types *.tgz *.html *.log *.tsbuildinfo test/**/*.{js,js.map,d.ts}", - "execute:samples": "dev-tool samples run samples-dev", - "extract-api": "npm run check:src:strict && npm run build:src && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "echo skipped", - "integration-test:node": "mocha -r test/mocha.env.ts -r ts-node/register -r esm -r dotenv/config -r ./test/public/common/setup.ts --reporter ../../../common/tools/mocha-multi-reporter.js \"./test/internal/**/*.spec.ts\" \"./test/public/**/*.spec.ts\" --timeout 100000", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", - "pack": "npm pack 2>&1", - "test:browser": "npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", - "test-consumer": "rimraf consumer-test/node_modules consumer-test/package-lock.json && node consumer-test.js 2>&1", - "test": "npm run unit-test && npm run integration-test", - "test:signoff": "npm run integration-test:node -- --fgrep \"nosignoff\" --invert", - "unit-test:browser": "echo skipped", - "unit-test:node": "echo skipped", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" - }, - "repository": "github:Azure/azure-sdk-for-js", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "tsdoc": { - "tsdocFlavor": "AEDoc" - }, - "dependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.2.0", - "@azure/core-tracing": "^1.0.0", - "debug": "^4.1.1", - "fast-json-stable-stringify": "^2.1.0", - "jsbi": "^3.1.3", - "node-abort-controller": "^3.0.0", - "priorityqueuejs": "^1.0.0", - "semaphore": "^1.0.5", - "tslib": "^2.2.0", - "universal-user-agent": "^6.0.0", - "uuid": "^8.3.0", - "@azure/abort-controller": "^1.0.0" - }, - "devDependencies": { - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/identity": "^2.0.1", - "@azure/logger": "^1.0.0", - "@microsoft/api-extractor": "^7.31.1", - "@types/debug": "^4.1.4", - "@types/mocha": "^7.0.2", - "@types/node": "^14.0.0", - "@types/priorityqueuejs": "^1.0.1", - "@types/semaphore": "^1.1.0", - "@types/sinon": "^9.0.4", - "@types/underscore": "^1.8.8", - "@types/uuid": "^8.0.0", - "cross-env": "^7.0.2", - "dotenv": "^16.0.0", - "downlevel-dts": "^0.10.0", - "eslint": "^8.0.0", - "esm": "^3.2.18", - "execa": "^5.0.0", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^2.0.0", - "prettier": "^2.5.1", - "requirejs": "^2.3.5", - "rimraf": "^3.0.0", - "sinon": "^9.0.2", - "source-map-support": "^0.5.9", - "ts-node": "^10.0.0", - "typescript": "~4.8.0", - "nock": "^12.0.3", - "@types/sinonjs__fake-timers": "~8.1.2", - "@sinonjs/fake-timers": "~10.0.2" - }, - "//sampleConfiguration": { - "skip": [ - "AADAuth.ts", - "AlterQueryThroughput.ts", - "Bulk.ts", - "BulkUpdateWithSproc.ts", - "ChangeFeed.ts", - "ContainerManagement.ts", - "ItemManagement.ts", - "IndexManagement.ts", - "DatabaseManagement.ts", - "QueryThroughput.ts", - "SasTokenAuth.ts", - "ServerSideScripts.ts", - "handleError.ts" - ], - "productName": "Azure Cosmos DB", - "productSlugs": [ - "azure-cosmos-db" - ], - "requiredResources": { - "Azure Cosmos DB account": "https://docs.microsoft.com/azure/cosmos-db/how-to-manage-database-account#create-an-account" - }, - "extraFiles": { - "./samples-dev/Data/Families.json": [ - "typescript/src/Data/Families.json", - "javascript/Data/Families.json" - ] - } - } -} diff --git a/reverse_engineering/node_modules/@azure/logger/LICENSE b/reverse_engineering/node_modules/@azure/logger/LICENSE deleted file mode 100644 index ea8fb15..0000000 --- a/reverse_engineering/node_modules/@azure/logger/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@azure/logger/README.md b/reverse_engineering/node_modules/@azure/logger/README.md deleted file mode 100644 index 058b5db..0000000 --- a/reverse_engineering/node_modules/@azure/logger/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# Azure Logger client library for JavaScript - -The `@azure/logger` package can be used to enable logging in the Azure SDKs for JavaScript. - -Logging can be enabled for the Azure SDK in the following ways: - -- Setting the AZURE_LOG_LEVEL environment variable -- Calling setLogLevel imported from "@azure/logger" -- Calling enable() on specific loggers -- Using the `DEBUG` environment variable. - -Note that AZURE_LOG_LEVEL, if set, takes precedence over DEBUG. Only use DEBUG without specifying AZURE_LOG_LEVEL or calling setLogLevel. - -## Getting started - -### Installation - -Install this library using npm as follows - -``` -npm install @azure/logger -``` - -## Key Concepts - -The `@azure/logger` package supports the following log levels -specified in order of most verbose to least verbose: - -- verbose -- info -- warning -- error - -When setting a log level, either programmatically or via the `AZURE_LOG_LEVEL` environment variable, -any logs that are written using a log level equal to or less than the one you choose -will be emitted. - -For example, setting the log level to `warning` will cause all logs that have the log -level `warning` or `error` to be emitted. - - -**NOTE**: When logging requests and responses, we sanitize these objects to make sure things like `Authorization` headers that contain secrets are not logged. - -Request and response bodies are never logged. Headers are redacted by default, unless present in the following list or explicitly allowed by the client SDK: -- "x-ms-client-request-id", -- "x-ms-return-client-request-id", -- "x-ms-useragent", -- "x-ms-correlation-request-id", -- "x-ms-request-id", -- "client-request-id", -- "ms-cv", -- "return-client-request-id", -- "traceparent", -- "Access-Control-Allow-Credentials", -- "Access-Control-Allow-Headers", -- "Access-Control-Allow-Methods", -- "Access-Control-Allow-Origin", -- "Access-Control-Expose-Headers", -- "Access-Control-Max-Age", -- "Access-Control-Request-Headers", -- "Access-Control-Request-Method", -- "Origin", -- "Accept", -- "Accept-Encoding", -- "Cache-Control", -- "Connection", -- "Content-Length", -- "Content-Type", -- "Date", -- "ETag", -- "Expires", -- "If-Match", -- "If-Modified-Since", -- "If-None-Match", -- "If-Unmodified-Since", -- "Last-Modified", -- "Pragma", -- "Request-Id", -- "Retry-After", -- "Server", -- "Transfer-Encoding", -- "User-Agent", -- "WWW-Authenticate", - -## Examples - -### Example 1 - basic usage - -```js -const { EventHubClient } = require('@azure/event-hubs'); - -const logger = require('@azure/logger'); -logger.setLogLevel('info'); - -// operations will now emit info, warning, and error logs -const client = new EventHubClient(/* params */); -client.getPartitionIds() - .then(ids => { /* do work */ }) - .catch(e => { /* do work */ }); -}); -``` - -### Example 2 - redirect log output - -```js -const { AzureLogger, setLogLevel } = require("@azure/logger"); - -setLogLevel("verbose"); - -// override logging to output to console.log (default location is stderr) -AzureLogger.log = (...args) => { - console.log(...args); -}; -``` - -Using `AzureLogger`, it is possible to redirect the logging output from the Azure SDKs by -overriding the `AzureLogger.log` method. This may be useful if you want to redirect logs to -a location other than stderr. - -## Next steps - -You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes. - -## Troubleshooting - -If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new). - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Flogger%2FREADME.png) diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/debug.js b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/debug.js deleted file mode 100644 index d202779..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/debug.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { log } from "./log"; -const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; -let enabledString; -let enabledNamespaces = []; -let skippedNamespaces = []; -const debuggers = []; -if (debugEnvVariable) { - enable(debugEnvVariable); -} -const debugObj = Object.assign((namespace) => { - return createDebugger(namespace); -}, { - enable, - enabled, - disable, - log, -}); -function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } - else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } -} -function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; -} -function disable() { - const result = enabledString || ""; - enable(""); - return result; -} -function createDebugger(namespace) { - const newDebugger = Object.assign(debug, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend, - }); - function debug(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; -} -function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; -} -function extend(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; -} -export default debugObj; -//# sourceMappingURL=debug.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/debug.js.map b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/debug.js.map deleted file mode 100644 index 9dc639a..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/debug.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAgE5B,MA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CAAC,CAAC;IAE5B,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,OAAO;IACd,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,KAAK,IAAI,CAAC,EAAE;QACd,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAiB,SAAiB;IAC/C,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,IAAI,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC,CAAC;IACrE,WAAW,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IAC3B,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { log } from \"./log\";\n\n/**\n * A simple mechanism for enabling logging.\n * Intended to mimic the publicly available `debug` package.\n */\nexport interface Debug {\n /**\n * Creates a new logger with the given namespace.\n */\n (namespace: string): Debugger;\n /**\n * The default log method (defaults to console)\n */\n log: (...args: any[]) => void;\n /**\n * Enables a particular set of namespaces.\n * To enable multiple separate them with commas, e.g. \"info,debug\".\n * Supports wildcards, e.g. \"azure:*\"\n * Supports skip syntax, e.g. \"azure:*,-azure:storage:*\" will enable\n * everything under azure except for things under azure:storage.\n */\n enable: (namespaces: string) => void;\n /**\n * Checks if a particular namespace is enabled.\n */\n enabled: (namespace: string) => boolean;\n /**\n * Disables all logging, returns what was previously enabled.\n */\n disable: () => string;\n}\n\n/**\n * A log function that can be dynamically enabled and redirected.\n */\nexport interface Debugger {\n /**\n * Logs the given arguments to the `log` method.\n */\n (...args: any[]): void;\n /**\n * True if this logger is active and logging.\n */\n enabled: boolean;\n /**\n * Used to cleanup/remove this logger.\n */\n destroy: () => boolean;\n /**\n * The current log method. Can be overridden to redirect output.\n */\n log: (...args: any[]) => void;\n /**\n * The namespace of this logger.\n */\n namespace: string;\n /**\n * Extends this logger with a child namespace.\n * Namespaces are separated with a ':' character.\n */\n extend: (namespace: string) => Debugger;\n}\n\nconst debugEnvVariable =\n (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\n\nlet enabledString: string | undefined;\nlet enabledNamespaces: RegExp[] = [];\nlet skippedNamespaces: RegExp[] = [];\nconst debuggers: Debugger[] = [];\n\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\n\nconst debugObj: Debug = Object.assign(\n (namespace: string): Debugger => {\n return createDebugger(namespace);\n },\n {\n enable,\n enabled,\n disable,\n log,\n }\n);\n\nfunction enable(namespaces: string): void {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n } else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\n\nfunction enabled(namespace: string): boolean {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\n\nfunction disable(): string {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\n\nfunction createDebugger(namespace: string): Debugger {\n const newDebugger: Debugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend,\n });\n\n function debug(...args: any[]): void {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n\n debuggers.push(newDebugger);\n\n return newDebugger;\n}\n\nfunction destroy(this: Debugger): boolean {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\n\nfunction extend(this: Debugger, namespace: string): Debugger {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\n\nexport default debugObj;\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/index.js b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/index.js deleted file mode 100644 index cc25720..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/index.js +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import debug from "./debug"; -const registeredLoggers = new Set(); -const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; -let azureLogLevel; -/** - * The AzureLogger provides a mechanism for overriding where logs are output to. - * By default, logs are sent to stderr. - * Override the `log` method to redirect logs to another location. - */ -export const AzureLogger = debug("azure"); -AzureLogger.log = (...args) => { - debug.log(...args); -}; -const AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; -if (logLevelFromEnv) { - // avoid calling setLogLevel because we don't want a mis-set environment variable to crash - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } - else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } -} -/** - * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. - * @param level - The log level to enable for logging. - * Options from most verbose to least verbose are: - * - verbose - * - info - * - warning - * - error - */ -export function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces.push(logger.namespace); - } - } - debug.enable(enabledNamespaces.join(",")); -} -/** - * Retrieves the currently specified log level. - */ -export function getLogLevel() { - return azureLogLevel; -} -const levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100, -}; -/** - * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. - * @param namespace - The name of the SDK package. - * @hidden - */ -export function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose"), - }; -} -function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; -} -function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level, - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces = debug.disable(); - debug.enable(enabledNamespaces + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; -} -function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); -} -function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/index.js.map b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/index.js.map deleted file mode 100644 index 53332f2..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAmB,MAAM,SAAS,CAAC;AAG1C,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAiB,CAAC;AACnD,MAAM,eAAe,GACnB,CAAC,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI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CAAC;IAE9B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,MAAqB;IACzC,OAAO,OAAO,CAAC,aAAa,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AACrF,CAAC;AAED,SAAS,eAAe,CAAC,QAAgB;IACvC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,QAAe,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport debug, { Debugger } from \"./debug\";\nexport { Debugger } from \"./debug\";\n\nconst registeredLoggers = new Set();\nconst logLevelFromEnv =\n (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\n\nlet azureLogLevel: AzureLogLevel | undefined;\n\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger: AzureClientLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\n\n/**\n * The log levels supported by the logger.\n * The log levels in order of most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport type AzureLogLevel = \"verbose\" | \"info\" | \"warning\" | \"error\";\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\n\ntype AzureDebugger = Debugger & { level: AzureLogLevel };\n\n/**\n * An AzureClientLogger is a function that can log to an appropriate severity level.\n */\nexport type AzureClientLogger = Debugger;\n\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n } else {\n console.error(\n `AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\n \", \"\n )}.`\n );\n }\n}\n\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level?: AzureLogLevel): void {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(\n `Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`\n );\n }\n azureLogLevel = level;\n\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n\n debug.enable(enabledNamespaces.join(\",\"));\n}\n\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel(): AzureLogLevel | undefined {\n return azureLogLevel;\n}\n\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100,\n};\n\n/**\n * Defines the methods available on the SDK-facing logger.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport interface AzureLogger {\n /**\n * Used for failures the program is unlikely to recover from,\n * such as Out of Memory.\n */\n error: Debugger;\n /**\n * Used when a function fails to perform its intended task.\n * Usually this means the function will throw an exception.\n * Not used for self-healing events (e.g. automatic retry)\n */\n warning: Debugger;\n /**\n * Used when a function operates normally.\n */\n info: Debugger;\n /**\n * Used for detailed troubleshooting scenarios. This is\n * intended for use by developers / system administrators\n * for diagnosing specific failures.\n */\n verbose: Debugger;\n}\n\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nexport function createClientLogger(namespace: string): AzureLogger {\n const clientRootLogger: AzureClientLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\"),\n };\n}\n\nfunction patchLogMethod(parent: AzureClientLogger, child: AzureClientLogger | AzureDebugger): void {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\n\nfunction createLogger(parent: AzureClientLogger, level: AzureLogLevel): AzureDebugger {\n const logger: AzureDebugger = Object.assign(parent.extend(level), {\n level,\n });\n\n patchLogMethod(parent, logger);\n\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n\n registeredLoggers.add(logger);\n\n return logger;\n}\n\nfunction shouldEnable(logger: AzureDebugger): boolean {\n return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\n\nfunction isAzureLogLevel(logLevel: string): logLevel is AzureLogLevel {\n return AZURE_LOG_LEVELS.includes(logLevel as any);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.browser.js b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.browser.js deleted file mode 100644 index 3f69bb2..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.browser.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -export function log(...args) { - if (args.length > 0) { - const firstArg = String(args[0]); - if (firstArg.includes(":error")) { - console.error(...args); - } - else if (firstArg.includes(":warning")) { - console.warn(...args); - } - else if (firstArg.includes(":info")) { - console.info(...args); - } - else if (firstArg.includes(":verbose")) { - console.debug(...args); - } - else { - console.debug(...args); - } - } -} -//# sourceMappingURL=log.browser.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.browser.js.map b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.browser.js.map deleted file mode 100644 index 4542a4e..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"log.browser.js","sourceRoot":"","sources":["../../src/log.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,UAAU,GAAG,CAAC,GAAG,IAAW;IAChC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACnB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YAC/B,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;SACxB;aAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YACxC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;SACvB;aAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YACrC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;SACvB;aAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YACxC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;SACxB;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;SACxB;KACF;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport function log(...args: any[]): void {\n if (args.length > 0) {\n const firstArg = String(args[0]);\n if (firstArg.includes(\":error\")) {\n console.error(...args);\n } else if (firstArg.includes(\":warning\")) {\n console.warn(...args);\n } else if (firstArg.includes(\":info\")) {\n console.info(...args);\n } else if (firstArg.includes(\":verbose\")) {\n console.debug(...args);\n } else {\n console.debug(...args);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.js b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.js deleted file mode 100644 index 74a1f11..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -import { EOL } from "os"; -import util from "util"; -export function log(message, ...args) { - process.stderr.write(`${util.format(message, ...args)}${EOL}`); -} -//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.js.map b/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.js.map deleted file mode 100644 index 9581d18..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist-esm/src/log.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAE,GAAG,IAAW;IAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;AACjE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { EOL } from \"os\";\nimport util from \"util\";\n\nexport function log(message: unknown, ...args: any[]): void {\n process.stderr.write(`${util.format(message, ...args)}${EOL}`);\n}\n"]} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/dist/index.js b/reverse_engineering/node_modules/@azure/logger/dist/index.js deleted file mode 100644 index 81e97c3..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist/index.js +++ /dev/null @@ -1,208 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var os = require('os'); -var util = require('util'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var util__default = /*#__PURE__*/_interopDefaultLegacy(util); - -// Copyright (c) Microsoft Corporation. -function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os.EOL}`); -} - -// Copyright (c) Microsoft Corporation. -const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; -let enabledString; -let enabledNamespaces = []; -let skippedNamespaces = []; -const debuggers = []; -if (debugEnvVariable) { - enable(debugEnvVariable); -} -const debugObj = Object.assign((namespace) => { - return createDebugger(namespace); -}, { - enable, - enabled, - disable, - log, -}); -function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } - else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } -} -function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; -} -function disable() { - const result = enabledString || ""; - enable(""); - return result; -} -function createDebugger(namespace) { - const newDebugger = Object.assign(debug, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend, - }); - function debug(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; -} -function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; -} -function extend(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; -} -var debug = debugObj; - -// Copyright (c) Microsoft Corporation. -const registeredLoggers = new Set(); -const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; -let azureLogLevel; -/** - * The AzureLogger provides a mechanism for overriding where logs are output to. - * By default, logs are sent to stderr. - * Override the `log` method to redirect logs to another location. - */ -const AzureLogger = debug("azure"); -AzureLogger.log = (...args) => { - debug.log(...args); -}; -const AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; -if (logLevelFromEnv) { - // avoid calling setLogLevel because we don't want a mis-set environment variable to crash - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } - else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } -} -/** - * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. - * @param level - The log level to enable for logging. - * Options from most verbose to least verbose are: - * - verbose - * - info - * - warning - * - error - */ -function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces.push(logger.namespace); - } - } - debug.enable(enabledNamespaces.join(",")); -} -/** - * Retrieves the currently specified log level. - */ -function getLogLevel() { - return azureLogLevel; -} -const levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100, -}; -/** - * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. - * @param namespace - The name of the SDK package. - * @hidden - */ -function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose"), - }; -} -function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; -} -function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level, - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces = debug.disable(); - debug.enable(enabledNamespaces + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; -} -function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); -} -function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); -} - -exports.AzureLogger = AzureLogger; -exports.createClientLogger = createClientLogger; -exports.getLogLevel = getLogLevel; -exports.setLogLevel = setLogLevel; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/@azure/logger/dist/index.js.map b/reverse_engineering/node_modules/@azure/logger/dist/index.js.map deleted file mode 100644 index 5edf99e..0000000 --- a/reverse_engineering/node_modules/@azure/logger/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/log.ts","../src/debug.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { EOL } from \"os\";\nimport util from \"util\";\n\nexport function log(message: unknown, ...args: any[]): void {\n process.stderr.write(`${util.format(message, ...args)}${EOL}`);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { log } from \"./log\";\n\n/**\n * A simple mechanism for enabling logging.\n * Intended to mimic the publicly available `debug` package.\n */\nexport interface Debug {\n /**\n * Creates a new logger with the given namespace.\n */\n (namespace: string): Debugger;\n /**\n * The default log method (defaults to console)\n */\n log: (...args: any[]) => void;\n /**\n * Enables a particular set of namespaces.\n * To enable multiple separate them with commas, e.g. \"info,debug\".\n * Supports wildcards, e.g. \"azure:*\"\n * Supports skip syntax, e.g. \"azure:*,-azure:storage:*\" will enable\n * everything under azure except for things under azure:storage.\n */\n enable: (namespaces: string) => void;\n /**\n * Checks if a particular namespace is enabled.\n */\n enabled: (namespace: string) => boolean;\n /**\n * Disables all logging, returns what was previously enabled.\n */\n disable: () => string;\n}\n\n/**\n * A log function that can be dynamically enabled and redirected.\n */\nexport interface Debugger {\n /**\n * Logs the given arguments to the `log` method.\n */\n (...args: any[]): void;\n /**\n * True if this logger is active and logging.\n */\n enabled: boolean;\n /**\n * Used to cleanup/remove this logger.\n */\n destroy: () => boolean;\n /**\n * The current log method. Can be overridden to redirect output.\n */\n log: (...args: any[]) => void;\n /**\n * The namespace of this logger.\n */\n namespace: string;\n /**\n * Extends this logger with a child namespace.\n * Namespaces are separated with a ':' character.\n */\n extend: (namespace: string) => Debugger;\n}\n\nconst debugEnvVariable =\n (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\n\nlet enabledString: string | undefined;\nlet enabledNamespaces: RegExp[] = [];\nlet skippedNamespaces: RegExp[] = [];\nconst debuggers: Debugger[] = [];\n\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\n\nconst debugObj: Debug = Object.assign(\n (namespace: string): Debugger => {\n return createDebugger(namespace);\n },\n {\n enable,\n enabled,\n disable,\n log,\n }\n);\n\nfunction enable(namespaces: string): void {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n } else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\n\nfunction enabled(namespace: string): boolean {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\n\nfunction disable(): string {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\n\nfunction createDebugger(namespace: string): Debugger {\n const newDebugger: Debugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend,\n });\n\n function debug(...args: any[]): void {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n\n debuggers.push(newDebugger);\n\n return newDebugger;\n}\n\nfunction destroy(this: Debugger): boolean {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\n\nfunction extend(this: Debugger, namespace: string): Debugger {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\n\nexport default debugObj;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport debug, { Debugger } from \"./debug\";\nexport { Debugger } from \"./debug\";\n\nconst registeredLoggers = new Set();\nconst logLevelFromEnv =\n (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\n\nlet azureLogLevel: AzureLogLevel | undefined;\n\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger: AzureClientLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\n\n/**\n * The log levels supported by the logger.\n * The log levels in order of most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport type AzureLogLevel = \"verbose\" | \"info\" | \"warning\" | \"error\";\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\n\ntype AzureDebugger = Debugger & { level: AzureLogLevel };\n\n/**\n * An AzureClientLogger is a function that can log to an appropriate severity level.\n */\nexport type AzureClientLogger = Debugger;\n\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n } else {\n console.error(\n `AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\n \", \"\n )}.`\n );\n }\n}\n\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level?: AzureLogLevel): void {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(\n `Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`\n );\n }\n azureLogLevel = level;\n\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n\n debug.enable(enabledNamespaces.join(\",\"));\n}\n\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel(): AzureLogLevel | undefined {\n return azureLogLevel;\n}\n\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100,\n};\n\n/**\n * Defines the methods available on the SDK-facing logger.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport interface AzureLogger {\n /**\n * Used for failures the program is unlikely to recover from,\n * such as Out of Memory.\n */\n error: Debugger;\n /**\n * Used when a function fails to perform its intended task.\n * Usually this means the function will throw an exception.\n * Not used for self-healing events (e.g. automatic retry)\n */\n warning: Debugger;\n /**\n * Used when a function operates normally.\n */\n info: Debugger;\n /**\n * Used for detailed troubleshooting scenarios. This is\n * intended for use by developers / system administrators\n * for diagnosing specific failures.\n */\n verbose: Debugger;\n}\n\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nexport function createClientLogger(namespace: string): AzureLogger {\n const clientRootLogger: AzureClientLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\"),\n };\n}\n\nfunction patchLogMethod(parent: AzureClientLogger, child: AzureClientLogger | AzureDebugger): void {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\n\nfunction createLogger(parent: AzureClientLogger, level: AzureLogLevel): AzureDebugger {\n const logger: AzureDebugger = Object.assign(parent.extend(level), {\n level,\n });\n\n patchLogMethod(parent, logger);\n\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n\n registeredLoggers.add(logger);\n\n return logger;\n}\n\nfunction shouldEnable(logger: AzureDebugger): boolean {\n return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\n\nfunction isAzureLogLevel(logLevel: string): logLevel is AzureLogLevel {\n return AZURE_LOG_LEVELS.includes(logLevel as any);\n}\n"],"names":["util","EOL"],"mappings":";;;;;;;;;;;AAAA;SAMgB,GAAG,CAAC,OAAgB,EAAE,GAAG,IAAW,EAAA;AAClD,IAAA,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,EAAGA,wBAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAGC,MAAG,CAAA,CAAE,CAAC,CAAC;AACjE;;ACRA;AAmEA,MAAM,gBAAgB,GACpB,CAAC,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC;AAEpF,IAAI,aAAiC,CAAC;AACtC,IAAI,iBAAiB,GAAa,EAAE,CAAC;AACrC,IAAI,iBAAiB,GAAa,EAAE,CAAC;AACrC,MAAM,SAAS,GAAe,EAAE,CAAC;AAEjC,IAAI,gBAAgB,EAAE;IACpB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAC1B,CAAA;AAED,MAAM,QAAQ,GAAU,MAAM,CAAC,MAAM,CACnC,CAAC,SAAiB,KAAc;AAC9B,IAAA,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;AACnC,CAAC,EACD;IACE,MAAM;IACN,OAAO;IACP,OAAO;IACP,GAAG;AACJ,CAAA,CACF,CAAC;AAEF,SAA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C;KACnD,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,MAAyB,EAAE,KAAwC,EAAA;AACzF,IAAA,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,KAAI;AACtB,QAAA,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACtB,KAAC,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,MAAyB,EAAE,KAAoB,EAAA;AACnE,IAAA,MAAM,MAAM,GAAkB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QAChE,KAAK;AACN,KAAA,CAAC,CAAC;AAEH,IAAA,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/B,IAAA,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;AACxB,QAAA,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;QAC1C,KAAK,CAAC,MAAM,CAAC,iBAAiB,GAAG,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAC1D,KAAA;AAED,IAAA,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAE9B,IAAA,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,MAAqB,EAAA;AACzC,IAAA,OAAO,OAAO,CAAC,aAAa,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AACrF,CAAC;AAED,SAAS,eAAe,CAAC,QAAgB,EAAA;AACvC,IAAA,OAAO,gBAAgB,CAAC,QAAQ,CAAC,QAAe,CAAC,CAAC;AACpD;;;;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@azure/logger/package.json b/reverse_engineering/node_modules/@azure/logger/package.json deleted file mode 100644 index ddb4e17..0000000 --- a/reverse_engineering/node_modules/@azure/logger/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "name": "@azure/logger", - "sdk-type": "client", - "version": "1.0.4", - "description": "Microsoft Azure SDK for JavaScript - Logger", - "main": "./dist/index.js", - "module": "dist-esm/src/index.js", - "browser": { - "./dist-esm/src/log.js": "./dist-esm/src/log.browser.js", - "process": false - }, - "react-native": { - "./dist/index.js": "./dist-esm/src/index.js" - }, - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:samples": "echo Obsolete", - "build:test": "tsc -p . && dev-tool run bundle", - "build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local --local", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-* temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "echo skipped", - "integration-test:node": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", - "pack": "npm pack 2>&1", - "pretest": "npm run build:test", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", - "test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", - "test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", - "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" - }, - "types": "./types/logger.d.ts", - "files": [ - "dist/", - "dist-esm/src/", - "types/logger.d.ts", - "README.md", - "LICENSE" - ], - "repository": "github:Azure/azure-sdk-for-js", - "keywords": [ - "azure", - "log", - "logger", - "logging", - "node.js", - "typescript", - "javascript", - "browser", - "cloud" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger/README.md", - "sideEffects": false, - "dependencies": { - "tslib": "^2.2.0" - }, - "devDependencies": { - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@microsoft/api-extractor": "^7.31.1", - "@types/chai": "^4.1.6", - "@types/mocha": "^7.0.2", - "@types/node": "^14.0.0", - "@types/sinon": "^9.0.4", - "chai": "^4.2.0", - "cross-env": "^7.0.2", - "dotenv": "^16.0.0", - "eslint": "^8.0.0", - "karma": "^6.2.0", - "karma-chrome-launcher": "^3.0.0", - "karma-coverage": "^2.0.0", - "karma-edge-launcher": "^0.4.2", - "karma-env-preprocessor": "^0.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-ie-launcher": "^1.0.0", - "karma-junit-reporter": "^2.0.1", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-sourcemap-loader": "^0.3.8", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^2.0.0", - "nyc": "^15.0.0", - "prettier": "^2.5.1", - "puppeteer": "^19.2.2", - "rimraf": "^3.0.0", - "sinon": "^9.0.2", - "ts-node": "^10.0.0", - "typescript": "~4.8.0" - } -} diff --git a/reverse_engineering/node_modules/@azure/logger/types/logger.d.ts b/reverse_engineering/node_modules/@azure/logger/types/logger.d.ts deleted file mode 100644 index 68f3e8f..0000000 --- a/reverse_engineering/node_modules/@azure/logger/types/logger.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * An AzureClientLogger is a function that can log to an appropriate severity level. - */ -export declare type AzureClientLogger = Debugger; - -/** - * The AzureLogger provides a mechanism for overriding where logs are output to. - * By default, logs are sent to stderr. - * Override the `log` method to redirect logs to another location. - */ -export declare const AzureLogger: AzureClientLogger; - -/** - * Defines the methods available on the SDK-facing logger. - */ -export declare interface AzureLogger { - /** - * Used for failures the program is unlikely to recover from, - * such as Out of Memory. - */ - error: Debugger; - /** - * Used when a function fails to perform its intended task. - * Usually this means the function will throw an exception. - * Not used for self-healing events (e.g. automatic retry) - */ - warning: Debugger; - /** - * Used when a function operates normally. - */ - info: Debugger; - /** - * Used for detailed troubleshooting scenarios. This is - * intended for use by developers / system administrators - * for diagnosing specific failures. - */ - verbose: Debugger; -} - -/** - * The log levels supported by the logger. - * The log levels in order of most verbose to least verbose are: - * - verbose - * - info - * - warning - * - error - */ -export declare type AzureLogLevel = "verbose" | "info" | "warning" | "error"; - -/** - * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. - * @param namespace - The name of the SDK package. - * @hidden - */ -export declare function createClientLogger(namespace: string): AzureLogger; - -/** - * A log function that can be dynamically enabled and redirected. - */ -export declare interface Debugger { - /** - * Logs the given arguments to the `log` method. - */ - (...args: any[]): void; - /** - * True if this logger is active and logging. - */ - enabled: boolean; - /** - * Used to cleanup/remove this logger. - */ - destroy: () => boolean; - /** - * The current log method. Can be overridden to redirect output. - */ - log: (...args: any[]) => void; - /** - * The namespace of this logger. - */ - namespace: string; - /** - * Extends this logger with a child namespace. - * Namespaces are separated with a ':' character. - */ - extend: (namespace: string) => Debugger; -} - -/** - * Retrieves the currently specified log level. - */ -export declare function getLogLevel(): AzureLogLevel | undefined; - -/** - * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. - * @param level - The log level to enable for logging. - * Options from most verbose to least verbose are: - * - verbose - * - info - * - warning - * - error - */ -export declare function setLogLevel(level?: AzureLogLevel): void; - -export { } diff --git a/reverse_engineering/node_modules/@tootallnate/once/LICENSE b/reverse_engineering/node_modules/@tootallnate/once/LICENSE deleted file mode 100644 index c4c56a2..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/@tootallnate/once/README.md b/reverse_engineering/node_modules/@tootallnate/once/README.md deleted file mode 100644 index bc980fd..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# @tootallnate/once - -### Creates a Promise that waits for a single event - -## Installation - -Install with `npm`: - -```bash -$ npm install @tootallnate/once -``` - -## API - -### once(emitter: EventEmitter, name: string, opts?: OnceOptions): Promise<[...Args]> - -Creates a Promise that waits for event `name` to occur on `emitter`, and resolves -the promise with an array of the values provided to the event handler. If an -`error` event occurs before the event specified by `name`, then the Promise is -rejected with the error argument. - -```typescript -import once from '@tootallnate/once'; -import { EventEmitter } from 'events'; - -const emitter = new EventEmitter(); - -setTimeout(() => { - emitter.emit('foo', 'bar'); -}, 100); - -const [result] = await once(emitter, 'foo'); -console.log({ result }); -// { result: 'bar' } -``` - -#### Promise Strong Typing - -The main feature that this module provides over other "once" implementations is that -the Promise that is returned is _**strongly typed**_ based on the type of `emitter` -and the `name` of the event. Some examples are shown below. - -_The process "exit" event contains a single number for exit code:_ - -```typescript -const [code] = await once(process, 'exit'); -// ^ number -``` -_A child process "exit" event contains either an exit code or a signal:_ - -```typescript -const child = spawn('echo', []); -const [code, signal] = await once(child, 'exit'); -// ^ number | null -// ^ string | null -``` - -_A forked child process "message" event is type `any`, so you can cast the Promise directly:_ - -```typescript -const child = fork('file.js'); - -// With `await` -const [message, _]: [WorkerPayload, unknown] = await once(child, 'message'); - -// With Promise -const messagePromise: Promise<[WorkerPayload, unknown]> = once(child, 'message'); - -// Better yet would be to leave it as `any`, and validate the payload -// at runtime with i.e. `ajv` + `json-schema-to-typescript` -``` - -_If the TypeScript definition does not contain an overload for the specified event name, then the Promise will have type `unknown[]` and your code will need to narrow the result manually:_ - -```typescript -interface CustomEmitter extends EventEmitter { - on(name: 'foo', listener: (a: string, b: number) => void): this; -} - -const emitter: CustomEmitter = new EventEmitter(); - -// "foo" event is a defined overload, so it's properly typed -const fooPromise = once(emitter, 'foo'); -// ^ Promise<[a: string, b: number]> - -// "bar" event in not a defined overload, so it gets `unknown[]` -const barPromise = once(emitter, 'bar'); -// ^ Promise -``` - -### OnceOptions - -- `signal` - `AbortSignal` instance to unbind event handlers before the Promise has been fulfilled. diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/index.d.ts b/reverse_engineering/node_modules/@tootallnate/once/dist/index.d.ts deleted file mode 100644 index 93d02a9..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import { EventEmitter } from 'events'; -import { EventNames, EventListenerParameters, AbortSignal } from './types'; -export interface OnceOptions { - signal?: AbortSignal; -} -export default function once>(emitter: Emitter, name: Event, { signal }?: OnceOptions): Promise>; diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/index.js b/reverse_engineering/node_modules/@tootallnate/once/dist/index.js deleted file mode 100644 index ca6385b..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function once(emitter, name, { signal } = {}) { - return new Promise((resolve, reject) => { - function cleanup() { - signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup); - emitter.removeListener(name, onEvent); - emitter.removeListener('error', onError); - } - function onEvent(...args) { - cleanup(); - resolve(args); - } - function onError(err) { - cleanup(); - reject(err); - } - signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup); - emitter.on(name, onEvent); - emitter.on('error', onError); - }); -} -exports.default = once; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/index.js.map b/reverse_engineering/node_modules/@tootallnate/once/dist/index.js.map deleted file mode 100644 index 61708ca..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAOA,SAAwB,IAAI,CAI3B,OAAgB,EAChB,IAAW,EACX,EAAE,MAAM,KAAkB,EAAE;IAE5B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,SAAS,OAAO;YACf,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC9C,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACtC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,CAAC;QACD,SAAS,OAAO,CAAC,GAAG,IAAW;YAC9B,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,IAA+C,CAAC,CAAC;QAC1D,CAAC;QACD,SAAS,OAAO,CAAC,GAAU;YAC1B,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QACD,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACJ,CAAC;AA1BD,uBA0BC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.d.ts b/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.d.ts deleted file mode 100644 index eb2bbc6..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.d.ts +++ /dev/null @@ -1,231 +0,0 @@ -export declare type OverloadedParameters = T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; - (...args: infer A14): any; - (...args: infer A15): any; - (...args: infer A16): any; - (...args: infer A17): any; - (...args: infer A18): any; - (...args: infer A19): any; - (...args: infer A20): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 | A15 | A16 | A17 | A18 | A19 | A20 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; - (...args: infer A14): any; - (...args: infer A15): any; - (...args: infer A16): any; - (...args: infer A17): any; - (...args: infer A18): any; - (...args: infer A19): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 | A15 | A16 | A17 | A18 | A19 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; - (...args: infer A14): any; - (...args: infer A15): any; - (...args: infer A16): any; - (...args: infer A17): any; - (...args: infer A18): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 | A15 | A16 | A17 | A18 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; - (...args: infer A14): any; - (...args: infer A15): any; - (...args: infer A16): any; - (...args: infer A17): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 | A15 | A16 | A17 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; - (...args: infer A14): any; - (...args: infer A15): any; - (...args: infer A16): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 | A15 | A16 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; - (...args: infer A14): any; - (...args: infer A15): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 | A15 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; - (...args: infer A14): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 | A14 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; - (...args: infer A13): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 | A13 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; - (...args: infer A12): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 | A12 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; - (...args: infer A11): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 | A11 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; - (...args: infer A10): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 | A10 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; - (...args: infer A9): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 | A9 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; - (...args: infer A8): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; - (...args: infer A7): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 | A7 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; - (...args: infer A6): any; -} ? A1 | A2 | A3 | A4 | A5 | A6 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; - (...args: infer A5): any; -} ? A1 | A2 | A3 | A4 | A5 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; - (...args: infer A4): any; -} ? A1 | A2 | A3 | A4 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; - (...args: infer A3): any; -} ? A1 | A2 | A3 : T extends { - (...args: infer A1): any; - (...args: infer A2): any; -} ? A1 | A2 : T extends { - (...args: infer A1): any; -} ? A1 : any; diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.js b/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.js deleted file mode 100644 index 207186d..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=overloaded-parameters.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map b/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map deleted file mode 100644 index 863f146..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"overloaded-parameters.js","sourceRoot":"","sources":["../src/overloaded-parameters.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/types.d.ts b/reverse_engineering/node_modules/@tootallnate/once/dist/types.d.ts deleted file mode 100644 index 58be828..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/types.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { EventEmitter } from 'events'; -import { OverloadedParameters } from './overloaded-parameters'; -export declare type FirstParameter = T extends [infer R, ...any[]] ? R : never; -export declare type EventListener = F extends [ - T, - infer R, - ...any[] -] ? R : never; -export declare type EventParameters = OverloadedParameters; -export declare type EventNames = FirstParameter>; -export declare type EventListenerParameters> = WithDefault, Event>>, unknown[]>; -export declare type WithDefault = [T] extends [never] ? D : T; -export interface AbortSignal { - addEventListener: (name: string, listener: (...args: any[]) => any) => void; - removeEventListener: (name: string, listener: (...args: any[]) => any) => void; -} diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/types.js b/reverse_engineering/node_modules/@tootallnate/once/dist/types.js deleted file mode 100644 index 11e638d..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/@tootallnate/once/dist/types.js.map b/reverse_engineering/node_modules/@tootallnate/once/dist/types.js.map deleted file mode 100644 index c768b79..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/dist/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/reverse_engineering/node_modules/@tootallnate/once/package.json b/reverse_engineering/node_modules/@tootallnate/once/package.json deleted file mode 100644 index 69ce947..0000000 --- a/reverse_engineering/node_modules/@tootallnate/once/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@tootallnate/once", - "version": "2.0.0", - "description": "Creates a Promise that waits for a single event", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "jest", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/once.git" - }, - "keywords": [], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/once/issues" - }, - "devDependencies": { - "@types/jest": "^27.0.2", - "@types/node": "^12.12.11", - "abort-controller": "^3.0.0", - "jest": "^27.2.1", - "rimraf": "^3.0.0", - "ts-jest": "^27.0.5", - "typescript": "^4.4.3" - }, - "engines": { - "node": ">= 10" - }, - "jest": { - "preset": "ts-jest", - "globals": { - "ts-jest": { - "diagnostics": false, - "isolatedModules": true - } - }, - "verbose": false, - "testEnvironment": "node", - "testMatch": [ - "/test/**/*.test.ts" - ] - } -} diff --git a/reverse_engineering/node_modules/agent-base/README.md b/reverse_engineering/node_modules/agent-base/README.md deleted file mode 100644 index 256f1f3..0000000 --- a/reverse_engineering/node_modules/agent-base/README.md +++ /dev/null @@ -1,145 +0,0 @@ -agent-base -========== -### Turn a function into an [`http.Agent`][http.Agent] instance -[![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI) - -This module provides an `http.Agent` generator. That is, you pass it an async -callback function, and it returns a new `http.Agent` instance that will invoke the -given callback function when sending outbound HTTP requests. - -#### Some subclasses: - -Here's some more interesting uses of `agent-base`. -Send a pull request to list yours! - - * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints - * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints - * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS - * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install agent-base -``` - - -Example -------- - -Here's a minimal example that creates a new `net.Socket` connection to the server -for every HTTP request (i.e. the equivalent of `agent: false` option): - -```js -var net = require('net'); -var tls = require('tls'); -var url = require('url'); -var http = require('http'); -var agent = require('agent-base'); - -var endpoint = 'http://nodejs.org/api/'; -var parsed = url.parse(endpoint); - -// This is the important part! -parsed.agent = agent(function (req, opts) { - var socket; - // `secureEndpoint` is true when using the https module - if (opts.secureEndpoint) { - socket = tls.connect(opts); - } else { - socket = net.connect(opts); - } - return socket; -}); - -// Everything else works just like normal... -http.get(parsed, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -Returning a Promise or using an `async` function is also supported: - -```js -agent(async function (req, opts) { - await sleep(1000); - // etc… -}); -``` - -Return another `http.Agent` instance to "pass through" the responsibility -for that HTTP request to that agent: - -```js -agent(function (req, opts) { - return opts.secureEndpoint ? https.globalAgent : http.globalAgent; -}); -``` - - -API ---- - -## Agent(Function callback[, Object options]) → [http.Agent][] - -Creates a base `http.Agent` that will execute the callback function `callback` -for every HTTP request that it is used as the `agent` for. The callback function -is responsible for creating a `stream.Duplex` instance of some kind that will be -used as the underlying socket in the HTTP request. - -The `options` object accepts the following properties: - - * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). - -The callback function should have the following signature: - -### callback(http.ClientRequest req, Object options, Function cb) → undefined - -The ClientRequest `req` can be accessed to read request headers and -and the path, etc. The `options` object contains the options passed -to the `http.request()`/`https.request()` function call, and is formatted -to be directly passed to `net.connect()`/`tls.connect()`, or however -else you want a Socket to be created. Pass the created socket to -the callback function `cb` once created, and the HTTP request will -continue to proceed. - -If the `https` module is used to invoke the HTTP request, then the -`secureEndpoint` property on `options` _will be set to `true`_. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent -[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent -[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent -[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent -[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/reverse_engineering/node_modules/agent-base/dist/src/index.d.ts b/reverse_engineering/node_modules/agent-base/dist/src/index.d.ts deleted file mode 100644 index bc4ab74..0000000 --- a/reverse_engineering/node_modules/agent-base/dist/src/index.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/// -import net from 'net'; -import http from 'http'; -import https from 'https'; -import { Duplex } from 'stream'; -import { EventEmitter } from 'events'; -declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; -declare function createAgent(callback: createAgent.AgentCallback, opts?: createAgent.AgentOptions): createAgent.Agent; -declare namespace createAgent { - interface ClientRequest extends http.ClientRequest { - _last?: boolean; - _hadError?: boolean; - method: string; - } - interface AgentRequestOptions { - host?: string; - path?: string; - port: number; - } - interface HttpRequestOptions extends AgentRequestOptions, Omit { - secureEndpoint: false; - } - interface HttpsRequestOptions extends AgentRequestOptions, Omit { - secureEndpoint: true; - } - type RequestOptions = HttpRequestOptions | HttpsRequestOptions; - type AgentLike = Pick | http.Agent; - type AgentCallbackReturn = Duplex | AgentLike; - type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void; - type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise; - type AgentCallback = typeof Agent.prototype.callback; - type AgentOptions = { - timeout?: number; - }; - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends EventEmitter { - timeout: number | null; - maxFreeSockets: number; - maxTotalSockets: number; - maxSockets: number; - sockets: { - [key: string]: net.Socket[]; - }; - freeSockets: { - [key: string]: net.Socket[]; - }; - requests: { - [key: string]: http.IncomingMessage[]; - }; - options: https.AgentOptions; - private promisifiedCallback?; - private explicitDefaultPort?; - private explicitProtocol?; - constructor(callback?: createAgent.AgentCallback | createAgent.AgentOptions, _opts?: createAgent.AgentOptions); - get defaultPort(): number; - set defaultPort(v: number); - get protocol(): string; - set protocol(v: string); - callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions, fn: createAgent.AgentCallbackCallback): void; - callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions): createAgent.AgentCallbackReturn | Promise; - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req: ClientRequest, _opts: RequestOptions): void; - freeSocket(socket: net.Socket, opts: AgentOptions): void; - destroy(): void; - } -} -export = createAgent; diff --git a/reverse_engineering/node_modules/agent-base/dist/src/index.js b/reverse_engineering/node_modules/agent-base/dist/src/index.js deleted file mode 100644 index bfd9e22..0000000 --- a/reverse_engineering/node_modules/agent-base/dist/src/index.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = require("events"); -const debug_1 = __importDefault(require("debug")); -const promisify_1 = __importDefault(require("./promisify")); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); -} -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } - else if (callback) { - opts = callback; - } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - set defaultPort(v) { - this.explicitDefaultPort = v; - } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - set protocol(v) { - this.explicitProtocol = v; - } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); - } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); - } - } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - destroy() { - debug('Destroying agent %o', this.constructor.name); - } - } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/agent-base/dist/src/index.js.map b/reverse_engineering/node_modules/agent-base/dist/src/index.js.map deleted file mode 100644 index bd118ab..0000000 --- a/reverse_engineering/node_modules/agent-base/dist/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAIA,mCAAsC;AACtC,kDAAgC;AAChC,4DAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,CAAM;IACtB,OAAO,OAAO,CAAC,CA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B,EAAE,IAAkB;YAChD,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,OAAO;YACN,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAxPY,iBAAK,QAwPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EAtTS,WAAW,KAAX,WAAW,QAsTpB;AAED,iBAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/agent-base/dist/src/promisify.d.ts b/reverse_engineering/node_modules/agent-base/dist/src/promisify.d.ts deleted file mode 100644 index 0268869..0000000 --- a/reverse_engineering/node_modules/agent-base/dist/src/promisify.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise } from './index'; -declare type LegacyCallback = (req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback) => void; -export default function promisify(fn: LegacyCallback): AgentCallbackPromise; -export {}; diff --git a/reverse_engineering/node_modules/agent-base/dist/src/promisify.js b/reverse_engineering/node_modules/agent-base/dist/src/promisify.js deleted file mode 100644 index b2f6132..0000000 --- a/reverse_engineering/node_modules/agent-base/dist/src/promisify.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function promisify(fn) { - return function (req, opts) { - return new Promise((resolve, reject) => { - fn.call(this, req, opts, (err, rtn) => { - if (err) { - reject(err); - } - else { - resolve(rtn); - } - }); - }); - }; -} -exports.default = promisify; -//# sourceMappingURL=promisify.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/agent-base/dist/src/promisify.js.map b/reverse_engineering/node_modules/agent-base/dist/src/promisify.js.map deleted file mode 100644 index 4bff9bf..0000000 --- a/reverse_engineering/node_modules/agent-base/dist/src/promisify.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAyB,EAAE,EAAE;gBAC5D,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC;iBACb;YACF,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAjBD,4BAiBC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/agent-base/package.json b/reverse_engineering/node_modules/agent-base/package.json deleted file mode 100644 index fadce3a..0000000 --- a/reverse_engineering/node_modules/agent-base/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "agent-base", - "version": "6.0.2", - "description": "Turn a function into an `http.Agent` instance", - "main": "dist/src/index", - "typings": "dist/src/index", - "files": [ - "dist/src", - "src" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "postbuild": "cpy --parents src test '!**/*.ts' dist", - "test": "mocha --reporter spec dist/test/*.js", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-agent-base.git" - }, - "keywords": [ - "http", - "agent", - "base", - "barebones", - "https" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-agent-base/issues" - }, - "dependencies": { - "debug": "4" - }, - "devDependencies": { - "@types/debug": "4", - "@types/mocha": "^5.2.7", - "@types/node": "^14.0.20", - "@types/semver": "^7.1.0", - "@types/ws": "^6.0.3", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "async-listen": "^1.2.0", - "cpy-cli": "^2.0.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.0", - "rimraf": "^3.0.0", - "semver": "^7.1.2", - "typescript": "^3.5.3", - "ws": "^3.0.0" - }, - "engines": { - "node": ">= 6.0.0" - } -} diff --git a/reverse_engineering/node_modules/agent-base/src/index.ts b/reverse_engineering/node_modules/agent-base/src/index.ts deleted file mode 100644 index a47ccd4..0000000 --- a/reverse_engineering/node_modules/agent-base/src/index.ts +++ /dev/null @@ -1,345 +0,0 @@ -import net from 'net'; -import http from 'http'; -import https from 'https'; -import { Duplex } from 'stream'; -import { EventEmitter } from 'events'; -import createDebug from 'debug'; -import promisify from './promisify'; - -const debug = createDebug('agent-base'); - -function isAgent(v: any): v is createAgent.AgentLike { - return Boolean(v) && typeof v.addRequest === 'function'; -} - -function isSecureEndpoint(): boolean { - const { stack } = new Error(); - if (typeof stack !== 'string') return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} - -function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; -function createAgent( - callback: createAgent.AgentCallback, - opts?: createAgent.AgentOptions -): createAgent.Agent; -function createAgent( - callback?: createAgent.AgentCallback | createAgent.AgentOptions, - opts?: createAgent.AgentOptions -) { - return new createAgent.Agent(callback, opts); -} - -namespace createAgent { - export interface ClientRequest extends http.ClientRequest { - _last?: boolean; - _hadError?: boolean; - method: string; - } - - export interface AgentRequestOptions { - host?: string; - path?: string; - // `port` on `http.RequestOptions` can be a string or undefined, - // but `net.TcpNetConnectOpts` expects only a number - port: number; - } - - export interface HttpRequestOptions - extends AgentRequestOptions, - Omit { - secureEndpoint: false; - } - - export interface HttpsRequestOptions - extends AgentRequestOptions, - Omit { - secureEndpoint: true; - } - - export type RequestOptions = HttpRequestOptions | HttpsRequestOptions; - - export type AgentLike = Pick | http.Agent; - - export type AgentCallbackReturn = Duplex | AgentLike; - - export type AgentCallbackCallback = ( - err?: Error | null, - socket?: createAgent.AgentCallbackReturn - ) => void; - - export type AgentCallbackPromise = ( - req: createAgent.ClientRequest, - opts: createAgent.RequestOptions - ) => - | createAgent.AgentCallbackReturn - | Promise; - - export type AgentCallback = typeof Agent.prototype.callback; - - export type AgentOptions = { - timeout?: number; - }; - - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - export class Agent extends EventEmitter { - public timeout: number | null; - public maxFreeSockets: number; - public maxTotalSockets: number; - public maxSockets: number; - public sockets: { - [key: string]: net.Socket[]; - }; - public freeSockets: { - [key: string]: net.Socket[]; - }; - public requests: { - [key: string]: http.IncomingMessage[]; - }; - public options: https.AgentOptions; - private promisifiedCallback?: createAgent.AgentCallbackPromise; - private explicitDefaultPort?: number; - private explicitProtocol?: string; - - constructor( - callback?: createAgent.AgentCallback | createAgent.AgentOptions, - _opts?: createAgent.AgentOptions - ) { - super(); - - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } else if (callback) { - opts = callback; - } - - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - - get defaultPort(): number { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - - set defaultPort(v: number) { - this.explicitDefaultPort = v; - } - - get protocol(): string { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - - set protocol(v: string) { - this.explicitProtocol = v; - } - - callback( - req: createAgent.ClientRequest, - opts: createAgent.RequestOptions, - fn: createAgent.AgentCallbackCallback - ): void; - callback( - req: createAgent.ClientRequest, - opts: createAgent.RequestOptions - ): - | createAgent.AgentCallbackReturn - | Promise; - callback( - req: createAgent.ClientRequest, - opts: createAgent.AgentOptions, - fn?: createAgent.AgentCallbackCallback - ): - | createAgent.AgentCallbackReturn - | Promise - | void { - throw new Error( - '"agent-base" has no default implementation, you must subclass and override `callback()`' - ); - } - - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req: ClientRequest, _opts: RequestOptions): void { - const opts: RequestOptions = { ..._opts }; - - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - - if (opts.host == null) { - opts.host = 'localhost'; - } - - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - - let timedOut = false; - let timeoutId: ReturnType | null = null; - const timeoutMs = opts.timeout || this.timeout; - - const onerror = (err: NodeJS.ErrnoException) => { - if (req._hadError) return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err: NodeJS.ErrnoException = new Error( - `A "socket" was not created for HTTP request before ${timeoutMs}ms` - ); - err.code = 'ETIMEOUT'; - onerror(err); - }; - - const callbackError = (err: NodeJS.ErrnoException) => { - if (timedOut) return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - - const onsocket = (socket: AgentCallbackReturn) => { - if (timedOut) return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug( - 'Callback returned another Agent instance %o', - socket.constructor.name - ); - (socket as createAgent.Agent).addRequest(req, opts); - return; - } - - if (socket) { - socket.once('free', () => { - this.freeSocket(socket as net.Socket, opts); - }); - req.onSocket(socket as net.Socket); - return; - } - - const err = new Error( - `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\`` - ); - onerror(err); - }; - - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify(this.callback); - } else { - this.promisifiedCallback = this.callback; - } - } - - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - - try { - debug( - 'Resolving socket for %o request: %o', - opts.protocol, - `${req.method} ${req.path}` - ); - Promise.resolve(this.promisifiedCallback(req, opts)).then( - onsocket, - callbackError - ); - } catch (err) { - Promise.reject(err).catch(callbackError); - } - } - - freeSocket(socket: net.Socket, opts: AgentOptions) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - - destroy() { - debug('Destroying agent %o', this.constructor.name); - } - } - - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -} - -export = createAgent; diff --git a/reverse_engineering/node_modules/agent-base/src/promisify.ts b/reverse_engineering/node_modules/agent-base/src/promisify.ts deleted file mode 100644 index 60cc662..0000000 --- a/reverse_engineering/node_modules/agent-base/src/promisify.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - Agent, - ClientRequest, - RequestOptions, - AgentCallbackCallback, - AgentCallbackPromise, - AgentCallbackReturn -} from './index'; - -type LegacyCallback = ( - req: ClientRequest, - opts: RequestOptions, - fn: AgentCallbackCallback -) => void; - -export default function promisify(fn: LegacyCallback): AgentCallbackPromise { - return function(this: Agent, req: ClientRequest, opts: RequestOptions) { - return new Promise((resolve, reject) => { - fn.call( - this, - req, - opts, - (err: Error | null | undefined, rtn?: AgentCallbackReturn) => { - if (err) { - reject(err); - } else { - resolve(rtn); - } - } - ); - }); - }; -} diff --git a/reverse_engineering/node_modules/asynckit/LICENSE b/reverse_engineering/node_modules/asynckit/LICENSE deleted file mode 100644 index c9eca5d..0000000 --- a/reverse_engineering/node_modules/asynckit/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Alex Indigo - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/reverse_engineering/node_modules/asynckit/README.md b/reverse_engineering/node_modules/asynckit/README.md deleted file mode 100644 index ddcc7e6..0000000 --- a/reverse_engineering/node_modules/asynckit/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) - -Minimal async jobs utility library, with streams support. - -[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) -[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) -[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) - -[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) -[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) -[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) - - - -AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. -Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. - -It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. - -| compression | size | -| :----------------- | -------: | -| asynckit.js | 12.34 kB | -| asynckit.min.js | 4.11 kB | -| asynckit.min.js.gz | 1.47 kB | - - -## Install - -```sh -$ npm install --save asynckit -``` - -## Examples - -### Parallel Jobs - -Runs iterator over provided array in parallel. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will terminate rest of the active jobs (if abort function is provided) -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var parallel = require('asynckit').parallel - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , target = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// async job accepts one element from the array -// and a callback function -function asyncJob(item, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var parallel = require('asynckit/parallel') - , assert = require('assert') - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] - , target = [] - , keys = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); - assert.deepEqual(keys, expectedKeys); -}); - -// supports full value, key, callback (shortcut) interface -function asyncJob(item, key, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - keys.push(key); - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). - -### Serial Jobs - -Runs iterator over provided array sequentially. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will not proceed to the rest of the items in the list -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var serial = require('asynckit/serial') - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// extended interface (item, key, callback) -// also supported for arrays -function asyncJob(item, key, cb) -{ - target.push(key); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var serial = require('asynckit').serial - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , target = [] - ; - - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// shortcut interface (item, callback) -// works for object as well as for the arrays -function asyncJob(item, cb) -{ - target.push(item); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). - -_Note: Since _object_ is an _unordered_ collection of properties, -it may produce unexpected results with sequential iterations. -Whenever order of the jobs' execution is important please use `serialOrdered` method._ - -### Ordered Serial Iterations - -TBD - -For example [compare-property](compare-property) package. - -### Streaming interface - -TBD - -## Want to Know More? - -More examples can be found in [test folder](test/). - -Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. - -## License - -AsyncKit is licensed under the MIT license. diff --git a/reverse_engineering/node_modules/asynckit/bench.js b/reverse_engineering/node_modules/asynckit/bench.js deleted file mode 100644 index c612f1a..0000000 --- a/reverse_engineering/node_modules/asynckit/bench.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint no-console: "off" */ - -var asynckit = require('./') - , async = require('async') - , assert = require('assert') - , expected = 0 - ; - -var Benchmark = require('benchmark'); -var suite = new Benchmark.Suite; - -var source = []; -for (var z = 1; z < 100; z++) -{ - source.push(z); - expected += z; -} - -suite -// add tests - -.add('async.map', function(deferred) -{ - var total = 0; - - async.map(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -.add('asynckit.parallel', function(deferred) -{ - var total = 0; - - asynckit.parallel(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -// add listeners -.on('cycle', function(ev) -{ - console.log(String(ev.target)); -}) -.on('complete', function() -{ - console.log('Fastest is ' + this.filter('fastest').map('name')); -}) -// run async -.run({ 'async': true }); diff --git a/reverse_engineering/node_modules/asynckit/index.js b/reverse_engineering/node_modules/asynckit/index.js deleted file mode 100644 index 455f945..0000000 --- a/reverse_engineering/node_modules/asynckit/index.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = -{ - parallel : require('./parallel.js'), - serial : require('./serial.js'), - serialOrdered : require('./serialOrdered.js') -}; diff --git a/reverse_engineering/node_modules/asynckit/lib/abort.js b/reverse_engineering/node_modules/asynckit/lib/abort.js deleted file mode 100644 index 114367e..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/abort.js +++ /dev/null @@ -1,29 +0,0 @@ -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} diff --git a/reverse_engineering/node_modules/asynckit/lib/async.js b/reverse_engineering/node_modules/asynckit/lib/async.js deleted file mode 100644 index 7f1288a..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/async.js +++ /dev/null @@ -1,34 +0,0 @@ -var defer = require('./defer.js'); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} diff --git a/reverse_engineering/node_modules/asynckit/lib/defer.js b/reverse_engineering/node_modules/asynckit/lib/defer.js deleted file mode 100644 index b67110c..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} diff --git a/reverse_engineering/node_modules/asynckit/lib/iterate.js b/reverse_engineering/node_modules/asynckit/lib/iterate.js deleted file mode 100644 index 5d2839a..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/iterate.js +++ /dev/null @@ -1,75 +0,0 @@ -var async = require('./async.js') - , abort = require('./abort.js') - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} diff --git a/reverse_engineering/node_modules/asynckit/lib/readable_asynckit.js b/reverse_engineering/node_modules/asynckit/lib/readable_asynckit.js deleted file mode 100644 index 78ad240..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/readable_asynckit.js +++ /dev/null @@ -1,91 +0,0 @@ -var streamify = require('./streamify.js') - , defer = require('./defer.js') - ; - -// API -module.exports = ReadableAsyncKit; - -/** - * Base constructor for all streams - * used to hold properties/methods - */ -function ReadableAsyncKit() -{ - ReadableAsyncKit.super_.apply(this, arguments); - - // list of active jobs - this.jobs = {}; - - // add stream methods - this.destroy = destroy; - this._start = _start; - this._read = _read; -} - -/** - * Destroys readable stream, - * by aborting outstanding jobs - * - * @returns {void} - */ -function destroy() -{ - if (this.destroyed) - { - return; - } - - this.destroyed = true; - - if (typeof this.terminator == 'function') - { - this.terminator(); - } -} - -/** - * Starts provided jobs in async manner - * - * @private - */ -function _start() -{ - // first argument – runner function - var runner = arguments[0] - // take away first argument - , args = Array.prototype.slice.call(arguments, 1) - // second argument - input data - , input = args[0] - // last argument - result callback - , endCb = streamify.callback.call(this, args[args.length - 1]) - ; - - args[args.length - 1] = endCb; - // third argument - iterator - args[1] = streamify.iterator.call(this, args[1]); - - // allow time for proper setup - defer(function() - { - if (!this.destroyed) - { - this.terminator = runner.apply(null, args); - } - else - { - endCb(null, Array.isArray(input) ? [] : {}); - } - }.bind(this)); -} - - -/** - * Implement _read to comply with Readable streams - * Doesn't really make sense for flowing object mode - * - * @private - */ -function _read() -{ - -} diff --git a/reverse_engineering/node_modules/asynckit/lib/readable_parallel.js b/reverse_engineering/node_modules/asynckit/lib/readable_parallel.js deleted file mode 100644 index 5d2929f..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/readable_parallel.js +++ /dev/null @@ -1,25 +0,0 @@ -var parallel = require('../parallel.js'); - -// API -module.exports = ReadableParallel; - -/** - * Streaming wrapper to `asynckit.parallel` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableParallel(list, iterator, callback) -{ - if (!(this instanceof ReadableParallel)) - { - return new ReadableParallel(list, iterator, callback); - } - - // turn on object mode - ReadableParallel.super_.call(this, {objectMode: true}); - - this._start(parallel, list, iterator, callback); -} diff --git a/reverse_engineering/node_modules/asynckit/lib/readable_serial.js b/reverse_engineering/node_modules/asynckit/lib/readable_serial.js deleted file mode 100644 index 7822698..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/readable_serial.js +++ /dev/null @@ -1,25 +0,0 @@ -var serial = require('../serial.js'); - -// API -module.exports = ReadableSerial; - -/** - * Streaming wrapper to `asynckit.serial` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerial(list, iterator, callback) -{ - if (!(this instanceof ReadableSerial)) - { - return new ReadableSerial(list, iterator, callback); - } - - // turn on object mode - ReadableSerial.super_.call(this, {objectMode: true}); - - this._start(serial, list, iterator, callback); -} diff --git a/reverse_engineering/node_modules/asynckit/lib/readable_serial_ordered.js b/reverse_engineering/node_modules/asynckit/lib/readable_serial_ordered.js deleted file mode 100644 index 3de89c4..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/readable_serial_ordered.js +++ /dev/null @@ -1,29 +0,0 @@ -var serialOrdered = require('../serialOrdered.js'); - -// API -module.exports = ReadableSerialOrdered; -// expose sort helpers -module.exports.ascending = serialOrdered.ascending; -module.exports.descending = serialOrdered.descending; - -/** - * Streaming wrapper to `asynckit.serialOrdered` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerialOrdered(list, iterator, sortMethod, callback) -{ - if (!(this instanceof ReadableSerialOrdered)) - { - return new ReadableSerialOrdered(list, iterator, sortMethod, callback); - } - - // turn on object mode - ReadableSerialOrdered.super_.call(this, {objectMode: true}); - - this._start(serialOrdered, list, iterator, sortMethod, callback); -} diff --git a/reverse_engineering/node_modules/asynckit/lib/state.js b/reverse_engineering/node_modules/asynckit/lib/state.js deleted file mode 100644 index cbea7ad..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/state.js +++ /dev/null @@ -1,37 +0,0 @@ -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} diff --git a/reverse_engineering/node_modules/asynckit/lib/streamify.js b/reverse_engineering/node_modules/asynckit/lib/streamify.js deleted file mode 100644 index f56a1c9..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/streamify.js +++ /dev/null @@ -1,141 +0,0 @@ -var async = require('./async.js'); - -// API -module.exports = { - iterator: wrapIterator, - callback: wrapCallback -}; - -/** - * Wraps iterators with long signature - * - * @this ReadableAsyncKit# - * @param {function} iterator - function to wrap - * @returns {function} - wrapped function - */ -function wrapIterator(iterator) -{ - var stream = this; - - return function(item, key, cb) - { - var aborter - , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) - ; - - stream.jobs[key] = wrappedCb; - - // it's either shortcut (item, cb) - if (iterator.length == 2) - { - aborter = iterator(item, wrappedCb); - } - // or long format (item, key, cb) - else - { - aborter = iterator(item, key, wrappedCb); - } - - return aborter; - }; -} - -/** - * Wraps provided callback function - * allowing to execute snitch function before - * real callback - * - * @this ReadableAsyncKit# - * @param {function} callback - function to wrap - * @returns {function} - wrapped function - */ -function wrapCallback(callback) -{ - var stream = this; - - var wrapped = function(error, result) - { - return finisher.call(stream, error, result, callback); - }; - - return wrapped; -} - -/** - * Wraps provided iterator callback function - * makes sure snitch only called once, - * but passes secondary calls to the original callback - * - * @this ReadableAsyncKit# - * @param {function} callback - callback to wrap - * @param {number|string} key - iteration key - * @returns {function} wrapped callback - */ -function wrapIteratorCallback(callback, key) -{ - var stream = this; - - return function(error, output) - { - // don't repeat yourself - if (!(key in stream.jobs)) - { - callback(error, output); - return; - } - - // clean up jobs - delete stream.jobs[key]; - - return streamer.call(stream, error, {key: key, value: output}, callback); - }; -} - -/** - * Stream wrapper for iterator callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects iterator results - */ -function streamer(error, output, callback) -{ - if (error && !this.error) - { - this.error = error; - this.pause(); - this.emit('error', error); - // send back value only, as expected - callback(error, output && output.value); - return; - } - - // stream stuff - this.push(output); - - // back to original track - // send back value only, as expected - callback(error, output && output.value); -} - -/** - * Stream wrapper for finishing callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects final results - */ -function finisher(error, output, callback) -{ - // signal end of the stream - // only for successfully finished streams - if (!error) - { - this.push(null); - } - - // back to original track - callback(error, output); -} diff --git a/reverse_engineering/node_modules/asynckit/lib/terminator.js b/reverse_engineering/node_modules/asynckit/lib/terminator.js deleted file mode 100644 index d6eb992..0000000 --- a/reverse_engineering/node_modules/asynckit/lib/terminator.js +++ /dev/null @@ -1,29 +0,0 @@ -var abort = require('./abort.js') - , async = require('./async.js') - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} diff --git a/reverse_engineering/node_modules/asynckit/package.json b/reverse_engineering/node_modules/asynckit/package.json deleted file mode 100644 index 51147d6..0000000 --- a/reverse_engineering/node_modules/asynckit/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "asynckit", - "version": "0.4.0", - "description": "Minimal async jobs utility library, with streams support", - "main": "index.js", - "scripts": { - "clean": "rimraf coverage", - "lint": "eslint *.js lib/*.js test/*.js", - "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", - "win-test": "tape test/test-*.js", - "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", - "report": "istanbul report", - "size": "browserify index.js | size-table asynckit", - "debug": "tape test/test-*.js" - }, - "pre-commit": [ - "clean", - "lint", - "test", - "browser", - "report", - "size" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/alexindigo/asynckit.git" - }, - "keywords": [ - "async", - "jobs", - "parallel", - "serial", - "iterator", - "array", - "object", - "stream", - "destroy", - "terminate", - "abort" - ], - "author": "Alex Indigo ", - "license": "MIT", - "bugs": { - "url": "https://github.com/alexindigo/asynckit/issues" - }, - "homepage": "https://github.com/alexindigo/asynckit#readme", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.9", - "eslint": "^2.9.0", - "istanbul": "^0.4.3", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.7", - "pre-commit": "^1.1.3", - "reamde": "^1.1.0", - "rimraf": "^2.5.2", - "size-table": "^0.2.0", - "tap-spec": "^4.1.1", - "tape": "^4.5.1" - }, - "dependencies": {} -} diff --git a/reverse_engineering/node_modules/asynckit/parallel.js b/reverse_engineering/node_modules/asynckit/parallel.js deleted file mode 100644 index 3c50344..0000000 --- a/reverse_engineering/node_modules/asynckit/parallel.js +++ /dev/null @@ -1,43 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} diff --git a/reverse_engineering/node_modules/asynckit/serial.js b/reverse_engineering/node_modules/asynckit/serial.js deleted file mode 100644 index 6cd949a..0000000 --- a/reverse_engineering/node_modules/asynckit/serial.js +++ /dev/null @@ -1,17 +0,0 @@ -var serialOrdered = require('./serialOrdered.js'); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} diff --git a/reverse_engineering/node_modules/asynckit/serialOrdered.js b/reverse_engineering/node_modules/asynckit/serialOrdered.js deleted file mode 100644 index 607eafe..0000000 --- a/reverse_engineering/node_modules/asynckit/serialOrdered.js +++ /dev/null @@ -1,75 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} diff --git a/reverse_engineering/node_modules/asynckit/stream.js b/reverse_engineering/node_modules/asynckit/stream.js deleted file mode 100644 index d43465f..0000000 --- a/reverse_engineering/node_modules/asynckit/stream.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('util').inherits - , Readable = require('stream').Readable - , ReadableAsyncKit = require('./lib/readable_asynckit.js') - , ReadableParallel = require('./lib/readable_parallel.js') - , ReadableSerial = require('./lib/readable_serial.js') - , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') - ; - -// API -module.exports = -{ - parallel : ReadableParallel, - serial : ReadableSerial, - serialOrdered : ReadableSerialOrdered, -}; - -inherits(ReadableAsyncKit, Readable); - -inherits(ReadableParallel, ReadableAsyncKit); -inherits(ReadableSerial, ReadableAsyncKit); -inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/reverse_engineering/node_modules/axios/CHANGELOG.md b/reverse_engineering/node_modules/axios/CHANGELOG.md deleted file mode 100644 index 6f11ac1..0000000 --- a/reverse_engineering/node_modules/axios/CHANGELOG.md +++ /dev/null @@ -1,685 +0,0 @@ -# Changelog - -### 0.21.1 (December 21, 2020) - -Fixes and Functionality: - -- Hotfix: Prevent SSRF (#3410) -- Protocol not parsed when setting proxy config from env vars (#3070) -- Updating axios in types to be lower case (#2797) -- Adding a type guard for `AxiosError` (#2949) - -Internal and Tests: - -- Remove the skipping of the `socket` http test (#3364) -- Use different socket for Win32 test (#3375) - -Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: - -- Daniel Lopretto -- Jason Kwok -- Jay -- Jonathan Foster -- Remco Haszing -- Xianming Zhong - -### 0.21.0 (October 23, 2020) - -Fixes and Functionality: - -- Fixing requestHeaders.Authorization ([#3287](https://github.com/axios/axios/pull/3287)) -- Fixing node types ([#3237](https://github.com/axios/axios/pull/3237)) -- Fixing axios.delete ignores config.data ([#3282](https://github.com/axios/axios/pull/3282)) -- Revert "Fixing overwrite Blob/File type as Content-Type in browser. (#1773)" ([#3289](https://github.com/axios/axios/pull/3289)) -- Fixing an issue that type 'null' and 'undefined' is not assignable to validateStatus when typescript strict option is enabled ([#3200](https://github.com/axios/axios/pull/3200)) - -Internal and Tests: - -- Lock travis to not use node v15 ([#3361](https://github.com/axios/axios/pull/3361)) - -Documentation: - -- Fixing simple typo, existant -> existent ([#3252](https://github.com/axios/axios/pull/3252)) -- Fixing typos ([#3309](https://github.com/axios/axios/pull/3309)) - -Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: - -- Allan Cruz <57270969+Allanbcruz@users.noreply.github.com> -- George Cheng -- Jay -- Kevin Kirsche -- Remco Haszing -- Taemin Shin -- Tim Gates -- Xianming Zhong - -### 0.20.0 (August 20, 2020) - -Release of 0.20.0-pre as a full release with no other changes. - -### 0.20.0-pre (July 15, 2020) - -Fixes and Functionality: - -- Fixing response with utf-8 BOM can not parse to json ([#2419](https://github.com/axios/axios/pull/2419)) - - fix: remove byte order marker (UTF-8 BOM) when transform response - - fix: remove BOM only utf-8 - - test: utf-8 BOM - - fix: incorrect param name -- Refactor mergeConfig without utils.deepMerge ([#2844](https://github.com/axios/axios/pull/2844)) - - Adding failing test - - Fixing #2587 default custom config persisting - - Adding Concat keys and filter duplicates - - Fixed value from CPE - - update for review feedbacks - - no deepMerge - - only merge between plain objects - - fix rename - - always merge config by mergeConfig - - extract function mergeDeepProperties - - refactor mergeConfig with all keys, and add special logic for validateStatus - - add test for resetting headers - - add lots of tests and fix a bug - - should not inherit `data` - - use simple toString -- Fixing overwrite Blob/File type as Content-Type in browser. ([#1773](https://github.com/axios/axios/pull/1773)) -- Fixing an issue that type 'null' is not assignable to validateStatus ([#2773](https://github.com/axios/axios/pull/2773)) -- Fixing special char encoding ([#1671](https://github.com/axios/axios/pull/1671)) - - removing @ character from replacement list since it is a reserved character - - Updating buildURL test to not include the @ character - - Removing console logs -- Fixing password encoding with special characters in basic authentication ([#1492](https://github.com/axios/axios/pull/1492)) - - Fixing password encoding with special characters in basic authentication - - Adding test to check if password with non-Latin1 characters pass -- Fixing 'Network Error' in react native android ([#1487](https://github.com/axios/axios/pull/1487)) - There is a bug in react native Android platform when using get method. It will trigger a 'Network Error' when passing the requestData which is an empty string to request.send function. So if the requestData is an empty string we can set it to null as well to fix the bug. -- Fixing Cookie Helper with Asyc Components ([#1105](https://github.com/axios/axios/pull/1105)) ([#1107](https://github.com/axios/axios/pull/1107)) -- Fixing 'progressEvent' type ([#2851](https://github.com/axios/axios/pull/2851)) - - Fix 'progressEvent' type - - Update axios.ts -- Fixing getting local files (file://) failed ([#2470](https://github.com/axios/axios/pull/2470)) - - fix issue #2416, #2396 - - fix Eslint warn - - Modify judgment conditions - - add unit test - - update unit test - - update unit test -- Allow PURGE method in typings ([#2191](https://github.com/axios/axios/pull/2191)) -- Adding option to disable automatic decompression ([#2661](https://github.com/axios/axios/pull/2661)) - - Adding ability to disable auto decompression - - Updating decompress documentation in README - - Fixing test\unit\adapters\http.js lint errors - - Adding test for disabling auto decompression - - Removing changes that fixed lint errors in tests - - Removing formatting change to unit test -- Add independent `maxBodyLength` option ([#2781](https://github.com/axios/axios/pull/2781)) - - Add independent option to set the maximum size of the request body - - Remove maxBodyLength check - - Update README - - Assert for error code and message -- Adding responseEncoding to mergeConfig ([#1745](https://github.com/axios/axios/pull/1745)) -- Compatible with follow-redirect aborts the request ([#2689](https://github.com/axios/axios/pull/2689)) - - Compatible with follow-redirect aborts the request - - Use the error code -- Fix merging of params ([#2656](https://github.com/axios/axios/pull/2656)) - - Name function to avoid ESLint func-names warning - - Switch params config to merge list and update tests - - Restore testing of both false and null - - Restore test cases for keys without defaults - - Include test for non-object values that aren't false-y. -- Revert `finally` as `then` ([#2683](https://github.com/axios/axios/pull/2683)) - -Internal and Tests: - -- Fix stale bot config ([#3049](https://github.com/axios/axios/pull/3049)) - - fix stale bot config - - fix multiple lines -- Add days and change name to work ([#3035](https://github.com/axios/axios/pull/3035)) -- Update close-issues.yml ([#3031](https://github.com/axios/axios/pull/3031)) - - Update close-issues.yml - Update close message to read better 😄 - - Fix use of quotations - Use single quotes as per other .yml files - - Remove user name form message -- Add GitHub actions to close stale issues/prs ([#3029](https://github.com/axios/axios/pull/3029)) - - prepare stale actions - - update messages - - Add exempt labels and lighten up comments -- Add GitHub actions to close invalid issues ([#3022](https://github.com/axios/axios/pull/3022)) - - add close actions - - fix with checkout - - update issue templates - - add reminder - - update close message -- Add test with Node.js 12 ([#2860](https://github.com/axios/axios/pull/2860)) - - test with Node.js 12 - - test with latest -- Adding console log on sandbox server startup ([#2210](https://github.com/axios/axios/pull/2210)) - - Adding console log on sandbox server startup - - Update server.js - Add server error handling - - Update server.js - Better error message, remove retry. -- Adding tests for method `options` type definitions ([#1996](https://github.com/axios/axios/pull/1996)) - Update tests. -- Add test for redirecting with too large response ([#2695](https://github.com/axios/axios/pull/2695)) -- Fixing unit test failure in Windows OS ([#2601](https://github.com/axios/axios/pull/2601)) -- Fixing issue for HEAD method and gzipped response ([#2666](https://github.com/axios/axios/pull/2666)) -- Fix tests in browsers ([#2748](https://github.com/axios/axios/pull/2748)) -- chore: add `jsdelivr` and `unpkg` support ([#2443](https://github.com/axios/axios/pull/2443)) - -Documentation: - -- Adding support for URLSearchParams in node ([#1900](https://github.com/axios/axios/pull/1900)) - - Adding support for URLSearchParams in node - - Remove un-needed code - - Update utils.js - - Make changes as suggested -- Adding table of content (preview) ([#3050](https://github.com/axios/axios/pull/3050)) - - add toc (preview) - - remove toc in toc - Signed-off-by: Moni - - fix sublinks - - fix indentation - - remove redundant table links - - update caps and indent - - remove axios -- Replace 'blacklist' with 'blocklist' ([#3006](https://github.com/axios/axios/pull/3006)) -- docs(): Detailed config options environment. ([#2088](https://github.com/axios/axios/pull/2088)) - - docs(): Detailed config options environment. - - Update README.md -- Include axios-data-unpacker in ECOSYSTEM.md ([#2080](https://github.com/axios/axios/pull/2080)) -- Allow opening examples in Gitpod ([#1958](https://github.com/axios/axios/pull/1958)) -- Remove axios.all() and axios.spread() from Readme.md ([#2727](https://github.com/axios/axios/pull/2727)) - - remove axios.all(), axios.spread() - - replace example - - axios.all() -> Promise.all() - - axios.spread(function (acct, perms)) -> function (acct, perms) - - add deprecated mark -- Update README.md ([#2887](https://github.com/axios/axios/pull/2887)) - Small change to the data attribute doc of the config. A request body can also be set for DELETE methods but this wasn't mentioned in the documentation (it only mentioned POST, PUT and PATCH). Took my some 10-20 minutes until I realized that I don't need to manipulate the request body with transformRequest in the case of DELETE. -- Include swagger-taxos-codegen in ECOSYSTEM.md ([#2162](https://github.com/axios/axios/pull/2162)) -- Add CDNJS version badge in README.md ([#878](https://github.com/axios/axios/pull/878)) - This badge will show the version on CDNJS! -- Documentation update to clear up ambiguity in code examples ([#2928](https://github.com/axios/axios/pull/2928)) - - Made an adjustment to the documentation to clear up any ambiguity around the use of "fs". This should help clear up that the code examples with "fs" cannot be used on the client side. -- Update README.md about validateStatus ([#2912](https://github.com/axios/axios/pull/2912)) - Rewrote the comment from "Reject only if the status code is greater than or equal to 500" to "Resolve only if the status code is less than 500" -- Updating documentation for usage form-data ([#2805](https://github.com/axios/axios/pull/2805)) - Closes #2049 -- Fixing CHANGELOG.md issue link ([#2784](https://github.com/axios/axios/pull/2784)) -- Include axios-hooks in ECOSYSTEM.md ([#2003](https://github.com/axios/axios/pull/2003)) -- Added Response header access instructions ([#1901](https://github.com/axios/axios/pull/1901)) - - Added Response header access instructions - - Added note about using bracket notation -- Add `onUploadProgress` and `onDownloadProgress` are browser only ([#2763](https://github.com/axios/axios/pull/2763)) - Saw in #928 and #1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README. -- Update ' sign to ` in proxy spec ([#2778](https://github.com/axios/axios/pull/2778)) -- Adding jsDelivr link in README ([#1110](https://github.com/axios/axios/pull/1110)) - - Adding jsDelivr link - - Add SRI - - Remove SRI - -Huge thanks to everyone who contributed to this release via code (authors listed -below) or via reviews and triaging on GitHub: - -- Alan Wang -- Alexandru Ungureanu -- Anubhav Srivastava -- Benny Neugebauer -- Cr <631807682@qq.com> -- David -- David Ko -- David Tanner -- Emily Morehouse -- Felipe Martins -- Fonger <5862369+Fonger@users.noreply.github.com> -- Frostack -- George Cheng -- grumblerchester -- Gustavo López -- hexaez <45806662+hexaez@users.noreply.github.com> -- huangzuizui -- Ian Wijma -- Jay -- jeffjing -- jennynju <46782518+jennynju@users.noreply.github.com> -- Jimmy Liao <52391190+jimmy-liao-gogoro@users.noreply.github.com> -- Jonathan Sharpe -- JounQin -- Justin Beckwith -- Kamil Posiadała <3dcreator.pl@gmail.com> -- Lukas Drgon -- marcinx -- Martti Laine -- Michał Zarach -- Moni -- Motonori Iwata <121048+iwata@users.noreply.github.com> -- Nikita Galkin -- Petr Mares -- Philippe Recto -- Remco Haszing -- rockcs1992 -- Ryan Bown -- Samina Fu -- Simone Busoli -- Spencer von der Ohe -- Sven Efftinge -- Taegyeoung Oh -- Taemin Shin -- Thibault Ehrhart <1208424+ehrhart@users.noreply.github.com> -- Xianming Zhong -- Yasu Flores -- Zac Delventhal - -### 0.19.2 (Jan 20, 2020) - -- Remove unnecessary XSS check ([#2679](https://github.com/axios/axios/pull/2679)) (see ([#2646](https://github.com/axios/axios/issues/2646)) for discussion) - -### 0.19.1 (Jan 7, 2020) - -Fixes and Functionality: - -- Fixing invalid agent issue ([#1904](https://github.com/axios/axios/pull/1904)) -- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582)) -- Delete useless default to hash ([#2458](https://github.com/axios/axios/pull/2458)) -- Fix HTTP/HTTPs agents passing to follow-redirect ([#1904](https://github.com/axios/axios/pull/1904)) -- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582)) -- Fix CI build failure ([#2570](https://github.com/axios/axios/pull/2570)) -- Remove dependency on is-buffer from package.json ([#1816](https://github.com/axios/axios/pull/1816)) -- Adding options typings ([#2341](https://github.com/axios/axios/pull/2341)) -- Adding Typescript HTTP method definition for LINK and UNLINK. ([#2444](https://github.com/axios/axios/pull/2444)) -- Update dist with newest changes, fixes Custom Attributes issue -- Change syntax to see if build passes ([#2488](https://github.com/axios/axios/pull/2488)) -- Update Webpack + deps, remove now unnecessary polyfills ([#2410](https://github.com/axios/axios/pull/2410)) -- Fix to prevent XSS, throw an error when the URL contains a JS script ([#2464](https://github.com/axios/axios/pull/2464)) -- Add custom timeout error copy in config ([#2275](https://github.com/axios/axios/pull/2275)) -- Add error toJSON example ([#2466](https://github.com/axios/axios/pull/2466)) -- Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… ([#2451](https://github.com/axios/axios/pull/2451)) -- Fixing subdomain handling on no_proxy ([#2442](https://github.com/axios/axios/pull/2442)) -- Make redirection from HTTP to HTTPS work ([#2426](https://github.com/axios/axios/pull/2426)) and ([#2547](https://github.com/axios/axios/pull/2547)) -- Add toJSON property to AxiosError type ([#2427](https://github.com/axios/axios/pull/2427)) -- Fixing socket hang up error on node side for slow response. ([#1752](https://github.com/axios/axios/pull/1752)) -- Alternative syntax to send data into the body ([#2317](https://github.com/axios/axios/pull/2317)) -- Fixing custom config options ([#2207](https://github.com/axios/axios/pull/2207)) -- Fixing set `config.method` after mergeConfig for Axios.prototype.request ([#2383](https://github.com/axios/axios/pull/2383)) -- Axios create url bug ([#2290](https://github.com/axios/axios/pull/2290)) -- Do not modify config.url when using a relative baseURL (resolves [#1628](https://github.com/axios/axios/issues/1098)) ([#2391](https://github.com/axios/axios/pull/2391)) -- Add typescript HTTP method definition for LINK and UNLINK ([#2444](https://github.com/axios/axios/pull/2444)) - -Internal: - -- Revert "Update Webpack + deps, remove now unnecessary polyfills" ([#2479](https://github.com/axios/axios/pull/2479)) -- Order of if/else blocks is causing unit tests mocking XHR. ([#2201](https://github.com/axios/axios/pull/2201)) -- Add license badge ([#2446](https://github.com/axios/axios/pull/2446)) -- Fix travis CI build [#2386](https://github.com/axios/axios/pull/2386) -- Fix cancellation error on build master. #2290 #2207 ([#2407](https://github.com/axios/axios/pull/2407)) - -Documentation: - -- Fixing typo in CHANGELOG.md: s/Functionallity/Functionality ([#2639](https://github.com/axios/axios/pull/2639)) -- Fix badge, use master branch ([#2538](https://github.com/axios/axios/pull/2538)) -- Fix typo in changelog [#2193](https://github.com/axios/axios/pull/2193) -- Document fix ([#2514](https://github.com/axios/axios/pull/2514)) -- Update docs with no_proxy change, issue #2484 ([#2513](https://github.com/axios/axios/pull/2513)) -- Fixing missing words in docs template ([#2259](https://github.com/axios/axios/pull/2259)) -- 🐛Fix request finally documentation in README ([#2189](https://github.com/axios/axios/pull/2189)) -- updating spelling and adding link to docs ([#2212](https://github.com/axios/axios/pull/2212)) -- docs: minor tweak ([#2404](https://github.com/axios/axios/pull/2404)) -- Update response interceptor docs ([#2399](https://github.com/axios/axios/pull/2399)) -- Update README.md ([#2504](https://github.com/axios/axios/pull/2504)) -- Fix word 'sintaxe' to 'syntax' in README.md ([#2432](https://github.com/axios/axios/pull/2432)) -- updating README: notes on CommonJS autocomplete ([#2256](https://github.com/axios/axios/pull/2256)) -- Fix grammar in README.md ([#2271](https://github.com/axios/axios/pull/2271)) -- Doc fixes, minor examples cleanup ([#2198](https://github.com/axios/axios/pull/2198)) - -### 0.19.0 (May 30, 2019) - -Fixes and Functionality: - -- Added support for no_proxy env variable ([#1693](https://github.com/axios/axios/pull/1693/files)) - Chance Dickson -- Unzip response body only for statuses != 204 ([#1129](https://github.com/axios/axios/pull/1129)) - drawski -- Destroy stream on exceeding maxContentLength (fixes [#1098](https://github.com/axios/axios/issues/1098)) ([#1485](https://github.com/axios/axios/pull/1485)) - Gadzhi Gadzhiev -- Makes Axios error generic to use AxiosResponse ([#1738](https://github.com/axios/axios/pull/1738)) - Suman Lama -- Fixing Mocha tests by locking follow-redirects version to 1.5.10 ([#1993](https://github.com/axios/axios/pull/1993)) - grumblerchester -- Allow uppercase methods in typings. ([#1781](https://github.com/axios/axios/pull/1781)) - Ken Powers -- Fixing building url with hash mark ([#1771](https://github.com/axios/axios/pull/1771)) - Anatoly Ryabov -- This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after `#`, because client cut everything after `#` -- Preserve HTTP method when following redirect ([#1758](https://github.com/axios/axios/pull/1758)) - Rikki Gibson -- Add `getUri` signature to TypeScript definition. ([#1736](https://github.com/axios/axios/pull/1736)) - Alexander Trauzzi -- Adding isAxiosError flag to errors thrown by axios ([#1419](https://github.com/axios/axios/pull/1419)) - Ayush Gupta - -Internal: - -- Fixing .eslintrc without extension ([#1789](https://github.com/axios/axios/pull/1789)) - Manoel -- Fix failing SauceLabs tests by updating configuration - Emily Morehouse -- Add issue templates - Emily Morehouse - -Documentation: - -- Consistent coding style in README ([#1787](https://github.com/axios/axios/pull/1787)) - Ali Servet Donmez -- Add information about auth parameter to README ([#2166](https://github.com/axios/axios/pull/2166)) - xlaguna -- Add DELETE to list of methods that allow data as a config option ([#2169](https://github.com/axios/axios/pull/2169)) - Daniela Borges Matos de Carvalho -- Update ECOSYSTEM.md - Add Axios Endpoints ([#2176](https://github.com/axios/axios/pull/2176)) - Renan -- Add r2curl in ECOSYSTEM ([#2141](https://github.com/axios/axios/pull/2141)) - 유용우 / CX -- Update README.md - Add instructions for installing with yarn ([#2036](https://github.com/axios/axios/pull/2036)) - Victor Hermes -- Fixing spacing for README.md ([#2066](https://github.com/axios/axios/pull/2066)) - Josh McCarty -- Update README.md. - Change `.then` to `.finally` in example code ([#2090](https://github.com/axios/axios/pull/2090)) - Omar Cai -- Clarify what values responseType can have in Node ([#2121](https://github.com/axios/axios/pull/2121)) - Tyler Breisacher -- docs(ECOSYSTEM): add axios-api-versioning ([#2020](https://github.com/axios/axios/pull/2020)) - Weffe -- It seems that `responseType: 'blob'` doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser -- Update README.md. - Add Querystring library note ([#1896](https://github.com/axios/axios/pull/1896)) - Dmitriy Eroshenko -- Add react-hooks-axios to Libraries section of ECOSYSTEM.md ([#1925](https://github.com/axios/axios/pull/1925)) - Cody Chan -- Clarify in README that default timeout is 0 (no timeout) ([#1750](https://github.com/axios/axios/pull/1750)) - Ben Standefer - -### 0.19.0-beta.1 (Aug 9, 2018) - -**NOTE:** This is a beta version of this release. There may be functionality that is broken in -certain browsers, though we suspect that builds are hanging and not erroring. See -https://saucelabs.com/u/axios for the most up-to-date information. - -New Functionality: - -- Add getUri method ([#1712](https://github.com/axios/axios/issues/1712)) -- Add support for no_proxy env variable ([#1693](https://github.com/axios/axios/issues/1693)) -- Add toJSON to decorated Axios errors to facilitate serialization ([#1625](https://github.com/axios/axios/issues/1625)) -- Add second then on axios call ([#1623](https://github.com/axios/axios/issues/1623)) -- Typings: allow custom return types -- Add option to specify character set in responses (with http adapter) - -Fixes: - -- Fix Keep defaults local to instance ([#385](https://github.com/axios/axios/issues/385)) -- Correctly catch exception in http test ([#1475](https://github.com/axios/axios/issues/1475)) -- Fix accept header normalization ([#1698](https://github.com/axios/axios/issues/1698)) -- Fix http adapter to allow HTTPS connections via HTTP ([#959](https://github.com/axios/axios/issues/959)) -- Fix Removes usage of deprecated Buffer constructor. ([#1555](https://github.com/axios/axios/issues/1555), [#1622](https://github.com/axios/axios/issues/1622)) -- Fix defaults to use httpAdapter if available ([#1285](https://github.com/axios/axios/issues/1285)) - - Fixing defaults to use httpAdapter if available - - Use a safer, cross-platform method to detect the Node environment -- Fix Reject promise if request is cancelled by the browser ([#537](https://github.com/axios/axios/issues/537)) -- [Typescript] Fix missing type parameters on delete/head methods -- [NS]: Send `false` flag isStandardBrowserEnv for Nativescript -- Fix missing type parameters on delete/head -- Fix Default method for an instance always overwritten by get -- Fix type error when socketPath option in AxiosRequestConfig -- Capture errors on request data streams -- Decorate resolve and reject to clear timeout in all cases - -Huge thanks to everyone who contributed to this release via code (authors listed -below) or via reviews and triaging on GitHub: - -- Andrew Scott -- Anthony Gauthier -- arpit -- ascott18 -- Benedikt Rötsch -- Chance Dickson -- Dave Stewart -- Deric Cain -- Guillaume Briday -- Jacob Wejendorp -- Jim Lynch -- johntron -- Justin Beckwith -- Justin Beckwith -- Khaled Garbaya -- Lim Jing Rong -- Mark van den Broek -- Martti Laine -- mattridley -- mattridley -- Nicolas Del Valle -- Nilegfx -- pbarbiero -- Rikki Gibson -- Sako Hartounian -- Shane Fitzpatrick -- Stephan Schneider -- Steven -- Tim Garthwaite -- Tim Johns -- Yutaro Miyazaki - -### 0.18.0 (Feb 19, 2018) - -- Adding support for UNIX Sockets when running with Node.js ([#1070](https://github.com/axios/axios/pull/1070)) -- Fixing typings ([#1177](https://github.com/axios/axios/pull/1177)): - - AxiosRequestConfig.proxy: allows type false - - AxiosProxyConfig: added auth field -- Adding function signature in AxiosInstance interface so AxiosInstance can be invoked ([#1192](https://github.com/axios/axios/pull/1192), [#1254](https://github.com/axios/axios/pull/1254)) -- Allowing maxContentLength to pass through to redirected calls as maxBodyLength in follow-redirects config ([#1287](https://github.com/axios/axios/pull/1287)) -- Fixing configuration when using an instance - method can now be set ([#1342](https://github.com/axios/axios/pull/1342)) - -### 0.17.1 (Nov 11, 2017) - -- Fixing issue with web workers ([#1160](https://github.com/axios/axios/pull/1160)) -- Allowing overriding transport ([#1080](https://github.com/axios/axios/pull/1080)) -- Updating TypeScript typings ([#1165](https://github.com/axios/axios/pull/1165), [#1125](https://github.com/axios/axios/pull/1125), [#1131](https://github.com/axios/axios/pull/1131)) - -### 0.17.0 (Oct 21, 2017) - -- **BREAKING** Fixing issue with `baseURL` and interceptors ([#950](https://github.com/axios/axios/pull/950)) -- **BREAKING** Improving handing of duplicate headers ([#874](https://github.com/axios/axios/pull/874)) -- Adding support for disabling proxies ([#691](https://github.com/axios/axios/pull/691)) -- Updating TypeScript typings with generic type parameters ([#1061](https://github.com/axios/axios/pull/1061)) - -### 0.16.2 (Jun 3, 2017) - -- Fixing issue with including `buffer` in bundle ([#887](https://github.com/axios/axios/pull/887)) -- Including underlying request in errors ([#830](https://github.com/axios/axios/pull/830)) -- Convert `method` to lowercase ([#930](https://github.com/axios/axios/pull/930)) - -### 0.16.1 (Apr 8, 2017) - -- Improving HTTP adapter to return last request in case of redirects ([#828](https://github.com/axios/axios/pull/828)) -- Updating `follow-redirects` dependency ([#829](https://github.com/axios/axios/pull/829)) -- Adding support for passing `Buffer` in node ([#773](https://github.com/axios/axios/pull/773)) - -### 0.16.0 (Mar 31, 2017) - -- **BREAKING** Removing `Promise` from axios typings in favor of built-in type declarations ([#480](https://github.com/axios/axios/issues/480)) -- Adding `options` shortcut method ([#461](https://github.com/axios/axios/pull/461)) -- Fixing issue with using `responseType: 'json'` in browsers incompatible with XHR Level 2 ([#654](https://github.com/axios/axios/pull/654)) -- Improving React Native detection ([#731](https://github.com/axios/axios/pull/731)) -- Fixing `combineURLs` to support empty `relativeURL` ([#581](https://github.com/axios/axios/pull/581)) -- Removing `PROTECTION_PREFIX` support ([#561](https://github.com/axios/axios/pull/561)) - -### 0.15.3 (Nov 27, 2016) - -- Fixing issue with custom instances and global defaults ([#443](https://github.com/axios/axios/issues/443)) -- Renaming `axios.d.ts` to `index.d.ts` ([#519](https://github.com/axios/axios/issues/519)) -- Adding `get`, `head`, and `delete` to `defaults.headers` ([#509](https://github.com/axios/axios/issues/509)) -- Fixing issue with `btoa` and IE ([#507](https://github.com/axios/axios/issues/507)) -- Adding support for proxy authentication ([#483](https://github.com/axios/axios/pull/483)) -- Improving HTTP adapter to use `http` protocol by default ([#493](https://github.com/axios/axios/pull/493)) -- Fixing proxy issues ([#491](https://github.com/axios/axios/pull/491)) - -### 0.15.2 (Oct 17, 2016) - -- Fixing issue with calling `cancel` after response has been received ([#482](https://github.com/axios/axios/issues/482)) - -### 0.15.1 (Oct 14, 2016) - -- Fixing issue with UMD ([#485](https://github.com/axios/axios/issues/485)) - -### 0.15.0 (Oct 10, 2016) - -- Adding cancellation support ([#452](https://github.com/axios/axios/pull/452)) -- Moving default adapter to global defaults ([#437](https://github.com/axios/axios/pull/437)) -- Fixing issue with `file` URI scheme ([#440](https://github.com/axios/axios/pull/440)) -- Fixing issue with `params` objects that have no prototype ([#445](https://github.com/axios/axios/pull/445)) - -### 0.14.0 (Aug 27, 2016) - -- **BREAKING** Updating TypeScript definitions ([#419](https://github.com/axios/axios/pull/419)) -- **BREAKING** Replacing `agent` option with `httpAgent` and `httpsAgent` ([#387](https://github.com/axios/axios/pull/387)) -- **BREAKING** Splitting `progress` event handlers into `onUploadProgress` and `onDownloadProgress` ([#423](https://github.com/axios/axios/pull/423)) -- Adding support for `http_proxy` and `https_proxy` environment variables ([#366](https://github.com/axios/axios/pull/366)) -- Fixing issue with `auth` config option and `Authorization` header ([#397](https://github.com/axios/axios/pull/397)) -- Don't set XSRF header if `xsrfCookieName` is `null` ([#406](https://github.com/axios/axios/pull/406)) - -### 0.13.1 (Jul 16, 2016) - -- Fixing issue with response data not being transformed on error ([#378](https://github.com/axios/axios/issues/378)) - -### 0.13.0 (Jul 13, 2016) - -- **BREAKING** Improved error handling ([#345](https://github.com/axios/axios/pull/345)) -- **BREAKING** Response transformer now invoked in dispatcher not adapter ([10eb238](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e)) -- **BREAKING** Request adapters now return a `Promise` ([157efd5](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a)) -- Fixing issue with `withCredentials` not being overwritten ([#343](https://github.com/axios/axios/issues/343)) -- Fixing regression with request transformer being called before request interceptor ([#352](https://github.com/axios/axios/issues/352)) -- Fixing custom instance defaults ([#341](https://github.com/axios/axios/issues/341)) -- Fixing instances created from `axios.create` to have same API as default axios ([#217](https://github.com/axios/axios/issues/217)) - -### 0.12.0 (May 31, 2016) - -- Adding support for `URLSearchParams` ([#317](https://github.com/axios/axios/pull/317)) -- Adding `maxRedirects` option ([#307](https://github.com/axios/axios/pull/307)) - -### 0.11.1 (May 17, 2016) - -- Fixing IE CORS support ([#313](https://github.com/axios/axios/pull/313)) -- Fixing detection of `FormData` ([#325](https://github.com/axios/axios/pull/325)) -- Adding `Axios` class to exports ([#321](https://github.com/axios/axios/pull/321)) - -### 0.11.0 (Apr 26, 2016) - -- Adding support for Stream with HTTP adapter ([#296](https://github.com/axios/axios/pull/296)) -- Adding support for custom HTTP status code error ranges ([#308](https://github.com/axios/axios/pull/308)) -- Fixing issue with ArrayBuffer ([#299](https://github.com/axios/axios/pull/299)) - -### 0.10.0 (Apr 20, 2016) - -- Fixing issue with some requests sending `undefined` instead of `null` ([#250](https://github.com/axios/axios/pull/250)) -- Fixing basic auth for HTTP adapter ([#252](https://github.com/axios/axios/pull/252)) -- Fixing request timeout for XHR adapter ([#227](https://github.com/axios/axios/pull/227)) -- Fixing IE8 support by using `onreadystatechange` instead of `onload` ([#249](https://github.com/axios/axios/pull/249)) -- Fixing IE9 cross domain requests ([#251](https://github.com/axios/axios/pull/251)) -- Adding `maxContentLength` option ([#275](https://github.com/axios/axios/pull/275)) -- Fixing XHR support for WebWorker environment ([#279](https://github.com/axios/axios/pull/279)) -- Adding request instance to response ([#200](https://github.com/axios/axios/pull/200)) - -### 0.9.1 (Jan 24, 2016) - -- Improving handling of request timeout in node ([#124](https://github.com/axios/axios/issues/124)) -- Fixing network errors not rejecting ([#205](https://github.com/axios/axios/pull/205)) -- Fixing issue with IE rejecting on HTTP 204 ([#201](https://github.com/axios/axios/issues/201)) -- Fixing host/port when following redirects ([#198](https://github.com/axios/axios/pull/198)) - -### 0.9.0 (Jan 18, 2016) - -- Adding support for custom adapters -- Fixing Content-Type header being removed when data is false ([#195](https://github.com/axios/axios/pull/195)) -- Improving XDomainRequest implementation ([#185](https://github.com/axios/axios/pull/185)) -- Improving config merging and order of precedence ([#183](https://github.com/axios/axios/pull/183)) -- Fixing XDomainRequest support for only <= IE9 ([#182](https://github.com/axios/axios/pull/182)) - -### 0.8.1 (Dec 14, 2015) - -- Adding support for passing XSRF token for cross domain requests when using `withCredentials` ([#168](https://github.com/axios/axios/pull/168)) -- Fixing error with format of basic auth header ([#178](https://github.com/axios/axios/pull/173)) -- Fixing error with JSON payloads throwing `InvalidStateError` in some cases ([#174](https://github.com/axios/axios/pull/174)) - -### 0.8.0 (Dec 11, 2015) - -- Adding support for creating instances of axios ([#123](https://github.com/axios/axios/pull/123)) -- Fixing http adapter to use `Buffer` instead of `String` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128)) -- Adding support for using custom parameter serializer with `paramsSerializer` option ([#121](https://github.com/axios/axios/pull/121)) -- Fixing issue in IE8 caused by `forEach` on `arguments` ([#127](https://github.com/axios/axios/pull/127)) -- Adding support for following redirects in node ([#146](https://github.com/axios/axios/pull/146)) -- Adding support for transparent decompression if `content-encoding` is set ([#149](https://github.com/axios/axios/pull/149)) -- Adding support for transparent XDomainRequest to handle cross domain requests in IE9 ([#140](https://github.com/axios/axios/pull/140)) -- Adding support for HTTP basic auth via Authorization header ([#167](https://github.com/axios/axios/pull/167)) -- Adding support for baseURL option ([#160](https://github.com/axios/axios/pull/160)) - -### 0.7.0 (Sep 29, 2015) - -- Fixing issue with minified bundle in IE8 ([#87](https://github.com/axios/axios/pull/87)) -- Adding support for passing agent in node ([#102](https://github.com/axios/axios/pull/102)) -- Adding support for returning result from `axios.spread` for chaining ([#106](https://github.com/axios/axios/pull/106)) -- Fixing typescript definition ([#105](https://github.com/axios/axios/pull/105)) -- Fixing default timeout config for node ([#112](https://github.com/axios/axios/pull/112)) -- Adding support for use in web workers, and react-native ([#70](https://github.com/axios/axios/issue/70)), ([#98](https://github.com/axios/axios/pull/98)) -- Adding support for fetch like API `axios(url[, config])` ([#116](https://github.com/axios/axios/issues/116)) - -### 0.6.0 (Sep 21, 2015) - -- Removing deprecated success/error aliases -- Fixing issue with array params not being properly encoded ([#49](https://github.com/axios/axios/pull/49)) -- Fixing issue with User-Agent getting overridden ([#69](https://github.com/axios/axios/issues/69)) -- Adding support for timeout config ([#56](https://github.com/axios/axios/issues/56)) -- Removing es6-promise dependency -- Fixing issue preventing `length` to be used as a parameter ([#91](https://github.com/axios/axios/pull/91)) -- Fixing issue with IE8 ([#85](https://github.com/axios/axios/pull/85)) -- Converting build to UMD - -### 0.5.4 (Apr 08, 2015) - -- Fixing issue with FormData not being sent ([#53](https://github.com/axios/axios/issues/53)) - -### 0.5.3 (Apr 07, 2015) - -- Using JSON.parse unconditionally when transforming response string ([#55](https://github.com/axios/axios/issues/55)) - -### 0.5.2 (Mar 13, 2015) - -- Adding support for `statusText` in response ([#46](https://github.com/axios/axios/issues/46)) - -### 0.5.1 (Mar 10, 2015) - -- Fixing issue using strict mode ([#45](https://github.com/axios/axios/issues/45)) -- Fixing issue with standalone build ([#47](https://github.com/axios/axios/issues/47)) - -### 0.5.0 (Jan 23, 2015) - -- Adding support for intercepetors ([#14](https://github.com/axios/axios/issues/14)) -- Updating es6-promise dependency - -### 0.4.2 (Dec 10, 2014) - -- Fixing issue with `Content-Type` when using `FormData` ([#22](https://github.com/axios/axios/issues/22)) -- Adding support for TypeScript ([#25](https://github.com/axios/axios/issues/25)) -- Fixing issue with standalone build ([#29](https://github.com/axios/axios/issues/29)) -- Fixing issue with verbs needing to be capitalized in some browsers ([#30](https://github.com/axios/axios/issues/30)) - -### 0.4.1 (Oct 15, 2014) - -- Adding error handling to request for node.js ([#18](https://github.com/axios/axios/issues/18)) - -### 0.4.0 (Oct 03, 2014) - -- Adding support for `ArrayBuffer` and `ArrayBufferView` ([#10](https://github.com/axios/axios/issues/10)) -- Adding support for utf-8 for node.js ([#13](https://github.com/axios/axios/issues/13)) -- Adding support for SSL for node.js ([#12](https://github.com/axios/axios/issues/12)) -- Fixing incorrect `Content-Type` header ([#9](https://github.com/axios/axios/issues/9)) -- Adding standalone build without bundled es6-promise ([#11](https://github.com/axios/axios/issues/11)) -- Deprecating `success`/`error` in favor of `then`/`catch` - -### 0.3.1 (Sep 16, 2014) - -- Fixing missing post body when using node.js ([#3](https://github.com/axios/axios/issues/3)) - -### 0.3.0 (Sep 16, 2014) - -- Fixing `success` and `error` to properly receive response data as individual arguments ([#8](https://github.com/axios/axios/issues/8)) -- Updating `then` and `catch` to receive response data as a single object ([#6](https://github.com/axios/axios/issues/6)) -- Fixing issue with `all` not working ([#7](https://github.com/axios/axios/issues/7)) - -### 0.2.2 (Sep 14, 2014) - -- Fixing bundling with browserify ([#4](https://github.com/axios/axios/issues/4)) - -### 0.2.1 (Sep 12, 2014) - -- Fixing build problem causing ridiculous file sizes - -### 0.2.0 (Sep 12, 2014) - -- Adding support for `all` and `spread` -- Adding support for node.js ([#1](https://github.com/axios/axios/issues/1)) - -### 0.1.0 (Aug 29, 2014) - -- Initial release diff --git a/reverse_engineering/node_modules/axios/LICENSE b/reverse_engineering/node_modules/axios/LICENSE deleted file mode 100644 index d36c80e..0000000 --- a/reverse_engineering/node_modules/axios/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-present Matt Zabriskie - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/reverse_engineering/node_modules/axios/README.md b/reverse_engineering/node_modules/axios/README.md deleted file mode 100755 index 44264f6..0000000 --- a/reverse_engineering/node_modules/axios/README.md +++ /dev/null @@ -1,800 +0,0 @@ -# axios - -[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios) -[![CDNJS](https://img.shields.io/cdnjs/v/axios.svg?style=flat-square)](https://cdnjs.com/libraries/axios) -[![build status](https://img.shields.io/travis/axios/axios/master.svg?style=flat-square)](https://travis-ci.org/axios/axios) -[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios) -[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios) -[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios) -[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios) -[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios) - -Promise based HTTP client for the browser and node.js -## Table of Contents - - - [Features](#features) - - [Browser Support](#browser-support) - - [Installing](#installing) - - [Example](#example) - - [Axios API](#axios-api) - - [Request method aliases](#request-method-aliases) - - [Concurrency (Deprecated)](#concurrency-deprecated) - - [Creating an instance](#creating-an-instance) - - [Instance methods](#instance-methods) - - [Request Config](#request-config) - - [Response Schema](#response-schema) - - [Config Defaults](#config-defaults) - - [Global axios defaults](#global-axios-defaults) - - [Custom instance defaults](#custom-instance-defaults) - - [Config order of precedence](#config-order-of-precedence) - - [Interceptors](#interceptors) - - [Handling Errors](#handling-errors) - - [Cancellation](#cancellation) - - [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format) - - [Browser](#browser) - - [Node.js](#nodejs) - - [Query string](#query-string) - - [Form data](#form-data) - - [Semver](#semver) - - [Promises](#promises) - - [TypeScript](#typescript) - - [Resources](#resources) - - [Credits](#credits) - - [License](#license) - -## Features - -- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser -- Make [http](http://nodejs.org/api/http.html) requests from node.js -- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API -- Intercept request and response -- Transform request and response data -- Cancel requests -- Automatic transforms for JSON data -- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) - -## Browser Support - -![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) | ---- | --- | --- | --- | --- | --- | -Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ | - -[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios) - -## Installing - -Using npm: - -```bash -$ npm install axios -``` - -Using bower: - -```bash -$ bower install axios -``` - -Using yarn: - -```bash -$ yarn add axios -``` - -Using jsDelivr CDN: - -```html - -``` - -Using unpkg CDN: - -```html - -``` - -## Example - -### note: CommonJS usage -In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach: - -```js -const axios = require('axios').default; - -// axios. will now provide autocomplete and parameter typings -``` - -Performing a `GET` request - -```js -const axios = require('axios'); - -// Make a request for a user with a given ID -axios.get('/user?ID=12345') - .then(function (response) { - // handle success - console.log(response); - }) - .catch(function (error) { - // handle error - console.log(error); - }) - .then(function () { - // always executed - }); - -// Optionally the request above could also be done as -axios.get('/user', { - params: { - ID: 12345 - } - }) - .then(function (response) { - console.log(response); - }) - .catch(function (error) { - console.log(error); - }) - .then(function () { - // always executed - }); - -// Want to use async/await? Add the `async` keyword to your outer function/method. -async function getUser() { - try { - const response = await axios.get('/user?ID=12345'); - console.log(response); - } catch (error) { - console.error(error); - } -} -``` - -> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet -> Explorer and older browsers, so use with caution. - -Performing a `POST` request - -```js -axios.post('/user', { - firstName: 'Fred', - lastName: 'Flintstone' - }) - .then(function (response) { - console.log(response); - }) - .catch(function (error) { - console.log(error); - }); -``` - -Performing multiple concurrent requests - -```js -function getUserAccount() { - return axios.get('/user/12345'); -} - -function getUserPermissions() { - return axios.get('/user/12345/permissions'); -} - -Promise.all([getUserAccount(), getUserPermissions()]) - .then(function (results) { - const acct = results[0]; - const perm = results[1]; - }); -``` - -## axios API - -Requests can be made by passing the relevant config to `axios`. - -##### axios(config) - -```js -// Send a POST request -axios({ - method: 'post', - url: '/user/12345', - data: { - firstName: 'Fred', - lastName: 'Flintstone' - } -}); -``` - -```js -// GET request for remote image in node.js -axios({ - method: 'get', - url: 'http://bit.ly/2mTM3nY', - responseType: 'stream' -}) - .then(function (response) { - response.data.pipe(fs.createWriteStream('ada_lovelace.jpg')) - }); -``` - -##### axios(url[, config]) - -```js -// Send a GET request (default method) -axios('/user/12345'); -``` - -### Request method aliases - -For convenience aliases have been provided for all supported request methods. - -##### axios.request(config) -##### axios.get(url[, config]) -##### axios.delete(url[, config]) -##### axios.head(url[, config]) -##### axios.options(url[, config]) -##### axios.post(url[, data[, config]]) -##### axios.put(url[, data[, config]]) -##### axios.patch(url[, data[, config]]) - -###### NOTE -When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config. - -### Concurrency (Deprecated) -Please use `Promise.all` to replace the below functions. - -Helper functions for dealing with concurrent requests. - -axios.all(iterable) -axios.spread(callback) - -### Creating an instance - -You can create a new instance of axios with a custom config. - -##### axios.create([config]) - -```js -const instance = axios.create({ - baseURL: 'https://some-domain.com/api/', - timeout: 1000, - headers: {'X-Custom-Header': 'foobar'} -}); -``` - -### Instance methods - -The available instance methods are listed below. The specified config will be merged with the instance config. - -##### axios#request(config) -##### axios#get(url[, config]) -##### axios#delete(url[, config]) -##### axios#head(url[, config]) -##### axios#options(url[, config]) -##### axios#post(url[, data[, config]]) -##### axios#put(url[, data[, config]]) -##### axios#patch(url[, data[, config]]) -##### axios#getUri([config]) - -## Request Config - -These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified. - -```js -{ - // `url` is the server URL that will be used for the request - url: '/user', - - // `method` is the request method to be used when making the request - method: 'get', // default - - // `baseURL` will be prepended to `url` unless `url` is absolute. - // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs - // to methods of that instance. - baseURL: 'https://some-domain.com/api/', - - // `transformRequest` allows changes to the request data before it is sent to the server - // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE' - // The last function in the array must return a string or an instance of Buffer, ArrayBuffer, - // FormData or Stream - // You may modify the headers object. - transformRequest: [function (data, headers) { - // Do whatever you want to transform the data - - return data; - }], - - // `transformResponse` allows changes to the response data to be made before - // it is passed to then/catch - transformResponse: [function (data) { - // Do whatever you want to transform the data - - return data; - }], - - // `headers` are custom headers to be sent - headers: {'X-Requested-With': 'XMLHttpRequest'}, - - // `params` are the URL parameters to be sent with the request - // Must be a plain object or a URLSearchParams object - params: { - ID: 12345 - }, - - // `paramsSerializer` is an optional function in charge of serializing `params` - // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/) - paramsSerializer: function (params) { - return Qs.stringify(params, {arrayFormat: 'brackets'}) - }, - - // `data` is the data to be sent as the request body - // Only applicable for request methods 'PUT', 'POST', 'DELETE , and 'PATCH' - // When no `transformRequest` is set, must be of one of the following types: - // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams - // - Browser only: FormData, File, Blob - // - Node only: Stream, Buffer - data: { - firstName: 'Fred' - }, - - // syntax alternative to send data into the body - // method post - // only the value is sent, not the key - data: 'Country=Brasil&City=Belo Horizonte', - - // `timeout` specifies the number of milliseconds before the request times out. - // If the request takes longer than `timeout`, the request will be aborted. - timeout: 1000, // default is `0` (no timeout) - - // `withCredentials` indicates whether or not cross-site Access-Control requests - // should be made using credentials - withCredentials: false, // default - - // `adapter` allows custom handling of requests which makes testing easier. - // Return a promise and supply a valid response (see lib/adapters/README.md). - adapter: function (config) { - /* ... */ - }, - - // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. - // This will set an `Authorization` header, overwriting any existing - // `Authorization` custom headers you have set using `headers`. - // Please note that only HTTP Basic auth is configurable through this parameter. - // For Bearer tokens and such, use `Authorization` custom headers instead. - auth: { - username: 'janedoe', - password: 's00pers3cret' - }, - - // `responseType` indicates the type of data that the server will respond with - // options are: 'arraybuffer', 'document', 'json', 'text', 'stream' - // browser only: 'blob' - responseType: 'json', // default - - // `responseEncoding` indicates encoding to use for decoding responses (Node.js only) - // Note: Ignored for `responseType` of 'stream' or client-side requests - responseEncoding: 'utf8', // default - - // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token - xsrfCookieName: 'XSRF-TOKEN', // default - - // `xsrfHeaderName` is the name of the http header that carries the xsrf token value - xsrfHeaderName: 'X-XSRF-TOKEN', // default - - // `onUploadProgress` allows handling of progress events for uploads - // browser only - onUploadProgress: function (progressEvent) { - // Do whatever you want with the native progress event - }, - - // `onDownloadProgress` allows handling of progress events for downloads - // browser only - onDownloadProgress: function (progressEvent) { - // Do whatever you want with the native progress event - }, - - // `maxContentLength` defines the max size of the http response content in bytes allowed in node.js - maxContentLength: 2000, - - // `maxBodyLength` (Node only option) defines the max size of the http request content in bytes allowed - maxBodyLength: 2000, - - // `validateStatus` defines whether to resolve or reject the promise for a given - // HTTP response status code. If `validateStatus` returns `true` (or is set to `null` - // or `undefined`), the promise will be resolved; otherwise, the promise will be - // rejected. - validateStatus: function (status) { - return status >= 200 && status < 300; // default - }, - - // `maxRedirects` defines the maximum number of redirects to follow in node.js. - // If set to 0, no redirects will be followed. - maxRedirects: 5, // default - - // `socketPath` defines a UNIX Socket to be used in node.js. - // e.g. '/var/run/docker.sock' to send requests to the docker daemon. - // Only either `socketPath` or `proxy` can be specified. - // If both are specified, `socketPath` is used. - socketPath: null, // default - - // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http - // and https requests, respectively, in node.js. This allows options to be added like - // `keepAlive` that are not enabled by default. - httpAgent: new http.Agent({ keepAlive: true }), - httpsAgent: new https.Agent({ keepAlive: true }), - - // `proxy` defines the hostname, port, and protocol of the proxy server. - // You can also define your proxy using the conventional `http_proxy` and - // `https_proxy` environment variables. If you are using environment variables - // for your proxy configuration, you can also define a `no_proxy` environment - // variable as a comma-separated list of domains that should not be proxied. - // Use `false` to disable proxies, ignoring environment variables. - // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and - // supplies credentials. - // This will set an `Proxy-Authorization` header, overwriting any existing - // `Proxy-Authorization` custom headers you have set using `headers`. - // If the proxy server uses HTTPS, then you must set the protocol to `https`. - proxy: { - protocol: 'https', - host: '127.0.0.1', - port: 9000, - auth: { - username: 'mikeymike', - password: 'rapunz3l' - } - }, - - // `cancelToken` specifies a cancel token that can be used to cancel the request - // (see Cancellation section below for details) - cancelToken: new CancelToken(function (cancel) { - }), - - // `decompress` indicates whether or not the response body should be decompressed - // automatically. If set to `true` will also remove the 'content-encoding' header - // from the responses objects of all decompressed responses - // - Node only (XHR cannot turn off decompression) - decompress: true // default - -} -``` - -## Response Schema - -The response for a request contains the following information. - -```js -{ - // `data` is the response that was provided by the server - data: {}, - - // `status` is the HTTP status code from the server response - status: 200, - - // `statusText` is the HTTP status message from the server response - statusText: 'OK', - - // `headers` the HTTP headers that the server responded with - // All header names are lower cased and can be accessed using the bracket notation. - // Example: `response.headers['content-type']` - headers: {}, - - // `config` is the config that was provided to `axios` for the request - config: {}, - - // `request` is the request that generated this response - // It is the last ClientRequest instance in node.js (in redirects) - // and an XMLHttpRequest instance in the browser - request: {} -} -``` - -When using `then`, you will receive the response as follows: - -```js -axios.get('/user/12345') - .then(function (response) { - console.log(response.data); - console.log(response.status); - console.log(response.statusText); - console.log(response.headers); - console.log(response.config); - }); -``` - -When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section. - -## Config Defaults - -You can specify config defaults that will be applied to every request. - -### Global axios defaults - -```js -axios.defaults.baseURL = 'https://api.example.com'; -axios.defaults.headers.common['Authorization'] = AUTH_TOKEN; -axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; -``` - -### Custom instance defaults - -```js -// Set config defaults when creating the instance -const instance = axios.create({ - baseURL: 'https://api.example.com' -}); - -// Alter defaults after instance has been created -instance.defaults.headers.common['Authorization'] = AUTH_TOKEN; -``` - -### Config order of precedence - -Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example. - -```js -// Create an instance using the config defaults provided by the library -// At this point the timeout config value is `0` as is the default for the library -const instance = axios.create(); - -// Override timeout default for the library -// Now all requests using this instance will wait 2.5 seconds before timing out -instance.defaults.timeout = 2500; - -// Override timeout for this request as it's known to take a long time -instance.get('/longRequest', { - timeout: 5000 -}); -``` - -## Interceptors - -You can intercept requests or responses before they are handled by `then` or `catch`. - -```js -// Add a request interceptor -axios.interceptors.request.use(function (config) { - // Do something before request is sent - return config; - }, function (error) { - // Do something with request error - return Promise.reject(error); - }); - -// Add a response interceptor -axios.interceptors.response.use(function (response) { - // Any status code that lie within the range of 2xx cause this function to trigger - // Do something with response data - return response; - }, function (error) { - // Any status codes that falls outside the range of 2xx cause this function to trigger - // Do something with response error - return Promise.reject(error); - }); -``` - -If you need to remove an interceptor later you can. - -```js -const myInterceptor = axios.interceptors.request.use(function () {/*...*/}); -axios.interceptors.request.eject(myInterceptor); -``` - -You can add interceptors to a custom instance of axios. - -```js -const instance = axios.create(); -instance.interceptors.request.use(function () {/*...*/}); -``` - -## Handling Errors - -```js -axios.get('/user/12345') - .catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - console.log(error.response.data); - console.log(error.response.status); - console.log(error.response.headers); - } else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.log(error.request); - } else { - // Something happened in setting up the request that triggered an Error - console.log('Error', error.message); - } - console.log(error.config); - }); -``` - -Using the `validateStatus` config option, you can define HTTP code(s) that should throw an error. - -```js -axios.get('/user/12345', { - validateStatus: function (status) { - return status < 500; // Resolve only if the status code is less than 500 - } -}) -``` - -Using `toJSON` you get an object with more information about the HTTP error. - -```js -axios.get('/user/12345') - .catch(function (error) { - console.log(error.toJSON()); - }); -``` - -## Cancellation - -You can cancel a request using a *cancel token*. - -> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises). - -You can create a cancel token using the `CancelToken.source` factory as shown below: - -```js -const CancelToken = axios.CancelToken; -const source = CancelToken.source(); - -axios.get('/user/12345', { - cancelToken: source.token -}).catch(function (thrown) { - if (axios.isCancel(thrown)) { - console.log('Request canceled', thrown.message); - } else { - // handle error - } -}); - -axios.post('/user/12345', { - name: 'new name' -}, { - cancelToken: source.token -}) - -// cancel the request (the message parameter is optional) -source.cancel('Operation canceled by the user.'); -``` - -You can also create a cancel token by passing an executor function to the `CancelToken` constructor: - -```js -const CancelToken = axios.CancelToken; -let cancel; - -axios.get('/user/12345', { - cancelToken: new CancelToken(function executor(c) { - // An executor function receives a cancel function as a parameter - cancel = c; - }) -}); - -// cancel the request -cancel(); -``` - -> Note: you can cancel several requests with the same cancel token. - -## Using application/x-www-form-urlencoded format - -By default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options. - -### Browser - -In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows: - -```js -const params = new URLSearchParams(); -params.append('param1', 'value1'); -params.append('param2', 'value2'); -axios.post('/foo', params); -``` - -> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment). - -Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library: - -```js -const qs = require('qs'); -axios.post('/foo', qs.stringify({ 'bar': 123 })); -``` - -Or in another way (ES6), - -```js -import qs from 'qs'; -const data = { 'bar': 123 }; -const options = { - method: 'POST', - headers: { 'content-type': 'application/x-www-form-urlencoded' }, - data: qs.stringify(data), - url, -}; -axios(options); -``` - -### Node.js - -#### Query string - -In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows: - -```js -const querystring = require('querystring'); -axios.post('http://something.com/', querystring.stringify({ foo: 'bar' })); -``` - -or ['URLSearchParams'](https://nodejs.org/api/url.html#url_class_urlsearchparams) from ['url module'](https://nodejs.org/api/url.html) as follows: - -```js -const url = require('url'); -const params = new url.URLSearchParams({ foo: 'bar' }); -axios.post('http://something.com/', params.toString()); -``` - -You can also use the [`qs`](https://github.com/ljharb/qs) library. - -###### NOTE -The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665). - -#### Form data - -In node.js, you can use the [`form-data`](https://github.com/form-data/form-data) library as follows: - -```js -const FormData = require('form-data'); - -const form = new FormData(); -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); - -axios.post('https://example.com', form, { headers: form.getHeaders() }) -``` - -Alternatively, use an interceptor: - -```js -axios.interceptors.request.use(config => { - if (config.data instanceof FormData) { - Object.assign(config.headers, config.data.getHeaders()); - } - return config; -}); -``` - -## Semver - -Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes. - -## Promises - -axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises). -If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise). - -## TypeScript -axios includes [TypeScript](http://typescriptlang.org) definitions. -```typescript -import axios from 'axios'; -axios.get('/user?ID=12345'); -``` - -## Resources - -* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) -* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md) -* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md) -* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md) -* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md) - -## Credits - -axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular. - -## License - -[MIT](LICENSE) diff --git a/reverse_engineering/node_modules/axios/UPGRADE_GUIDE.md b/reverse_engineering/node_modules/axios/UPGRADE_GUIDE.md deleted file mode 100644 index 745e804..0000000 --- a/reverse_engineering/node_modules/axios/UPGRADE_GUIDE.md +++ /dev/null @@ -1,162 +0,0 @@ -# Upgrade Guide - -### 0.15.x -> 0.16.0 - -#### `Promise` Type Declarations - -The `Promise` type declarations have been removed from the axios typings in favor of the built-in type declarations. If you use axios in a TypeScript project that targets `ES5`, please make sure to include the `es2015.promise` lib. Please see [this post](https://blog.mariusschulz.com/2016/11/25/typescript-2-0-built-in-type-declarations) for details. - -### 0.13.x -> 0.14.0 - -#### TypeScript Definitions - -The axios TypeScript definitions have been updated to match the axios API and use the ES2015 module syntax. - -Please use the following `import` statement to import axios in TypeScript: - -```typescript -import axios from 'axios'; - -axios.get('/foo') - .then(response => console.log(response)) - .catch(error => console.log(error)); -``` - -#### `agent` Config Option - -The `agent` config option has been replaced with two new options: `httpAgent` and `httpsAgent`. Please use them instead. - -```js -{ - // Define a custom agent for HTTP - httpAgent: new http.Agent({ keepAlive: true }), - // Define a custom agent for HTTPS - httpsAgent: new https.Agent({ keepAlive: true }) -} -``` - -#### `progress` Config Option - -The `progress` config option has been replaced with the `onUploadProgress` and `onDownloadProgress` options. - -```js -{ - // Define a handler for upload progress events - onUploadProgress: function (progressEvent) { - // ... - }, - - // Define a handler for download progress events - onDownloadProgress: function (progressEvent) { - // ... - } -} -``` - -### 0.12.x -> 0.13.0 - -The `0.13.0` release contains several changes to custom adapters and error handling. - -#### Error Handling - -Previous to this release an error could either be a server response with bad status code or an actual `Error`. With this release Promise will always reject with an `Error`. In the case that a response was received, the `Error` will also include the response. - -```js -axios.get('/user/12345') - .catch((error) => { - console.log(error.message); - console.log(error.code); // Not always specified - console.log(error.config); // The config that was used to make the request - console.log(error.response); // Only available if response was received from the server - }); -``` - -#### Request Adapters - -This release changes a few things about how request adapters work. Please take note if you are using your own custom adapter. - -1. Response transformer is now called outside of adapter. -2. Request adapter returns a `Promise`. - -This means that you no longer need to invoke `transformData` on response data. You will also no longer receive `resolve` and `reject` as arguments in your adapter. - -Previous code: - -```js -function myAdapter(resolve, reject, config) { - var response = { - data: transformData( - responseData, - responseHeaders, - config.transformResponse - ), - status: request.status, - statusText: request.statusText, - headers: responseHeaders - }; - settle(resolve, reject, response); -} -``` - -New code: - -```js -function myAdapter(config) { - return new Promise(function (resolve, reject) { - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders - }; - settle(resolve, reject, response); - }); -} -``` - -See the related commits for more details: -- [Response transformers](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e) -- [Request adapter Promise](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a) - -### 0.5.x -> 0.6.0 - -The `0.6.0` release contains mostly bug fixes, but there are a couple things to be aware of when upgrading. - -#### ES6 Promise Polyfill - -Up until the `0.6.0` release ES6 `Promise` was being polyfilled using [es6-promise](https://github.com/jakearchibald/es6-promise). With this release, the polyfill has been removed, and you will need to supply it yourself if your environment needs it. - -```js -require('es6-promise').polyfill(); -var axios = require('axios'); -``` - -This will polyfill the global environment, and only needs to be done once. - -#### `axios.success`/`axios.error` - -The `success`, and `error` aliases were deprecated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively. - -```js -axios.get('some/url') - .then(function (res) { - /* ... */ - }) - .catch(function (err) { - /* ... */ - }); -``` - -#### UMD - -Previous versions of axios shipped with an AMD, CommonJS, and Global build. This has all been rolled into a single UMD build. - -```js -// AMD -require(['bower_components/axios/dist/axios'], function (axios) { - /* ... */ -}); - -// CommonJS -var axios = require('axios/dist/axios'); -``` diff --git a/reverse_engineering/node_modules/axios/dist/axios.js b/reverse_engineering/node_modules/axios/dist/axios.js deleted file mode 100644 index 6dd94bd..0000000 --- a/reverse_engineering/node_modules/axios/dist/axios.js +++ /dev/null @@ -1,1756 +0,0 @@ -/* axios v0.21.1 | (c) 2020 by Matt Zabriskie */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["axios"] = factory(); - else - root["axios"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(1); - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var bind = __webpack_require__(3); - var Axios = __webpack_require__(4); - var mergeConfig = __webpack_require__(22); - var defaults = __webpack_require__(10); - - /** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ - function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - return instance; - } - - // Create the default instance to be exported - var axios = createInstance(defaults); - - // Expose Axios class to allow class inheritance - axios.Axios = Axios; - - // Factory for creating new instances - axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); - }; - - // Expose Cancel & CancelToken - axios.Cancel = __webpack_require__(23); - axios.CancelToken = __webpack_require__(24); - axios.isCancel = __webpack_require__(9); - - // Expose all/spread - axios.all = function all(promises) { - return Promise.all(promises); - }; - axios.spread = __webpack_require__(25); - - // Expose isAxiosError - axios.isAxiosError = __webpack_require__(26); - - module.exports = axios; - - // Allow use of default import syntax in TypeScript - module.exports.default = axios; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var bind = __webpack_require__(3); - - /*global toString:true*/ - - // utils is a library of generic helper functions non-specific to axios - - var toString = Object.prototype.toString; - - /** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ - function isArray(val) { - return toString.call(val) === '[object Array]'; - } - - /** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ - function isUndefined(val) { - return typeof val === 'undefined'; - } - - /** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ - function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); - } - - /** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ - function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; - } - - /** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ - function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); - } - - /** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ - function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; - } - - /** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ - function isString(val) { - return typeof val === 'string'; - } - - /** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ - function isNumber(val) { - return typeof val === 'number'; - } - - /** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ - function isObject(val) { - return val !== null && typeof val === 'object'; - } - - /** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ - function isPlainObject(val) { - if (toString.call(val) !== '[object Object]') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; - } - - /** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ - function isDate(val) { - return toString.call(val) === '[object Date]'; - } - - /** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ - function isFile(val) { - return toString.call(val) === '[object File]'; - } - - /** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ - function isBlob(val) { - return toString.call(val) === '[object Blob]'; - } - - /** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ - function isFunction(val) { - return toString.call(val) === '[object Function]'; - } - - /** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ - function isStream(val) { - return isObject(val) && isFunction(val.pipe); - } - - /** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ - function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; - } - - /** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ - function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); - } - - /** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ - function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); - } - - /** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ - function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } - } - - /** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ - function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; - } - - /** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ - function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; - } - - /** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ - function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; - } - - module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - 'use strict'; - - module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var buildURL = __webpack_require__(5); - var InterceptorManager = __webpack_require__(6); - var dispatchRequest = __webpack_require__(7); - var mergeConfig = __webpack_require__(22); - - /** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ - function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; - } - - /** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ - Axios.prototype.request = function request(config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; - } - - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } - - // Hook up interceptors middleware - var chain = [dispatchRequest, undefined]; - var promise = Promise.resolve(config); - - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - chain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - chain.push(interceptor.fulfilled, interceptor.rejected); - }); - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; - }; - - Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); - }; - - // Provide aliases for supported request methods - utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; - }); - - utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: data - })); - }; - }); - - module.exports = Axios; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); - } - - /** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ - module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; - }; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - function InterceptorManager() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; - }; - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ - InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - }; - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ - InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - }; - - module.exports = InterceptorManager; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var transformData = __webpack_require__(8); - var isCancel = __webpack_require__(9); - var defaults = __webpack_require__(10); - - /** - * Throws a `Cancel` if cancellation has been requested. - */ - function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - } - - /** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ - module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); - }; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - /** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ - module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); - }); - - return data; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - 'use strict'; - - module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var normalizeHeaderName = __webpack_require__(11); - - var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' - }; - - function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } - } - - function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__(12); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = __webpack_require__(12); - } - return adapter; - } - - var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } - }; - - defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } - }; - - utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; - }); - - utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); - }); - - module.exports = defaults; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); - }; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var settle = __webpack_require__(13); - var cookies = __webpack_require__(16); - var buildURL = __webpack_require__(5); - var buildFullPath = __webpack_require__(17); - var parseHeaders = __webpack_require__(20); - var isURLSameOrigin = __webpack_require__(21); - var createError = __webpack_require__(14); - - module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - var fullPath = buildFullPath(config.baseURL, config.url); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (!requestData) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); - }; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var createError = __webpack_require__(14); - - /** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ - module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } - }; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var enhanceError = __webpack_require__(15); - - /** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ - module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); - }; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ - module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; - return error; - }; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() - ); - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var isAbsoluteURL = __webpack_require__(18); - var combineURLs = __webpack_require__(19); - - /** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ - module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; - }; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ - module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); - }; - - -/***/ }), -/* 19 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ - module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; - }; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - // Headers whose duplicates are ignored by node - // c.f. https://nodejs.org/api/http.html#http_message_headers - var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' - ]; - - /** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ - module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; - }; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() - ); - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - /** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ - module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - var valueFromConfig2Keys = ['url', 'method', 'data']; - var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; - var defaultToConfig2Keys = [ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', - 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', - 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' - ]; - var directMergeKeys = ['validateStatus']; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - } - - utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } - }); - - utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); - - utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - utils.forEach(directMergeKeys, function merge(prop) { - if (prop in config2) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - var axiosKeys = valueFromConfig2Keys - .concat(mergeDeepPropertiesKeys) - .concat(defaultToConfig2Keys) - .concat(directMergeKeys); - - var otherKeys = Object - .keys(config1) - .concat(Object.keys(config2)) - .filter(function filterAxiosKeys(key) { - return axiosKeys.indexOf(key) === -1; - }); - - utils.forEach(otherKeys, mergeDeepProperties); - - return config; - }; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ - function Cancel(message) { - this.message = message; - } - - Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); - }; - - Cancel.prototype.__CANCEL__ = true; - - module.exports = Cancel; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var Cancel = __webpack_require__(23); - - /** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ - function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `Cancel` if cancellation has been requested. - */ - CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } - }; - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; - }; - - module.exports = CancelToken; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ - module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; - }; - - -/***/ }), -/* 26 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ - module.exports = function isAxiosError(payload) { - return (typeof payload === 'object') && (payload.isAxiosError === true); - }; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=axios.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/axios/dist/axios.map b/reverse_engineering/node_modules/axios/dist/axios.map deleted file mode 100644 index 6d61f7e..0000000 --- a/reverse_engineering/node_modules/axios/dist/axios.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 0ad9e9f79033ec4fb28f","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js","webpack:///./lib/helpers/isAxiosError.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,yC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACvDA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,6BAA4B;AAC5B,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9VA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,0BAAyB;AACzB,MAAK;AACL;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;;;;;;;AC9FA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACrEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;;;;;;AC9EA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;;;;;;ACjGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;;;;;;AClLA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzCA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA0C;AAC1C,UAAS;;AAET;AACA,6DAA4D,wBAAwB;AACpF;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,mCAAkC;AAClC,gCAA+B,aAAa,EAAE;AAC9C;AACA;AACA,MAAK;AACL;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpDA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,4BAA2B;AAC3B,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;;;;;;ACtFA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1BA;;AAEA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0ad9e9f79033ec4fb28f","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 18\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAxiosError.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/reverse_engineering/node_modules/axios/dist/axios.min.js b/reverse_engineering/node_modules/axios/dist/axios.min.js deleted file mode 100644 index fc6c8b6..0000000 --- a/reverse_engineering/node_modules/axios/dist/axios.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* axios v0.21.1 | (c) 2020 by Matt Zabriskie */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(4),a=n(22),u=n(10),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(25),c.isAxiosError=n(26),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"undefined"==typeof e}function s(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"[object ArrayBuffer]"===R.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function c(e){return"string"==typeof e}function f(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){if("[object Object]"!==R.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Date]"===R.call(e)}function h(e){return"[object File]"===R.call(e)}function m(e){return"[object Blob]"===R.call(e)}function y(e){return"[object Function]"===R.call(e)}function g(e){return p(e)&&y(e.pipe)}function v(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function x(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(13),s=n(16),i=n(5),a=n(17),u=n(20),c=n(21),f=n(14);e.exports=function(e){return new Promise(function(t,n){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var y=a(e.baseURL,e.url);if(l.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,s=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:s,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};o(t,n,i),l=null}},l.onabort=function(){l&&(n(f("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){n(f("Network Error",e,null,l)),l=null},l.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(f(t,e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),n(e),l=null)}),p||(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(18),o=n(19);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){function n(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(e[o],t[o])}t=t||{};var s={},i=["url","method","data"],a=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];r.forEach(i,function(e){r.isUndefined(t[e])||(s[e]=n(void 0,t[e]))}),r.forEach(a,o),r.forEach(u,function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(void 0,t[o])}),r.forEach(c,function(r){r in t?s[r]=n(e[r],t[r]):r in e&&(s[r]=n(void 0,e[r]))});var f=i.concat(a).concat(u).concat(c),p=Object.keys(e).concat(Object.keys(t)).filter(function(e){return f.indexOf(e)===-1});return r.forEach(p,o),s}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&e.isAxiosError===!0}}])}); -//# sourceMappingURL=axios.min.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/axios/dist/axios.min.map b/reverse_engineering/node_modules/axios/dist/axios.min.map deleted file mode 100644 index a897631..0000000 --- a/reverse_engineering/node_modules/axios/dist/axios.min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///axios.min.js","webpack:///webpack/bootstrap 081842adca0968bb3270","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js","webpack:///./lib/helpers/isAxiosError.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createInstance","defaultConfig","context","Axios","instance","bind","prototype","request","utils","extend","mergeConfig","defaults","axios","create","instanceConfig","Cancel","CancelToken","isCancel","all","promises","Promise","spread","isAxiosError","default","isArray","val","toString","isUndefined","isBuffer","constructor","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isObject","isPlainObject","Object","getPrototypeOf","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","document","forEach","obj","fn","i","l","length","key","hasOwnProperty","merge","assignValue","slice","arguments","a","b","thisArg","stripBOM","content","charCodeAt","args","Array","apply","interceptors","InterceptorManager","response","buildURL","dispatchRequest","config","url","method","toLowerCase","chain","undefined","promise","resolve","interceptor","unshift","fulfilled","rejected","push","then","shift","getUri","params","paramsSerializer","data","encode","encodeURIComponent","serializedParams","parts","v","toISOString","JSON","stringify","join","hashmarkIndex","indexOf","handlers","use","eject","h","throwIfCancellationRequested","cancelToken","throwIfRequested","transformData","headers","transformRequest","common","adapter","transformResponse","reason","reject","fns","value","__CANCEL__","setContentTypeIfUnset","getDefaultAdapter","XMLHttpRequest","process","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","status","Accept","normalizedName","name","toUpperCase","settle","cookies","buildFullPath","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","auth","username","password","unescape","Authorization","btoa","fullPath","baseURL","open","onreadystatechange","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onabort","onerror","ontimeout","timeoutErrorMessage","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","send","enhanceError","message","code","error","Error","toJSON","description","number","fileName","lineNumber","columnNumber","stack","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","isAbsoluteURL","combineURLs","requestedURL","test","relativeURL","ignoreDuplicateOf","parsed","split","line","substr","concat","resolveURL","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","originURL","userAgent","createElement","location","requestURL","config1","config2","getMergedValue","target","source","mergeDeepProperties","prop","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","axiosKeys","otherKeys","keys","filter","executor","TypeError","resolvePromise","token","callback","arr","payload"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,MAAAD,IAEAD,EAAA,MAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEtDjCL,EAAAD,QAAAM,EAAA,IF4DM,SAAUL,EAAQD,EAASM,GG5DjC,YAcA,SAAAS,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AAQD,EAASM,G0BvmDjC,YAUA,SAAAyB,GAAAwP,GACA,qBAAAA,GACA,SAAAC,WAAA,+BAGA,IAAAC,EACArR,MAAAuG,QAAA,GAAAxE,SAAA,SAAAyE,GACA6K,EAAA7K,GAGA,IAAA8K,GAAAtR,IACAmR,GAAA,SAAApE,GACAuE,EAAA1I,SAKA0I,EAAA1I,OAAA,GAAAlH,GAAAqL,GACAsE,EAAAC,EAAA1I,WA1BA,GAAAlH,GAAAxB,EAAA,GAiCAyB,GAAAV,UAAAoH,iBAAA,WACA,GAAArI,KAAA4I,OACA,KAAA5I,MAAA4I,QAQAjH,EAAA6O,OAAA,WACA,GAAA7D,GACA2E,EAAA,GAAA3P,GAAA,SAAAlB,GACAkM,EAAAlM,GAEA,QACA6Q,QACA3E,WAIA9M,EAAAD,QAAA+B,G1B8mDM,SAAU9B,EAAQD,G2BtqDxB,YAsBAC,GAAAD,QAAA,SAAA2R,GACA,gBAAAC,GACA,MAAAD,GAAA5L,MAAA,KAAA6L,M3B+qDM,SAAU3R,EAAQD,G4BvsDxB,YAQAC,GAAAD,QAAA,SAAA6R,GACA,sBAAAA,MAAAxP,gBAAA","file":"axios.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar bind = __webpack_require__(3);\n\tvar Axios = __webpack_require__(4);\n\tvar mergeConfig = __webpack_require__(22);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Create an instance of Axios\n\t *\n\t * @param {Object} defaultConfig The default config for the instance\n\t * @return {Axios} A new instance of Axios\n\t */\n\tfunction createInstance(defaultConfig) {\n\t var context = new Axios(defaultConfig);\n\t var instance = bind(Axios.prototype.request, context);\n\t\n\t // Copy axios.prototype to instance\n\t utils.extend(instance, Axios.prototype, context);\n\t\n\t // Copy context to instance\n\t utils.extend(instance, context);\n\t\n\t return instance;\n\t}\n\t\n\t// Create the default instance to be exported\n\tvar axios = createInstance(defaults);\n\t\n\t// Expose Axios class to allow class inheritance\n\taxios.Axios = Axios;\n\t\n\t// Factory for creating new instances\n\taxios.create = function create(instanceConfig) {\n\t return createInstance(mergeConfig(axios.defaults, instanceConfig));\n\t};\n\t\n\t// Expose Cancel & CancelToken\n\taxios.Cancel = __webpack_require__(23);\n\taxios.CancelToken = __webpack_require__(24);\n\taxios.isCancel = __webpack_require__(9);\n\t\n\t// Expose all/spread\n\taxios.all = function all(promises) {\n\t return Promise.all(promises);\n\t};\n\taxios.spread = __webpack_require__(25);\n\t\n\t// Expose isAxiosError\n\taxios.isAxiosError = __webpack_require__(26);\n\t\n\tmodule.exports = axios;\n\t\n\t// Allow use of default import syntax in TypeScript\n\tmodule.exports.default = axios;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bind = __webpack_require__(3);\n\t\n\t/*global toString:true*/\n\t\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is undefined\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if the value is undefined, otherwise false\n\t */\n\tfunction isUndefined(val) {\n\t return typeof val === 'undefined';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Buffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Buffer, otherwise false\n\t */\n\tfunction isBuffer(val) {\n\t return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n\t && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n\t}\n\t\n\t/**\n\t * Determine if a value is an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBuffer(val) {\n\t return toString.call(val) === '[object ArrayBuffer]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a FormData\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an FormData, otherwise false\n\t */\n\tfunction isFormData(val) {\n\t return (typeof FormData !== 'undefined') && (val instanceof FormData);\n\t}\n\t\n\t/**\n\t * Determine if a value is a view on an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBufferView(val) {\n\t var result;\n\t if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n\t result = ArrayBuffer.isView(val);\n\t } else {\n\t result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a plain Object\n\t *\n\t * @param {Object} val The value to test\n\t * @return {boolean} True if value is a plain Object, otherwise false\n\t */\n\tfunction isPlainObject(val) {\n\t if (toString.call(val) !== '[object Object]') {\n\t return false;\n\t }\n\t\n\t var prototype = Object.getPrototypeOf(val);\n\t return prototype === null || prototype === Object.prototype;\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Function\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Function, otherwise false\n\t */\n\tfunction isFunction(val) {\n\t return toString.call(val) === '[object Function]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Stream\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Stream, otherwise false\n\t */\n\tfunction isStream(val) {\n\t return isObject(val) && isFunction(val.pipe);\n\t}\n\t\n\t/**\n\t * Determine if a value is a URLSearchParams object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n\t */\n\tfunction isURLSearchParams(val) {\n\t return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Determine if we're running in a standard browser environment\n\t *\n\t * This allows axios to run in a web worker, and react-native.\n\t * Both environments support XMLHttpRequest, but not fully standard globals.\n\t *\n\t * web workers:\n\t * typeof window -> undefined\n\t * typeof document -> undefined\n\t *\n\t * react-native:\n\t * navigator.product -> 'ReactNative'\n\t * nativescript\n\t * navigator.product -> 'NativeScript' or 'NS'\n\t */\n\tfunction isStandardBrowserEnv() {\n\t if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n\t navigator.product === 'NativeScript' ||\n\t navigator.product === 'NS')) {\n\t return false;\n\t }\n\t return (\n\t typeof window !== 'undefined' &&\n\t typeof document !== 'undefined'\n\t );\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object') {\n\t /*eslint no-param-reassign:0*/\n\t obj = [obj];\n\t }\n\t\n\t if (isArray(obj)) {\n\t // Iterate over array values\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t fn.call(null, obj[i], i, obj);\n\t }\n\t } else {\n\t // Iterate over object keys\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t fn.call(null, obj[key], key, obj);\n\t }\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Accepts varargs expecting each argument to be an object, then\n\t * immutably merges the properties of each object and returns result.\n\t *\n\t * When multiple objects contain the same key the later object in\n\t * the arguments list will take precedence.\n\t *\n\t * Example:\n\t *\n\t * ```js\n\t * var result = merge({foo: 123}, {foo: 456});\n\t * console.log(result.foo); // outputs 456\n\t * ```\n\t *\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction merge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (isPlainObject(result[key]) && isPlainObject(val)) {\n\t result[key] = merge(result[key], val);\n\t } else if (isPlainObject(val)) {\n\t result[key] = merge({}, val);\n\t } else if (isArray(val)) {\n\t result[key] = val.slice();\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Extends object a by mutably adding to it the properties of object b.\n\t *\n\t * @param {Object} a The object to be extended\n\t * @param {Object} b The object to copy properties from\n\t * @param {Object} thisArg The object to bind function to\n\t * @return {Object} The resulting value of object a\n\t */\n\tfunction extend(a, b, thisArg) {\n\t forEach(b, function assignValue(val, key) {\n\t if (thisArg && typeof val === 'function') {\n\t a[key] = bind(val, thisArg);\n\t } else {\n\t a[key] = val;\n\t }\n\t });\n\t return a;\n\t}\n\t\n\t/**\n\t * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n\t *\n\t * @param {string} content with BOM\n\t * @return {string} content value without BOM\n\t */\n\tfunction stripBOM(content) {\n\t if (content.charCodeAt(0) === 0xFEFF) {\n\t content = content.slice(1);\n\t }\n\t return content;\n\t}\n\t\n\tmodule.exports = {\n\t isArray: isArray,\n\t isArrayBuffer: isArrayBuffer,\n\t isBuffer: isBuffer,\n\t isFormData: isFormData,\n\t isArrayBufferView: isArrayBufferView,\n\t isString: isString,\n\t isNumber: isNumber,\n\t isObject: isObject,\n\t isPlainObject: isPlainObject,\n\t isUndefined: isUndefined,\n\t isDate: isDate,\n\t isFile: isFile,\n\t isBlob: isBlob,\n\t isFunction: isFunction,\n\t isStream: isStream,\n\t isURLSearchParams: isURLSearchParams,\n\t isStandardBrowserEnv: isStandardBrowserEnv,\n\t forEach: forEach,\n\t merge: merge,\n\t extend: extend,\n\t trim: trim,\n\t stripBOM: stripBOM\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function bind(fn, thisArg) {\n\t return function wrap() {\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t return fn.apply(thisArg, args);\n\t };\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar buildURL = __webpack_require__(5);\n\tvar InterceptorManager = __webpack_require__(6);\n\tvar dispatchRequest = __webpack_require__(7);\n\tvar mergeConfig = __webpack_require__(22);\n\t\n\t/**\n\t * Create a new instance of Axios\n\t *\n\t * @param {Object} instanceConfig The default config for the instance\n\t */\n\tfunction Axios(instanceConfig) {\n\t this.defaults = instanceConfig;\n\t this.interceptors = {\n\t request: new InterceptorManager(),\n\t response: new InterceptorManager()\n\t };\n\t}\n\t\n\t/**\n\t * Dispatch a request\n\t *\n\t * @param {Object} config The config specific for this request (merged with this.defaults)\n\t */\n\tAxios.prototype.request = function request(config) {\n\t /*eslint no-param-reassign:0*/\n\t // Allow for axios('example/url'[, config]) a la fetch API\n\t if (typeof config === 'string') {\n\t config = arguments[1] || {};\n\t config.url = arguments[0];\n\t } else {\n\t config = config || {};\n\t }\n\t\n\t config = mergeConfig(this.defaults, config);\n\t\n\t // Set config.method\n\t if (config.method) {\n\t config.method = config.method.toLowerCase();\n\t } else if (this.defaults.method) {\n\t config.method = this.defaults.method.toLowerCase();\n\t } else {\n\t config.method = 'get';\n\t }\n\t\n\t // Hook up interceptors middleware\n\t var chain = [dispatchRequest, undefined];\n\t var promise = Promise.resolve(config);\n\t\n\t this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n\t chain.unshift(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n\t chain.push(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t while (chain.length) {\n\t promise = promise.then(chain.shift(), chain.shift());\n\t }\n\t\n\t return promise;\n\t};\n\t\n\tAxios.prototype.getUri = function getUri(config) {\n\t config = mergeConfig(this.defaults, config);\n\t return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n\t};\n\t\n\t// Provide aliases for supported request methods\n\tutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, config) {\n\t return this.request(mergeConfig(config || {}, {\n\t method: method,\n\t url: url,\n\t data: (config || {}).data\n\t }));\n\t };\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, data, config) {\n\t return this.request(mergeConfig(config || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t});\n\t\n\tmodule.exports = Axios;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+').\n\t replace(/%5B/gi, '[').\n\t replace(/%5D/gi, ']');\n\t}\n\t\n\t/**\n\t * Build a URL by appending params to the end\n\t *\n\t * @param {string} url The base of the url (e.g., http://www.google.com)\n\t * @param {object} [params] The params to be appended\n\t * @returns {string} The formatted url\n\t */\n\tmodule.exports = function buildURL(url, params, paramsSerializer) {\n\t /*eslint no-param-reassign:0*/\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var serializedParams;\n\t if (paramsSerializer) {\n\t serializedParams = paramsSerializer(params);\n\t } else if (utils.isURLSearchParams(params)) {\n\t serializedParams = params.toString();\n\t } else {\n\t var parts = [];\n\t\n\t utils.forEach(params, function serialize(val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t\n\t if (utils.isArray(val)) {\n\t key = key + '[]';\n\t } else {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function parseValue(v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t } else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t serializedParams = parts.join('&');\n\t }\n\t\n\t if (serializedParams) {\n\t var hashmarkIndex = url.indexOf('#');\n\t if (hashmarkIndex !== -1) {\n\t url = url.slice(0, hashmarkIndex);\n\t }\n\t\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n\t }\n\t\n\t return url;\n\t};\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction InterceptorManager() {\n\t this.handlers = [];\n\t}\n\t\n\t/**\n\t * Add a new interceptor to the stack\n\t *\n\t * @param {Function} fulfilled The function to handle `then` for a `Promise`\n\t * @param {Function} rejected The function to handle `reject` for a `Promise`\n\t *\n\t * @return {Number} An ID used to remove interceptor later\n\t */\n\tInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n\t this.handlers.push({\n\t fulfilled: fulfilled,\n\t rejected: rejected\n\t });\n\t return this.handlers.length - 1;\n\t};\n\t\n\t/**\n\t * Remove an interceptor from the stack\n\t *\n\t * @param {Number} id The ID that was returned by `use`\n\t */\n\tInterceptorManager.prototype.eject = function eject(id) {\n\t if (this.handlers[id]) {\n\t this.handlers[id] = null;\n\t }\n\t};\n\t\n\t/**\n\t * Iterate over all the registered interceptors\n\t *\n\t * This method is particularly useful for skipping over any\n\t * interceptors that may have become `null` calling `eject`.\n\t *\n\t * @param {Function} fn The function to call for each interceptor\n\t */\n\tInterceptorManager.prototype.forEach = function forEach(fn) {\n\t utils.forEach(this.handlers, function forEachHandler(h) {\n\t if (h !== null) {\n\t fn(h);\n\t }\n\t });\n\t};\n\t\n\tmodule.exports = InterceptorManager;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar transformData = __webpack_require__(8);\n\tvar isCancel = __webpack_require__(9);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tfunction throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}\n\t\n\t/**\n\t * Dispatch a request to the server using the configured adapter.\n\t *\n\t * @param {object} config The config that is to be used for the request\n\t * @returns {Promise} The Promise to be fulfilled\n\t */\n\tmodule.exports = function dispatchRequest(config) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Ensure headers exist\n\t config.headers = config.headers || {};\n\t\n\t // Transform request data\n\t config.data = transformData(\n\t config.data,\n\t config.headers,\n\t config.transformRequest\n\t );\n\t\n\t // Flatten headers\n\t config.headers = utils.merge(\n\t config.headers.common || {},\n\t config.headers[config.method] || {},\n\t config.headers\n\t );\n\t\n\t utils.forEach(\n\t ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n\t function cleanHeaderConfig(method) {\n\t delete config.headers[method];\n\t }\n\t );\n\t\n\t var adapter = config.adapter || defaults.adapter;\n\t\n\t return adapter(config).then(function onAdapterResolution(response) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t response.data = transformData(\n\t response.data,\n\t response.headers,\n\t config.transformResponse\n\t );\n\t\n\t return response;\n\t }, function onAdapterRejection(reason) {\n\t if (!isCancel(reason)) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t if (reason && reason.response) {\n\t reason.response.data = transformData(\n\t reason.response.data,\n\t reason.response.headers,\n\t config.transformResponse\n\t );\n\t }\n\t }\n\t\n\t return Promise.reject(reason);\n\t });\n\t};\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t /*eslint no-param-reassign:0*/\n\t utils.forEach(fns, function transform(fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function isCancel(value) {\n\t return !!(value && value.__CANCEL__);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar normalizeHeaderName = __webpack_require__(11);\n\t\n\tvar DEFAULT_CONTENT_TYPE = {\n\t 'Content-Type': 'application/x-www-form-urlencoded'\n\t};\n\t\n\tfunction setContentTypeIfUnset(headers, value) {\n\t if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n\t headers['Content-Type'] = value;\n\t }\n\t}\n\t\n\tfunction getDefaultAdapter() {\n\t var adapter;\n\t if (typeof XMLHttpRequest !== 'undefined') {\n\t // For browsers use XHR adapter\n\t adapter = __webpack_require__(12);\n\t } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n\t // For node use HTTP adapter\n\t adapter = __webpack_require__(12);\n\t }\n\t return adapter;\n\t}\n\t\n\tvar defaults = {\n\t adapter: getDefaultAdapter(),\n\t\n\t transformRequest: [function transformRequest(data, headers) {\n\t normalizeHeaderName(headers, 'Accept');\n\t normalizeHeaderName(headers, 'Content-Type');\n\t if (utils.isFormData(data) ||\n\t utils.isArrayBuffer(data) ||\n\t utils.isBuffer(data) ||\n\t utils.isStream(data) ||\n\t utils.isFile(data) ||\n\t utils.isBlob(data)\n\t ) {\n\t return data;\n\t }\n\t if (utils.isArrayBufferView(data)) {\n\t return data.buffer;\n\t }\n\t if (utils.isURLSearchParams(data)) {\n\t setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n\t return data.toString();\n\t }\n\t if (utils.isObject(data)) {\n\t setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n\t return JSON.stringify(data);\n\t }\n\t return data;\n\t }],\n\t\n\t transformResponse: [function transformResponse(data) {\n\t /*eslint no-param-reassign:0*/\n\t if (typeof data === 'string') {\n\t try {\n\t data = JSON.parse(data);\n\t } catch (e) { /* Ignore */ }\n\t }\n\t return data;\n\t }],\n\t\n\t /**\n\t * A timeout in milliseconds to abort a request. If set to 0 (default) a\n\t * timeout is not created.\n\t */\n\t timeout: 0,\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN',\n\t\n\t maxContentLength: -1,\n\t maxBodyLength: -1,\n\t\n\t validateStatus: function validateStatus(status) {\n\t return status >= 200 && status < 300;\n\t }\n\t};\n\t\n\tdefaults.headers = {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t }\n\t};\n\t\n\tutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n\t defaults.headers[method] = {};\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n\t});\n\t\n\tmodule.exports = defaults;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n\t utils.forEach(headers, function processHeader(value, name) {\n\t if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n\t headers[normalizedName] = value;\n\t delete headers[name];\n\t }\n\t });\n\t};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar settle = __webpack_require__(13);\n\tvar cookies = __webpack_require__(16);\n\tvar buildURL = __webpack_require__(5);\n\tvar buildFullPath = __webpack_require__(17);\n\tvar parseHeaders = __webpack_require__(20);\n\tvar isURLSameOrigin = __webpack_require__(21);\n\tvar createError = __webpack_require__(14);\n\t\n\tmodule.exports = function xhrAdapter(config) {\n\t return new Promise(function dispatchXhrRequest(resolve, reject) {\n\t var requestData = config.data;\n\t var requestHeaders = config.headers;\n\t\n\t if (utils.isFormData(requestData)) {\n\t delete requestHeaders['Content-Type']; // Let the browser set it\n\t }\n\t\n\t var request = new XMLHttpRequest();\n\t\n\t // HTTP basic authentication\n\t if (config.auth) {\n\t var username = config.auth.username || '';\n\t var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n\t requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n\t }\n\t\n\t var fullPath = buildFullPath(config.baseURL, config.url);\n\t request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\t\n\t // Set the request timeout in MS\n\t request.timeout = config.timeout;\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function handleLoad() {\n\t if (!request || request.readyState !== 4) {\n\t return;\n\t }\n\t\n\t // The request errored out and we didn't get a response, this will be\n\t // handled by onerror instead\n\t // With one exception: request that using file: protocol, most browsers\n\t // will return status as 0 even though it's a successful request\n\t if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n\t return;\n\t }\n\t\n\t // Prepare the response\n\t var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n\t var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n\t var response = {\n\t data: responseData,\n\t status: request.status,\n\t statusText: request.statusText,\n\t headers: responseHeaders,\n\t config: config,\n\t request: request\n\t };\n\t\n\t settle(resolve, reject, response);\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle browser request cancellation (as opposed to a manual cancellation)\n\t request.onabort = function handleAbort() {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle low level network errors\n\t request.onerror = function handleError() {\n\t // Real errors are hidden from us by the browser\n\t // onerror should only fire if it's a network error\n\t reject(createError('Network Error', config, null, request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle timeout\n\t request.ontimeout = function handleTimeout() {\n\t var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n\t if (config.timeoutErrorMessage) {\n\t timeoutErrorMessage = config.timeoutErrorMessage;\n\t }\n\t reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n\t request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Add xsrf header\n\t // This is only done if running in a standard browser environment.\n\t // Specifically not if we're in a web worker, or react-native.\n\t if (utils.isStandardBrowserEnv()) {\n\t // Add xsrf header\n\t var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n\t cookies.read(config.xsrfCookieName) :\n\t undefined;\n\t\n\t if (xsrfValue) {\n\t requestHeaders[config.xsrfHeaderName] = xsrfValue;\n\t }\n\t }\n\t\n\t // Add headers to the request\n\t if ('setRequestHeader' in request) {\n\t utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n\t if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n\t // Remove Content-Type if data is undefined\n\t delete requestHeaders[key];\n\t } else {\n\t // Otherwise add header to the request\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t }\n\t\n\t // Add withCredentials to request if needed\n\t if (!utils.isUndefined(config.withCredentials)) {\n\t request.withCredentials = !!config.withCredentials;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (config.responseType) {\n\t try {\n\t request.responseType = config.responseType;\n\t } catch (e) {\n\t // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n\t // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n\t if (config.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Handle progress if needed\n\t if (typeof config.onDownloadProgress === 'function') {\n\t request.addEventListener('progress', config.onDownloadProgress);\n\t }\n\t\n\t // Not all browsers support upload events\n\t if (typeof config.onUploadProgress === 'function' && request.upload) {\n\t request.upload.addEventListener('progress', config.onUploadProgress);\n\t }\n\t\n\t if (config.cancelToken) {\n\t // Handle cancellation\n\t config.cancelToken.promise.then(function onCanceled(cancel) {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t request.abort();\n\t reject(cancel);\n\t // Clean up request\n\t request = null;\n\t });\n\t }\n\t\n\t if (!requestData) {\n\t requestData = null;\n\t }\n\t\n\t // Send the request\n\t request.send(requestData);\n\t });\n\t};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar createError = __webpack_require__(14);\n\t\n\t/**\n\t * Resolve or reject a Promise based on response status.\n\t *\n\t * @param {Function} resolve A function that resolves the promise.\n\t * @param {Function} reject A function that rejects the promise.\n\t * @param {object} response The response.\n\t */\n\tmodule.exports = function settle(resolve, reject, response) {\n\t var validateStatus = response.config.validateStatus;\n\t if (!response.status || !validateStatus || validateStatus(response.status)) {\n\t resolve(response);\n\t } else {\n\t reject(createError(\n\t 'Request failed with status code ' + response.status,\n\t response.config,\n\t null,\n\t response.request,\n\t response\n\t ));\n\t }\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar enhanceError = __webpack_require__(15);\n\t\n\t/**\n\t * Create an Error with the specified message, config, error code, request and response.\n\t *\n\t * @param {string} message The error message.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The created error.\n\t */\n\tmodule.exports = function createError(message, config, code, request, response) {\n\t var error = new Error(message);\n\t return enhanceError(error, config, code, request, response);\n\t};\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Update an Error with the specified config, error code, and response.\n\t *\n\t * @param {Error} error The error to update.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The error.\n\t */\n\tmodule.exports = function enhanceError(error, config, code, request, response) {\n\t error.config = config;\n\t if (code) {\n\t error.code = code;\n\t }\n\t\n\t error.request = request;\n\t error.response = response;\n\t error.isAxiosError = true;\n\t\n\t error.toJSON = function toJSON() {\n\t return {\n\t // Standard\n\t message: this.message,\n\t name: this.name,\n\t // Microsoft\n\t description: this.description,\n\t number: this.number,\n\t // Mozilla\n\t fileName: this.fileName,\n\t lineNumber: this.lineNumber,\n\t columnNumber: this.columnNumber,\n\t stack: this.stack,\n\t // Axios\n\t config: this.config,\n\t code: this.code\n\t };\n\t };\n\t return error;\n\t};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs support document.cookie\n\t (function standardBrowserEnv() {\n\t return {\n\t write: function write(name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(expires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function read(name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function remove(name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t };\n\t })() :\n\t\n\t // Non standard browser env (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return {\n\t write: function write() {},\n\t read: function read() { return null; },\n\t remove: function remove() {}\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar isAbsoluteURL = __webpack_require__(18);\n\tvar combineURLs = __webpack_require__(19);\n\t\n\t/**\n\t * Creates a new URL by combining the baseURL with the requestedURL,\n\t * only when the requestedURL is not already an absolute URL.\n\t * If the requestURL is absolute, this function returns the requestedURL untouched.\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} requestedURL Absolute or relative URL to combine\n\t * @returns {string} The combined full path\n\t */\n\tmodule.exports = function buildFullPath(baseURL, requestedURL) {\n\t if (baseURL && !isAbsoluteURL(requestedURL)) {\n\t return combineURLs(baseURL, requestedURL);\n\t }\n\t return requestedURL;\n\t};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the specified URL is absolute\n\t *\n\t * @param {string} url The URL to test\n\t * @returns {boolean} True if the specified URL is absolute, otherwise false\n\t */\n\tmodule.exports = function isAbsoluteURL(url) {\n\t // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n\t // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n\t // by any combination of letters, digits, plus, period, or hyphen.\n\t return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n\t};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Creates a new URL by combining the specified URLs\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} relativeURL The relative URL\n\t * @returns {string} The combined URL\n\t */\n\tmodule.exports = function combineURLs(baseURL, relativeURL) {\n\t return relativeURL\n\t ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n\t : baseURL;\n\t};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t// Headers whose duplicates are ignored by node\n\t// c.f. https://nodejs.org/api/http.html#http_message_headers\n\tvar ignoreDuplicateOf = [\n\t 'age', 'authorization', 'content-length', 'content-type', 'etag',\n\t 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n\t 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n\t 'referer', 'retry-after', 'user-agent'\n\t];\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {};\n\t var key;\n\t var val;\n\t var i;\n\t\n\t if (!headers) { return parsed; }\n\t\n\t utils.forEach(headers.split('\\n'), function parser(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n\t return;\n\t }\n\t if (key === 'set-cookie') {\n\t parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n\t } else {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs have full support of the APIs needed to test\n\t // whether the request URL is of the same origin as current location.\n\t (function standardBrowserEnv() {\n\t var msie = /(msie|trident)/i.test(navigator.userAgent);\n\t var urlParsingNode = document.createElement('a');\n\t var originURL;\n\t\n\t /**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\t function resolveURL(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n\t urlParsingNode.pathname :\n\t '/' + urlParsingNode.pathname\n\t };\n\t }\n\t\n\t originURL = resolveURL(window.location.href);\n\t\n\t /**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestURL The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\t return function isURLSameOrigin(requestURL) {\n\t var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n\t return (parsed.protocol === originURL.protocol &&\n\t parsed.host === originURL.host);\n\t };\n\t })() :\n\t\n\t // Non standard browser envs (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return function isURLSameOrigin() {\n\t return true;\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Config-specific merge-function which creates a new config-object\n\t * by merging two configuration objects together.\n\t *\n\t * @param {Object} config1\n\t * @param {Object} config2\n\t * @returns {Object} New object resulting from merging config2 to config1\n\t */\n\tmodule.exports = function mergeConfig(config1, config2) {\n\t // eslint-disable-next-line no-param-reassign\n\t config2 = config2 || {};\n\t var config = {};\n\t\n\t var valueFromConfig2Keys = ['url', 'method', 'data'];\n\t var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n\t var defaultToConfig2Keys = [\n\t 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n\t 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n\t 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n\t 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n\t 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n\t ];\n\t var directMergeKeys = ['validateStatus'];\n\t\n\t function getMergedValue(target, source) {\n\t if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n\t return utils.merge(target, source);\n\t } else if (utils.isPlainObject(source)) {\n\t return utils.merge({}, source);\n\t } else if (utils.isArray(source)) {\n\t return source.slice();\n\t }\n\t return source;\n\t }\n\t\n\t function mergeDeepProperties(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(config1[prop], config2[prop]);\n\t } else if (!utils.isUndefined(config1[prop])) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t }\n\t\n\t utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(undefined, config2[prop]);\n\t }\n\t });\n\t\n\t utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\t\n\t utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(undefined, config2[prop]);\n\t } else if (!utils.isUndefined(config1[prop])) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t });\n\t\n\t utils.forEach(directMergeKeys, function merge(prop) {\n\t if (prop in config2) {\n\t config[prop] = getMergedValue(config1[prop], config2[prop]);\n\t } else if (prop in config1) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t });\n\t\n\t var axiosKeys = valueFromConfig2Keys\n\t .concat(mergeDeepPropertiesKeys)\n\t .concat(defaultToConfig2Keys)\n\t .concat(directMergeKeys);\n\t\n\t var otherKeys = Object\n\t .keys(config1)\n\t .concat(Object.keys(config2))\n\t .filter(function filterAxiosKeys(key) {\n\t return axiosKeys.indexOf(key) === -1;\n\t });\n\t\n\t utils.forEach(otherKeys, mergeDeepProperties);\n\t\n\t return config;\n\t};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * A `Cancel` is an object that is thrown when an operation is canceled.\n\t *\n\t * @class\n\t * @param {string=} message The message.\n\t */\n\tfunction Cancel(message) {\n\t this.message = message;\n\t}\n\t\n\tCancel.prototype.toString = function toString() {\n\t return 'Cancel' + (this.message ? ': ' + this.message : '');\n\t};\n\t\n\tCancel.prototype.__CANCEL__ = true;\n\t\n\tmodule.exports = Cancel;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar Cancel = __webpack_require__(23);\n\t\n\t/**\n\t * A `CancelToken` is an object that can be used to request cancellation of an operation.\n\t *\n\t * @class\n\t * @param {Function} executor The executor function.\n\t */\n\tfunction CancelToken(executor) {\n\t if (typeof executor !== 'function') {\n\t throw new TypeError('executor must be a function.');\n\t }\n\t\n\t var resolvePromise;\n\t this.promise = new Promise(function promiseExecutor(resolve) {\n\t resolvePromise = resolve;\n\t });\n\t\n\t var token = this;\n\t executor(function cancel(message) {\n\t if (token.reason) {\n\t // Cancellation has already been requested\n\t return;\n\t }\n\t\n\t token.reason = new Cancel(message);\n\t resolvePromise(token.reason);\n\t });\n\t}\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n\t if (this.reason) {\n\t throw this.reason;\n\t }\n\t};\n\t\n\t/**\n\t * Returns an object that contains a new `CancelToken` and a function that, when called,\n\t * cancels the `CancelToken`.\n\t */\n\tCancelToken.source = function source() {\n\t var cancel;\n\t var token = new CancelToken(function executor(c) {\n\t cancel = c;\n\t });\n\t return {\n\t token: token,\n\t cancel: cancel\n\t };\n\t};\n\t\n\tmodule.exports = CancelToken;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Syntactic sugar for invoking a function and expanding an array for arguments.\n\t *\n\t * Common use case would be to use `Function.prototype.apply`.\n\t *\n\t * ```js\n\t * function f(x, y, z) {}\n\t * var args = [1, 2, 3];\n\t * f.apply(null, args);\n\t * ```\n\t *\n\t * With `spread` this example can be re-written.\n\t *\n\t * ```js\n\t * spread(function(x, y, z) {})([1, 2, 3]);\n\t * ```\n\t *\n\t * @param {Function} callback\n\t * @returns {Function}\n\t */\n\tmodule.exports = function spread(callback) {\n\t return function wrap(arr) {\n\t return callback.apply(null, arr);\n\t };\n\t};\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the payload is an error thrown by Axios\n\t *\n\t * @param {*} payload The value to test\n\t * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n\t */\n\tmodule.exports = function isAxiosError(payload) {\n\t return (typeof payload === 'object') && (payload.isAxiosError === true);\n\t};\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// axios.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 081842adca0968bb3270","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 18\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAxiosError.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/reverse_engineering/node_modules/axios/index.d.ts b/reverse_engineering/node_modules/axios/index.d.ts deleted file mode 100644 index c74e93c..0000000 --- a/reverse_engineering/node_modules/axios/index.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -export interface AxiosTransformer { - (data: any, headers?: any): any; -} - -export interface AxiosAdapter { - (config: AxiosRequestConfig): AxiosPromise; -} - -export interface AxiosBasicCredentials { - username: string; - password: string; -} - -export interface AxiosProxyConfig { - host: string; - port: number; - auth?: { - username: string; - password:string; - }; - protocol?: string; -} - -export type Method = - | 'get' | 'GET' - | 'delete' | 'DELETE' - | 'head' | 'HEAD' - | 'options' | 'OPTIONS' - | 'post' | 'POST' - | 'put' | 'PUT' - | 'patch' | 'PATCH' - | 'purge' | 'PURGE' - | 'link' | 'LINK' - | 'unlink' | 'UNLINK' - -export type ResponseType = - | 'arraybuffer' - | 'blob' - | 'document' - | 'json' - | 'text' - | 'stream' - -export interface AxiosRequestConfig { - url?: string; - method?: Method; - baseURL?: string; - transformRequest?: AxiosTransformer | AxiosTransformer[]; - transformResponse?: AxiosTransformer | AxiosTransformer[]; - headers?: any; - params?: any; - paramsSerializer?: (params: any) => string; - data?: any; - timeout?: number; - timeoutErrorMessage?: string; - withCredentials?: boolean; - adapter?: AxiosAdapter; - auth?: AxiosBasicCredentials; - responseType?: ResponseType; - xsrfCookieName?: string; - xsrfHeaderName?: string; - onUploadProgress?: (progressEvent: any) => void; - onDownloadProgress?: (progressEvent: any) => void; - maxContentLength?: number; - validateStatus?: ((status: number) => boolean) | null; - maxBodyLength?: number; - maxRedirects?: number; - socketPath?: string | null; - httpAgent?: any; - httpsAgent?: any; - proxy?: AxiosProxyConfig | false; - cancelToken?: CancelToken; - decompress?: boolean; -} - -export interface AxiosResponse { - data: T; - status: number; - statusText: string; - headers: any; - config: AxiosRequestConfig; - request?: any; -} - -export interface AxiosError extends Error { - config: AxiosRequestConfig; - code?: string; - request?: any; - response?: AxiosResponse; - isAxiosError: boolean; - toJSON: () => object; -} - -export interface AxiosPromise extends Promise> { -} - -export interface CancelStatic { - new (message?: string): Cancel; -} - -export interface Cancel { - message: string; -} - -export interface Canceler { - (message?: string): void; -} - -export interface CancelTokenStatic { - new (executor: (cancel: Canceler) => void): CancelToken; - source(): CancelTokenSource; -} - -export interface CancelToken { - promise: Promise; - reason?: Cancel; - throwIfRequested(): void; -} - -export interface CancelTokenSource { - token: CancelToken; - cancel: Canceler; -} - -export interface AxiosInterceptorManager { - use(onFulfilled?: (value: V) => V | Promise, onRejected?: (error: any) => any): number; - eject(id: number): void; -} - -export interface AxiosInstance { - (config: AxiosRequestConfig): AxiosPromise; - (url: string, config?: AxiosRequestConfig): AxiosPromise; - defaults: AxiosRequestConfig; - interceptors: { - request: AxiosInterceptorManager; - response: AxiosInterceptorManager; - }; - getUri(config?: AxiosRequestConfig): string; - request> (config: AxiosRequestConfig): Promise; - get>(url: string, config?: AxiosRequestConfig): Promise; - delete>(url: string, config?: AxiosRequestConfig): Promise; - head>(url: string, config?: AxiosRequestConfig): Promise; - options>(url: string, config?: AxiosRequestConfig): Promise; - post>(url: string, data?: any, config?: AxiosRequestConfig): Promise; - put>(url: string, data?: any, config?: AxiosRequestConfig): Promise; - patch>(url: string, data?: any, config?: AxiosRequestConfig): Promise; -} - -export interface AxiosStatic extends AxiosInstance { - create(config?: AxiosRequestConfig): AxiosInstance; - Cancel: CancelStatic; - CancelToken: CancelTokenStatic; - isCancel(value: any): boolean; - all(values: (T | Promise)[]): Promise; - spread(callback: (...args: T[]) => R): (array: T[]) => R; - isAxiosError(payload: any): payload is AxiosError; -} - -declare const axios: AxiosStatic; - -export default axios; diff --git a/reverse_engineering/node_modules/axios/index.js b/reverse_engineering/node_modules/axios/index.js deleted file mode 100644 index 79dfd09..0000000 --- a/reverse_engineering/node_modules/axios/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/axios'); \ No newline at end of file diff --git a/reverse_engineering/node_modules/axios/lib/adapters/README.md b/reverse_engineering/node_modules/axios/lib/adapters/README.md deleted file mode 100644 index 68f1118..0000000 --- a/reverse_engineering/node_modules/axios/lib/adapters/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# axios // adapters - -The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. - -## Example - -```js -var settle = require('./../core/settle'); - -module.exports = function myAdapter(config) { - // At this point: - // - config has been merged with defaults - // - request transformers have already run - // - request interceptors have already run - - // Make the request using config provided - // Upon response settle the Promise - - return new Promise(function(resolve, reject) { - - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // From here: - // - response transformers will run - // - response interceptors will run - }); -} -``` diff --git a/reverse_engineering/node_modules/axios/lib/adapters/http.js b/reverse_engineering/node_modules/axios/lib/adapters/http.js deleted file mode 100755 index f32241f..0000000 --- a/reverse_engineering/node_modules/axios/lib/adapters/http.js +++ /dev/null @@ -1,303 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var buildFullPath = require('../core/buildFullPath'); -var buildURL = require('./../helpers/buildURL'); -var http = require('http'); -var https = require('https'); -var httpFollow = require('follow-redirects').http; -var httpsFollow = require('follow-redirects').https; -var url = require('url'); -var zlib = require('zlib'); -var pkg = require('./../../package.json'); -var createError = require('../core/createError'); -var enhanceError = require('../core/enhanceError'); - -var isHttps = /https:?/; - -/** - * - * @param {http.ClientRequestArgs} options - * @param {AxiosProxyConfig} proxy - * @param {string} location - */ -function setProxy(options, proxy, location) { - options.hostname = proxy.host; - options.host = proxy.host; - options.port = proxy.port; - options.path = location; - - // Basic proxy authorization - if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } - - // If a proxy is used, any redirects must also pass through the proxy - options.beforeRedirect = function beforeRedirect(redirection) { - redirection.headers.host = redirection.host; - setProxy(redirection, proxy, redirection.href); - }; -} - -/*eslint consistent-return:0*/ -module.exports = function httpAdapter(config) { - return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { - var resolve = function resolve(value) { - resolvePromise(value); - }; - var reject = function reject(value) { - rejectPromise(value); - }; - var data = config.data; - var headers = config.headers; - - // Set User-Agent (required by some servers) - // Only set header if it hasn't been set in config - // See https://github.com/axios/axios/issues/69 - if (!headers['User-Agent'] && !headers['user-agent']) { - headers['User-Agent'] = 'axios/' + pkg.version; - } - - if (data && !utils.isStream(data)) { - if (Buffer.isBuffer(data)) { - // Nothing to do... - } else if (utils.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(createError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - config - )); - } - - // Add Content-Length header if data exists - headers['Content-Length'] = data.length; - } - - // HTTP basic authentication - var auth = undefined; - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - auth = username + ':' + password; - } - - // Parse url - var fullPath = buildFullPath(config.baseURL, config.url); - var parsed = url.parse(fullPath); - var protocol = parsed.protocol || 'http:'; - - if (!auth && parsed.auth) { - var urlAuth = parsed.auth.split(':'); - var urlUsername = urlAuth[0] || ''; - var urlPassword = urlAuth[1] || ''; - auth = urlUsername + ':' + urlPassword; - } - - if (auth) { - delete headers.Authorization; - } - - var isHttpsRequest = isHttps.test(protocol); - var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - - var options = { - path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), - method: config.method.toUpperCase(), - headers: headers, - agent: agent, - agents: { http: config.httpAgent, https: config.httpsAgent }, - auth: auth - }; - - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname; - options.port = parsed.port; - } - - var proxy = config.proxy; - if (!proxy && proxy !== false) { - var proxyEnv = protocol.slice(0, -1) + '_proxy'; - var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; - if (proxyUrl) { - var parsedProxyUrl = url.parse(proxyUrl); - var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; - var shouldProxy = true; - - if (noProxyEnv) { - var noProxy = noProxyEnv.split(',').map(function trim(s) { - return s.trim(); - }); - - shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { - if (!proxyElement) { - return false; - } - if (proxyElement === '*') { - return true; - } - if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) { - return true; - } - - return parsed.hostname === proxyElement; - }); - } - - if (shouldProxy) { - proxy = { - host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port, - protocol: parsedProxyUrl.protocol - }; - - if (parsedProxyUrl.auth) { - var proxyUrlAuth = parsedProxyUrl.auth.split(':'); - proxy.auth = { - username: proxyUrlAuth[0], - password: proxyUrlAuth[1] - }; - } - } - } - } - - if (proxy) { - options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); - setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); - } - - var transport; - var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsProxy ? https : http; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; - } - transport = isHttpsProxy ? httpsFollow : httpFollow; - } - - if (config.maxBodyLength > -1) { - options.maxBodyLength = config.maxBodyLength; - } - - // Create the request - var req = transport.request(options, function handleResponse(res) { - if (req.aborted) return; - - // uncompress the response body transparently if required - var stream = res; - - // return the last request in case of redirects - var lastRequest = res.req || req; - - - // if no content, is HEAD request or decompress disabled we should not decompress - if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) { - switch (res.headers['content-encoding']) { - /*eslint default-case:0*/ - case 'gzip': - case 'compress': - case 'deflate': - // add the unzipper to the body stream processing pipeline - stream = stream.pipe(zlib.createUnzip()); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - } - } - - var response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: res.headers, - config: config, - request: lastRequest - }; - - if (config.responseType === 'stream') { - response.data = stream; - settle(resolve, reject, response); - } else { - var responseBuffer = []; - stream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) { - stream.destroy(); - reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - config, null, lastRequest)); - } - }); - - stream.on('error', function handleStreamError(err) { - if (req.aborted) return; - reject(enhanceError(err, config, null, lastRequest)); - }); - - stream.on('end', function handleStreamEnd() { - var responseData = Buffer.concat(responseBuffer); - if (config.responseType !== 'arraybuffer') { - responseData = responseData.toString(config.responseEncoding); - if (!config.responseEncoding || config.responseEncoding === 'utf8') { - responseData = utils.stripBOM(responseData); - } - } - - response.data = responseData; - settle(resolve, reject, response); - }); - } - }); - - // Handle errors - req.on('error', function handleRequestError(err) { - if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return; - reject(enhanceError(err, config, null, req)); - }); - - // Handle request timeout - if (config.timeout) { - // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. - // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. - // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. - // And then these socket which be hang up will devoring CPU little by little. - // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. - req.setTimeout(config.timeout, function handleRequestTimeout() { - req.abort(); - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req)); - }); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (req.aborted) return; - - req.abort(); - reject(cancel); - }); - } - - // Send the request - if (utils.isStream(data)) { - data.on('error', function handleStreamError(err) { - reject(enhanceError(err, config, null, req)); - }).pipe(req); - } else { - req.end(data); - } - }); -}; diff --git a/reverse_engineering/node_modules/axios/lib/adapters/xhr.js b/reverse_engineering/node_modules/axios/lib/adapters/xhr.js deleted file mode 100644 index 3027752..0000000 --- a/reverse_engineering/node_modules/axios/lib/adapters/xhr.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var cookies = require('./../helpers/cookies'); -var buildURL = require('./../helpers/buildURL'); -var buildFullPath = require('../core/buildFullPath'); -var parseHeaders = require('./../helpers/parseHeaders'); -var isURLSameOrigin = require('./../helpers/isURLSameOrigin'); -var createError = require('../core/createError'); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - var fullPath = buildFullPath(config.baseURL, config.url); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (!requestData) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; diff --git a/reverse_engineering/node_modules/axios/lib/axios.js b/reverse_engineering/node_modules/axios/lib/axios.js deleted file mode 100644 index c6357b0..0000000 --- a/reverse_engineering/node_modules/axios/lib/axios.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var bind = require('./helpers/bind'); -var Axios = require('./core/Axios'); -var mergeConfig = require('./core/mergeConfig'); -var defaults = require('./defaults'); - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - return instance; -} - -// Create the default instance to be exported -var axios = createInstance(defaults); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios; - -// Factory for creating new instances -axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); -}; - -// Expose Cancel & CancelToken -axios.Cancel = require('./cancel/Cancel'); -axios.CancelToken = require('./cancel/CancelToken'); -axios.isCancel = require('./cancel/isCancel'); - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = require('./helpers/spread'); - -// Expose isAxiosError -axios.isAxiosError = require('./helpers/isAxiosError'); - -module.exports = axios; - -// Allow use of default import syntax in TypeScript -module.exports.default = axios; diff --git a/reverse_engineering/node_modules/axios/lib/cancel/Cancel.js b/reverse_engineering/node_modules/axios/lib/cancel/Cancel.js deleted file mode 100644 index e0de400..0000000 --- a/reverse_engineering/node_modules/axios/lib/cancel/Cancel.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -/** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function Cancel(message) { - this.message = message; -} - -Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); -}; - -Cancel.prototype.__CANCEL__ = true; - -module.exports = Cancel; diff --git a/reverse_engineering/node_modules/axios/lib/cancel/CancelToken.js b/reverse_engineering/node_modules/axios/lib/cancel/CancelToken.js deleted file mode 100644 index 6b46e66..0000000 --- a/reverse_engineering/node_modules/axios/lib/cancel/CancelToken.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -var Cancel = require('./Cancel'); - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ -function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); -} - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } -}; - -/** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ -CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; -}; - -module.exports = CancelToken; diff --git a/reverse_engineering/node_modules/axios/lib/cancel/isCancel.js b/reverse_engineering/node_modules/axios/lib/cancel/isCancel.js deleted file mode 100644 index 051f3ae..0000000 --- a/reverse_engineering/node_modules/axios/lib/cancel/isCancel.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; diff --git a/reverse_engineering/node_modules/axios/lib/core/Axios.js b/reverse_engineering/node_modules/axios/lib/core/Axios.js deleted file mode 100644 index c28c413..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/Axios.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var buildURL = require('../helpers/buildURL'); -var InterceptorManager = require('./InterceptorManager'); -var dispatchRequest = require('./dispatchRequest'); -var mergeConfig = require('./mergeConfig'); - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ -function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; -} - -/** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ -Axios.prototype.request = function request(config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; - } - - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } - - // Hook up interceptors middleware - var chain = [dispatchRequest, undefined]; - var promise = Promise.resolve(config); - - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - chain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - chain.push(interceptor.fulfilled, interceptor.rejected); - }); - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; -}; - -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); -}; - -// Provide aliases for supported request methods -utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: data - })); - }; -}); - -module.exports = Axios; diff --git a/reverse_engineering/node_modules/axios/lib/core/InterceptorManager.js b/reverse_engineering/node_modules/axios/lib/core/InterceptorManager.js deleted file mode 100644 index 50d667b..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/InterceptorManager.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -function InterceptorManager() { - this.handlers = []; -} - -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; -}; - -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; - -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); -}; - -module.exports = InterceptorManager; diff --git a/reverse_engineering/node_modules/axios/lib/core/README.md b/reverse_engineering/node_modules/axios/lib/core/README.md deleted file mode 100644 index 253bc48..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# axios // core - -The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: - -- Dispatching requests -- Managing interceptors -- Handling config diff --git a/reverse_engineering/node_modules/axios/lib/core/buildFullPath.js b/reverse_engineering/node_modules/axios/lib/core/buildFullPath.js deleted file mode 100644 index 00b2b05..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/buildFullPath.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var isAbsoluteURL = require('../helpers/isAbsoluteURL'); -var combineURLs = require('../helpers/combineURLs'); - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ -module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -}; diff --git a/reverse_engineering/node_modules/axios/lib/core/createError.js b/reverse_engineering/node_modules/axios/lib/core/createError.js deleted file mode 100644 index 933680f..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/createError.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var enhanceError = require('./enhanceError'); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; diff --git a/reverse_engineering/node_modules/axios/lib/core/dispatchRequest.js b/reverse_engineering/node_modules/axios/lib/core/dispatchRequest.js deleted file mode 100644 index c8267ad..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/dispatchRequest.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var transformData = require('./transformData'); -var isCancel = require('../cancel/isCancel'); -var defaults = require('../defaults'); - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); -}; diff --git a/reverse_engineering/node_modules/axios/lib/core/enhanceError.js b/reverse_engineering/node_modules/axios/lib/core/enhanceError.js deleted file mode 100644 index b6bc444..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/enhanceError.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ -module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; - return error; -}; diff --git a/reverse_engineering/node_modules/axios/lib/core/mergeConfig.js b/reverse_engineering/node_modules/axios/lib/core/mergeConfig.js deleted file mode 100644 index 5a2c10c..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/mergeConfig.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - var valueFromConfig2Keys = ['url', 'method', 'data']; - var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; - var defaultToConfig2Keys = [ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', - 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', - 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' - ]; - var directMergeKeys = ['validateStatus']; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - } - - utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } - }); - - utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); - - utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - utils.forEach(directMergeKeys, function merge(prop) { - if (prop in config2) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - var axiosKeys = valueFromConfig2Keys - .concat(mergeDeepPropertiesKeys) - .concat(defaultToConfig2Keys) - .concat(directMergeKeys); - - var otherKeys = Object - .keys(config1) - .concat(Object.keys(config2)) - .filter(function filterAxiosKeys(key) { - return axiosKeys.indexOf(key) === -1; - }); - - utils.forEach(otherKeys, mergeDeepProperties); - - return config; -}; diff --git a/reverse_engineering/node_modules/axios/lib/core/settle.js b/reverse_engineering/node_modules/axios/lib/core/settle.js deleted file mode 100644 index 886adb0..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/settle.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var createError = require('./createError'); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } -}; diff --git a/reverse_engineering/node_modules/axios/lib/core/transformData.js b/reverse_engineering/node_modules/axios/lib/core/transformData.js deleted file mode 100644 index e065362..0000000 --- a/reverse_engineering/node_modules/axios/lib/core/transformData.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -/** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ -module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); - }); - - return data; -}; diff --git a/reverse_engineering/node_modules/axios/lib/defaults.js b/reverse_engineering/node_modules/axios/lib/defaults.js deleted file mode 100644 index 2b2a1a7..0000000 --- a/reverse_engineering/node_modules/axios/lib/defaults.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var normalizeHeaderName = require('./helpers/normalizeHeaderName'); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = require('./adapters/xhr'); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = require('./adapters/http'); - } - return adapter; -} - -var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } -}; - -defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } -}; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/README.md b/reverse_engineering/node_modules/axios/lib/helpers/README.md deleted file mode 100644 index 4ae3419..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# axios // helpers - -The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: - -- Browser polyfills -- Managing cookies -- Parsing HTTP headers diff --git a/reverse_engineering/node_modules/axios/lib/helpers/bind.js b/reverse_engineering/node_modules/axios/lib/helpers/bind.js deleted file mode 100644 index 6147c60..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/bind.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/buildURL.js b/reverse_engineering/node_modules/axios/lib/helpers/buildURL.js deleted file mode 100644 index 31595c3..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/buildURL.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/combineURLs.js b/reverse_engineering/node_modules/axios/lib/helpers/combineURLs.js deleted file mode 100644 index f1b58a5..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/combineURLs.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/cookies.js b/reverse_engineering/node_modules/axios/lib/helpers/cookies.js deleted file mode 100644 index 5a8a666..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/cookies.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); diff --git a/reverse_engineering/node_modules/axios/lib/helpers/deprecatedMethod.js b/reverse_engineering/node_modules/axios/lib/helpers/deprecatedMethod.js deleted file mode 100644 index ed40965..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/deprecatedMethod.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -/*eslint no-console:0*/ - -/** - * Supply a warning to the developer that a method they are using - * has been deprecated. - * - * @param {string} method The name of the deprecated method - * @param {string} [instead] The alternate method to use if applicable - * @param {string} [docs] The documentation URL to get further details - */ -module.exports = function deprecatedMethod(method, instead, docs) { - try { - console.warn( - 'DEPRECATED method `' + method + '`.' + - (instead ? ' Use `' + instead + '` instead.' : '') + - ' This method will be removed in a future release.'); - - if (docs) { - console.warn('For more information about usage see ' + docs); - } - } catch (e) { /* Ignore */ } -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/isAbsoluteURL.js b/reverse_engineering/node_modules/axios/lib/helpers/isAbsoluteURL.js deleted file mode 100644 index d33e992..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/isAbsoluteURL.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/isAxiosError.js b/reverse_engineering/node_modules/axios/lib/helpers/isAxiosError.js deleted file mode 100644 index 29ff41a..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/isAxiosError.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -module.exports = function isAxiosError(payload) { - return (typeof payload === 'object') && (payload.isAxiosError === true); -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/isURLSameOrigin.js b/reverse_engineering/node_modules/axios/lib/helpers/isURLSameOrigin.js deleted file mode 100644 index f1d89ad..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/isURLSameOrigin.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); diff --git a/reverse_engineering/node_modules/axios/lib/helpers/normalizeHeaderName.js b/reverse_engineering/node_modules/axios/lib/helpers/normalizeHeaderName.js deleted file mode 100644 index 738c9fe..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/normalizeHeaderName.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/parseHeaders.js b/reverse_engineering/node_modules/axios/lib/helpers/parseHeaders.js deleted file mode 100644 index 8af2cc7..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/parseHeaders.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; diff --git a/reverse_engineering/node_modules/axios/lib/helpers/spread.js b/reverse_engineering/node_modules/axios/lib/helpers/spread.js deleted file mode 100644 index 25e3cdd..0000000 --- a/reverse_engineering/node_modules/axios/lib/helpers/spread.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -}; diff --git a/reverse_engineering/node_modules/axios/lib/utils.js b/reverse_engineering/node_modules/axios/lib/utils.js deleted file mode 100644 index 83eb1c6..0000000 --- a/reverse_engineering/node_modules/axios/lib/utils.js +++ /dev/null @@ -1,351 +0,0 @@ -'use strict'; - -var bind = require('./helpers/bind'); - -/*global toString:true*/ - -// utils is a library of generic helper functions non-specific to axios - -var toString = Object.prototype.toString; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return toString.call(val) === '[object Array]'; -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); -} - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ -function isPlainObject(val) { - if (toString.call(val) !== '[object Object]') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} - -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} - -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; -} - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ -function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM -}; diff --git a/reverse_engineering/node_modules/axios/package.json b/reverse_engineering/node_modules/axios/package.json deleted file mode 100644 index e817613..0000000 --- a/reverse_engineering/node_modules/axios/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_from": "axios@0.21.1", - "_id": "axios@0.21.1", - "_inBundle": false, - "_integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "_location": "/axios", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "axios@0.21.1", - "name": "axios", - "escapedName": "axios", - "rawSpec": "0.21.1", - "saveSpec": null, - "fetchSpec": "0.21.1" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "_shasum": "22563481962f4d6bde9a76d516ef0e5d3c09b2b8", - "_spec": "axios@0.21.1", - "_where": "/home/volodymyr/projects/plugins/CosmosDB-with-SQL-API/reverse_engineering", - "author": { - "name": "Matt Zabriskie" - }, - "browser": { - "./lib/adapters/http.js": "./lib/adapters/xhr.js" - }, - "bugs": { - "url": "https://github.com/axios/axios/issues" - }, - "bundleDependencies": false, - "bundlesize": [ - { - "path": "./dist/axios.min.js", - "threshold": "5kB" - } - ], - "dependencies": { - "follow-redirects": "^1.10.0" - }, - "deprecated": false, - "description": "Promise based HTTP client for the browser and node.js", - "devDependencies": { - "bundlesize": "^0.17.0", - "coveralls": "^3.0.0", - "es6-promise": "^4.2.4", - "grunt": "^1.0.2", - "grunt-banner": "^0.6.0", - "grunt-cli": "^1.2.0", - "grunt-contrib-clean": "^1.1.0", - "grunt-contrib-watch": "^1.0.0", - "grunt-eslint": "^20.1.0", - "grunt-karma": "^2.0.0", - "grunt-mocha-test": "^0.13.3", - "grunt-ts": "^6.0.0-beta.19", - "grunt-webpack": "^1.0.18", - "istanbul-instrumenter-loader": "^1.0.0", - "jasmine-core": "^2.4.1", - "karma": "^1.3.0", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage": "^1.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-jasmine": "^1.1.1", - "karma-jasmine-ajax": "^0.1.13", - "karma-opera-launcher": "^1.0.0", - "karma-safari-launcher": "^1.0.0", - "karma-sauce-launcher": "^1.2.0", - "karma-sinon": "^1.0.5", - "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "^1.7.0", - "load-grunt-tasks": "^3.5.2", - "minimist": "^1.2.0", - "mocha": "^5.2.0", - "sinon": "^4.5.0", - "typescript": "^2.8.1", - "url-search-params": "^0.10.0", - "webpack": "^1.13.1", - "webpack-dev-server": "^1.14.1" - }, - "homepage": "https://github.com/axios/axios", - "jsdelivr": "dist/axios.min.js", - "keywords": [ - "xhr", - "http", - "ajax", - "promise", - "node" - ], - "license": "MIT", - "main": "index.js", - "name": "axios", - "repository": { - "type": "git", - "url": "git+https://github.com/axios/axios.git" - }, - "scripts": { - "build": "NODE_ENV=production grunt build", - "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "examples": "node ./examples/server.js", - "fix": "eslint --fix lib/**/*.js", - "postversion": "git push && git push --tags", - "preversion": "npm test", - "start": "node ./sandbox/server.js", - "test": "grunt test && bundlesize", - "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json" - }, - "typings": "./index.d.ts", - "unpkg": "dist/axios.min.js", - "version": "0.21.1" -} diff --git a/reverse_engineering/node_modules/combined-stream/License b/reverse_engineering/node_modules/combined-stream/License deleted file mode 100644 index 4804b7a..0000000 --- a/reverse_engineering/node_modules/combined-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/reverse_engineering/node_modules/combined-stream/Readme.md b/reverse_engineering/node_modules/combined-stream/Readme.md deleted file mode 100644 index 9e367b5..0000000 --- a/reverse_engineering/node_modules/combined-stream/Readme.md +++ /dev/null @@ -1,138 +0,0 @@ -# combined-stream - -A stream that emits multiple other streams one after another. - -**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`. - -- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module. - -- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another. - -## Installation - -``` bash -npm install combined-stream -``` - -## Usage - -Here is a simple example that shows how you can use combined-stream to combine -two files into one: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -While the example above works great, it will pause all source streams until -they are needed. If you don't want that to happen, you can set `pauseStreams` -to `false`: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create({pauseStreams: false}); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -However, what if you don't have all the source streams yet, or you don't want -to allocate the resources (file descriptors, memory, etc.) for them right away? -Well, in that case you can simply provide a callback that supplies the stream -by calling a `next()` function: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(function(next) { - next(fs.createReadStream('file1.txt')); -}); -combinedStream.append(function(next) { - next(fs.createReadStream('file2.txt')); -}); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -## API - -### CombinedStream.create([options]) - -Returns a new combined stream object. Available options are: - -* `maxDataSize` -* `pauseStreams` - -The effect of those options is described below. - -### combinedStream.pauseStreams = `true` - -Whether to apply back pressure to the underlaying streams. If set to `false`, -the underlaying streams will never be paused. If set to `true`, the -underlaying streams will be paused right after being appended, as well as when -`delayedStream.pipe()` wants to throttle. - -### combinedStream.maxDataSize = `2 * 1024 * 1024` - -The maximum amount of bytes (or characters) to buffer for all source streams. -If this value is exceeded, `combinedStream` emits an `'error'` event. - -### combinedStream.dataSize = `0` - -The amount of bytes (or characters) currently buffered by `combinedStream`. - -### combinedStream.append(stream) - -Appends the given `stream` to the combinedStream object. If `pauseStreams` is -set to `true, this stream will also be paused right away. - -`streams` can also be a function that takes one parameter called `next`. `next` -is a function that must be invoked in order to provide the `next` stream, see -example above. - -Regardless of how the `stream` is appended, combined-stream always attaches an -`'error'` listener to it, so you don't have to do that manually. - -Special case: `stream` can also be a String or Buffer. - -### combinedStream.write(data) - -You should not call this, `combinedStream` takes care of piping the appended -streams into itself for you. - -### combinedStream.resume() - -Causes `combinedStream` to start drain the streams it manages. The function is -idempotent, and also emits a `'resume'` event each time which usually goes to -the stream that is currently being drained. - -### combinedStream.pause(); - -If `combinedStream.pauseStreams` is set to `false`, this does nothing. -Otherwise a `'pause'` event is emitted, this goes to the stream that is -currently being drained, so you can use it to apply back pressure. - -### combinedStream.end(); - -Sets `combinedStream.writable` to false, emits an `'end'` event, and removes -all streams from the queue. - -### combinedStream.destroy(); - -Same as `combinedStream.end()`, except it emits a `'close'` event instead of -`'end'`. - -## License - -combined-stream is licensed under the MIT license. diff --git a/reverse_engineering/node_modules/combined-stream/lib/combined_stream.js b/reverse_engineering/node_modules/combined-stream/lib/combined_stream.js deleted file mode 100644 index 125f097..0000000 --- a/reverse_engineering/node_modules/combined-stream/lib/combined_stream.js +++ /dev/null @@ -1,208 +0,0 @@ -var util = require('util'); -var Stream = require('stream').Stream; -var DelayedStream = require('delayed-stream'); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } - - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; - -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; diff --git a/reverse_engineering/node_modules/combined-stream/package.json b/reverse_engineering/node_modules/combined-stream/package.json deleted file mode 100644 index 6982b6d..0000000 --- a/reverse_engineering/node_modules/combined-stream/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "author": "Felix Geisendörfer (http://debuggable.com/)", - "name": "combined-stream", - "description": "A stream that emits multiple other streams one after another.", - "version": "1.0.8", - "homepage": "https://github.com/felixge/node-combined-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-combined-stream.git" - }, - "main": "./lib/combined_stream", - "scripts": { - "test": "node test/run.js" - }, - "engines": { - "node": ">= 0.8" - }, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "devDependencies": { - "far": "~0.0.7" - }, - "license": "MIT" -} diff --git a/reverse_engineering/node_modules/combined-stream/yarn.lock b/reverse_engineering/node_modules/combined-stream/yarn.lock deleted file mode 100644 index 7edf418..0000000 --- a/reverse_engineering/node_modules/combined-stream/yarn.lock +++ /dev/null @@ -1,17 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -far@~0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" - dependencies: - oop "0.0.3" - -oop@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" diff --git a/reverse_engineering/node_modules/debug/LICENSE b/reverse_engineering/node_modules/debug/LICENSE deleted file mode 100644 index 1a9820e..0000000 --- a/reverse_engineering/node_modules/debug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/reverse_engineering/node_modules/debug/README.md b/reverse_engineering/node_modules/debug/README.md deleted file mode 100644 index e9c3e04..0000000 --- a/reverse_engineering/node_modules/debug/README.md +++ /dev/null @@ -1,481 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. - - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - - Josh Junon - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/reverse_engineering/node_modules/debug/package.json b/reverse_engineering/node_modules/debug/package.json deleted file mode 100644 index 3bcdc24..0000000 --- a/reverse_engineering/node_modules/debug/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "debug", - "version": "4.3.4", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon ", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "istanbul cover _mocha -- test.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "2.1.2" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - } -} diff --git a/reverse_engineering/node_modules/debug/src/browser.js b/reverse_engineering/node_modules/debug/src/browser.js deleted file mode 100644 index cd0fc35..0000000 --- a/reverse_engineering/node_modules/debug/src/browser.js +++ /dev/null @@ -1,269 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/reverse_engineering/node_modules/debug/src/common.js b/reverse_engineering/node_modules/debug/src/common.js deleted file mode 100644 index e3291b2..0000000 --- a/reverse_engineering/node_modules/debug/src/common.js +++ /dev/null @@ -1,274 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/reverse_engineering/node_modules/debug/src/index.js b/reverse_engineering/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f..0000000 --- a/reverse_engineering/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/reverse_engineering/node_modules/debug/src/node.js b/reverse_engineering/node_modules/debug/src/node.js deleted file mode 100644 index 79bc085..0000000 --- a/reverse_engineering/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/reverse_engineering/node_modules/delayed-stream/.npmignore b/reverse_engineering/node_modules/delayed-stream/.npmignore deleted file mode 100644 index 9daeafb..0000000 --- a/reverse_engineering/node_modules/delayed-stream/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/reverse_engineering/node_modules/delayed-stream/License b/reverse_engineering/node_modules/delayed-stream/License deleted file mode 100644 index 4804b7a..0000000 --- a/reverse_engineering/node_modules/delayed-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/reverse_engineering/node_modules/delayed-stream/Makefile b/reverse_engineering/node_modules/delayed-stream/Makefile deleted file mode 100644 index b4ff85a..0000000 --- a/reverse_engineering/node_modules/delayed-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/reverse_engineering/node_modules/delayed-stream/Readme.md b/reverse_engineering/node_modules/delayed-stream/Readme.md deleted file mode 100644 index aca36f9..0000000 --- a/reverse_engineering/node_modules/delayed-stream/Readme.md +++ /dev/null @@ -1,141 +0,0 @@ -# delayed-stream - -Buffers events from a stream until you are ready to handle them. - -## Installation - -``` bash -npm install delayed-stream -``` - -## Usage - -The following example shows how to write a http echo server that delays its -response by 1000 ms. - -``` javascript -var DelayedStream = require('delayed-stream'); -var http = require('http'); - -http.createServer(function(req, res) { - var delayed = DelayedStream.create(req); - - setTimeout(function() { - res.writeHead(200); - delayed.pipe(res); - }, 1000); -}); -``` - -If you are not using `Stream#pipe`, you can also manually release the buffered -events by calling `delayedStream.resume()`: - -``` javascript -var delayed = DelayedStream.create(req); - -setTimeout(function() { - // Emit all buffered events and resume underlaying source - delayed.resume(); -}, 1000); -``` - -## Implementation - -In order to use this meta stream properly, here are a few things you should -know about the implementation. - -### Event Buffering / Proxying - -All events of the `source` stream are hijacked by overwriting the `source.emit` -method. Until node implements a catch-all event listener, this is the only way. - -However, delayed-stream still continues to emit all events it captures on the -`source`, regardless of whether you have released the delayed stream yet or -not. - -Upon creation, delayed-stream captures all `source` events and stores them in -an internal event buffer. Once `delayedStream.release()` is called, all -buffered events are emitted on the `delayedStream`, and the event buffer is -cleared. After that, delayed-stream merely acts as a proxy for the underlaying -source. - -### Error handling - -Error events on `source` are buffered / proxied just like any other events. -However, `delayedStream.create` attaches a no-op `'error'` listener to the -`source`. This way you only have to handle errors on the `delayedStream` -object, rather than in two places. - -### Buffer limits - -delayed-stream provides a `maxDataSize` property that can be used to limit -the amount of data being buffered. In order to protect you from bad `source` -streams that don't react to `source.pause()`, this feature is enabled by -default. - -## API - -### DelayedStream.create(source, [options]) - -Returns a new `delayedStream`. Available options are: - -* `pauseStream` -* `maxDataSize` - -The description for those properties can be found below. - -### delayedStream.source - -The `source` stream managed by this object. This is useful if you are -passing your `delayedStream` around, and you still want to access properties -on the `source` object. - -### delayedStream.pauseStream = true - -Whether to pause the underlaying `source` when calling -`DelayedStream.create()`. Modifying this property afterwards has no effect. - -### delayedStream.maxDataSize = 1024 * 1024 - -The amount of data to buffer before emitting an `error`. - -If the underlaying source is emitting `Buffer` objects, the `maxDataSize` -refers to bytes. - -If the underlaying source is emitting JavaScript strings, the size refers to -characters. - -If you know what you are doing, you can set this property to `Infinity` to -disable this feature. You can also modify this property during runtime. - -### delayedStream.dataSize = 0 - -The amount of data buffered so far. - -### delayedStream.readable - -An ECMA5 getter that returns the value of `source.readable`. - -### delayedStream.resume() - -If the `delayedStream` has not been released so far, `delayedStream.release()` -is called. - -In either case, `source.resume()` is called. - -### delayedStream.pause() - -Calls `source.pause()`. - -### delayedStream.pipe(dest) - -Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`. - -### delayedStream.release() - -Emits and clears all events that have been buffered up so far. This does not -resume the underlaying source, use `delayedStream.resume()` instead. - -## License - -delayed-stream is licensed under the MIT license. diff --git a/reverse_engineering/node_modules/delayed-stream/lib/delayed_stream.js b/reverse_engineering/node_modules/delayed-stream/lib/delayed_stream.js deleted file mode 100644 index b38fc85..0000000 --- a/reverse_engineering/node_modules/delayed-stream/lib/delayed_stream.js +++ /dev/null @@ -1,107 +0,0 @@ -var Stream = require('stream').Stream; -var util = require('util'); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.create = function(source, options) { - var delayedStream = new this(); - - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - - delayedStream.source = source; - - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; - - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } - - return delayedStream; -}; - -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); - -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } - - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } - - this._bufferedEvents.push(args); -}; - -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - - if (this.dataSize <= this.maxDataSize) { - return; - } - - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; diff --git a/reverse_engineering/node_modules/delayed-stream/package.json b/reverse_engineering/node_modules/delayed-stream/package.json deleted file mode 100644 index eea3291..0000000 --- a/reverse_engineering/node_modules/delayed-stream/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "author": "Felix Geisendörfer (http://debuggable.com/)", - "contributors": [ - "Mike Atkins " - ], - "name": "delayed-stream", - "description": "Buffers events from a stream until you are ready to handle them.", - "license": "MIT", - "version": "1.0.0", - "homepage": "https://github.com/felixge/node-delayed-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-delayed-stream.git" - }, - "main": "./lib/delayed_stream", - "engines": { - "node": ">=0.4.0" - }, - "scripts": { - "test": "make test" - }, - "dependencies": {}, - "devDependencies": { - "fake": "0.2.0", - "far": "0.0.1" - } -} diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/.eslintrc.yml b/reverse_engineering/node_modules/fast-json-stable-stringify/.eslintrc.yml deleted file mode 100644 index 1c77b0d..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/.eslintrc.yml +++ /dev/null @@ -1,26 +0,0 @@ -extends: eslint:recommended -env: - node: true - browser: true -rules: - block-scoped-var: 2 - callback-return: 2 - dot-notation: 2 - indent: 2 - linebreak-style: [2, unix] - new-cap: 2 - no-console: [2, allow: [warn, error]] - no-else-return: 2 - no-eq-null: 2 - no-fallthrough: 2 - no-invalid-this: 2 - no-return-assign: 2 - no-shadow: 1 - no-trailing-spaces: 2 - no-use-before-define: [2, nofunc] - quotes: [2, single, avoid-escape] - semi: [2, always] - strict: [2, global] - valid-jsdoc: [2, requireReturn: false] - no-control-regex: 0 - no-useless-escape: 2 diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/.github/FUNDING.yml b/reverse_engineering/node_modules/fast-json-stable-stringify/.github/FUNDING.yml deleted file mode 100644 index 61f9daa..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -tidelift: "npm/fast-json-stable-stringify" diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/.travis.yml b/reverse_engineering/node_modules/fast-json-stable-stringify/.travis.yml deleted file mode 100644 index b61e8f0..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "8" - - "10" - - "12" - - "13" -after_script: - - coveralls < coverage/lcov.info diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/LICENSE b/reverse_engineering/node_modules/fast-json-stable-stringify/LICENSE deleted file mode 100644 index c932223..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -This software is released under the MIT license: - -Copyright (c) 2017 Evgeny Poberezkin -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/README.md b/reverse_engineering/node_modules/fast-json-stable-stringify/README.md deleted file mode 100644 index 02cf49f..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# fast-json-stable-stringify - -Deterministic `JSON.stringify()` - a faster version of [@substack](https://github.com/substack)'s json-stable-strigify without [jsonify](https://github.com/substack/jsonify). - -You can also pass in a custom comparison function. - -[![Build Status](https://travis-ci.org/epoberezkin/fast-json-stable-stringify.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-json-stable-stringify) -[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-json-stable-stringify/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-json-stable-stringify?branch=master) - -# example - -``` js -var stringify = require('fast-json-stable-stringify'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); -``` - -output: - -``` -{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} -``` - - -# methods - -``` js -var stringify = require('fast-json-stable-stringify') -``` - -## var str = stringify(obj, opts) - -Return a deterministic stringified string `str` from the object `obj`. - - -## options - -### cmp - -If `opts` is given, you can supply an `opts.cmp` to have a custom comparison -function for object keys. Your function `opts.cmp` is called with these -parameters: - -``` js -opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) -``` - -For example, to sort on the object key names in reverse order you could write: - -``` js -var stringify = require('fast-json-stable-stringify'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); -``` - -which results in the output string: - -``` -{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} -``` - -Or if you wanted to sort on the object values in reverse order, you could write: - -``` -var stringify = require('fast-json-stable-stringify'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); -``` - -which outputs: - -``` -{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} -``` - -### cycles - -Pass `true` in `opts.cycles` to stringify circular property as `__cycle__` - the result will not be a valid JSON string in this case. - -TypeError will be thrown in case of circular object without this option. - - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install fast-json-stable-stringify -``` - - -# benchmark - -To run benchmark (requires Node.js 6+): -``` -node benchmark -``` - -Results: -``` -fast-json-stable-stringify x 17,189 ops/sec ±1.43% (83 runs sampled) -json-stable-stringify x 13,634 ops/sec ±1.39% (85 runs sampled) -fast-stable-stringify x 20,212 ops/sec ±1.20% (84 runs sampled) -faster-stable-stringify x 15,549 ops/sec ±1.12% (84 runs sampled) -The fastest is fast-stable-stringify -``` - - -## Enterprise support - -fast-json-stable-stringify package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-json-stable-stringify?utm_source=npm-fast-json-stable-stringify&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers. - - -## Security contact - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues. - - -# license - -[MIT](https://github.com/epoberezkin/fast-json-stable-stringify/blob/master/LICENSE) diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/benchmark/index.js b/reverse_engineering/node_modules/fast-json-stable-stringify/benchmark/index.js deleted file mode 100644 index e725f9f..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/benchmark/index.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -const Benchmark = require('benchmark'); -const suite = new Benchmark.Suite; -const testData = require('./test.json'); - - -const stringifyPackages = { - // 'JSON.stringify': JSON.stringify, - 'fast-json-stable-stringify': require('../index'), - 'json-stable-stringify': true, - 'fast-stable-stringify': true, - 'faster-stable-stringify': true -}; - - -for (const name in stringifyPackages) { - let func = stringifyPackages[name]; - if (func === true) func = require(name); - - suite.add(name, function() { - func(testData); - }); -} - -suite - .on('cycle', (event) => console.log(String(event.target))) - .on('complete', function () { - console.log('The fastest is ' + this.filter('fastest').map('name')); - }) - .run({async: true}); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/benchmark/test.json b/reverse_engineering/node_modules/fast-json-stable-stringify/benchmark/test.json deleted file mode 100644 index c9118c1..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/benchmark/test.json +++ /dev/null @@ -1,137 +0,0 @@ -[ - { - "_id": "59ef4a83ee8364808d761beb", - "index": 0, - "guid": "e50ffae9-7128-4148-9ee5-40c3fc523c5d", - "isActive": false, - "balance": "$2,341.81", - "picture": "http://placehold.it/32x32", - "age": 28, - "eyeColor": "brown", - "name": "Carey Savage", - "gender": "female", - "company": "VERAQ", - "email": "careysavage@veraq.com", - "phone": "+1 (897) 574-3014", - "address": "458 Willow Street, Henrietta, California, 7234", - "about": "Nisi reprehenderit nulla ad officia pariatur non dolore laboris irure cupidatat laborum. Minim eu ex Lorem adipisicing exercitation irure minim sunt est enim mollit incididunt voluptate nulla. Ut mollit anim reprehenderit et aliqua ex esse aliquip. Aute sit duis deserunt do incididunt consequat minim qui dolor commodo deserunt et voluptate.\r\n", - "registered": "2014-05-21T01:56:51 -01:00", - "latitude": 63.89502, - "longitude": 62.369807, - "tags": [ - "nostrud", - "nisi", - "consectetur", - "ullamco", - "cupidatat", - "culpa", - "commodo" - ], - "friends": [ - { - "id": 0, - "name": "Henry Walls" - }, - { - "id": 1, - "name": "Janice Baker" - }, - { - "id": 2, - "name": "Russell Bush" - } - ], - "greeting": "Hello, Carey Savage! You have 4 unread messages.", - "favoriteFruit": "banana" - }, - { - "_id": "59ef4a83ff5774a691454e89", - "index": 1, - "guid": "2bee9efc-4095-4c2e-87ef-d08c8054c89d", - "isActive": true, - "balance": "$1,618.15", - "picture": "http://placehold.it/32x32", - "age": 35, - "eyeColor": "blue", - "name": "Elinor Pearson", - "gender": "female", - "company": "FLEXIGEN", - "email": "elinorpearson@flexigen.com", - "phone": "+1 (923) 548-3751", - "address": "600 Bayview Avenue, Draper, Montana, 3088", - "about": "Mollit commodo ea sit Lorem velit. Irure anim esse Lorem sint quis officia ut. Aliqua nisi dolore in aute deserunt mollit ex ea in mollit.\r\n", - "registered": "2017-04-22T07:58:41 -01:00", - "latitude": -87.824919, - "longitude": 69.538927, - "tags": [ - "fugiat", - "labore", - "proident", - "quis", - "eiusmod", - "qui", - "est" - ], - "friends": [ - { - "id": 0, - "name": "Massey Wagner" - }, - { - "id": 1, - "name": "Marcella Ferrell" - }, - { - "id": 2, - "name": "Evans Mckee" - } - ], - "greeting": "Hello, Elinor Pearson! You have 3 unread messages.", - "favoriteFruit": "strawberry" - }, - { - "_id": "59ef4a839ec8a4be4430b36b", - "index": 2, - "guid": "ddd6e8c0-95bd-416d-8b46-a768d6363809", - "isActive": false, - "balance": "$2,046.95", - "picture": "http://placehold.it/32x32", - "age": 40, - "eyeColor": "green", - "name": "Irwin Davidson", - "gender": "male", - "company": "DANJA", - "email": "irwindavidson@danja.com", - "phone": "+1 (883) 537-2041", - "address": "439 Cook Street, Chapin, Kentucky, 7398", - "about": "Irure velit non commodo aliqua exercitation ut nostrud minim magna. Dolor ad ad ut irure eu. Non pariatur dolor eiusmod ipsum do et exercitation cillum. Et amet laboris minim eiusmod ullamco magna ea reprehenderit proident sunt.\r\n", - "registered": "2016-09-01T07:49:08 -01:00", - "latitude": -49.803812, - "longitude": 104.93279, - "tags": [ - "consequat", - "enim", - "quis", - "magna", - "est", - "culpa", - "tempor" - ], - "friends": [ - { - "id": 0, - "name": "Ruth Hansen" - }, - { - "id": 1, - "name": "Kathrine Austin" - }, - { - "id": 2, - "name": "Rivera Munoz" - } - ], - "greeting": "Hello, Irwin Davidson! You have 2 unread messages.", - "favoriteFruit": "banana" - } -] diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/example/key_cmp.js b/reverse_engineering/node_modules/fast-json-stable-stringify/example/key_cmp.js deleted file mode 100644 index d5f6675..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/example/key_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/example/nested.js b/reverse_engineering/node_modules/fast-json-stable-stringify/example/nested.js deleted file mode 100644 index 9a672fc..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/example/nested.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/example/str.js b/reverse_engineering/node_modules/fast-json-stable-stringify/example/str.js deleted file mode 100644 index 9b4b3cd..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/example/str.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 6, b: [4,5], a: 3 }; -console.log(stringify(obj)); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/example/value_cmp.js b/reverse_engineering/node_modules/fast-json-stable-stringify/example/value_cmp.js deleted file mode 100644 index 09f1c5f..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/example/value_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/index.d.ts b/reverse_engineering/node_modules/fast-json-stable-stringify/index.d.ts deleted file mode 100644 index 23e46ca..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module 'fast-json-stable-stringify' { - function stringify(obj: any): string; - export = stringify; -} diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/index.js b/reverse_engineering/node_modules/fast-json-stable-stringify/index.js deleted file mode 100644 index c44e6a4..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -module.exports = function (data, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; - - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - - var seen = []; - return (function stringify (node) { - if (node && node.toJSON && typeof node.toJSON === 'function') { - node = node.toJSON(); - } - - if (node === undefined) return; - if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; - if (typeof node !== 'object') return JSON.stringify(node); - - var i, out; - if (Array.isArray(node)) { - out = '['; - for (i = 0; i < node.length; i++) { - if (i) out += ','; - out += stringify(node[i]) || 'null'; - } - return out + ']'; - } - - if (node === null) return 'null'; - - if (seen.indexOf(node) !== -1) { - if (cycles) return JSON.stringify('__cycle__'); - throw new TypeError('Converting circular structure to JSON'); - } - - var seenIndex = seen.push(node) - 1; - var keys = Object.keys(node).sort(cmp && cmp(node)); - out = ''; - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify(node[key]); - - if (!value) continue; - if (out) out += ','; - out += JSON.stringify(key) + ':' + value; - } - seen.splice(seenIndex, 1); - return '{' + out + '}'; - })(data); -}; diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/package.json b/reverse_engineering/node_modules/fast-json-stable-stringify/package.json deleted file mode 100644 index ad2c8bf..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "fast-json-stable-stringify", - "version": "2.1.0", - "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify", - "main": "index.js", - "types": "index.d.ts", - "dependencies": {}, - "devDependencies": { - "benchmark": "^2.1.4", - "coveralls": "^3.0.0", - "eslint": "^6.7.0", - "fast-stable-stringify": "latest", - "faster-stable-stringify": "latest", - "json-stable-stringify": "latest", - "nyc": "^14.1.0", - "pre-commit": "^1.2.2", - "tape": "^4.11.0" - }, - "scripts": { - "eslint": "eslint index.js test", - "test-spec": "tape test/*.js", - "test": "npm run eslint && nyc npm run test-spec" - }, - "repository": { - "type": "git", - "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git" - }, - "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify", - "keywords": [ - "json", - "stringify", - "deterministic", - "hash", - "stable" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "nyc": { - "exclude": [ - "test", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - } -} diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/test/cmp.js b/reverse_engineering/node_modules/fast-json-stable-stringify/test/cmp.js deleted file mode 100644 index 4efd6b5..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/test/cmp.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var test = require('tape'); -var stringify = require('../'); - -test('custom comparison function', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; - }); - t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); -}); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/test/nested.js b/reverse_engineering/node_modules/fast-json-stable-stringify/test/nested.js deleted file mode 100644 index 167a358..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/test/nested.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var test = require('tape'); -var stringify = require('../'); - -test('nested', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); -}); - -test('cyclic (default)', function (t) { - t.plan(1); - var one = { a: 1 }; - var two = { a: 2, one: one }; - one.two = two; - try { - stringify(one); - } catch (ex) { - t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); - } -}); - -test('cyclic (specifically allowed)', function (t) { - t.plan(1); - var one = { a: 1 }; - var two = { a: 2, one: one }; - one.two = two; - t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); -}); - -test('repeated non-cyclic value', function(t) { - t.plan(1); - var one = { x: 1 }; - var two = { a: one, b: one }; - t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}'); -}); - -test('acyclic but with reused obj-property pointers', function (t) { - t.plan(1); - var x = { a: 1 }; - var y = { b: x, c: x }; - t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}'); -}); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/test/str.js b/reverse_engineering/node_modules/fast-json-stable-stringify/test/str.js deleted file mode 100644 index 99a9ade..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/test/str.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -var test = require('tape'); -var stringify = require('../'); - -test('simple object', function (t) { - t.plan(1); - var obj = { c: 6, b: [4,5], a: 3, z: null }; - t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); -}); - -test('object with undefined', function (t) { - t.plan(1); - var obj = { a: 3, z: undefined }; - t.equal(stringify(obj), '{"a":3}'); -}); - -test('object with null', function (t) { - t.plan(1); - var obj = { a: 3, z: null }; - t.equal(stringify(obj), '{"a":3,"z":null}'); -}); - -test('object with NaN and Infinity', function (t) { - t.plan(1); - var obj = { a: 3, b: NaN, c: Infinity }; - t.equal(stringify(obj), '{"a":3,"b":null,"c":null}'); -}); - -test('array with undefined', function (t) { - t.plan(1); - var obj = [4, undefined, 6]; - t.equal(stringify(obj), '[4,null,6]'); -}); - -test('object with empty string', function (t) { - t.plan(1); - var obj = { a: 3, z: '' }; - t.equal(stringify(obj), '{"a":3,"z":""}'); -}); - -test('array with empty string', function (t) { - t.plan(1); - var obj = [4, '', 6]; - t.equal(stringify(obj), '[4,"",6]'); -}); diff --git a/reverse_engineering/node_modules/fast-json-stable-stringify/test/to-json.js b/reverse_engineering/node_modules/fast-json-stable-stringify/test/to-json.js deleted file mode 100644 index 2fb2cfa..0000000 --- a/reverse_engineering/node_modules/fast-json-stable-stringify/test/to-json.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var test = require('tape'); -var stringify = require('../'); - -test('toJSON function', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; - t.equal(stringify(obj), '{"one":1}' ); -}); - -test('toJSON returns string', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; - t.equal(stringify(obj), '"one"'); -}); - -test('toJSON returns array', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; - t.equal(stringify(obj), '["one"]'); -}); diff --git a/reverse_engineering/node_modules/follow-redirects/LICENSE b/reverse_engineering/node_modules/follow-redirects/LICENSE deleted file mode 100644 index 742cbad..0000000 --- a/reverse_engineering/node_modules/follow-redirects/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/reverse_engineering/node_modules/follow-redirects/README.md b/reverse_engineering/node_modules/follow-redirects/README.md deleted file mode 100644 index 68dfe0e..0000000 --- a/reverse_engineering/node_modules/follow-redirects/README.md +++ /dev/null @@ -1,148 +0,0 @@ -## Follow Redirects - -Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. - -[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) -[![Build Status](https://travis-ci.com/follow-redirects/follow-redirects.svg?branch=master)](https://travis-ci.com/follow-redirects/follow-redirects) -[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master) -[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) -[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh) - -`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback) - methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback) - modules, with the exception that they will seamlessly follow redirects. - -```javascript -const { http, https } = require('follow-redirects'); - -http.get('http://bit.ly/900913', response => { - response.on('data', chunk => { - console.log(chunk); - }); -}).on('error', err => { - console.error(err); -}); -``` - -You can inspect the final redirected URL through the `responseUrl` property on the `response`. -If no redirection happened, `responseUrl` is the original request URL. - -```javascript -const request = https.request({ - host: 'bitly.com', - path: '/UHfDGO', -}, response => { - console.log(response.responseUrl); - // 'http://duckduckgo.com/robots.txt' -}); -request.end(); -``` - -## Options -### Global options -Global options are set directly on the `follow-redirects` module: - -```javascript -const followRedirects = require('follow-redirects'); -followRedirects.maxRedirects = 10; -followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB -``` - -The following global options are supported: - -- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. - -- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. - -### Per-request options -Per-request options are set by passing an `options` object: - -```javascript -const url = require('url'); -const { http, https } = require('follow-redirects'); - -const options = url.parse('http://bit.ly/900913'); -options.maxRedirects = 10; -options.beforeRedirect = (options, { headers }) => { - // Use this to adjust the request options upon redirecting, - // to inspect the latest response headers, - // or to cancel the request by throwing an error - if (options.hostname === "example.com") { - options.auth = "user:password"; - } -}; -http.request(options); -``` - -In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback), -the following per-request options are supported: -- `followRedirects` (default: `true`) – whether redirects should be followed. - -- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. - -- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. - -- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error. - -- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }` - -- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object. - - -### Advanced usage -By default, `follow-redirects` will use the Node.js default implementations -of [`http`](https://nodejs.org/api/http.html) -and [`https`](https://nodejs.org/api/https.html). -To enable features such as caching and/or intermediate request tracking, -you might instead want to wrap `follow-redirects` around custom protocol implementations: - -```javascript -const { http, https } = require('follow-redirects').wrap({ - http: require('your-custom-http'), - https: require('your-custom-https'), -}); -``` - -Such custom protocols only need an implementation of the `request` method. - -## Browser Usage - -Due to the way the browser works, -the `http` and `https` browser equivalents perform redirects by default. - -By requiring `follow-redirects` this way: -```javascript -const http = require('follow-redirects/http'); -const https = require('follow-redirects/https'); -``` -you can easily tell webpack and friends to replace -`follow-redirect` by the built-in versions: - -```json -{ - "follow-redirects/http" : "http", - "follow-redirects/https" : "https" -} -``` - -## Contributing - -Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues) - detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied - by tests. You can run the test suite locally with a simple `npm test` command. - -## Debug Logging - -`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging - set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test - suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well. - -## Authors - -- [Ruben Verborgh](https://ruben.verborgh.org/) -- [Olivier Lalonde](mailto:olalonde@gmail.com) -- [James Talmage](mailto:james@talmage.io) - -## License - -[MIT License](https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE) diff --git a/reverse_engineering/node_modules/follow-redirects/debug.js b/reverse_engineering/node_modules/follow-redirects/debug.js deleted file mode 100644 index 4c1fa24..0000000 --- a/reverse_engineering/node_modules/follow-redirects/debug.js +++ /dev/null @@ -1,9 +0,0 @@ -var debug; -try { - /* eslint global-require: off */ - debug = require("debug")("follow-redirects"); -} -catch (error) { - debug = function () { /* */ }; -} -module.exports = debug; diff --git a/reverse_engineering/node_modules/follow-redirects/http.js b/reverse_engineering/node_modules/follow-redirects/http.js deleted file mode 100644 index 695e356..0000000 --- a/reverse_engineering/node_modules/follow-redirects/http.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./").http; diff --git a/reverse_engineering/node_modules/follow-redirects/https.js b/reverse_engineering/node_modules/follow-redirects/https.js deleted file mode 100644 index d21c921..0000000 --- a/reverse_engineering/node_modules/follow-redirects/https.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./").https; diff --git a/reverse_engineering/node_modules/follow-redirects/index.js b/reverse_engineering/node_modules/follow-redirects/index.js deleted file mode 100644 index 98db8ee..0000000 --- a/reverse_engineering/node_modules/follow-redirects/index.js +++ /dev/null @@ -1,504 +0,0 @@ -var url = require("url"); -var URL = url.URL; -var http = require("http"); -var https = require("https"); -var Writable = require("stream").Writable; -var assert = require("assert"); -var debug = require("./debug"); - -// Create handlers that pass events from native requests -var eventHandlers = Object.create(null); -["abort", "aborted", "connect", "error", "socket", "timeout"].forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); - -// Error types with codes -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded" -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); - -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; - - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } - - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - self._processResponse(response); - }; - - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); - -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } - - // Validate input and shift parameters if necessary - if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (typeof encoding === "function") { - callback = encoding; - encoding = null; - } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (typeof data === "function") { - callback = data; - data = encoding = null; - } - else if (typeof encoding === "function") { - callback = encoding; - encoding = null; - } - - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - if (callback) { - this.once("timeout", callback); - } - - if (this.socket) { - startTimer(this, msecs); - } - else { - var self = this; - this._currentRequest.once("socket", function () { - startTimer(self, msecs); - }); - } - - this.once("response", clearTimer); - this.once("error", clearTimer); - - return this; -}; - -function startTimer(request, msecs) { - clearTimeout(request._timeout); - request._timeout = setTimeout(function () { - request.emit("timeout"); - }, msecs); -} - -function clearTimer() { - clearTimeout(this._timeout); -} - -// Proxy all other public ClientRequest methods -[ - "abort", "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); - -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); - -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } - - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; - } - - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } - } -}; - - -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - this.emit("error", new TypeError("Unsupported protocol " + protocol)); - return; - } - - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.substr(0, protocol.length - 1); - this._options.agent = this._options.agents[scheme]; - } - - // Create the native request - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - this._currentUrl = url.format(this._options); - - // Set up event handlers - request._redirectable = this; - for (var event in eventHandlers) { - /* istanbul ignore else */ - if (event) { - request.on(event, eventHandlers[event]); - } - } - - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end. - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - /* istanbul ignore else */ - if (request === self._currentRequest) { - // Report any write errors - /* istanbul ignore if */ - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - /* istanbul ignore else */ - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } - } - }()); - } -}; - -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); - } - - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - var location = response.headers.location; - if (location && this._options.followRedirects !== false && - statusCode >= 300 && statusCode < 400) { - // Abort the current request - this._currentRequest.removeAllListeners(); - this._currentRequest.on("error", noop); - this._currentRequest.abort(); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - this.emit("error", new TooManyRedirectsError()); - return; - } - - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - - // Drop the Host header, as the redirect might lead to a different host - var previousHostName = removeMatchingHeaders(/^host$/i, this._options.headers) || - url.parse(this._currentUrl).hostname; - - // Create the redirected request - var redirectUrl = url.resolve(this._currentUrl, location); - debug("redirecting to", redirectUrl); - this._isRedirect = true; - var redirectUrlParts = url.parse(redirectUrl); - Object.assign(this._options, redirectUrlParts); - - // Drop the Authorization header if redirecting to another host - if (redirectUrlParts.hostname !== previousHostName) { - removeMatchingHeaders(/^authorization$/i, this._options.headers); - } - - // Evaluate the beforeRedirect callback - if (typeof this._options.beforeRedirect === "function") { - var responseDetails = { headers: response.headers }; - try { - this._options.beforeRedirect.call(null, this._options, responseDetails); - } - catch (err) { - this.emit("error", err); - return; - } - this._sanitizeOptions(this._options); - } - - // Perform the redirected request - try { - this._performRequest(); - } - catch (cause) { - var error = new RedirectionError("Redirected request failed: " + cause.message); - error.cause = cause; - this.emit("error", error); - } - } - else { - // The response is not a redirect; return it as-is - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - - // Clean up - this._requestBodyBuffers = []; - } -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters - if (typeof input === "string") { - var urlStr = input; - try { - input = urlToOptions(new URL(urlStr)); - } - catch (err) { - /* istanbul ignore next */ - input = url.parse(urlStr); - } - } - else if (URL && (input instanceof URL)) { - input = urlToOptions(input); - } - else { - callback = options; - options = input; - input = { protocol: protocol }; - } - if (typeof options === "function") { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; - } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; -} - -/* istanbul ignore next */ -function noop() { /* empty */ } - -// from https://github.com/nodejs/node/blob/master/lib/internal/url.js -function urlToOptions(urlObject) { - var options = { - protocol: urlObject.protocol, - hostname: urlObject.hostname.startsWith("[") ? - /* istanbul ignore next */ - urlObject.hostname.slice(1, -1) : - urlObject.hostname, - hash: urlObject.hash, - search: urlObject.search, - pathname: urlObject.pathname, - path: urlObject.pathname + urlObject.search, - href: urlObject.href, - }; - if (urlObject.port !== "") { - options.port = Number(urlObject.port); - } - return options; -} - -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; - } - } - return lastValue; -} - -function createErrorType(code, defaultMessage) { - function CustomError(message) { - Error.captureStackTrace(this, this.constructor); - this.message = message || defaultMessage; - } - CustomError.prototype = new Error(); - CustomError.prototype.constructor = CustomError; - CustomError.prototype.name = "Error [" + code + "]"; - CustomError.prototype.code = code; - return CustomError; -} - -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; diff --git a/reverse_engineering/node_modules/follow-redirects/package.json b/reverse_engineering/node_modules/follow-redirects/package.json deleted file mode 100644 index 9c7a7c4..0000000 --- a/reverse_engineering/node_modules/follow-redirects/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_from": "follow-redirects@^1.10.0", - "_id": "follow-redirects@1.13.1", - "_inBundle": false, - "_integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==", - "_location": "/follow-redirects", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "follow-redirects@^1.10.0", - "name": "follow-redirects", - "escapedName": "follow-redirects", - "rawSpec": "^1.10.0", - "saveSpec": null, - "fetchSpec": "^1.10.0" - }, - "_requiredBy": [ - "/axios" - ], - "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", - "_shasum": "5f69b813376cee4fd0474a3aba835df04ab763b7", - "_spec": "follow-redirects@^1.10.0", - "_where": "/home/volodymyr/projects/plugins/CosmosDB-with-SQL-API/reverse_engineering/node_modules/axios", - "author": { - "name": "Ruben Verborgh", - "email": "ruben@verborgh.org", - "url": "https://ruben.verborgh.org/" - }, - "bugs": { - "url": "https://github.com/follow-redirects/follow-redirects/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Olivier Lalonde", - "email": "olalonde@gmail.com", - "url": "http://www.syskall.com" - }, - { - "name": "James Talmage", - "email": "james@talmage.io" - } - ], - "deprecated": false, - "description": "HTTP and HTTPS modules that follow redirects.", - "devDependencies": { - "concat-stream": "^2.0.0", - "eslint": "^5.16.0", - "express": "^4.16.4", - "lolex": "^3.1.0", - "mocha": "^6.0.2", - "nyc": "^14.1.1" - }, - "engines": { - "node": ">=4.0" - }, - "files": [ - "*.js" - ], - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "homepage": "https://github.com/follow-redirects/follow-redirects", - "keywords": [ - "http", - "https", - "url", - "redirect", - "client", - "location", - "utility" - ], - "license": "MIT", - "main": "index.js", - "name": "follow-redirects", - "peerDependenciesMeta": { - "debug": { - "optional": true - } - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git" - }, - "scripts": { - "lint": "eslint *.js test", - "mocha": "nyc mocha", - "test": "npm run lint && npm run mocha" - }, - "version": "1.13.1" -} diff --git a/reverse_engineering/node_modules/form-data/License b/reverse_engineering/node_modules/form-data/License deleted file mode 100644 index c7ff12a..0000000 --- a/reverse_engineering/node_modules/form-data/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. diff --git a/reverse_engineering/node_modules/form-data/README.md.bak b/reverse_engineering/node_modules/form-data/README.md.bak deleted file mode 100644 index 298a1a2..0000000 --- a/reverse_engineering/node_modules/form-data/README.md.bak +++ /dev/null @@ -1,358 +0,0 @@ -# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) - -A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. - -The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. - -[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface - -[![Linux Build](https://img.shields.io/travis/form-data/form-data/v4.0.0.svg?label=linux:6.x-12.x)](https://travis-ci.org/form-data/form-data) -[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v4.0.0.svg?label=macos:6.x-12.x)](https://travis-ci.org/form-data/form-data) -[![Windows Build](https://img.shields.io/travis/form-data/form-data/v4.0.0.svg?label=windows:6.x-12.x)](https://travis-ci.org/form-data/form-data) - -[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v4.0.0.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) -[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) - -## Install - -``` -npm install --save form-data -``` - -## Usage - -In this example we are constructing a form with 3 fields that contain a string, -a buffer and a file stream. - -``` javascript -var FormData = require('form-data'); -var fs = require('fs'); - -var form = new FormData(); -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); -``` - -Also you can use http-response stream: - -``` javascript -var FormData = require('form-data'); -var http = require('http'); - -var form = new FormData(); - -http.request('http://nodejs.org/images/logo.png', function(response) { - form.append('my_field', 'my value'); - form.append('my_buffer', new Buffer(10)); - form.append('my_logo', response); -}); -``` - -Or @mikeal's [request](https://github.com/request/request) stream: - -``` javascript -var FormData = require('form-data'); -var request = require('request'); - -var form = new FormData(); - -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_logo', request('http://nodejs.org/images/logo.png')); -``` - -In order to submit this form to a web application, call ```submit(url, [callback])``` method: - -``` javascript -form.submit('http://example.org/', function(err, res) { - // res – response object (http.IncomingMessage) // - res.resume(); -}); - -``` - -For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. - -### Custom options - -You can provide custom options, such as `maxDataSize`: - -``` javascript -var FormData = require('form-data'); - -var form = new FormData({ maxDataSize: 20971520 }); -form.append('my_field', 'my value'); -form.append('my_buffer', /* something big */); -``` - -List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) - -### Alternative submission methods - -You can use node's http client interface: - -``` javascript -var http = require('http'); - -var request = http.request({ - method: 'post', - host: 'example.org', - path: '/upload', - headers: form.getHeaders() -}); - -form.pipe(request); - -request.on('response', function(res) { - console.log(res.statusCode); -}); -``` - -Or if you would prefer the `'Content-Length'` header to be set for you: - -``` javascript -form.submit('example.org/upload', function(err, res) { - console.log(res.statusCode); -}); -``` - -To use custom headers and pre-known length in parts: - -``` javascript -var CRLF = '\r\n'; -var form = new FormData(); - -var options = { - header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, - knownLength: 1 -}; - -form.append('my_buffer', buffer, options); - -form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); -}); -``` - -Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: - -``` javascript -someModule.stream(function(err, stdout, stderr) { - if (err) throw err; - - var form = new FormData(); - - form.append('file', stdout, { - filename: 'unicycle.jpg', // ... or: - filepath: 'photos/toys/unicycle.jpg', - contentType: 'image/jpeg', - knownLength: 19806 - }); - - form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); - }); -}); -``` - -The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). - -For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: - -``` javascript -form.submit({ - host: 'example.com', - path: '/probably.php?extra=params', - auth: 'username:password' -}, function(err, res) { - console.log(res.statusCode); -}); -``` - -In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: - -``` javascript -form.submit({ - host: 'example.com', - path: '/surelynot.php', - headers: {'x-test-header': 'test-header-value'} -}, function(err, res) { - console.log(res.statusCode); -}); -``` - -### Methods - -- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). -- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) -- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) -- [_Void_ setBoundary()](https://github.com/form-data/form-data#void-setboundary) -- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) -- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) -- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) -- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) -- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) -- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) - -#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) -Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. -```javascript -var form = new FormData(); -form.append( 'my_string', 'my value' ); -form.append( 'my_integer', 1 ); -form.append( 'my_boolean', true ); -form.append( 'my_buffer', new Buffer(10) ); -form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) -``` - -You may provide a string for options, or an object. -```javascript -// Set filename by providing a string for options -form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); - -// provide an object. -form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); -``` - -#### _Headers_ getHeaders( [**Headers** _userHeaders_] ) -This method adds the correct `content-type` header to the provided array of `userHeaders`. - -#### _String_ getBoundary() -Return the boundary of the formData. By default, the boundary consists of 26 `-` followed by 24 numbers -for example: -```javascript ---------------------------515890814546601021194782 -``` - -#### _Void_ setBoundary(String _boundary_) -Set the boundary string, overriding the default behavior described above. - -_Note: The boundary must be unique and may not appear in the data._ - -#### _Buffer_ getBuffer() -Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. -```javascript -var form = new FormData(); -form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); -form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); - -axios.post( 'https://example.com/path/to/api', - form.getBuffer(), - form.getHeaders() - ) -``` -**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. - -#### _Integer_ getLengthSync() -Same as `getLength` but synchronous. - -_Note: getLengthSync __doesn't__ calculate streams length._ - -#### _Integer_ getLength( **function** _callback_ ) -Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated -```javascript -this.getLength(function(err, length) { - if (err) { - this._error(err); - return; - } - - // add content length - request.setHeader('Content-Length', length); - - ... -}.bind(this)); -``` - -#### _Boolean_ hasKnownLength() -Checks if the length of added values is known. - -#### _Request_ submit( _params_, **function** _callback_ ) -Submit the form to a web application. -```javascript -var form = new FormData(); -form.append( 'my_string', 'Hello World' ); - -form.submit( 'http://example.com/', function(err, res) { - // res – response object (http.IncomingMessage) // - res.resume(); -} ); -``` - -#### _String_ toString() -Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. - -### Integration with other libraries - -#### Request - -Form submission using [request](https://github.com/request/request): - -```javascript -var formData = { - my_field: 'my_value', - my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), -}; - -request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { - if (err) { - return console.error('upload failed:', err); - } - console.log('Upload successful! Server responded with:', body); -}); -``` - -For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). - -#### node-fetch - -You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): - -```javascript -var form = new FormData(); - -form.append('a', 1); - -fetch('http://example.com', { method: 'POST', body: form }) - .then(function(res) { - return res.json(); - }).then(function(json) { - console.log(json); - }); -``` - -#### axios - -In Node.js you can post a file using [axios](https://github.com/axios/axios): -```javascript -const form = new FormData(); -const stream = fs.createReadStream(PATH_TO_FILE); - -form.append('image', stream); - -// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` -const formHeaders = form.getHeaders(); - -axios.post('http://example.com', form, { - headers: { - ...formHeaders, - }, -}) -.then(response => response) -.catch(error => error) -``` - -## Notes - -- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. -- ```getLength(cb)``` will send an error as first parameter of callback if stream length cannot be calculated (e.g. send in custom streams w/o using ```knownLength```). -- ```submit``` will not add `content-length` if form length is unknown or not calculable. -- Starting version `2.x` FormData has dropped support for `node@0.10.x`. -- Starting version `3.x` FormData has dropped support for `node@4.x`. - -## License - -Form-Data is released under the [MIT](License) license. diff --git a/reverse_engineering/node_modules/form-data/Readme.md b/reverse_engineering/node_modules/form-data/Readme.md deleted file mode 100644 index 298a1a2..0000000 --- a/reverse_engineering/node_modules/form-data/Readme.md +++ /dev/null @@ -1,358 +0,0 @@ -# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) - -A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. - -The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. - -[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface - -[![Linux Build](https://img.shields.io/travis/form-data/form-data/v4.0.0.svg?label=linux:6.x-12.x)](https://travis-ci.org/form-data/form-data) -[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v4.0.0.svg?label=macos:6.x-12.x)](https://travis-ci.org/form-data/form-data) -[![Windows Build](https://img.shields.io/travis/form-data/form-data/v4.0.0.svg?label=windows:6.x-12.x)](https://travis-ci.org/form-data/form-data) - -[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v4.0.0.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) -[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) - -## Install - -``` -npm install --save form-data -``` - -## Usage - -In this example we are constructing a form with 3 fields that contain a string, -a buffer and a file stream. - -``` javascript -var FormData = require('form-data'); -var fs = require('fs'); - -var form = new FormData(); -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); -``` - -Also you can use http-response stream: - -``` javascript -var FormData = require('form-data'); -var http = require('http'); - -var form = new FormData(); - -http.request('http://nodejs.org/images/logo.png', function(response) { - form.append('my_field', 'my value'); - form.append('my_buffer', new Buffer(10)); - form.append('my_logo', response); -}); -``` - -Or @mikeal's [request](https://github.com/request/request) stream: - -``` javascript -var FormData = require('form-data'); -var request = require('request'); - -var form = new FormData(); - -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_logo', request('http://nodejs.org/images/logo.png')); -``` - -In order to submit this form to a web application, call ```submit(url, [callback])``` method: - -``` javascript -form.submit('http://example.org/', function(err, res) { - // res – response object (http.IncomingMessage) // - res.resume(); -}); - -``` - -For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. - -### Custom options - -You can provide custom options, such as `maxDataSize`: - -``` javascript -var FormData = require('form-data'); - -var form = new FormData({ maxDataSize: 20971520 }); -form.append('my_field', 'my value'); -form.append('my_buffer', /* something big */); -``` - -List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) - -### Alternative submission methods - -You can use node's http client interface: - -``` javascript -var http = require('http'); - -var request = http.request({ - method: 'post', - host: 'example.org', - path: '/upload', - headers: form.getHeaders() -}); - -form.pipe(request); - -request.on('response', function(res) { - console.log(res.statusCode); -}); -``` - -Or if you would prefer the `'Content-Length'` header to be set for you: - -``` javascript -form.submit('example.org/upload', function(err, res) { - console.log(res.statusCode); -}); -``` - -To use custom headers and pre-known length in parts: - -``` javascript -var CRLF = '\r\n'; -var form = new FormData(); - -var options = { - header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, - knownLength: 1 -}; - -form.append('my_buffer', buffer, options); - -form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); -}); -``` - -Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: - -``` javascript -someModule.stream(function(err, stdout, stderr) { - if (err) throw err; - - var form = new FormData(); - - form.append('file', stdout, { - filename: 'unicycle.jpg', // ... or: - filepath: 'photos/toys/unicycle.jpg', - contentType: 'image/jpeg', - knownLength: 19806 - }); - - form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); - }); -}); -``` - -The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). - -For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: - -``` javascript -form.submit({ - host: 'example.com', - path: '/probably.php?extra=params', - auth: 'username:password' -}, function(err, res) { - console.log(res.statusCode); -}); -``` - -In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: - -``` javascript -form.submit({ - host: 'example.com', - path: '/surelynot.php', - headers: {'x-test-header': 'test-header-value'} -}, function(err, res) { - console.log(res.statusCode); -}); -``` - -### Methods - -- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). -- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) -- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) -- [_Void_ setBoundary()](https://github.com/form-data/form-data#void-setboundary) -- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) -- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) -- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) -- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) -- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) -- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) - -#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) -Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. -```javascript -var form = new FormData(); -form.append( 'my_string', 'my value' ); -form.append( 'my_integer', 1 ); -form.append( 'my_boolean', true ); -form.append( 'my_buffer', new Buffer(10) ); -form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) -``` - -You may provide a string for options, or an object. -```javascript -// Set filename by providing a string for options -form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); - -// provide an object. -form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); -``` - -#### _Headers_ getHeaders( [**Headers** _userHeaders_] ) -This method adds the correct `content-type` header to the provided array of `userHeaders`. - -#### _String_ getBoundary() -Return the boundary of the formData. By default, the boundary consists of 26 `-` followed by 24 numbers -for example: -```javascript ---------------------------515890814546601021194782 -``` - -#### _Void_ setBoundary(String _boundary_) -Set the boundary string, overriding the default behavior described above. - -_Note: The boundary must be unique and may not appear in the data._ - -#### _Buffer_ getBuffer() -Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. -```javascript -var form = new FormData(); -form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); -form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); - -axios.post( 'https://example.com/path/to/api', - form.getBuffer(), - form.getHeaders() - ) -``` -**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. - -#### _Integer_ getLengthSync() -Same as `getLength` but synchronous. - -_Note: getLengthSync __doesn't__ calculate streams length._ - -#### _Integer_ getLength( **function** _callback_ ) -Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated -```javascript -this.getLength(function(err, length) { - if (err) { - this._error(err); - return; - } - - // add content length - request.setHeader('Content-Length', length); - - ... -}.bind(this)); -``` - -#### _Boolean_ hasKnownLength() -Checks if the length of added values is known. - -#### _Request_ submit( _params_, **function** _callback_ ) -Submit the form to a web application. -```javascript -var form = new FormData(); -form.append( 'my_string', 'Hello World' ); - -form.submit( 'http://example.com/', function(err, res) { - // res – response object (http.IncomingMessage) // - res.resume(); -} ); -``` - -#### _String_ toString() -Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. - -### Integration with other libraries - -#### Request - -Form submission using [request](https://github.com/request/request): - -```javascript -var formData = { - my_field: 'my_value', - my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), -}; - -request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { - if (err) { - return console.error('upload failed:', err); - } - console.log('Upload successful! Server responded with:', body); -}); -``` - -For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). - -#### node-fetch - -You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): - -```javascript -var form = new FormData(); - -form.append('a', 1); - -fetch('http://example.com', { method: 'POST', body: form }) - .then(function(res) { - return res.json(); - }).then(function(json) { - console.log(json); - }); -``` - -#### axios - -In Node.js you can post a file using [axios](https://github.com/axios/axios): -```javascript -const form = new FormData(); -const stream = fs.createReadStream(PATH_TO_FILE); - -form.append('image', stream); - -// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` -const formHeaders = form.getHeaders(); - -axios.post('http://example.com', form, { - headers: { - ...formHeaders, - }, -}) -.then(response => response) -.catch(error => error) -``` - -## Notes - -- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. -- ```getLength(cb)``` will send an error as first parameter of callback if stream length cannot be calculated (e.g. send in custom streams w/o using ```knownLength```). -- ```submit``` will not add `content-length` if form length is unknown or not calculable. -- Starting version `2.x` FormData has dropped support for `node@0.10.x`. -- Starting version `3.x` FormData has dropped support for `node@4.x`. - -## License - -Form-Data is released under the [MIT](License) license. diff --git a/reverse_engineering/node_modules/form-data/index.d.ts b/reverse_engineering/node_modules/form-data/index.d.ts deleted file mode 100644 index 295e9e9..0000000 --- a/reverse_engineering/node_modules/form-data/index.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Definitions by: Carlos Ballesteros Velasco -// Leon Yu -// BendingBender -// Maple Miao - -/// -import * as stream from 'stream'; -import * as http from 'http'; - -export = FormData; - -// Extracted because @types/node doesn't export interfaces. -interface ReadableOptions { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - read?(this: stream.Readable, size: number): void; - destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => void): void; - autoDestroy?: boolean; -} - -interface Options extends ReadableOptions { - writable?: boolean; - readable?: boolean; - dataSize?: number; - maxDataSize?: number; - pauseStreams?: boolean; -} - -declare class FormData extends stream.Readable { - constructor(options?: Options); - append(key: string, value: any, options?: FormData.AppendOptions | string): void; - getHeaders(userHeaders?: FormData.Headers): FormData.Headers; - submit( - params: string | FormData.SubmitOptions, - callback?: (error: Error | null, response: http.IncomingMessage) => void - ): http.ClientRequest; - getBuffer(): Buffer; - setBoundary(boundary: string): void; - getBoundary(): string; - getLength(callback: (err: Error | null, length: number) => void): void; - getLengthSync(): number; - hasKnownLength(): boolean; -} - -declare namespace FormData { - interface Headers { - [key: string]: any; - } - - interface AppendOptions { - header?: string | Headers; - knownLength?: number; - filename?: string; - filepath?: string; - contentType?: string; - } - - interface SubmitOptions extends http.RequestOptions { - protocol?: 'https:' | 'http:'; - } -} diff --git a/reverse_engineering/node_modules/form-data/lib/browser.js b/reverse_engineering/node_modules/form-data/lib/browser.js deleted file mode 100644 index 09e7c70..0000000 --- a/reverse_engineering/node_modules/form-data/lib/browser.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-env browser */ -module.exports = typeof self == 'object' ? self.FormData : window.FormData; diff --git a/reverse_engineering/node_modules/form-data/lib/form_data.js b/reverse_engineering/node_modules/form-data/lib/form_data.js deleted file mode 100644 index 18dc819..0000000 --- a/reverse_engineering/node_modules/form-data/lib/form_data.js +++ /dev/null @@ -1,501 +0,0 @@ -var CombinedStream = require('combined-stream'); -var util = require('util'); -var path = require('path'); -var http = require('http'); -var https = require('https'); -var parseUrl = require('url').parse; -var fs = require('fs'); -var Stream = require('stream').Stream; -var mime = require('mime-types'); -var asynckit = require('asynckit'); -var populate = require('./populate.js'); - -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - -/** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream - */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; - for (var option in options) { - this[option] = options[option]; - } -} - -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function(field, value, options) { - - options = options || {}; - - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; - } - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; - } - - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { - return; - } - - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; - -FormData.prototype._lengthRetriever = function(value, callback) { - - if (value.hasOwnProperty('fd')) { - - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { - - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); - - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { - - var fileSize; - - if (err) { - callback(err); - return; - } - - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } - - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - callback('Unknown stream'); - } -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; - } - - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; - - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); - } - - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; - - // skip nullish headers. - if (header == null) { - continue; - } - - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } - - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; - -FormData.prototype._getContentDisposition = function(value, options) { - - var filename - , contentDisposition - ; - - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); - } - - if (filename) { - contentDisposition = 'filename="' + filename + '"'; - } - - return contentDisposition; -}; - -FormData.prototype._getContentType = function(value, options) { - - // use custom content-type above all - var contentType = options.contentType; - - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } - - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } - - // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { - contentType = value.headers['content-type']; - } - - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); - } - - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } - - return contentType; -}; - -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - } - - return formHeaders; -}; - -FormData.prototype.setBoundary = function(boundary) { - this._boundary = boundary; -}; - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); - var boundary = this.getBoundary(); - - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { - - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); - } - - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); - } - } - } - - // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; - } - - return hasKnownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); - - // use custom params - } else { - - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } - } - - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); - - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); - return; - } - - // add content length - if (length) { - request.setHeader('Content-Length', length); - } - - this.pipe(request); - if (cb) { - var onResponse; - - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); - - return cb.call(this, error, responce); - }; - - onResponse = callback.bind(this, null); - - request.on('error', callback); - request.on('response', onResponse); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } -}; - -FormData.prototype.toString = function () { - return '[object FormData]'; -}; diff --git a/reverse_engineering/node_modules/form-data/lib/populate.js b/reverse_engineering/node_modules/form-data/lib/populate.js deleted file mode 100644 index 4d35738..0000000 --- a/reverse_engineering/node_modules/form-data/lib/populate.js +++ /dev/null @@ -1,10 +0,0 @@ -// populates missing values -module.exports = function(dst, src) { - - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); - - return dst; -}; diff --git a/reverse_engineering/node_modules/form-data/package.json b/reverse_engineering/node_modules/form-data/package.json deleted file mode 100644 index 0f20240..0000000 --- a/reverse_engineering/node_modules/form-data/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "author": "Felix Geisendörfer (http://debuggable.com/)", - "name": "form-data", - "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", - "version": "4.0.0", - "repository": { - "type": "git", - "url": "git://github.com/form-data/form-data.git" - }, - "main": "./lib/form_data", - "browser": "./lib/browser", - "typings": "./index.d.ts", - "scripts": { - "pretest": "rimraf coverage test/tmp", - "test": "istanbul cover test/run.js", - "posttest": "istanbul report lcov text", - "lint": "eslint lib/*.js test/*.js test/integration/*.js", - "report": "istanbul report lcov text", - "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8", - "ci-test": "npm run test && npm run browser && npm run report", - "predebug": "rimraf coverage test/tmp", - "debug": "verbose=1 ./test/run.js", - "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", - "check": "istanbul check-coverage coverage/coverage*.json", - "files": "pkgfiles --sort=name", - "get-version": "node -e \"console.log(require('./package.json').version)\"", - "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md", - "restore-readme": "mv README.md.bak README.md", - "prepublish": "in-publish && npm run update-readme || not-in-publish", - "postpublish": "npm run restore-readme" - }, - "pre-commit": [ - "lint", - "ci-test", - "check" - ], - "engines": { - "node": ">= 6" - }, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "devDependencies": { - "@types/node": "^12.0.10", - "browserify": "^13.1.1", - "browserify-istanbul": "^2.0.0", - "coveralls": "^3.0.4", - "cross-spawn": "^6.0.5", - "eslint": "^6.0.1", - "fake": "^0.2.2", - "far": "^0.0.7", - "formidable": "^1.0.17", - "in-publish": "^2.0.0", - "is-node-modern": "^1.0.0", - "istanbul": "^0.4.5", - "obake": "^0.1.2", - "puppeteer": "^1.19.0", - "pkgfiles": "^2.3.0", - "pre-commit": "^1.1.3", - "request": "^2.88.0", - "rimraf": "^2.7.1", - "tape": "^4.6.2", - "typescript": "^3.5.2" - }, - "license": "MIT" -} diff --git a/reverse_engineering/node_modules/http-proxy-agent/README.md b/reverse_engineering/node_modules/http-proxy-agent/README.md deleted file mode 100644 index d60e206..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/README.md +++ /dev/null @@ -1,74 +0,0 @@ -http-proxy-agent -================ -### An HTTP(s) proxy `http.Agent` implementation for HTTP -[![Build Status](https://github.com/TooTallNate/node-http-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-http-proxy-agent/actions?workflow=Node+CI) - -This module provides an `http.Agent` implementation that connects to a specified -HTTP or HTTPS proxy server, and can be used with the built-in `http` module. - -__Note:__ For HTTP proxy usage with the `https` module, check out -[`node-https-proxy-agent`](https://github.com/TooTallNate/node-https-proxy-agent). - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install http-proxy-agent -``` - - -Example -------- - -``` js -var url = require('url'); -var http = require('http'); -var HttpProxyAgent = require('http-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// HTTP endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'http://nodejs.org/api/'; -console.log('attempting to GET %j', endpoint); -var opts = url.parse(endpoint); - -// create an instance of the `HttpProxyAgent` class with the proxy server information -var agent = new HttpProxyAgent(proxy); -opts.agent = agent; - -http.get(opts, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/reverse_engineering/node_modules/http-proxy-agent/dist/agent.d.ts b/reverse_engineering/node_modules/http-proxy-agent/dist/agent.d.ts deleted file mode 100644 index 3f043f7..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/dist/agent.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/// -import net from 'net'; -import { Agent, ClientRequest, RequestOptions } from 'agent-base'; -import { HttpProxyAgentOptions } from '.'; -interface HttpProxyAgentClientRequest extends ClientRequest { - path: string; - output?: string[]; - outputData?: { - data: string; - }[]; - _header?: string | null; - _implicitHeader(): void; -} -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public - */ -export default class HttpProxyAgent extends Agent { - private secureProxy; - private proxy; - constructor(_opts: string | HttpProxyAgentOptions); - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req: HttpProxyAgentClientRequest, opts: RequestOptions): Promise; -} -export {}; diff --git a/reverse_engineering/node_modules/http-proxy-agent/dist/agent.js b/reverse_engineering/node_modules/http-proxy-agent/dist/agent.js deleted file mode 100644 index aca8280..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/dist/agent.js +++ /dev/null @@ -1,145 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const net_1 = __importDefault(require("net")); -const tls_1 = __importDefault(require("tls")); -const url_1 = __importDefault(require("url")); -const debug_1 = __importDefault(require("debug")); -const once_1 = __importDefault(require("@tootallnate/once")); -const agent_base_1 = require("agent-base"); -const debug = (0, debug_1.default)('http-proxy-agent'); -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public - */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('Creating new HttpProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - const parsed = url_1.default.parse(req.path); - if (!parsed.protocol) { - parsed.protocol = 'http:'; - } - if (!parsed.hostname) { - parsed.hostname = opts.hostname || opts.host || null; - } - if (parsed.port == null && typeof opts.port) { - parsed.port = String(opts.port); - } - if (parsed.port === '80') { - // if port is 80, then we can remove the port so that the - // ":80" portion is not on the produced URL - parsed.port = ''; - } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = url_1.default.format(parsed); - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); - } - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - if (req._header) { - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._header = null; - req._implicitHeader(); - if (req.output && req.output.length > 0) { - // Node < 12 - debug('Patching connection write() output buffer with updated header'); - first = req.output[0]; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.output[0] = req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.output); - } - else if (req.outputData && req.outputData.length > 0) { - // Node >= 12 - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - yield (0, once_1.default)(socket, 'connect'); - return socket; - }); - } -} -exports.default = HttpProxyAgent; -//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/http-proxy-agent/dist/agent.js.map b/reverse_engineering/node_modules/http-proxy-agent/dist/agent.js.map deleted file mode 100644 index bd3b56a..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/dist/agent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,kDAAgC;AAChC,6DAAqC;AACrC,2CAAkE;AAGlE,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,kBAAkB,CAAC,CAAC;AAY9C,SAAS,OAAO,CAAC,QAAwB;IACxC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3E,CAAC;AAED;;;;;GAKG;AACH,MAAqB,cAAe,SAAQ,kBAAK;IAIhD,YAAY,KAAqC;QAChD,IAAI,IAA2B,CAAC;QAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC9B,IAAI,GAA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mEAAmE;YACnE,qEAAqE;YACrE,qDAAqD;YACrD,MAAM,IAAA,cAAI,EAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAE9B,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;CACD;AA1ID,iCA0IC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/http-proxy-agent/dist/index.d.ts b/reverse_engineering/node_modules/http-proxy-agent/dist/index.d.ts deleted file mode 100644 index 24bdb52..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/dist/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// -import net from 'net'; -import tls from 'tls'; -import { Url } from 'url'; -import { AgentOptions } from 'agent-base'; -import _HttpProxyAgent from './agent'; -declare function createHttpProxyAgent(opts: string | createHttpProxyAgent.HttpProxyAgentOptions): _HttpProxyAgent; -declare namespace createHttpProxyAgent { - interface BaseHttpProxyAgentOptions { - secureProxy?: boolean; - host?: string | null; - path?: string | null; - port?: string | number | null; - } - export interface HttpProxyAgentOptions extends AgentOptions, BaseHttpProxyAgentOptions, Partial> { - } - export type HttpProxyAgent = _HttpProxyAgent; - export const HttpProxyAgent: typeof _HttpProxyAgent; - export {}; -} -export = createHttpProxyAgent; diff --git a/reverse_engineering/node_modules/http-proxy-agent/dist/index.js b/reverse_engineering/node_modules/http-proxy-agent/dist/index.js deleted file mode 100644 index 0a71180..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/dist/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(require("./agent")); -function createHttpProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpProxyAgent) { - createHttpProxyAgent.HttpProxyAgent = agent_1.default; - createHttpProxyAgent.prototype = agent_1.default.prototype; -})(createHttpProxyAgent || (createHttpProxyAgent = {})); -module.exports = createHttpProxyAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/http-proxy-agent/dist/index.js.map b/reverse_engineering/node_modules/http-proxy-agent/dist/index.js.map deleted file mode 100644 index e07dae5..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAIA,oDAAsC;AAEtC,SAAS,oBAAoB,CAC5B,IAAyD;IAEzD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,WAAU,oBAAoB;IAmBhB,mCAAc,GAAG,eAAe,CAAC;IAE9C,oBAAoB,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;AAC5D,CAAC,EAtBS,oBAAoB,KAApB,oBAAoB,QAsB7B;AAED,iBAAS,oBAAoB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/http-proxy-agent/package.json b/reverse_engineering/node_modules/http-proxy-agent/package.json deleted file mode 100644 index 659d6e1..0000000 --- a/reverse_engineering/node_modules/http-proxy-agent/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "http-proxy-agent", - "version": "5.0.0", - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-http-proxy-agent.git" - }, - "keywords": [ - "http", - "proxy", - "endpoint", - "agent" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-http-proxy-agent/issues" - }, - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "devDependencies": { - "@types/debug": "4", - "@types/node": "^12.19.2", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "proxy": "1", - "rimraf": "^3.0.0", - "typescript": "^4.4.3" - }, - "engines": { - "node": ">= 6" - } -} diff --git a/reverse_engineering/node_modules/https-proxy-agent/README.md b/reverse_engineering/node_modules/https-proxy-agent/README.md deleted file mode 100644 index 328656a..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/README.md +++ /dev/null @@ -1,137 +0,0 @@ -https-proxy-agent -================ -### An HTTP(s) proxy `http.Agent` implementation for HTTPS -[![Build Status](https://github.com/TooTallNate/node-https-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI) - -This module provides an `http.Agent` implementation that connects to a specified -HTTP or HTTPS proxy server, and can be used with the built-in `https` module. - -Specifically, this `Agent` implementation connects to an intermediary "proxy" -server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to -open a direct TCP connection to the destination server. - -Since this agent implements the CONNECT HTTP method, it also works with other -protocols that use this method when connecting over proxies (i.e. WebSockets). -See the "Examples" section below for more. - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install https-proxy-agent -``` - - -Examples --------- - -#### `https` module example - -``` js -var url = require('url'); -var https = require('https'); -var HttpsProxyAgent = require('https-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// HTTPS endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate'; -console.log('attempting to GET %j', endpoint); -var options = url.parse(endpoint); - -// create an instance of the `HttpsProxyAgent` class with the proxy server information -var agent = new HttpsProxyAgent(proxy); -options.agent = agent; - -https.get(options, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -#### `ws` WebSocket connection example - -``` js -var url = require('url'); -var WebSocket = require('ws'); -var HttpsProxyAgent = require('https-proxy-agent'); - -// HTTP/HTTPS proxy to connect to -var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; -console.log('using proxy server %j', proxy); - -// WebSocket endpoint for the proxy to connect to -var endpoint = process.argv[2] || 'ws://echo.websocket.org'; -var parsed = url.parse(endpoint); -console.log('attempting to connect to WebSocket %j', endpoint); - -// create an instance of the `HttpsProxyAgent` class with the proxy server information -var options = url.parse(proxy); - -var agent = new HttpsProxyAgent(options); - -// finally, initiate the WebSocket connection -var socket = new WebSocket(endpoint, { agent: agent }); - -socket.on('open', function () { - console.log('"open" event!'); - socket.send('hello world'); -}); - -socket.on('message', function (data, flags) { - console.log('"message" event! %j %j', data, flags); - socket.close(); -}); -``` - -API ---- - -### new HttpsProxyAgent(Object options) - -The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects -to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket -requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT]. - -The `options` argument may either be a string URI of the proxy server to use, or an -"options" object with more specific properties: - - * `host` - String - Proxy host to connect to (may use `hostname` as well). Required. - * `port` - Number - Proxy port to connect to. Required. - * `protocol` - String - If `https:`, then use TLS to connect to the proxy. - * `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method. - * Any other options given are passed to the `net.connect()`/`tls.connect()` functions. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/agent.d.ts b/reverse_engineering/node_modules/https-proxy-agent/dist/agent.d.ts deleted file mode 100644 index 4f1c636..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/agent.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -import net from 'net'; -import { Agent, ClientRequest, RequestOptions } from 'agent-base'; -import { HttpsProxyAgentOptions } from '.'; -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - * - * @api public - */ -export default class HttpsProxyAgent extends Agent { - private secureProxy; - private proxy; - constructor(_opts: string | HttpsProxyAgentOptions); - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req: ClientRequest, opts: RequestOptions): Promise; -} diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/agent.js b/reverse_engineering/node_modules/https-proxy-agent/dist/agent.js deleted file mode 100644 index 75d1136..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/agent.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const net_1 = __importDefault(require("net")); -const tls_1 = __importDefault(require("tls")); -const url_1 = __importDefault(require("url")); -const assert_1 = __importDefault(require("assert")); -const debug_1 = __importDefault(require("debug")); -const agent_base_1 = require("agent-base"); -const parse_proxy_response_1 = __importDefault(require("./parse-proxy-response")); -const debug = debug_1.default('https-proxy-agent:agent'); -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - * - * @api public - */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('creating new HttpsProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - // ALPN is supported by Node.js >= v5. - // attempt to negotiate http/1.1 for proxy servers that support http/2 - if (this.secureProxy && !('ALPNProtocols' in proxy)) { - proxy.ALPNProtocols = ['http 1.1']; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - const headers = Object.assign({}, proxy.headers); - const hostname = `${opts.host}:${opts.port}`; - let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; - } - // The `Host` header should only include the port - // number when it is not the default port. - let { host, port, secureEndpoint } = opts; - if (!isDefaultPort(port, secureEndpoint)) { - host += `:${port}`; - } - headers.Host = host; - headers.Connection = 'close'; - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = parse_proxy_response_1.default(socket); - socket.write(`${payload}\r\n`); - const { statusCode, buffered } = yield proxyResponsePromise; - if (statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, - servername })); - } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net_1.default.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('replaying proxy buffer for failed request'); - assert_1.default(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - return fakeSocket; - }); - } -} -exports.default = HttpsProxyAgent; -function resume(socket) { - socket.resume(); -} -function isDefaultPort(port, secure) { - return Boolean((!secure && port === 80) || (secure && port === 443)); -} -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/agent.js.map b/reverse_engineering/node_modules/https-proxy-agent/dist/agent.js.map deleted file mode 100644 index 0af6c17..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/agent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACtB,8CAAsB;AACtB,oDAA4B;AAC5B,kDAAgC;AAEhC,2CAAkE;AAElE,kFAAwD;AAExD,MAAM,KAAK,GAAG,eAAW,CAAC,yBAAyB,CAAC,CAAC;AAErD;;;;;;;;;;;;;GAa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,EAAE,CAAC,CAAa,EAAE,EAAE;gBACpC,KAAK,CAAC,2CAA2C,CAAC,CAAC;gBACnD,gBAAM,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;gBAEpC,gEAAgE;gBAChE,8DAA8D;gBAC9D,YAAY;gBACZ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,OAAO,UAAU,CAAC;QACnB,CAAC;KAAA;CACD;AA3JD,kCA2JC;AAED,SAAS,MAAM,CAAC,MAAkC;IACjD,MAAM,CAAC,MAAM,EAAE,CAAC;AACjB,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,MAAe;IACnD,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,OAAO,CAAC,QAAwB;IACxC,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3E,CAAC;AAED,SAAS,IAAI,CACZ,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAEX,CAAC;IACF,IAAI,GAAqB,CAAC;IAC1B,KAAK,GAAG,IAAI,GAAG,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/index.d.ts b/reverse_engineering/node_modules/https-proxy-agent/dist/index.d.ts deleted file mode 100644 index 0d60062..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -import net from 'net'; -import tls from 'tls'; -import { Url } from 'url'; -import { AgentOptions } from 'agent-base'; -import { OutgoingHttpHeaders } from 'http'; -import _HttpsProxyAgent from './agent'; -declare function createHttpsProxyAgent(opts: string | createHttpsProxyAgent.HttpsProxyAgentOptions): _HttpsProxyAgent; -declare namespace createHttpsProxyAgent { - interface BaseHttpsProxyAgentOptions { - headers?: OutgoingHttpHeaders; - secureProxy?: boolean; - host?: string | null; - path?: string | null; - port?: string | number | null; - } - export interface HttpsProxyAgentOptions extends AgentOptions, BaseHttpsProxyAgentOptions, Partial> { - } - export type HttpsProxyAgent = _HttpsProxyAgent; - export const HttpsProxyAgent: typeof _HttpsProxyAgent; - export {}; -} -export = createHttpsProxyAgent; diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/index.js b/reverse_engineering/node_modules/https-proxy-agent/dist/index.js deleted file mode 100644 index b03e763..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(require("./agent")); -function createHttpsProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpsProxyAgent) { - createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; - createHttpsProxyAgent.prototype = agent_1.default.prototype; -})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); -module.exports = createHttpsProxyAgent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/index.js.map b/reverse_engineering/node_modules/https-proxy-agent/dist/index.js.map deleted file mode 100644 index f3ce559..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAKA,oDAAuC;AAEvC,SAAS,qBAAqB,CAC7B,IAA2D;IAE3D,OAAO,IAAI,eAAgB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,WAAU,qBAAqB;IAoBjB,qCAAe,GAAG,eAAgB,CAAC;IAEhD,qBAAqB,CAAC,SAAS,GAAG,eAAgB,CAAC,SAAS,CAAC;AAC9D,CAAC,EAvBS,qBAAqB,KAArB,qBAAqB,QAuB9B;AAED,iBAAS,qBAAqB,CAAC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts b/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts deleted file mode 100644 index 7565674..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import { Readable } from 'stream'; -export interface ProxyResponse { - statusCode: number; - buffered: Buffer; -} -export default function parseProxyResponse(socket: Readable): Promise; diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.js deleted file mode 100644 index aa5ce3c..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const debug_1 = __importDefault(require("debug")); -const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('close', onclose); - socket.removeListener('readable', read); - } - function onclose(err) { - debug('onclose had error %o', err); - } - function onend() { - debug('onend'); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); - const statusCode = +firstLine.split(' ')[1]; - debug('got proxy server response: %o', firstLine); - resolve({ - statusCode, - buffered - }); - } - socket.on('error', onerror); - socket.on('close', onclose); - socket.on('end', onend); - read(); - }); -} -exports.default = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map \ No newline at end of file diff --git a/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map b/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map deleted file mode 100644 index bacdb84..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;;;AAAA,kDAAgC;AAGhC,MAAM,KAAK,GAAG,eAAW,CAAC,wCAAwC,CAAC,CAAC;AAOpE,SAAwB,kBAAkB,CACzC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAA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AAU,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;YAClD,OAAO,CAAC;gBACP,UAAU;gBACV,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;AACJ,CAAC;AAvED,qCAuEC"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/https-proxy-agent/package.json b/reverse_engineering/node_modules/https-proxy-agent/package.json deleted file mode 100644 index fb2aba1..0000000 --- a/reverse_engineering/node_modules/https-proxy-agent/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "https-proxy-agent", - "version": "5.0.1", - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", - "main": "dist/index", - "types": "dist/index", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "test": "mocha --reporter spec", - "test-lint": "eslint src --ext .js,.ts", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-https-proxy-agent.git" - }, - "keywords": [ - "https", - "proxy", - "endpoint", - "agent" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues" - }, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "devDependencies": { - "@types/debug": "4", - "@types/node": "^12.12.11", - "@typescript-eslint/eslint-plugin": "1.6.0", - "@typescript-eslint/parser": "1.1.0", - "eslint": "5.16.0", - "eslint-config-airbnb": "17.1.0", - "eslint-config-prettier": "4.1.0", - "eslint-import-resolver-typescript": "1.1.1", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-jsx-a11y": "6.2.1", - "eslint-plugin-react": "7.12.4", - "mocha": "^6.2.2", - "proxy": "1", - "rimraf": "^3.0.0", - "typescript": "^3.5.3" - }, - "engines": { - "node": ">= 6" - } -} diff --git a/reverse_engineering/node_modules/jsbi/LICENSE b/reverse_engineering/node_modules/jsbi/LICENSE deleted file mode 100644 index 4f6f639..0000000 --- a/reverse_engineering/node_modules/jsbi/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/reverse_engineering/node_modules/jsbi/README.md b/reverse_engineering/node_modules/jsbi/README.md deleted file mode 100644 index 152ba03..0000000 --- a/reverse_engineering/node_modules/jsbi/README.md +++ /dev/null @@ -1,164 +0,0 @@ -# JSBI — pure-JavaScript BigInts [![Build status](https://travis-ci.com/GoogleChromeLabs/jsbi.svg?branch=main)](https://travis-ci.com/GoogleChromeLabs/jsbi) [![jsbi on npm](https://img.shields.io/npm/v/jsbi)](https://www.npmjs.com/package/jsbi) - -JSBI is a pure-JavaScript implementation of [the ECMAScript BigInt proposal](https://tc39.es/proposal-bigint/), which officially became a part of the JavaScript language in ES2020. - -## Installation - -```sh -npm install jsbi --save -``` - -## Usage - -```js -import JSBI from './jsbi.mjs'; - -const max = JSBI.BigInt(Number.MAX_SAFE_INTEGER); -console.log(String(max)); -// → '9007199254740991' -const other = JSBI.BigInt('2'); -const result = JSBI.add(max, other); -console.log(String(result)); -// → '9007199254740993' -``` - -Note: explicitly call `toString` on any `JSBI` instances when `console.log()`ing them to see their numeric representation (e.g. `String(max)` or `max.toString()`). Without it (e.g. `console.log(max)`), you’ll instead see the object that represents the value. - -Use [babel-plugin-transform-jsbi-to-bigint](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) to transpile JSBI code into native BigInt code. - -Refer to the detailed instructions below for more information. - -## Why? - -[Native BigInts are already shipping](https://v8.dev/features/bigint) in modern browsers (at the time of this writing, Google Chrome 67+, Opera 54+, Firefox 68+, Edge 79+, Safari 14+) and Node.js (v10.4+), but some users are still running older browsers — which means you can't use them yet if you want your code to run everywhere. - -To use BigInts in code that you want to run *everywhere*, you need a library. But there’s a difficulty: the BigInt proposal changes the behavior of operators (like `+`, `>=`, etc.) to work on BigInts. These changes are impossible to polyfill directly; and they are also making it infeasible (in most cases) to transpile BigInt code to fallback code using Babel or similar tools. The reason is that such a transpilation would have to replace every single operator in the program with a call to some function that performs type checks on its inputs, which would incur an unacceptable performance penalty. - -The solution is to do it the other way round: write code using a library’s syntax, and [transpile it to native BigInt code](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) when available. JSBI is designed for exactly this purpose: it provides a BigInt “polyfill” implementation that behaves exactly like the upcoming native BigInts, but with a syntax that you can ship on all browsers, today. - -Its advantages over other, existing big-integer libraries are: - -- it behaves exactly like native BigInts do where they are available, so to eventually migrate to those, you can [mechanically](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) update your code’s syntax; no re-thinking of its logic will be required. -- strong focus on performance. On average, JSBI is performance-competitive with the native implementation that Google Chrome is currently shipping. (Note: we expect this statement to gradually become outdated as browsers invest in additional optimizations.) - -## How? - -Except for mechanical differences in syntax, you use JSBI-BigInts just [like you would use native BigInts](https://developers.google.com/web/updates/2018/05/bigint). Some things even look the same, after you replace `BigInt` with `JSBI.BigInt`: - -| Operation | native BigInts | JSBI | -| -------------------- | ----------------------- | ------------------------ | -| Creation from String | `a = BigInt('456')` | `a = JSBI.BigInt('456')` | -| Creation from Number | `a = BigInt(789)` | `a = JSBI.BigInt(789)` | -| Conversion to String | `a.toString(radix)` | `a.toString(radix)` | -| Conversion to Number | `Number(a)` | `JSBI.toNumber(a)` | -| Truncation | `BigInt.asIntN(64, a)` | `JSBI.asIntN(64, a)` | -| | `BigInt.asUintN(64, a)` | `JSBI.asUintN(64, a)` | -| Type check | `typeof a === 'bigint'` | `a instanceof JSBI` | - -Most operators are replaced by static functions: - -| Operation | native BigInts | JSBI | -| --------------------------- | -------------- | --------------------------------- | -| Addition | `c = a + b` | `c = JSBI.add(a, b)` | -| Subtraction | `c = a - b` | `c = JSBI.subtract(a, b)` | -| Multiplication | `c = a * b` | `c = JSBI.multiply(a, b)` | -| Division | `c = a / b` | `c = JSBI.divide(a, b)` | -| Remainder | `c = a % b` | `c = JSBI.remainder(a, b)` | -| Exponentiation | `c = a ** b` | `c = JSBI.exponentiate(a, b)` | -| Negation | `b = -a` | `b = JSBI.unaryMinus(a)` | -| Bitwise negation | `b = ~a` | `b = JSBI.bitwiseNot(a)` | -| Left shifting | `c = a << b` | `c = JSBI.leftShift(a, b)` | -| Right shifting | `c = a >> b` | `c = JSBI.signedRightShift(a, b)` | -| Bitwise “and” | `c = a & b` | `c = JSBI.bitwiseAnd(a, b)` | -| Bitwise “or” | `c = a \| b` | `c = JSBI.bitwiseOr(a, b)` | -| Bitwise “xor” | `c = a ^ b` | `c = JSBI.bitwiseXor(a, b)` | -| Comparison to other BigInts | `a === b` | `JSBI.equal(a, b)` | -| | `a !== b` | `JSBI.notEqual(a, b)` | -| | `a < b` | `JSBI.lessThan(a, b)` | -| | `a <= b` | `JSBI.lessThanOrEqual(a, b)` | -| | `a > b` | `JSBI.greaterThan(a, b)` | -| | `a >= b` | `JSBI.greaterThanOrEqual(a, b)` | - -The functions above operate only on BigInts. (They don’t perform type checks in the current implementation, because such checks are a waste of time when we assume that you know what you’re doing. Don’t try to call them with other inputs, or you’ll get “interesting” failures!) - -Some operations are particularly interesting when you give them inputs of mixed types, e.g. comparing a BigInt to a Number, or concatenating a string with a BigInt. They are implemented as static functions named after the respective native operators: - -| Operation | native BigInts | JSBI | -| ------------------------------- | -------------- | ---------------- | -| Abstract equality comparison | `x == y` | `JSBI.EQ(x, y)` | -| Generic “not equal” | `x != y` | `JSBI.NE(x, y)` | -| Generic “less than” | `x < y` | `JSBI.LT(x, y)` | -| Generic “less than or equal” | `x <= y` | `JSBI.LE(x, y)` | -| Generic “greater than” | `x > y` | `JSBI.GT(x, y)` | -| Generic “greater than or equal” | `x >= y` | `JSBI.GE(x, y)` | -| Generic addition | `x + y` | `JSBI.ADD(x, y)` | - -The variable names `x` and `y` here indicate that the variables can refer to anything, for example: `JSBI.GT(101.5, BigInt('100'))` or `str = JSBI.ADD('result: ', BigInt('0x2A'))`. - -Unfortunately, there are also a few things that are not supported at all: - -| Unsupported operation | native BigInts | JSBI | -| --------------------- | -------------- | ------------------------------------ | -| literals | `a = 123n;` | N/A ☹ | -| increment | `a++` | N/A ☹ | -| | `a + 1n` | `JSBI.add(a, JSBI.BigInt('1'))` | -| decrement | `a--` | N/A ☹ | -| | `a - 1n` | `JSBI.subtract(a, JSBI.BigInt('1'))` | - -It is impossible to replicate the exact behavior of the native `++` and `--` operators in a polyfill/library. Since JSBI is intended to be transpiled away eventually, it doesn’t provide a similar-but-different alternative. You can use `JSBI.add()` and `JSBI.subtract()` instead. - -## When? - -Now! The JSBI library is ready for use today. - -Once BigInts are natively supported everywhere, use [babel-plugin-transform-jsbi-to-bigint](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) to transpile your JSBI code into native BigInt code once and for all. - -View [our issue tracker](https://github.com/GoogleChromeLabs/jsbi/issues) to learn more about out our future plans for JSBI, and please join the discussion! - -A more vague future plan is to use the JSBI library (or an extension to it) as a staging ground for additional BigInt-related functionality. The official proposal is intentionally somewhat minimal, and leaves further “library functions” for follow-up proposals. Examples are a combined `exp`+`mod` function, and bit manipulation functions. - -## Development - -1. Clone this repository and `cd` into the local directory. - -1. Use the Node.js version specified in `.nvmrc`: - - ```sh - nvm use - ``` - -1. Install development dependencies: - - ```sh - npm install - ``` - -1. Run the tests: - - ```sh - npm test - ``` - - See `npm run` for the list of commands. - -## For maintainers - -### How to publish a new release - -1. On the `main` branch, bump the version number in `package.json`: - - ```sh - npm version patch -m 'Release v%s' - ``` - - Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). - - Note that this produces a Git commit + tag. - -1. Push the release commit and tag: - - ```sh - git push && git push --tags - ``` - - Our CI then automatically publishes the new release to npm. diff --git a/reverse_engineering/node_modules/jsbi/dist/jsbi-cjs.js b/reverse_engineering/node_modules/jsbi/dist/jsbi-cjs.js deleted file mode 100644 index bb9f2a5..0000000 --- a/reverse_engineering/node_modules/jsbi/dist/jsbi-cjs.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict';class JSBI extends Array{constructor(i,_){if(super(i),this.sign=_,i>JSBI.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(i){var _=Math.floor,t=Number.isFinite;if("number"==typeof i){if(0===i)return JSBI.__zero();if(JSBI.__isOneDigitInt(i))return 0>i?JSBI.__oneDigit(-i,!0):JSBI.__oneDigit(i,!1);if(!t(i)||_(i)!==i)throw new RangeError("The number "+i+" cannot be converted to BigInt because it is not an integer");return JSBI.__fromDouble(i)}if("string"==typeof i){const _=JSBI.__fromString(i);if(null===_)throw new SyntaxError("Cannot convert "+i+" to a BigInt");return _}if("boolean"==typeof i)return!0===i?JSBI.__oneDigit(1,!1):JSBI.__zero();if("object"==typeof i){if(i.constructor===JSBI)return i;const _=JSBI.__toPrimitive(i);return JSBI.BigInt(_)}throw new TypeError("Cannot convert "+i+" to a BigInt")}toDebugString(){const i=["BigInt["];for(const _ of this)i.push((_?(_>>>0).toString(16):_)+", ");return i.push("]"),i.join("")}toString(i=10){if(2>i||36>>=12;const a=l-12;let u=12<=l?0:o<<20+l,d=20+l;for(0>>30-a,u=o<>>30-d,d-=30;const h=JSBI.__decideRounding(i,d,s,o);if((1===h||0===h&&1==(1&u))&&(u=u+1>>>0,0===u&&(r++,0!=r>>>20&&(r=0,g++,1023=JSBI.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===i.length&&2===i.__digit(0)){const _=1+(0|t/30),e=i.sign&&0!=(1&t),n=new JSBI(_,e);n.__initializeDigits();const g=1<>=1;0!==t;t>>=1)n=JSBI.multiply(n,n),0!=(1&t)&&(null===e?e=n:e=JSBI.multiply(e,n));return e}static multiply(_,t){if(0===_.length)return _;if(0===t.length)return t;let i=_.length+t.length;30<=_.__clzmsd()+t.__clzmsd()&&i--;const e=new JSBI(i,_.sign!==t.sign);e.__initializeDigits();for(let n=0;n<_.length;n++)JSBI.__multiplyAccumulate(t,_.__digit(n),e,n);return e.__trim()}static divide(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>JSBI.__absoluteCompare(i,_))return JSBI.__zero();const t=i.sign!==_.sign,e=_.__unsignedDigit(0);let n;if(1===_.length&&32767>=e){if(1===e)return t===i.sign?i:JSBI.unaryMinus(i);n=JSBI.__absoluteDivSmall(i,e,null)}else n=JSBI.__absoluteDivLarge(i,_,!0,!1);return n.sign=t,n.__trim()}static remainder(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>JSBI.__absoluteCompare(i,_))return i;const t=_.__unsignedDigit(0);if(1===_.length&&32767>=t){if(1===t)return JSBI.__zero();const _=JSBI.__absoluteModSmall(i,t);return 0===_?JSBI.__zero():JSBI.__oneDigit(_,i.sign)}const e=JSBI.__absoluteDivLarge(i,_,!1,!0);return e.sign=i.sign,e.__trim()}static add(i,_){const t=i.sign;return t===_.sign?JSBI.__absoluteAdd(i,_,t):0<=JSBI.__absoluteCompare(i,_)?JSBI.__absoluteSub(i,_,t):JSBI.__absoluteSub(_,i,!t)}static subtract(i,_){const t=i.sign;return t===_.sign?0<=JSBI.__absoluteCompare(i,_)?JSBI.__absoluteSub(i,_,t):JSBI.__absoluteSub(_,i,!t):JSBI.__absoluteAdd(i,_,t)}static leftShift(i,_){return 0===_.length||0===i.length?i:_.sign?JSBI.__rightShiftByAbsolute(i,_):JSBI.__leftShiftByAbsolute(i,_)}static signedRightShift(i,_){return 0===_.length||0===i.length?i:_.sign?JSBI.__leftShiftByAbsolute(i,_):JSBI.__rightShiftByAbsolute(i,_)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(i,_){return 0>JSBI.__compareToBigInt(i,_)}static lessThanOrEqual(i,_){return 0>=JSBI.__compareToBigInt(i,_)}static greaterThan(i,_){return 0_)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===_)return JSBI.__zero();if(_>=JSBI.__kMaxLengthBits)return t;const e=0|(_+29)/30;if(t.lengthi)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===i)return JSBI.__zero();if(_.sign){if(i>JSBI.__kMaxLengthBits)throw new RangeError("BigInt too big");return JSBI.__truncateAndSubFromPowerOfTwo(i,_,!1)}if(i>=JSBI.__kMaxLengthBits)return _;const e=0|(i+29)/30;if(_.length>>g)return _}return JSBI.__truncateToNBits(i,_)}static ADD(i,_){if(i=JSBI.__toPrimitive(i),_=JSBI.__toPrimitive(_),"string"==typeof i)return"string"!=typeof _&&(_=_.toString()),i+_;if("string"==typeof _)return i.toString()+_;if(i=JSBI.__toNumeric(i),_=JSBI.__toNumeric(_),JSBI.__isBigInt(i)&&JSBI.__isBigInt(_))return JSBI.add(i,_);if("number"==typeof i&&"number"==typeof _)return i+_;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(i,_){return JSBI.__compare(i,_,0)}static LE(i,_){return JSBI.__compare(i,_,1)}static GT(i,_){return JSBI.__compare(i,_,2)}static GE(i,_){return JSBI.__compare(i,_,3)}static EQ(i,_){for(;;){if(JSBI.__isBigInt(i))return JSBI.__isBigInt(_)?JSBI.equal(i,_):JSBI.EQ(_,i);if("number"==typeof i){if(JSBI.__isBigInt(_))return JSBI.__equalToNumber(_,i);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("string"==typeof i){if(JSBI.__isBigInt(_))return i=JSBI.__fromString(i),null!==i&&JSBI.equal(i,_);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("boolean"==typeof i){if(JSBI.__isBigInt(_))return JSBI.__equalToNumber(_,+i);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("symbol"==typeof i){if(JSBI.__isBigInt(_))return!1;if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("object"==typeof i){if("object"==typeof _&&_.constructor!==JSBI)return i==_;i=JSBI.__toPrimitive(i)}else return i==_}}static NE(i,_){return!JSBI.EQ(i,_)}static __zero(){return new JSBI(0,!1)}static __oneDigit(i,_){const t=new JSBI(1,_);return t.__setDigit(0,i),t}__copy(){const _=new JSBI(this.length,this.sign);for(let t=0;t_)n=-_-1;else{if(0===t)return-1;t--,e=i.__digit(t),n=29}let g=1<>>20,t=_-1023,e=(0|t/30)+1,n=new JSBI(e,0>i);let g=1048575&JSBI.__kBitConversionInts[1]|1048576,o=JSBI.__kBitConversionInts[0];const s=20,l=t%30;let r,a=0;if(l<20){const i=s-l;a=i+32,r=g>>>i,g=g<<32-i|o>>>i,o<<=32-i}else if(l===20)a=32,r=g,g=o,o=0;else{const i=l-s;a=32-i,r=g<>>32-i,g=o<>>2,g=g<<30|o>>>2,o<<=30):r=0,n.__setDigit(_,r);return n.__trim()}static __isWhitespace(i){return!!(13>=i&&9<=i)||(159>=i?32==i:131071>=i?160==i||5760==i:196607>=i?(i&=131071,10>=i||40==i||41==i||47==i||95==i||4096==i):65279==i)}static __fromString(i,_=0){let t=0;const e=i.length;let n=0;if(n===e)return JSBI.__zero();let g=i.charCodeAt(n);for(;JSBI.__isWhitespace(g);){if(++n===e)return JSBI.__zero();g=i.charCodeAt(n)}if(43===g){if(++n===e)return null;g=i.charCodeAt(n),t=1}else if(45===g){if(++n===e)return null;g=i.charCodeAt(n),t=-1}if(0===_){if(_=10,48===g){if(++n===e)return JSBI.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(_=16,++n===e)return null;g=i.charCodeAt(n)}else if(79===g||111===g){if(_=8,++n===e)return null;g=i.charCodeAt(n)}else if(66===g||98===g){if(_=2,++n===e)return null;g=i.charCodeAt(n)}}}else if(16===_&&48===g){if(++n===e)return JSBI.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(++n===e)return null;g=i.charCodeAt(n)}}if(0!=t&&10!==_)return null;for(;48===g;){if(++n===e)return JSBI.__zero();g=i.charCodeAt(n)}const o=e-n;let s=JSBI.__kMaxBitsPerChar[_],l=JSBI.__kBitsPerCharTableMultiplier-1;if(o>1073741824/s)return null;const r=s*o+l>>>JSBI.__kBitsPerCharTableShift,a=new JSBI(0|(r+29)/30,!1),u=10>_?_:10,h=10<_?_-10:0;if(0==(_&_-1)){s>>=JSBI.__kBitsPerCharTableShift;const _=[],t=[];let o=!1;do{let l=0,r=0;for(;;){let _;if(g-48>>>0>>0>>0>>0>>JSBI.__kBitsPerCharTableShift)/30;a.__inplaceMultiplyAdd(b,r,D)}while(!t)}if(n!==e){if(!JSBI.__isWhitespace(g))return null;for(n++;n>>l-o)}if(0!==g){if(n>=_.length)throw new Error("implementation bug");_.__setDigit(n++,g)}for(;n<_.length;n++)_.__setDigit(n,0)}static __toStringBasePowerOfTwo(_,i){const t=_.length;let e=i-1;e=(85&e>>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const n=e,g=i-1,o=_.__digit(t-1),s=JSBI.__clz30(o);let l=0|(30*t-s+n-1)/n;if(_.sign&&l++,268435456>>o,d=30-o;d>=n;)r[a--]=JSBI.__kConversionChars[u&g],u>>>=n,d-=n}const h=(u|o<>>n-d;0!==u;)r[a--]=JSBI.__kConversionChars[u&g],u>>>=n;if(_.sign&&(r[a--]="-"),-1!=a)throw new Error("implementation bug");return r.join("")}static __toStringGeneric(_,i,t){const e=_.length;if(0===e)return"";if(1===e){let e=_.__unsignedDigit(0).toString(i);return!1===t&&_.sign&&(e="-"+e),e}const n=30*e-JSBI.__clz30(_.__digit(e-1)),g=JSBI.__kMaxBitsPerChar[i],o=g-1;let s=n*JSBI.__kBitsPerCharTableMultiplier;s+=o-1,s=0|s/o;const l=s+1>>1,r=JSBI.exponentiate(JSBI.__oneDigit(i,!1),JSBI.__oneDigit(l,!1));let a,u;const d=r.__unsignedDigit(0);if(1===r.length&&32767>=d){a=new JSBI(_.length,!1),a.__initializeDigits();let t=0;for(let e=2*_.length-1;0<=e;e--){const i=t<<15|_.__halfDigit(e);a.__setHalfDigit(e,0|i/d),t=0|i%d}u=t.toString(i)}else{const t=JSBI.__absoluteDivLarge(_,r,!0,!0);a=t.quotient;const e=t.remainder.__trim();u=JSBI.__toStringGeneric(e,i,!0)}a.__trim();let h=JSBI.__toStringGeneric(a,i,!0);for(;u.lengthe?JSBI.__absoluteLess(t):0}static __compareToNumber(i,_){if(JSBI.__isOneDigitInt(_)){const t=i.sign,e=0>_;if(t!==e)return JSBI.__unequalSign(t);if(0===i.length){if(e)throw new Error("implementation bug");return 0===_?0:-1}if(1n?JSBI.__absoluteGreater(t):g_)return JSBI.__unequalSign(t);if(0===_)throw new Error("implementation bug: should be handled elsewhere");if(0===i.length)return-1;JSBI.__kBitConversionDouble[0]=_;const e=2047&JSBI.__kBitConversionInts[1]>>>20;if(2047==e)throw new Error("implementation bug: handled elsewhere");const n=e-1023;if(0>n)return JSBI.__absoluteGreater(t);const g=i.length;let o=i.__digit(g-1);const s=JSBI.__clz30(o),l=30*g-s,r=n+1;if(lr)return JSBI.__absoluteGreater(t);let a=1048576|1048575&JSBI.__kBitConversionInts[1],u=JSBI.__kBitConversionInts[0];const d=20,h=29-s;if(h!==(0|(l-1)%30))throw new Error("implementation bug");let m,b=0;if(20>h){const i=d-h;b=i+32,m=a>>>i,a=a<<32-i|u>>>i,u<<=32-i}else if(20===h)b=32,m=a,a=u,u=0;else{const i=h-d;b=32-i,m=a<>>32-i,a=u<>>=0,m>>>=0,o>m)return JSBI.__absoluteGreater(t);if(o>>2,a=a<<30|u>>>2,u<<=30):m=0;const _=i.__unsignedDigit(e);if(_>m)return JSBI.__absoluteGreater(t);if(__&&i.__unsignedDigit(0)===t(_):0===JSBI.__compareToDouble(i,_)}static __comparisonResultToBool(i,_){return 0===_?0>i:1===_?0>=i:2===_?0_;case 3:return i>=_;}if(JSBI.__isBigInt(i)&&"string"==typeof _)return _=JSBI.__fromString(_),null!==_&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if("string"==typeof i&&JSBI.__isBigInt(_))return i=JSBI.__fromString(i),null!==i&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if(i=JSBI.__toNumeric(i),_=JSBI.__toNumeric(_),JSBI.__isBigInt(i)){if(JSBI.__isBigInt(_))return JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if("number"!=typeof _)throw new Error("implementation bug");return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(i,_),t)}if("number"!=typeof i)throw new Error("implementation bug");if(JSBI.__isBigInt(_))return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(_,i),2^t);if("number"!=typeof _)throw new Error("implementation bug");return 0===t?i<_:1===t?i<=_:2===t?i>_:3===t?i>=_:void 0}__clzmsd(){return JSBI.__clz30(this.__digit(this.length-1))}static __absoluteAdd(_,t,e){if(_.length>>30,g.__setDigit(s,1073741823&i)}for(;s<_.length;s++){const i=_.__digit(s)+o;o=i>>>30,g.__setDigit(s,1073741823&i)}return s>>30,n.__setDigit(o,1073741823&i)}for(;o<_.length;o++){const i=_.__digit(o)-g;g=1&i>>>30,n.__setDigit(o,1073741823&i)}return n.__trim()}static __absoluteAddOne(_,i,t=null){const e=_.length;null===t?t=new JSBI(e,i):t.sign=i;let n=1;for(let g=0;g>>30,t.__setDigit(g,1073741823&i)}return 0!=n&&t.__setDigitGrow(e,1),t}static __absoluteSubOne(_,t){const e=_.length;t=t||e;const n=new JSBI(t,!1);let g=1;for(let o=0;o>>30,n.__setDigit(o,1073741823&i)}if(0!=g)throw new Error("implementation bug");for(let g=e;gn?0:_.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(_,t,e,n){if(0===t)return;const g=32767&t,o=t>>>15;let s=0,l=0;for(let r,a=0;a<_.length;a++,n++){r=e.__digit(n);const i=_.__digit(a),t=32767&i,u=i>>>15,d=JSBI.__imul(t,g),h=JSBI.__imul(t,o),m=JSBI.__imul(u,g),b=JSBI.__imul(u,o);r+=l+d+s,s=r>>>30,r&=1073741823,r+=((32767&h)<<15)+((32767&m)<<15),s+=r>>>30,l=b+(h>>>15)+(m>>>15),e.__setDigit(n,1073741823&r)}for(;0!=s||0!==l;n++){let i=e.__digit(n);i+=s+l,l=0,s=i>>>30,e.__setDigit(n,1073741823&i)}}static __internalMultiplyAdd(_,t,e,g,o){let s=e,l=0;for(let n=0;n>>15,t),a=e+((32767&g)<<15)+l+s;s=a>>>30,l=g>>>15,o.__setDigit(n,1073741823&a)}if(o.length>g)for(o.__setDigit(g++,s+l);gthis.length&&(t=this.length);const e=32767&i,n=i>>>15;let g=0,o=_;for(let s=0;s>>15,l=JSBI.__imul(_,e),r=JSBI.__imul(_,n),a=JSBI.__imul(t,e),u=JSBI.__imul(t,n);let d=o+l+g;g=d>>>30,d&=1073741823,d+=((32767&r)<<15)+((32767&a)<<15),g+=d>>>30,o=u+(r>>>15)+(a>>>15),this.__setDigit(s,1073741823&d)}if(0!=g||0!==o)throw new Error("implementation bug")}static __absoluteDivSmall(_,t,e=null){null===e&&(e=new JSBI(_.length,!1));let n=0;for(let g,o=2*_.length-1;0<=o;o-=2){g=(n<<15|_.__halfDigit(o))>>>0;const i=0|g/t;n=0|g%t,g=(n<<15|_.__halfDigit(o-1))>>>0;const s=0|g/t;n=0|g%t,e.__setDigit(o>>>1,i<<15|s)}return e}static __absoluteModSmall(_,t){let e=0;for(let n=2*_.length-1;0<=n;n--){const i=(e<<15|_.__halfDigit(n))>>>0;e=0|i%t}return e}static __absoluteDivLarge(i,_,t,e){const g=_.__halfDigitLength(),n=_.length,o=i.__halfDigitLength()-g;let s=null;t&&(s=new JSBI(o+2>>>1,!1),s.__initializeDigits());const l=new JSBI(g+2>>>1,!1);l.__initializeDigits();const r=JSBI.__clz15(_.__halfDigit(g-1));0>>0;r=0|t/u;let e=0|t%u;const n=_.__halfDigit(g-2),o=a.__halfDigit(h+g-2);for(;JSBI.__imul(r,n)>>>0>(e<<16|o)>>>0&&(r--,e+=u,!(32767>>1,d|r))}if(e)return a.__inplaceRightShift(r),t?{quotient:s,remainder:a}:a;if(t)return s;throw new Error("unreachable")}static __clz15(i){return JSBI.__clz30(i)-15}__inplaceAdd(_,t,e){let n=0;for(let g=0;g>>15,this.__setHalfDigit(t+g,32767&i)}return n}__inplaceSub(_,t,e){let n=0;if(1&t){t>>=1;let g=this.__digit(t),o=32767&g,s=0;for(;s>>1;s++){const i=_.__digit(s),e=(g>>>15)-(32767&i)-n;n=1&e>>>15,this.__setDigit(t+s,(32767&e)<<15|32767&o),g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15}const i=_.__digit(s),l=(g>>>15)-(32767&i)-n;n=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o);if(t+s+1>=this.length)throw new RangeError("out of bounds");0==(1&e)&&(g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15,this.__setDigit(t+_.length,1073709056&g|32767&o))}else{t>>=1;let g=0;for(;g<_.length-1;g++){const i=this.__digit(t+g),e=_.__digit(g),o=(32767&i)-(32767&e)-n;n=1&o>>>15;const s=(i>>>15)-(e>>>15)-n;n=1&s>>>15,this.__setDigit(t+g,(32767&s)<<15|32767&o)}const i=this.__digit(t+g),o=_.__digit(g),s=(32767&i)-(32767&o)-n;n=1&s>>>15;let l=0;0==(1&e)&&(l=(i>>>15)-(o>>>15)-n,n=1&l>>>15),this.__setDigit(t+g,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(_){if(0===_)return;let t=this.__digit(0)>>>_;const e=this.length-1;for(let n=0;n>>_}this.__setDigit(e,t)}static __specialLeftShift(_,t,e){const g=_.length,n=new JSBI(g+e,!1);if(0===t){for(let t=0;t>>30-t}return 0t)throw new RangeError("BigInt too big");const e=0|t/30,n=t%30,g=_.length,o=0!==n&&0!=_.__digit(g-1)>>>30-n,s=g+e+(o?1:0),l=new JSBI(s,_.sign);if(0===n){let t=0;for(;t>>30-n}if(o)l.__setDigit(g+e,t);else if(0!==t)throw new Error("implementation bug")}return l.__trim()}static __rightShiftByAbsolute(_,i){const t=_.length,e=_.sign,n=JSBI.__toShiftAmount(i);if(0>n)return JSBI.__rightShiftByMaximum(e);const g=0|n/30,o=n%30;let s=t-g;if(0>=s)return JSBI.__rightShiftByMaximum(e);let l=!1;if(e){if(0!=(_.__digit(g)&(1<>>o;const n=t-g-1;for(let t=0;t>>o}r.__setDigit(n,e)}return l&&(r=JSBI.__absoluteAddOne(r,!0,r)),r.__trim()}static __rightShiftByMaximum(i){return i?JSBI.__oneDigit(1,!0):JSBI.__zero()}static __toShiftAmount(i){if(1JSBI.__kMaxLengthBits?-1:_}static __toPrimitive(i,_="default"){if("object"!=typeof i)return i;if(i.constructor===JSBI)return i;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const t=i[Symbol.toPrimitive];if(t){const i=t(_);if("object"!=typeof i)return i;throw new TypeError("Cannot convert object to primitive value")}}const t=i.valueOf;if(t){const _=t.call(i);if("object"!=typeof _)return _}const e=i.toString;if(e){const _=e.call(i);if("object"!=typeof _)return _}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(i){return JSBI.__isBigInt(i)?i:+i}static __isBigInt(i){return"object"==typeof i&&null!==i&&i.constructor===JSBI}static __truncateToNBits(i,_){const t=0|(i+29)/30,e=new JSBI(t,_.sign),n=t-1;for(let t=0;t>>_}return e.__setDigit(n,g),e.__trim()}static __truncateAndSubFromPowerOfTwo(_,t,e){var n=Math.min;const g=0|(_+29)/30,o=new JSBI(g,e);let s=0;const l=g-1;let a=0;for(const i=n(l,t.length);s>>30,o.__setDigit(s,1073741823&i)}for(;s>>i;const _=1<<32-i;h=_-u-a,h&=_-1}return o.__setDigit(l,h),o.__trim()}__digit(_){return this[_]}__unsignedDigit(_){return this[_]>>>0}__setDigit(_,i){this[_]=0|i}__setDigitGrow(_,i){this[_]=0|i}__halfDigitLength(){const i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(_){return 32767&this[_>>>1]>>>15*(1&_)}__setHalfDigit(_,i){const t=_>>>1,e=this.__digit(t),n=1&_?32767&e|i<<15:1073709056&e|32767&i;this.__setDigit(t,n)}static __digitPow(i,_){let t=1;for(;0<_;)1&_&&(t*=i),_>>>=1,i*=i;return t}static __isOneDigitInt(i){return(1073741823&i)===i}}JSBI.__kMaxLength=33554432,JSBI.__kMaxLengthBits=JSBI.__kMaxLength<<5,JSBI.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],JSBI.__kBitsPerCharTableShift=5,JSBI.__kBitsPerCharTableMultiplier=1<>>0)/Math.LN2)},JSBI.__imul=Math.imul||function(i,_){return 0|i*_},module.exports=JSBI; -//# sourceMappingURL=jsbi-cjs.js.map diff --git a/reverse_engineering/node_modules/jsbi/dist/jsbi-cjs.js.map b/reverse_engineering/node_modules/jsbi/dist/jsbi-cjs.js.map deleted file mode 100644 index 8937f56..0000000 --- a/reverse_engineering/node_modules/jsbi/dist/jsbi-cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jsbi-cjs.js","sources":["../lib/jsbi.ts"],"sourcesContent":[null],"names":["JSBI","Array","constructor","length","sign","__kMaxLength","RangeError","BigInt","arg","Math","floor","Number","isFinite","__zero","__isOneDigitInt","__oneDigit","__fromDouble","result","__fromString","SyntaxError","primitive","__toPrimitive","TypeError","toDebugString","digit","push","toString","join","radix","__toStringBasePowerOfTwo","__toStringGeneric","toNumber","x","xLength","value","__unsignedDigit","xMsd","__digit","msdLeadingZeros","__clz30","xBitLength","Infinity","exponent","currentDigit","digitIndex","shift","mantissaHigh","mantissaHighBitsUnset","mantissaLow","mantissaLowBitsUnset","rounding","__decideRounding","signBit","__kBitConversionInts","__kBitConversionDouble","unaryMinus","__copy","bitwiseNot","__absoluteSubOne","__trim","__absoluteAddOne","exponentiate","y","expValue","__kMaxLengthBits","neededDigits","__initializeDigits","msd","__setDigit","runningSquare","multiply","resultLength","__clzmsd","i","__multiplyAccumulate","divide","__absoluteCompare","resultSign","divisor","quotient","__absoluteDivSmall","__absoluteDivLarge","remainder","remainderDigit","__absoluteModSmall","add","__absoluteAdd","__absoluteSub","subtract","leftShift","__rightShiftByAbsolute","__leftShiftByAbsolute","signedRightShift","unsignedRightShift","lessThan","__compareToBigInt","lessThanOrEqual","greaterThan","greaterThanOrEqual","equal","notEqual","bitwiseAnd","max","__absoluteAnd","y1","__absoluteOr","__absoluteAndNot","bitwiseXor","__absoluteXor","bitwiseOr","asIntN","n","neededLength","topDigit","compareDigit","__truncateToNBits","__truncateAndSubFromPowerOfTwo","asUintN","bitsInTopDigit","ADD","__toNumeric","__isBigInt","LT","__compare","LE","GT","GE","EQ","__equalToNumber","NE","newLength","last","pop","mantissaBitsUnset","topUnconsumedBit","mask","rawExponent","digits","kMantissaHighTopBit","msdTopBit","remainingMantissaBits","__isWhitespace","c","string","cursor","current","charCodeAt","chars","bitsPerChar","__kMaxBitsPerChar","roundup","__kBitsPerCharTableMultiplier","bitsMin","__kBitsPerCharTableShift","limDigit","limAlpha","parts","partsBits","done","part","bits","d","__fillFromParts","charsSoFar","multiplier","m","digitsSoFar","__inplaceMultiplyAdd","bitsInDigit","partBits","Error","charMask","charsRequired","pos","availableBits","newDigit","__kConversionChars","consumedBits","isRecursiveCall","bitLength","maxBitsPerChar","minBitsPerChar","secondHalfChars","conqueror","secondHalf","input","__halfDigit","__setHalfDigit","divisionResult","firstHalf","__unequalSign","leftNegative","__absoluteGreater","bothNegative","__absoluteLess","xSign","__compareToNumber","ySign","yAbs","abs","xDigit","__compareToDouble","yBitLength","compareMantissa","__comparisonResultToBool","op","carry","r","borrow","inputLength","__setDigitGrow","yLength","numPairs","tmp","tmpLength","diff","multiplicand","accumulator","accumulatorIndex","m2Low","m2High","high","acc","m1","m1Low","m1High","rLow","__imul","rMid1","rMid2","rHigh","__internalMultiplyAdd","source","factor","summand","rx","ry","mLow","mHigh","dLow","dHigh","pLow","pMid1","pMid2","pHigh","upperHalf","lowerHalf","dividend","wantQuotient","wantRemainder","__halfDigitLength","n2","q","qhatv","__clz15","__specialLeftShift","u","vn1","halfDigitBuffer","qhat","j","ujn","rhat","vn2","ujn2","__inplaceSub","__inplaceAdd","__inplaceRightShift","startIndex","halfDigits","sum","subtrahend","r0","sub","r15","addDigit","__toShiftAmount","digitShift","bitsShift","grow","__rightShiftByMaximum","mustRoundDown","obj","hint","Symbol","toPrimitive","exoticToPrim","valueOf","call","drop","min","limit","msdBitsConsumed","resultMsd","minuendMsd","len","previous","updated","__digitPow","base","ArrayBuffer","Float64Array","__kBitConversionBuffer","Int32Array","clz32","log","LN2","imul","a","b"],"mappings":"aAaA,KAAMA,CAAAA,IAAN,QAAmBC,CAAAA,MACjBC,YAAYC,EAAwBC,GAElC,GADA,MAAMD,CAAN,CACA,CAFkC,SAAA,CAAAC,CAElC,CAAID,CAAM,CAAGH,IAAI,CAACK,YAAlB,CACE,KAAM,IAAIC,CAAAA,UAAJ,CAAe,8BAAf,CAET,CAEY,MAANC,CAAAA,MAAM,CAACC,CAAD,QASoBC,IAAI,CAACC,QAA7BC,MAAM,CAACC,SARd,GAAmB,QAAf,QAAOJ,CAAAA,CAAX,CAA6B,CAC3B,GAAY,CAAR,GAAAA,CAAJ,CAAe,MAAOR,CAAAA,IAAI,CAACa,MAAL,EAAP,CACf,GAAIb,IAAI,CAACc,eAAL,CAAqBN,CAArB,CAAJ,OACY,EAAN,CAAAA,CADN,CAEWR,IAAI,CAACe,UAAL,CAAgB,CAACP,CAAjB,IAFX,CAISR,IAAI,CAACe,UAAL,CAAgBP,CAAhB,IAJT,CAMA,GAAI,CAAC,EAAgBA,CAAhB,CAAD,EAAyB,EAAWA,CAAX,IAAoBA,CAAjD,CACE,KAAM,IAAIF,CAAAA,UAAJ,CAAe,cAAgBE,CAAhB,8DAAf,CAAN,CAGF,MAAOR,CAAAA,IAAI,CAACgB,YAAL,CAAkBR,CAAlB,CACR,CAAM,GAAmB,QAAf,QA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8S,sBAAtB,EACzB9S,yBAAA,CAAuB,GAAI+S,CAAAA,UAAJ,CAAe/S,IAAI,CAAC8S,sBAApB,EAKvB9S,YAAA,CAAUS,IAAI,CAACuS,KAAL,CAAa,SAAShR,CAAT,EAC5B,MAAOvB,CAAAA,IAAI,CAACuS,KAAL,CAAWhR,CAAX,EAAgB,CACxB,CAFgB,CAEb,SAASA,CAAT,QACQ,EAAN,GAAAA,EAAgB,GAC6B,CAA1C,KAAqC,CAA/B,CAAAvB,IAAI,CAACwS,GAAL,CAASjR,CAAC,GAAK,CAAf,EAAoBvB,IAAI,CAACyS,GAA/B,CACR,EACMlT,WAAA,CAASS,IAAI,CAAC0S,IAAL,EAAa,SAASC,CAAT,CAAoBC,CAApB,EAC3B,MAAiB,EAAV,CAACD,CAAC,CAAGC,CACb"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/jsbi/dist/jsbi-umd.js b/reverse_engineering/node_modules/jsbi/dist/jsbi-umd.js deleted file mode 100644 index de5e6a3..0000000 --- a/reverse_engineering/node_modules/jsbi/dist/jsbi-umd.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(i,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_():"function"==typeof define&&define.amd?define(_):(i=i||self,i.JSBI=_())})(this,function(){'use strict';var i=Math.imul,_=Math.clz32,t=Math.abs,e=Math.max,g=Math.floor;class o extends Array{constructor(i,_){if(super(i),this.sign=_,i>o.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(i){var _=Number.isFinite;if("number"==typeof i){if(0===i)return o.__zero();if(o.__isOneDigitInt(i))return 0>i?o.__oneDigit(-i,!0):o.__oneDigit(i,!1);if(!_(i)||g(i)!==i)throw new RangeError("The number "+i+" cannot be converted to BigInt because it is not an integer");return o.__fromDouble(i)}if("string"==typeof i){const _=o.__fromString(i);if(null===_)throw new SyntaxError("Cannot convert "+i+" to a BigInt");return _}if("boolean"==typeof i)return!0===i?o.__oneDigit(1,!1):o.__zero();if("object"==typeof i){if(i.constructor===o)return i;const _=o.__toPrimitive(i);return o.BigInt(_)}throw new TypeError("Cannot convert "+i+" to a BigInt")}toDebugString(){const i=["BigInt["];for(const _ of this)i.push((_?(_>>>0).toString(16):_)+", ");return i.push("]"),i.join("")}toString(i=10){if(2>i||36>>=12;const u=r-12;let d=12<=r?0:s<<20+r,h=20+r;for(0>>30-u,d=s<>>30-h,h-=30;const m=o.__decideRounding(i,h,l,s);if((1===m||0===m&&1==(1&d))&&(d=d+1>>>0,0===d&&(a++,0!=a>>>20&&(a=0,g++,1023=o.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===i.length&&2===i.__digit(0)){const _=1+(0|t/30),e=i.sign&&0!=(1&t),n=new o(_,e);n.__initializeDigits();const g=1<>=1;0!==t;t>>=1)n=o.multiply(n,n),0!=(1&t)&&(null===e?e=n:e=o.multiply(e,n));return e}static multiply(_,t){if(0===_.length)return _;if(0===t.length)return t;let i=_.length+t.length;30<=_.__clzmsd()+t.__clzmsd()&&i--;const e=new o(i,_.sign!==t.sign);e.__initializeDigits();for(let n=0;n<_.length;n++)o.__multiplyAccumulate(t,_.__digit(n),e,n);return e.__trim()}static divide(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>o.__absoluteCompare(i,_))return o.__zero();const t=i.sign!==_.sign,e=_.__unsignedDigit(0);let n;if(1===_.length&&32767>=e){if(1===e)return t===i.sign?i:o.unaryMinus(i);n=o.__absoluteDivSmall(i,e,null)}else n=o.__absoluteDivLarge(i,_,!0,!1);return n.sign=t,n.__trim()}static remainder(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>o.__absoluteCompare(i,_))return i;const t=_.__unsignedDigit(0);if(1===_.length&&32767>=t){if(1===t)return o.__zero();const _=o.__absoluteModSmall(i,t);return 0===_?o.__zero():o.__oneDigit(_,i.sign)}const e=o.__absoluteDivLarge(i,_,!1,!0);return e.sign=i.sign,e.__trim()}static add(i,_){const t=i.sign;return t===_.sign?o.__absoluteAdd(i,_,t):0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t)}static subtract(i,_){const t=i.sign;return t===_.sign?0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t):o.__absoluteAdd(i,_,t)}static leftShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__rightShiftByAbsolute(i,_):o.__leftShiftByAbsolute(i,_)}static signedRightShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__leftShiftByAbsolute(i,_):o.__rightShiftByAbsolute(i,_)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(i,_){return 0>o.__compareToBigInt(i,_)}static lessThanOrEqual(i,_){return 0>=o.__compareToBigInt(i,_)}static greaterThan(i,_){return 0_)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===_)return o.__zero();if(_>=o.__kMaxLengthBits)return t;const e=0|(_+29)/30;if(t.lengthi)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===i)return o.__zero();if(_.sign){if(i>o.__kMaxLengthBits)throw new RangeError("BigInt too big");return o.__truncateAndSubFromPowerOfTwo(i,_,!1)}if(i>=o.__kMaxLengthBits)return _;const t=0|(i+29)/30;if(_.length>>e)return _}return o.__truncateToNBits(i,_)}static ADD(i,_){if(i=o.__toPrimitive(i),_=o.__toPrimitive(_),"string"==typeof i)return"string"!=typeof _&&(_=_.toString()),i+_;if("string"==typeof _)return i.toString()+_;if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)&&o.__isBigInt(_))return o.add(i,_);if("number"==typeof i&&"number"==typeof _)return i+_;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(i,_){return o.__compare(i,_,0)}static LE(i,_){return o.__compare(i,_,1)}static GT(i,_){return o.__compare(i,_,2)}static GE(i,_){return o.__compare(i,_,3)}static EQ(i,_){for(;;){if(o.__isBigInt(i))return o.__isBigInt(_)?o.equal(i,_):o.EQ(_,i);if("number"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,i);if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if("string"==typeof i){if(o.__isBigInt(_))return i=o.__fromString(i),null!==i&&o.equal(i,_);if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if("boolean"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,+i);if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if("symbol"==typeof i){if(o.__isBigInt(_))return!1;if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if("object"==typeof i){if("object"==typeof _&&_.constructor!==o)return i==_;i=o.__toPrimitive(i)}else return i==_}}static NE(i,_){return!o.EQ(i,_)}static __zero(){return new o(0,!1)}static __oneDigit(i,_){const t=new o(1,_);return t.__setDigit(0,i),t}__copy(){const _=new o(this.length,this.sign);for(let t=0;t_)n=-_-1;else{if(0===t)return-1;t--,e=i.__digit(t),n=29}let g=1<>>20,t=_-1023,e=(0|t/30)+1,n=new o(e,0>i);let g=1048575&o.__kBitConversionInts[1]|1048576,s=o.__kBitConversionInts[0];const l=20,r=t%30;let a,u=0;if(20>r){const i=l-r;u=i+32,a=g>>>i,g=g<<32-i|s>>>i,s<<=32-i}else if(20===r)u=32,a=g,g=s,s=0;else{const i=r-l;u=32-i,a=g<>>32-i,g=s<>>2,g=g<<30|s>>>2,s<<=30):a=0,n.__setDigit(_,a);return n.__trim()}static __isWhitespace(i){return!!(13>=i&&9<=i)||(159>=i?32==i:131071>=i?160==i||5760==i:196607>=i?(i&=131071,10>=i||40==i||41==i||47==i||95==i||4096==i):65279==i)}static __fromString(i,_=0){let t=0;const e=i.length;let n=0;if(n===e)return o.__zero();let g=i.charCodeAt(n);for(;o.__isWhitespace(g);){if(++n===e)return o.__zero();g=i.charCodeAt(n)}if(43===g){if(++n===e)return null;g=i.charCodeAt(n),t=1}else if(45===g){if(++n===e)return null;g=i.charCodeAt(n),t=-1}if(0===_){if(_=10,48===g){if(++n===e)return o.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(_=16,++n===e)return null;g=i.charCodeAt(n)}else if(79===g||111===g){if(_=8,++n===e)return null;g=i.charCodeAt(n)}else if(66===g||98===g){if(_=2,++n===e)return null;g=i.charCodeAt(n)}}}else if(16===_&&48===g){if(++n===e)return o.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(++n===e)return null;g=i.charCodeAt(n)}}if(0!=t&&10!==_)return null;for(;48===g;){if(++n===e)return o.__zero();g=i.charCodeAt(n)}const s=e-n;let l=o.__kMaxBitsPerChar[_],r=o.__kBitsPerCharTableMultiplier-1;if(s>1073741824/l)return null;const a=l*s+r>>>o.__kBitsPerCharTableShift,u=new o(0|(a+29)/30,!1),h=10>_?_:10,b=10<_?_-10:0;if(0==(_&_-1)){l>>=o.__kBitsPerCharTableShift;const _=[],t=[];let s=!1;do{let o=0,r=0;for(;;){let _;if(g-48>>>0>>0>>0>>0>>o.__kBitsPerCharTableShift)/30;u.__inplaceMultiplyAdd(D,a,c)}while(!t)}if(n!==e){if(!o.__isWhitespace(g))return null;for(n++;n>>l-o)}if(0!==g){if(n>=_.length)throw new Error("implementation bug");_.__setDigit(n++,g)}for(;n<_.length;n++)_.__setDigit(n,0)}static __toStringBasePowerOfTwo(_,i){const t=_.length;let e=i-1;e=(85&e>>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const n=e,g=i-1,s=_.__digit(t-1),l=o.__clz30(s);let r=0|(30*t-l+n-1)/n;if(_.sign&&r++,268435456>>s,h=30-s;h>=n;)a[u--]=o.__kConversionChars[d&g],d>>>=n,h-=n}const m=(d|s<>>n-h;0!==d;)a[u--]=o.__kConversionChars[d&g],d>>>=n;if(_.sign&&(a[u--]="-"),-1!=u)throw new Error("implementation bug");return a.join("")}static __toStringGeneric(_,i,t){const e=_.length;if(0===e)return"";if(1===e){let e=_.__unsignedDigit(0).toString(i);return!1===t&&_.sign&&(e="-"+e),e}const n=30*e-o.__clz30(_.__digit(e-1)),g=o.__kMaxBitsPerChar[i],s=g-1;let l=n*o.__kBitsPerCharTableMultiplier;l+=s-1,l=0|l/s;const r=l+1>>1,a=o.exponentiate(o.__oneDigit(i,!1),o.__oneDigit(r,!1));let u,d;const h=a.__unsignedDigit(0);if(1===a.length&&32767>=h){u=new o(_.length,!1),u.__initializeDigits();let t=0;for(let e=2*_.length-1;0<=e;e--){const i=t<<15|_.__halfDigit(e);u.__setHalfDigit(e,0|i/h),t=0|i%h}d=t.toString(i)}else{const t=o.__absoluteDivLarge(_,a,!0,!0);u=t.quotient;const e=t.remainder.__trim();d=o.__toStringGeneric(e,i,!0)}u.__trim();let m=o.__toStringGeneric(u,i,!0);for(;d.lengthe?o.__absoluteLess(t):0}static __compareToNumber(i,_){if(o.__isOneDigitInt(_)){const e=i.sign,n=0>_;if(e!==n)return o.__unequalSign(e);if(0===i.length){if(n)throw new Error("implementation bug");return 0===_?0:-1}if(1g?o.__absoluteGreater(e):s_)return o.__unequalSign(t);if(0===_)throw new Error("implementation bug: should be handled elsewhere");if(0===i.length)return-1;o.__kBitConversionDouble[0]=_;const e=2047&o.__kBitConversionInts[1]>>>20;if(2047==e)throw new Error("implementation bug: handled elsewhere");const n=e-1023;if(0>n)return o.__absoluteGreater(t);const g=i.length;let s=i.__digit(g-1);const l=o.__clz30(s),r=30*g-l,a=n+1;if(ra)return o.__absoluteGreater(t);let u=1048576|1048575&o.__kBitConversionInts[1],d=o.__kBitConversionInts[0];const h=20,m=29-l;if(m!==(0|(r-1)%30))throw new Error("implementation bug");let b,D=0;if(20>m){const i=h-m;D=i+32,b=u>>>i,u=u<<32-i|d>>>i,d<<=32-i}else if(20===m)D=32,b=u,u=d,d=0;else{const i=m-h;D=32-i,b=u<>>32-i,u=d<>>=0,b>>>=0,s>b)return o.__absoluteGreater(t);if(s>>2,u=u<<30|d>>>2,d<<=30):b=0;const _=i.__unsignedDigit(e);if(_>b)return o.__absoluteGreater(t);if(__&&i.__unsignedDigit(0)===t(_):0===o.__compareToDouble(i,_)}static __comparisonResultToBool(i,_){return 0===_?0>i:1===_?0>=i:2===_?0_;case 3:return i>=_;}if(o.__isBigInt(i)&&"string"==typeof _)return _=o.__fromString(_),null!==_&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if("string"==typeof i&&o.__isBigInt(_))return i=o.__fromString(i),null!==i&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)){if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if("number"!=typeof _)throw new Error("implementation bug");return o.__comparisonResultToBool(o.__compareToNumber(i,_),t)}if("number"!=typeof i)throw new Error("implementation bug");if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToNumber(_,i),2^t);if("number"!=typeof _)throw new Error("implementation bug");return 0===t?i<_:1===t?i<=_:2===t?i>_:3===t?i>=_:void 0}__clzmsd(){return o.__clz30(this.__digit(this.length-1))}static __absoluteAdd(_,t,e){if(_.length>>30,g.__setDigit(l,1073741823&i)}for(;l<_.length;l++){const i=_.__digit(l)+s;s=i>>>30,g.__setDigit(l,1073741823&i)}return l>>30,n.__setDigit(s,1073741823&i)}for(;s<_.length;s++){const i=_.__digit(s)-g;g=1&i>>>30,n.__setDigit(s,1073741823&i)}return n.__trim()}static __absoluteAddOne(_,i,t=null){const e=_.length;null===t?t=new o(e,i):t.sign=i;let n=1;for(let g=0;g>>30,t.__setDigit(g,1073741823&i)}return 0!=n&&t.__setDigitGrow(e,1),t}static __absoluteSubOne(_,t){const e=_.length;t=t||e;const n=new o(t,!1);let g=1;for(let o=0;o>>30,n.__setDigit(o,1073741823&i)}if(0!=g)throw new Error("implementation bug");for(let g=e;gn?0:_.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(_,t,e,n){if(0===t)return;const g=32767&t,s=t>>>15;let l=0,r=0;for(let a,u=0;u<_.length;u++,n++){a=e.__digit(n);const i=_.__digit(u),t=32767&i,d=i>>>15,h=o.__imul(t,g),m=o.__imul(t,s),b=o.__imul(d,g),D=o.__imul(d,s);a+=r+h+l,l=a>>>30,a&=1073741823,a+=((32767&m)<<15)+((32767&b)<<15),l+=a>>>30,r=D+(m>>>15)+(b>>>15),e.__setDigit(n,1073741823&a)}for(;0!=l||0!==r;n++){let i=e.__digit(n);i+=l+r,r=0,l=i>>>30,e.__setDigit(n,1073741823&i)}}static __internalMultiplyAdd(_,t,e,g,s){let l=e,a=0;for(let n=0;n>>15,t),u=e+((32767&g)<<15)+a+l;l=u>>>30,a=g>>>15,s.__setDigit(n,1073741823&u)}if(s.length>g)for(s.__setDigit(g++,l+a);gthis.length&&(t=this.length);const e=32767&i,n=i>>>15;let g=0,s=_;for(let l=0;l>>15,r=o.__imul(_,e),a=o.__imul(_,n),u=o.__imul(t,e),d=o.__imul(t,n);let h=s+r+g;g=h>>>30,h&=1073741823,h+=((32767&a)<<15)+((32767&u)<<15),g+=h>>>30,s=d+(a>>>15)+(u>>>15),this.__setDigit(l,1073741823&h)}if(0!=g||0!==s)throw new Error("implementation bug")}static __absoluteDivSmall(_,t,e=null){null===e&&(e=new o(_.length,!1));let n=0;for(let g,o=2*_.length-1;0<=o;o-=2){g=(n<<15|_.__halfDigit(o))>>>0;const i=0|g/t;n=0|g%t,g=(n<<15|_.__halfDigit(o-1))>>>0;const s=0|g/t;n=0|g%t,e.__setDigit(o>>>1,i<<15|s)}return e}static __absoluteModSmall(_,t){let e=0;for(let n=2*_.length-1;0<=n;n--){const i=(e<<15|_.__halfDigit(n))>>>0;e=0|i%t}return e}static __absoluteDivLarge(i,_,t,e){const g=_.__halfDigitLength(),n=_.length,s=i.__halfDigitLength()-g;let l=null;t&&(l=new o(s+2>>>1,!1),l.__initializeDigits());const r=new o(g+2>>>1,!1);r.__initializeDigits();const a=o.__clz15(_.__halfDigit(g-1));0>>0;a=0|t/u;let e=0|t%u;const n=_.__halfDigit(g-2),s=d.__halfDigit(m+g-2);for(;o.__imul(a,n)>>>0>(e<<16|s)>>>0&&(a--,e+=u,!(32767>>1,h|a))}if(e)return d.__inplaceRightShift(a),t?{quotient:l,remainder:d}:d;if(t)return l;throw new Error("unreachable")}static __clz15(i){return o.__clz30(i)-15}__inplaceAdd(_,t,e){let n=0;for(let g=0;g>>15,this.__setHalfDigit(t+g,32767&i)}return n}__inplaceSub(_,t,e){let n=0;if(1&t){t>>=1;let g=this.__digit(t),o=32767&g,s=0;for(;s>>1;s++){const i=_.__digit(s),e=(g>>>15)-(32767&i)-n;n=1&e>>>15,this.__setDigit(t+s,(32767&e)<<15|32767&o),g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15}const i=_.__digit(s),l=(g>>>15)-(32767&i)-n;n=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o);if(t+s+1>=this.length)throw new RangeError("out of bounds");0==(1&e)&&(g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15,this.__setDigit(t+_.length,1073709056&g|32767&o))}else{t>>=1;let g=0;for(;g<_.length-1;g++){const i=this.__digit(t+g),e=_.__digit(g),o=(32767&i)-(32767&e)-n;n=1&o>>>15;const s=(i>>>15)-(e>>>15)-n;n=1&s>>>15,this.__setDigit(t+g,(32767&s)<<15|32767&o)}const i=this.__digit(t+g),o=_.__digit(g),s=(32767&i)-(32767&o)-n;n=1&s>>>15;let l=0;0==(1&e)&&(l=(i>>>15)-(o>>>15)-n,n=1&l>>>15),this.__setDigit(t+g,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(_){if(0===_)return;let t=this.__digit(0)>>>_;const e=this.length-1;for(let n=0;n>>_}this.__setDigit(e,t)}static __specialLeftShift(_,t,e){const g=_.length,n=new o(g+e,!1);if(0===t){for(let t=0;t>>30-t}return 0t)throw new RangeError("BigInt too big");const e=0|t/30,n=t%30,g=_.length,s=0!==n&&0!=_.__digit(g-1)>>>30-n,l=g+e+(s?1:0),r=new o(l,_.sign);if(0===n){let t=0;for(;t>>30-n}if(s)r.__setDigit(g+e,t);else if(0!==t)throw new Error("implementation bug")}return r.__trim()}static __rightShiftByAbsolute(_,i){const t=_.length,e=_.sign,n=o.__toShiftAmount(i);if(0>n)return o.__rightShiftByMaximum(e);const g=0|n/30,s=n%30;let l=t-g;if(0>=l)return o.__rightShiftByMaximum(e);let r=!1;if(e){if(0!=(_.__digit(g)&(1<>>s;const n=t-g-1;for(let t=0;t>>s}a.__setDigit(n,e)}return r&&(a=o.__absoluteAddOne(a,!0,a)),a.__trim()}static __rightShiftByMaximum(i){return i?o.__oneDigit(1,!0):o.__zero()}static __toShiftAmount(i){if(1o.__kMaxLengthBits?-1:_}static __toPrimitive(i,_="default"){if("object"!=typeof i)return i;if(i.constructor===o)return i;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const t=i[Symbol.toPrimitive];if(t){const i=t(_);if("object"!=typeof i)return i;throw new TypeError("Cannot convert object to primitive value")}}const t=i.valueOf;if(t){const _=t.call(i);if("object"!=typeof _)return _}const e=i.toString;if(e){const _=e.call(i);if("object"!=typeof _)return _}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(i){return o.__isBigInt(i)?i:+i}static __isBigInt(i){return"object"==typeof i&&null!==i&&i.constructor===o}static __truncateToNBits(i,_){const t=0|(i+29)/30,e=new o(t,_.sign),n=t-1;for(let t=0;t>>_}return e.__setDigit(n,g),e.__trim()}static __truncateAndSubFromPowerOfTwo(_,t,e){var n=Math.min;const g=0|(_+29)/30,s=new o(g,e);let l=0;const r=g-1;let a=0;for(const i=n(r,t.length);l>>30,s.__setDigit(l,1073741823&i)}for(;l>>i;const _=1<<32-i;h=_-u-a,h&=_-1}return s.__setDigit(r,h),s.__trim()}__digit(_){return this[_]}__unsignedDigit(_){return this[_]>>>0}__setDigit(_,i){this[_]=0|i}__setDigitGrow(_,i){this[_]=0|i}__halfDigitLength(){const i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(_){return 32767&this[_>>>1]>>>15*(1&_)}__setHalfDigit(_,i){const t=_>>>1,e=this.__digit(t),n=1&_?32767&e|i<<15:1073709056&e|32767&i;this.__setDigit(t,n)}static __digitPow(i,_){let t=1;for(;0<_;)1&_&&(t*=i),_>>>=1,i*=i;return t}static __isOneDigitInt(i){return(1073741823&i)===i}}return o.__kMaxLength=33554432,o.__kMaxLengthBits=o.__kMaxLength<<5,o.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],o.__kBitsPerCharTableShift=5,o.__kBitsPerCharTableMultiplier=1<>>0)/_)},o.__imul=i||function(i,_){return 0|i*_},o}); -//# sourceMappingURL=jsbi-umd.js.map diff --git a/reverse_engineering/node_modules/jsbi/dist/jsbi-umd.js.map b/reverse_engineering/node_modules/jsbi/dist/jsbi-umd.js.map deleted file mode 100644 index 67fdb54..0000000 --- a/reverse_engineering/node_modules/jsbi/dist/jsbi-umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jsbi-umd.js","sources":["../lib/jsbi.ts"],"sourcesContent":[null],"names":["Math","imul","clz32","abs","max","floor","JSBI","Array","constructor","length","sign","__kMaxLength","RangeError","BigInt","arg","Number","isFinite","__zero","__isOneDigitInt","__oneDigit","__fromDouble","result","__fromString","SyntaxError","primitive","__toPrimitive","TypeError","toDebugString","digit","push","toString","join","radix","__toStringBasePowerOfTwo","__toStringGeneric","toNumber","x","xLength","value","__unsignedDigit","xMsd","__digit","msdLeadingZeros","__clz30","xBitLength","Infinity","exponent","currentDigit","digitIndex","shift","mantissaHigh","mantissaHighBitsUnset","mantissaLow","mantissaLowBitsUnset","rounding","__decideRounding","signBit","__kBitConversionInts","__kBitConversionDouble","unaryMinus","__copy","bitwiseNot","__absoluteSubOne","__trim","__absoluteAddOne","exponentiate","y","expValue","__kMaxLengthBits","neededDigits","__initializeDigits","msd","__setDigit","runningSquare","multiply","resultLength","__clzmsd","i","__multiplyAccumulate","divide","__absoluteCompare","resultSign","divisor","quotient","__absoluteDivSmall","__absoluteDivLarge","remainder","remainderDigit","__absoluteModSmall","add","__absoluteAdd","__absoluteSub","subtract","leftShift","__rightShiftByAbsolute","__leftShiftByAbsolute","signedRightShift","unsignedRightShift","lessThan","__compareToBigInt","lessThanOrEqual","greaterThan","greaterThanOrEqual","equal","notEqual","bitwiseAnd","__absoluteAnd","y1","__absoluteOr","__absoluteAndNot","bitwiseXor","__absoluteXor","bitwiseOr","asIntN","n","neededLength","topDigit","compareDigit","__truncateToNBits","__truncateAndSubFromPowerOfTwo","asUintN","bitsInTopDigit","ADD","__toNumeric","__isBigInt","LT","__compare","LE","GT","GE","EQ","__equalToNumber","NE","newLength","last","pop","mantissaBitsUnset","topUnconsumedBit","mask","rawExponent","digits","kMantissaHighTopBit","msdTopBit","remainingMantissaBits","__isWhitespace","c","string","cursor","current","charCodeAt","chars","bitsPerChar","__kMaxBitsPerChar","roundup","__kBitsPerCharTableMultiplier","bitsMin","__kBitsPerCharTableShift","limDigit","limAlpha","parts","partsBits","done","part","bits","d","__fillFromParts","charsSoFar","multiplier","m","digitsSoFar","__inplaceMultiplyAdd","bitsInDigit","partBits","Error","charMask","charsRequired","pos","availableBits","newDigit","__kConversionChars","consumedBits","isRecursiveCall","bitLength","maxBitsPerChar","minBitsPerChar","secondHalfChars","conqueror","secondHalf","input","__halfDigit","__setHalfDigit","divisionResult","firstHalf","__unequalSign","leftNegative","__absoluteGreater","bothNegative","__absoluteLess","xSign","__compareToNumber","ySign","yAbs","xDigit","__compareToDouble","yBitLength","compareMantissa","__comparisonResultToBool","op","carry","r","borrow","inputLength","__setDigitGrow","yLength","numPairs","tmp","tmpLength","diff","multiplicand","accumulator","accumulatorIndex","m2Low","m2High","high","acc","m1","m1Low","m1High","rLow","__imul","rMid1","rMid2","rHigh","__internalMultiplyAdd","source","factor","summand","rx","ry","mLow","mHigh","dLow","dHigh","pLow","pMid1","pMid2","pHigh","upperHalf","lowerHalf","dividend","wantQuotient","wantRemainder","__halfDigitLength","n2","q","qhatv","__clz15","__specialLeftShift","u","vn1","halfDigitBuffer","qhat","j","ujn","rhat","vn2","ujn2","__inplaceSub","__inplaceAdd","__inplaceRightShift","startIndex","halfDigits","sum","subtrahend","r0","sub","r15","addDigit","__toShiftAmount","digitShift","bitsShift","grow","__rightShiftByMaximum","mustRoundDown","obj","hint","Symbol","toPrimitive","exoticToPrim","valueOf","call","drop","min","limit","msdBitsConsumed","resultMsd","minuendMsd","len","previous","updated","__digitPow","base","ArrayBuffer","Float64Array","__kBitConversionBuffer","Int32Array","LN2","log","a","b"],"mappings":"mMA43DkBA,IAAI,CAACC,OANJD,IAAI,CAACE,QAl6BLF,IAAI,CAACG,MAjoBGH,IAAI,CAACI,MArTGJ,IAAI,CAACK,MAjBxC,KAAMC,CAAAA,CAAN,QAAmBC,CAAAA,MACjBC,YAAYC,EAAwBC,GAElC,GADA,MAAMD,CAAN,CACA,CAFkC,SAAA,CAAAC,CAElC,CAAID,CAAM,CAAGH,CAAI,CAACK,YAAlB,CACE,KAAM,IAAIC,CAAAA,UAAJ,CAAe,8BAAf,CAET,CAEY,MAANC,CAAAA,MAAM,CAACC,CAAD,QASJC,MAAM,CAACC,SARd,GAAmB,QAAf,QAAOF,CAAAA,CAAX,CAA6B,CAC3B,GAAY,CAAR,GAAAA,CAAJ,CAAe,MAAOR,CAAAA,CAAI,CAACW,MAAL,EAAP,CACf,GAAIX,CAAI,CAACY,eAAL,CAAqBJ,CAArB,CAAJ,OACY,EAAN,CAAAA,CADN,CAEWR,CAAI,CAACa,UAAL,CAAgB,CAACL,CAAjB,IAFX,CAISR,CAAI,CAACa,UAAL,CAAgBL,CAAhB,IAJT,CAMA,GAAI,CAAC,EAAgBA,CAAhB,CAAD,EAAyB,EAAWA,CAAX,IAAoBA,CAAjD,CACE,KAAM,IAAIF,CAAAA,UAAJ,CAAe,cAAgBE,CAAhB,8DAAf,CAAN,CAGF,MAAOR,CAAAA,CAAI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FgB,CAEb,SAASA,CAAT,QAE+BpC,IAAI,CAACkT,MAAzBlT,IAAI,CAACmT,UADR,EAAN,GAAA/Q,EAAgB,GAC6B,CAA1C,KAAqC,CAA/B,GAASA,CAAC,GAAK,CAAf,GAAN,CACR,EACM9B,QAAA,CAAS,GAAa,SAAS8S,CAAT,CAAoBC,CAApB,EAC3B,MAAiB,EAAV,CAACD,CAAC,CAAGC,CACb"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/jsbi/dist/jsbi.mjs b/reverse_engineering/node_modules/jsbi/dist/jsbi.mjs deleted file mode 100644 index a115512..0000000 --- a/reverse_engineering/node_modules/jsbi/dist/jsbi.mjs +++ /dev/null @@ -1,2 +0,0 @@ -class JSBI extends Array{constructor(i,_){if(super(i),this.sign=_,i>JSBI.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(i){var _=Math.floor,t=Number.isFinite;if("number"==typeof i){if(0===i)return JSBI.__zero();if(JSBI.__isOneDigitInt(i))return 0>i?JSBI.__oneDigit(-i,!0):JSBI.__oneDigit(i,!1);if(!t(i)||_(i)!==i)throw new RangeError("The number "+i+" cannot be converted to BigInt because it is not an integer");return JSBI.__fromDouble(i)}if("string"==typeof i){const _=JSBI.__fromString(i);if(null===_)throw new SyntaxError("Cannot convert "+i+" to a BigInt");return _}if("boolean"==typeof i)return!0===i?JSBI.__oneDigit(1,!1):JSBI.__zero();if("object"==typeof i){if(i.constructor===JSBI)return i;const _=JSBI.__toPrimitive(i);return JSBI.BigInt(_)}throw new TypeError("Cannot convert "+i+" to a BigInt")}toDebugString(){const i=["BigInt["];for(const _ of this)i.push((_?(_>>>0).toString(16):_)+", ");return i.push("]"),i.join("")}toString(i=10){if(2>i||36>>=12;const a=l-12;let u=12<=l?0:o<<20+l,d=20+l;for(0>>30-a,u=o<>>30-d,d-=30;const h=JSBI.__decideRounding(i,d,s,o);if((1===h||0===h&&1==(1&u))&&(u=u+1>>>0,0===u&&(r++,0!=r>>>20&&(r=0,g++,1023=JSBI.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===i.length&&2===i.__digit(0)){const _=1+(0|t/30),e=i.sign&&0!=(1&t),n=new JSBI(_,e);n.__initializeDigits();const g=1<>=1;0!==t;t>>=1)n=JSBI.multiply(n,n),0!=(1&t)&&(null===e?e=n:e=JSBI.multiply(e,n));return e}static multiply(_,t){if(0===_.length)return _;if(0===t.length)return t;let i=_.length+t.length;30<=_.__clzmsd()+t.__clzmsd()&&i--;const e=new JSBI(i,_.sign!==t.sign);e.__initializeDigits();for(let n=0;n<_.length;n++)JSBI.__multiplyAccumulate(t,_.__digit(n),e,n);return e.__trim()}static divide(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>JSBI.__absoluteCompare(i,_))return JSBI.__zero();const t=i.sign!==_.sign,e=_.__unsignedDigit(0);let n;if(1===_.length&&32767>=e){if(1===e)return t===i.sign?i:JSBI.unaryMinus(i);n=JSBI.__absoluteDivSmall(i,e,null)}else n=JSBI.__absoluteDivLarge(i,_,!0,!1);return n.sign=t,n.__trim()}static remainder(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>JSBI.__absoluteCompare(i,_))return i;const t=_.__unsignedDigit(0);if(1===_.length&&32767>=t){if(1===t)return JSBI.__zero();const _=JSBI.__absoluteModSmall(i,t);return 0===_?JSBI.__zero():JSBI.__oneDigit(_,i.sign)}const e=JSBI.__absoluteDivLarge(i,_,!1,!0);return e.sign=i.sign,e.__trim()}static add(i,_){const t=i.sign;return t===_.sign?JSBI.__absoluteAdd(i,_,t):0<=JSBI.__absoluteCompare(i,_)?JSBI.__absoluteSub(i,_,t):JSBI.__absoluteSub(_,i,!t)}static subtract(i,_){const t=i.sign;return t===_.sign?0<=JSBI.__absoluteCompare(i,_)?JSBI.__absoluteSub(i,_,t):JSBI.__absoluteSub(_,i,!t):JSBI.__absoluteAdd(i,_,t)}static leftShift(i,_){return 0===_.length||0===i.length?i:_.sign?JSBI.__rightShiftByAbsolute(i,_):JSBI.__leftShiftByAbsolute(i,_)}static signedRightShift(i,_){return 0===_.length||0===i.length?i:_.sign?JSBI.__leftShiftByAbsolute(i,_):JSBI.__rightShiftByAbsolute(i,_)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(i,_){return 0>JSBI.__compareToBigInt(i,_)}static lessThanOrEqual(i,_){return 0>=JSBI.__compareToBigInt(i,_)}static greaterThan(i,_){return 0_)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===_)return JSBI.__zero();if(_>=JSBI.__kMaxLengthBits)return t;const e=0|(_+29)/30;if(t.lengthi)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===i)return JSBI.__zero();if(_.sign){if(i>JSBI.__kMaxLengthBits)throw new RangeError("BigInt too big");return JSBI.__truncateAndSubFromPowerOfTwo(i,_,!1)}if(i>=JSBI.__kMaxLengthBits)return _;const e=0|(i+29)/30;if(_.length>>g)return _}return JSBI.__truncateToNBits(i,_)}static ADD(i,_){if(i=JSBI.__toPrimitive(i),_=JSBI.__toPrimitive(_),"string"==typeof i)return"string"!=typeof _&&(_=_.toString()),i+_;if("string"==typeof _)return i.toString()+_;if(i=JSBI.__toNumeric(i),_=JSBI.__toNumeric(_),JSBI.__isBigInt(i)&&JSBI.__isBigInt(_))return JSBI.add(i,_);if("number"==typeof i&&"number"==typeof _)return i+_;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(i,_){return JSBI.__compare(i,_,0)}static LE(i,_){return JSBI.__compare(i,_,1)}static GT(i,_){return JSBI.__compare(i,_,2)}static GE(i,_){return JSBI.__compare(i,_,3)}static EQ(i,_){for(;;){if(JSBI.__isBigInt(i))return JSBI.__isBigInt(_)?JSBI.equal(i,_):JSBI.EQ(_,i);if("number"==typeof i){if(JSBI.__isBigInt(_))return JSBI.__equalToNumber(_,i);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("string"==typeof i){if(JSBI.__isBigInt(_))return i=JSBI.__fromString(i),null!==i&&JSBI.equal(i,_);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("boolean"==typeof i){if(JSBI.__isBigInt(_))return JSBI.__equalToNumber(_,+i);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("symbol"==typeof i){if(JSBI.__isBigInt(_))return!1;if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("object"==typeof i){if("object"==typeof _&&_.constructor!==JSBI)return i==_;i=JSBI.__toPrimitive(i)}else return i==_}}static NE(i,_){return!JSBI.EQ(i,_)}static __zero(){return new JSBI(0,!1)}static __oneDigit(i,_){const t=new JSBI(1,_);return t.__setDigit(0,i),t}__copy(){const _=new JSBI(this.length,this.sign);for(let t=0;t_)n=-_-1;else{if(0===t)return-1;t--,e=i.__digit(t),n=29}let g=1<>>20,t=_-1023,e=(0|t/30)+1,n=new JSBI(e,0>i);let g=1048575&JSBI.__kBitConversionInts[1]|1048576,o=JSBI.__kBitConversionInts[0];const s=20,l=t%30;let r,a=0;if(l<20){const i=s-l;a=i+32,r=g>>>i,g=g<<32-i|o>>>i,o<<=32-i}else if(l===20)a=32,r=g,g=o,o=0;else{const i=l-s;a=32-i,r=g<>>32-i,g=o<>>2,g=g<<30|o>>>2,o<<=30):r=0,n.__setDigit(_,r);return n.__trim()}static __isWhitespace(i){return!!(13>=i&&9<=i)||(159>=i?32==i:131071>=i?160==i||5760==i:196607>=i?(i&=131071,10>=i||40==i||41==i||47==i||95==i||4096==i):65279==i)}static __fromString(i,_=0){let t=0;const e=i.length;let n=0;if(n===e)return JSBI.__zero();let g=i.charCodeAt(n);for(;JSBI.__isWhitespace(g);){if(++n===e)return JSBI.__zero();g=i.charCodeAt(n)}if(43===g){if(++n===e)return null;g=i.charCodeAt(n),t=1}else if(45===g){if(++n===e)return null;g=i.charCodeAt(n),t=-1}if(0===_){if(_=10,48===g){if(++n===e)return JSBI.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(_=16,++n===e)return null;g=i.charCodeAt(n)}else if(79===g||111===g){if(_=8,++n===e)return null;g=i.charCodeAt(n)}else if(66===g||98===g){if(_=2,++n===e)return null;g=i.charCodeAt(n)}}}else if(16===_&&48===g){if(++n===e)return JSBI.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(++n===e)return null;g=i.charCodeAt(n)}}if(0!=t&&10!==_)return null;for(;48===g;){if(++n===e)return JSBI.__zero();g=i.charCodeAt(n)}const o=e-n;let s=JSBI.__kMaxBitsPerChar[_],l=JSBI.__kBitsPerCharTableMultiplier-1;if(o>1073741824/s)return null;const r=s*o+l>>>JSBI.__kBitsPerCharTableShift,a=new JSBI(0|(r+29)/30,!1),u=10>_?_:10,h=10<_?_-10:0;if(0==(_&_-1)){s>>=JSBI.__kBitsPerCharTableShift;const _=[],t=[];let o=!1;do{let l=0,r=0;for(;;){let _;if(g-48>>>0>>0>>0>>0>>JSBI.__kBitsPerCharTableShift)/30;a.__inplaceMultiplyAdd(b,r,D)}while(!t)}if(n!==e){if(!JSBI.__isWhitespace(g))return null;for(n++;n>>l-o)}if(0!==g){if(n>=_.length)throw new Error("implementation bug");_.__setDigit(n++,g)}for(;n<_.length;n++)_.__setDigit(n,0)}static __toStringBasePowerOfTwo(_,i){const t=_.length;let e=i-1;e=(85&e>>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const n=e,g=i-1,o=_.__digit(t-1),s=JSBI.__clz30(o);let l=0|(30*t-s+n-1)/n;if(_.sign&&l++,268435456>>o,d=30-o;d>=n;)r[a--]=JSBI.__kConversionChars[u&g],u>>>=n,d-=n}const h=(u|o<>>n-d;0!==u;)r[a--]=JSBI.__kConversionChars[u&g],u>>>=n;if(_.sign&&(r[a--]="-"),-1!=a)throw new Error("implementation bug");return r.join("")}static __toStringGeneric(_,i,t){const e=_.length;if(0===e)return"";if(1===e){let e=_.__unsignedDigit(0).toString(i);return!1===t&&_.sign&&(e="-"+e),e}const n=30*e-JSBI.__clz30(_.__digit(e-1)),g=JSBI.__kMaxBitsPerChar[i],o=g-1;let s=n*JSBI.__kBitsPerCharTableMultiplier;s+=o-1,s=0|s/o;const l=s+1>>1,r=JSBI.exponentiate(JSBI.__oneDigit(i,!1),JSBI.__oneDigit(l,!1));let a,u;const d=r.__unsignedDigit(0);if(1===r.length&&32767>=d){a=new JSBI(_.length,!1),a.__initializeDigits();let t=0;for(let e=2*_.length-1;0<=e;e--){const i=t<<15|_.__halfDigit(e);a.__setHalfDigit(e,0|i/d),t=0|i%d}u=t.toString(i)}else{const t=JSBI.__absoluteDivLarge(_,r,!0,!0);a=t.quotient;const e=t.remainder.__trim();u=JSBI.__toStringGeneric(e,i,!0)}a.__trim();let h=JSBI.__toStringGeneric(a,i,!0);for(;u.lengthe?JSBI.__absoluteLess(t):0}static __compareToNumber(i,_){if(JSBI.__isOneDigitInt(_)){const t=i.sign,e=0>_;if(t!==e)return JSBI.__unequalSign(t);if(0===i.length){if(e)throw new Error("implementation bug");return 0===_?0:-1}if(1n?JSBI.__absoluteGreater(t):g_)return JSBI.__unequalSign(t);if(0===_)throw new Error("implementation bug: should be handled elsewhere");if(0===i.length)return-1;JSBI.__kBitConversionDouble[0]=_;const e=2047&JSBI.__kBitConversionInts[1]>>>20;if(2047==e)throw new Error("implementation bug: handled elsewhere");const n=e-1023;if(0>n)return JSBI.__absoluteGreater(t);const g=i.length;let o=i.__digit(g-1);const s=JSBI.__clz30(o),l=30*g-s,r=n+1;if(lr)return JSBI.__absoluteGreater(t);let a=1048576|1048575&JSBI.__kBitConversionInts[1],u=JSBI.__kBitConversionInts[0];const d=20,h=29-s;if(h!==(0|(l-1)%30))throw new Error("implementation bug");let m,b=0;if(20>h){const i=d-h;b=i+32,m=a>>>i,a=a<<32-i|u>>>i,u<<=32-i}else if(20===h)b=32,m=a,a=u,u=0;else{const i=h-d;b=32-i,m=a<>>32-i,a=u<>>=0,m>>>=0,o>m)return JSBI.__absoluteGreater(t);if(o>>2,a=a<<30|u>>>2,u<<=30):m=0;const _=i.__unsignedDigit(e);if(_>m)return JSBI.__absoluteGreater(t);if(__&&i.__unsignedDigit(0)===t(_):0===JSBI.__compareToDouble(i,_)}static __comparisonResultToBool(i,_){return 0===_?0>i:1===_?0>=i:2===_?0_;case 3:return i>=_;}if(JSBI.__isBigInt(i)&&"string"==typeof _)return _=JSBI.__fromString(_),null!==_&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if("string"==typeof i&&JSBI.__isBigInt(_))return i=JSBI.__fromString(i),null!==i&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if(i=JSBI.__toNumeric(i),_=JSBI.__toNumeric(_),JSBI.__isBigInt(i)){if(JSBI.__isBigInt(_))return JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if("number"!=typeof _)throw new Error("implementation bug");return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(i,_),t)}if("number"!=typeof i)throw new Error("implementation bug");if(JSBI.__isBigInt(_))return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(_,i),2^t);if("number"!=typeof _)throw new Error("implementation bug");return 0===t?i<_:1===t?i<=_:2===t?i>_:3===t?i>=_:void 0}__clzmsd(){return JSBI.__clz30(this.__digit(this.length-1))}static __absoluteAdd(_,t,e){if(_.length>>30,g.__setDigit(s,1073741823&i)}for(;s<_.length;s++){const i=_.__digit(s)+o;o=i>>>30,g.__setDigit(s,1073741823&i)}return s>>30,n.__setDigit(o,1073741823&i)}for(;o<_.length;o++){const i=_.__digit(o)-g;g=1&i>>>30,n.__setDigit(o,1073741823&i)}return n.__trim()}static __absoluteAddOne(_,i,t=null){const e=_.length;null===t?t=new JSBI(e,i):t.sign=i;let n=1;for(let g=0;g>>30,t.__setDigit(g,1073741823&i)}return 0!=n&&t.__setDigitGrow(e,1),t}static __absoluteSubOne(_,t){const e=_.length;t=t||e;const n=new JSBI(t,!1);let g=1;for(let o=0;o>>30,n.__setDigit(o,1073741823&i)}if(0!=g)throw new Error("implementation bug");for(let g=e;gn?0:_.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(_,t,e,n){if(0===t)return;const g=32767&t,o=t>>>15;let s=0,l=0;for(let r,a=0;a<_.length;a++,n++){r=e.__digit(n);const i=_.__digit(a),t=32767&i,u=i>>>15,d=JSBI.__imul(t,g),h=JSBI.__imul(t,o),m=JSBI.__imul(u,g),b=JSBI.__imul(u,o);r+=l+d+s,s=r>>>30,r&=1073741823,r+=((32767&h)<<15)+((32767&m)<<15),s+=r>>>30,l=b+(h>>>15)+(m>>>15),e.__setDigit(n,1073741823&r)}for(;0!=s||0!==l;n++){let i=e.__digit(n);i+=s+l,l=0,s=i>>>30,e.__setDigit(n,1073741823&i)}}static __internalMultiplyAdd(_,t,e,g,o){let s=e,l=0;for(let n=0;n>>15,t),a=e+((32767&g)<<15)+l+s;s=a>>>30,l=g>>>15,o.__setDigit(n,1073741823&a)}if(o.length>g)for(o.__setDigit(g++,s+l);gthis.length&&(t=this.length);const e=32767&i,n=i>>>15;let g=0,o=_;for(let s=0;s>>15,l=JSBI.__imul(_,e),r=JSBI.__imul(_,n),a=JSBI.__imul(t,e),u=JSBI.__imul(t,n);let d=o+l+g;g=d>>>30,d&=1073741823,d+=((32767&r)<<15)+((32767&a)<<15),g+=d>>>30,o=u+(r>>>15)+(a>>>15),this.__setDigit(s,1073741823&d)}if(0!=g||0!==o)throw new Error("implementation bug")}static __absoluteDivSmall(_,t,e=null){null===e&&(e=new JSBI(_.length,!1));let n=0;for(let g,o=2*_.length-1;0<=o;o-=2){g=(n<<15|_.__halfDigit(o))>>>0;const i=0|g/t;n=0|g%t,g=(n<<15|_.__halfDigit(o-1))>>>0;const s=0|g/t;n=0|g%t,e.__setDigit(o>>>1,i<<15|s)}return e}static __absoluteModSmall(_,t){let e=0;for(let n=2*_.length-1;0<=n;n--){const i=(e<<15|_.__halfDigit(n))>>>0;e=0|i%t}return e}static __absoluteDivLarge(i,_,t,e){const g=_.__halfDigitLength(),n=_.length,o=i.__halfDigitLength()-g;let s=null;t&&(s=new JSBI(o+2>>>1,!1),s.__initializeDigits());const l=new JSBI(g+2>>>1,!1);l.__initializeDigits();const r=JSBI.__clz15(_.__halfDigit(g-1));0>>0;r=0|t/u;let e=0|t%u;const n=_.__halfDigit(g-2),o=a.__halfDigit(h+g-2);for(;JSBI.__imul(r,n)>>>0>(e<<16|o)>>>0&&(r--,e+=u,!(32767>>1,d|r))}if(e)return a.__inplaceRightShift(r),t?{quotient:s,remainder:a}:a;if(t)return s;throw new Error("unreachable")}static __clz15(i){return JSBI.__clz30(i)-15}__inplaceAdd(_,t,e){let n=0;for(let g=0;g>>15,this.__setHalfDigit(t+g,32767&i)}return n}__inplaceSub(_,t,e){let n=0;if(1&t){t>>=1;let g=this.__digit(t),o=32767&g,s=0;for(;s>>1;s++){const i=_.__digit(s),e=(g>>>15)-(32767&i)-n;n=1&e>>>15,this.__setDigit(t+s,(32767&e)<<15|32767&o),g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15}const i=_.__digit(s),l=(g>>>15)-(32767&i)-n;n=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o);if(t+s+1>=this.length)throw new RangeError("out of bounds");0==(1&e)&&(g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15,this.__setDigit(t+_.length,1073709056&g|32767&o))}else{t>>=1;let g=0;for(;g<_.length-1;g++){const i=this.__digit(t+g),e=_.__digit(g),o=(32767&i)-(32767&e)-n;n=1&o>>>15;const s=(i>>>15)-(e>>>15)-n;n=1&s>>>15,this.__setDigit(t+g,(32767&s)<<15|32767&o)}const i=this.__digit(t+g),o=_.__digit(g),s=(32767&i)-(32767&o)-n;n=1&s>>>15;let l=0;0==(1&e)&&(l=(i>>>15)-(o>>>15)-n,n=1&l>>>15),this.__setDigit(t+g,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(_){if(0===_)return;let t=this.__digit(0)>>>_;const e=this.length-1;for(let n=0;n>>_}this.__setDigit(e,t)}static __specialLeftShift(_,t,e){const g=_.length,n=new JSBI(g+e,!1);if(0===t){for(let t=0;t>>30-t}return 0t)throw new RangeError("BigInt too big");const e=0|t/30,n=t%30,g=_.length,o=0!==n&&0!=_.__digit(g-1)>>>30-n,s=g+e+(o?1:0),l=new JSBI(s,_.sign);if(0===n){let t=0;for(;t>>30-n}if(o)l.__setDigit(g+e,t);else if(0!==t)throw new Error("implementation bug")}return l.__trim()}static __rightShiftByAbsolute(_,i){const t=_.length,e=_.sign,n=JSBI.__toShiftAmount(i);if(0>n)return JSBI.__rightShiftByMaximum(e);const g=0|n/30,o=n%30;let s=t-g;if(0>=s)return JSBI.__rightShiftByMaximum(e);let l=!1;if(e){if(0!=(_.__digit(g)&(1<>>o;const n=t-g-1;for(let t=0;t>>o}r.__setDigit(n,e)}return l&&(r=JSBI.__absoluteAddOne(r,!0,r)),r.__trim()}static __rightShiftByMaximum(i){return i?JSBI.__oneDigit(1,!0):JSBI.__zero()}static __toShiftAmount(i){if(1JSBI.__kMaxLengthBits?-1:_}static __toPrimitive(i,_="default"){if("object"!=typeof i)return i;if(i.constructor===JSBI)return i;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const t=i[Symbol.toPrimitive];if(t){const i=t(_);if("object"!=typeof i)return i;throw new TypeError("Cannot convert object to primitive value")}}const t=i.valueOf;if(t){const _=t.call(i);if("object"!=typeof _)return _}const e=i.toString;if(e){const _=e.call(i);if("object"!=typeof _)return _}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(i){return JSBI.__isBigInt(i)?i:+i}static __isBigInt(i){return"object"==typeof i&&null!==i&&i.constructor===JSBI}static __truncateToNBits(i,_){const t=0|(i+29)/30,e=new JSBI(t,_.sign),n=t-1;for(let t=0;t>>_}return e.__setDigit(n,g),e.__trim()}static __truncateAndSubFromPowerOfTwo(_,t,e){var n=Math.min;const g=0|(_+29)/30,o=new JSBI(g,e);let s=0;const l=g-1;let a=0;for(const i=n(l,t.length);s>>30,o.__setDigit(s,1073741823&i)}for(;s>>i;const _=1<<32-i;h=_-u-a,h&=_-1}return o.__setDigit(l,h),o.__trim()}__digit(_){return this[_]}__unsignedDigit(_){return this[_]>>>0}__setDigit(_,i){this[_]=0|i}__setDigitGrow(_,i){this[_]=0|i}__halfDigitLength(){const i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(_){return 32767&this[_>>>1]>>>15*(1&_)}__setHalfDigit(_,i){const t=_>>>1,e=this.__digit(t),n=1&_?32767&e|i<<15:1073709056&e|32767&i;this.__setDigit(t,n)}static __digitPow(i,_){let t=1;for(;0<_;)1&_&&(t*=i),_>>>=1,i*=i;return t}static __isOneDigitInt(i){return(1073741823&i)===i}}JSBI.__kMaxLength=33554432,JSBI.__kMaxLengthBits=JSBI.__kMaxLength<<5,JSBI.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],JSBI.__kBitsPerCharTableShift=5,JSBI.__kBitsPerCharTableMultiplier=1<>>0)/Math.LN2)},JSBI.__imul=Math.imul||function(i,_){return 0|i*_};export default JSBI; -//# sourceMappingURL=jsbi.mjs.map diff --git a/reverse_engineering/node_modules/jsbi/dist/jsbi.mjs.map b/reverse_engineering/node_modules/jsbi/dist/jsbi.mjs.map deleted file mode 100644 index 8d4ff10..0000000 --- a/reverse_engineering/node_modules/jsbi/dist/jsbi.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jsbi.mjs","sources":["../lib/jsbi.ts"],"sourcesContent":[null],"names":["JSBI","Array","constructor","length","sign","__kMaxLength","RangeError","BigInt","arg","Math","floor","Number","isFinite","__zero","__isOneDigitInt","__oneDigit","__fromDouble","result","__fromString","SyntaxError","primitive","__toPrimitive","TypeError","toDebugString","digit","push","toString","join","radix","__toStringBasePowerOfTwo","__toStringGeneric","toNumber","x","xLength","value","__unsignedDigit","xMsd","__digit","msdLeadingZeros","__clz30","xBitLength","Infinity","exponent","currentDigit","digitIndex","shift","mantissaHigh","mantissaHighBitsUnset","mantissaLow","mantissaLowBitsUnset","rounding","__decideRounding","signBit","__kBitConversionInts","__kBitConversionDouble","unaryMinus","__copy","bitwiseNot","__absoluteSubOne","__trim","__absoluteAddOne","exponentiate","y","expValue","__kMaxLengthBits","neededDigits","__initializeDigits","msd","__setDigit","runningSquare","multiply","resultLength","__clzmsd","i","__multiplyAccumulate","divide","__absoluteCompare","resultSign","divisor","quotient","__absoluteDivSmall","__absoluteDivLarge","remainder","remainderDigit","__absoluteModSmall","add","__absoluteAdd","__absoluteSub","subtract","leftShift","__rightShiftByAbsolute","__leftShiftByAbsolute","signedRightShift","unsignedRightShift","lessThan","__compareToBigInt","lessThanOrEqual","greaterThan","greaterThanOrEqual","equal","notEqual","bitwiseAnd","max","__absoluteAnd","y1","__absoluteOr","__absoluteAndNot","bitwiseXor","__absoluteXor","bitwiseOr","asIntN","n","neededLength","topDigit","compareDigit","__truncateToNBits","__truncateAndSubFromPowerOfTwo","asUintN","bitsInTopDigit","ADD","__toNumeric","__isBigInt","LT","__compare","LE","GT","GE","EQ","__equalToNumber","NE","newLength","last","pop","mantissaBitsUnset","topUnconsumedBit","mask","rawExponent","digits","kMantissaHighTopBit","msdTopBit","remainingMantissaBits","__isWhitespace","c","string","cursor","current","charCodeAt","chars","bitsPerChar","__kMaxBitsPerChar","roundup","__kBitsPerCharTableMultiplier","bitsMin","__kBitsPerCharTableShift","limDigit","limAlpha","parts","partsBits","done","part","bits","d","__fillFromParts","charsSoFar","multiplier","m","digitsSoFar","__inplaceMultiplyAdd","bitsInDigit","partBits","Error","charMask","charsRequired","pos","availableBits","newDigit","__kConversionChars","consumedBits","isRecursiveCall","bitLength","maxBitsPerChar","minBitsPerChar","secondHalfChars","conqueror","secondHalf","input","__halfDigit","__setHalfDigit","divisionResult","firstHalf","__unequalSign","leftNegative","__absoluteGreater","bothNegative","__absoluteLess","xSign","__compareToNumber","ySign","yAbs","abs","xDigit","__compareToDouble","yBitLength","compareMantissa","__comparisonResultToBool","op","carry","r","borrow","inputLength","__setDigitGrow","yLength","numPairs","tmp","tmpLength","diff","multiplicand","accumulator","accumulatorIndex","m2Low","m2High","high","acc","m1","m1Low","m1High","rLow","__imul","rMid1","rMid2","rHigh","__internalMultiplyAdd","source","factor","summand","rx","ry","mLow","mHigh","dLow","dHigh","pLow","pMid1","pMid2","pHigh","upperHalf","lowerHalf","dividend","wantQuotient","wantRemainder","__halfDigitLength","n2","q","qhatv","__clz15","__specialLeftShift","u","vn1","halfDigitBuffer","qhat","j","ujn","rhat","vn2","ujn2","__inplaceSub","__inplaceAdd","__inplaceRightShift","startIndex","halfDigits","sum","subtrahend","r0","sub","r15","addDigit","__toShiftAmount","digitShift","bitsShift","grow","__rightShiftByMaximum","mustRoundDown","obj","hint","Symbol","toPrimitive","exoticToPrim","valueOf","call","drop","min","limit","msdBitsConsumed","resultMsd","minuendMsd","len","previous","updated","__digitPow","base","ArrayBuffer","Float64Array","__kBitConversionBuffer","Int32Array","clz32","log","LN2","imul","a","b"],"mappings":"AAaA,KAAMA,CAAAA,IAAN,QAAmBC,CAAAA,MACjBC,YAAYC,EAAwBC,GAElC,GADA,MAAMD,CAAN,CACA,CAFkC,SAAA,CAAAC,CAElC,CAAID,CAAM,CAAGH,IAAI,CAACK,YAAlB,CACE,KAAM,IAAIC,CAAAA,UAAJ,CAAe,8BAAf,CAET,CAEY,MAANC,CAAAA,MAAM,CAACC,CAAD,QASoBC,IAAI,CAACC,QAA7BC,MAAM,CAACC,SARd,GAAmB,QAAf,QAAOJ,CAAAA,CAAX,CAA6B,CAC3B,GAAY,CAAR,GAAAA,CAAJ,CAAe,MAAOR,CAAAA,IAAI,CAACa,MAAL,EAAP,CACf,GAAIb,IAAI,CAACc,eAAL,CAAqBN,CAArB,CAAJ,OACY,EAAN,CAAAA,CADN,CAEWR,IAAI,CAACe,UAAL,CAAgB,CAACP,CAAjB,IAFX,CAISR,IAAI,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AKzB,GALyB,CAKpB,GALoB,CAKf,GALe,CAKV,GALU,EAQpBA,6BAAA,CAA2B,EAC3BA,kCAAA,CAAgC,GAAKA,IAAI,CAACyJ,yBAC1CzJ,uBAAA,mJACAA,2BAAA,CAAyB,GAAI4S,CAAAA,WAAJ,CAAgB,CAAhB,EACzB5S,2BAAA,CAAyB,GAAI6S,CAAAA,YAAJ,CAAiB7S,IAAI,CAAC8S,sBAAtB,EACzB9S,yBAAA,CAAuB,GAAI+S,CAAAA,UAAJ,CAAe/S,IAAI,CAAC8S,sBAApB,EAKvB9S,YAAA,CAAUS,IAAI,CAACuS,KAAL,CAAa,SAAShR,CAAT,EAC5B,MAAOvB,CAAAA,IAAI,CAACuS,KAAL,CAAWhR,CAAX,EAAgB,CACxB,CAFgB,CAEb,SAASA,CAAT,QACQ,EAAN,GAAAA,EAAgB,GAC6B,CAA1C,KAAqC,CAA/B,CAAAvB,IAAI,CAACwS,GAAL,CAASjR,CAAC,GAAK,CAAf,EAAoBvB,IAAI,CAACyS,GAA/B,CACR,EACMlT,WAAA,CAASS,IAAI,CAAC0S,IAAL,EAAa,SAASC,CAAT,CAAoBC,CAApB,EAC3B,MAAiB,EAAV,CAACD,CAAC,CAAGC,CACb"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/jsbi/jsbi.d.ts b/reverse_engineering/node_modules/jsbi/jsbi.d.ts deleted file mode 100644 index 1c84834..0000000 --- a/reverse_engineering/node_modules/jsbi/jsbi.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default class JSBI { - private constructor(length: number, sign: boolean); - private length: number; - private sign: boolean; - - static BigInt(from: number|string|boolean|object): JSBI; - - toString(radix?: number): string; - static toNumber(x: JSBI): number; - - static unaryMinus(x: JSBI): JSBI; - static bitwiseNot(x: JSBI): JSBI; - - static exponentiate(x: JSBI, y: JSBI): JSBI; - static multiply(x: JSBI, y: JSBI): JSBI; - static divide(x: JSBI, y: JSBI): JSBI; - static remainder(x: JSBI, y: JSBI): JSBI; - static add(x: JSBI, y: JSBI): JSBI; - static subtract(x: JSBI, y: JSBI): JSBI; - static leftShift(x: JSBI, y: JSBI): JSBI; - static signedRightShift(x: JSBI, y: JSBI): JSBI; - - static lessThan(x: JSBI, y: JSBI): boolean; - static lessThanOrEqual(x: JSBI, y: JSBI): boolean; - static greaterThan(x: JSBI, y: JSBI): boolean; - static greaterThanOrEqual(x: JSBI, y: JSBI): boolean; - static equal(x: JSBI, y: JSBI): boolean; - static notEqual(x: JSBI, y: JSBI): boolean; - - static bitwiseAnd(x: JSBI, y: JSBI): JSBI; - static bitwiseXor(x: JSBI, y: JSBI): JSBI; - static bitwiseOr(x: JSBI, y: JSBI): JSBI; - - static asIntN(n: number, x: JSBI): JSBI; - static asUintN(n: number, x: JSBI): JSBI; - - static ADD(x: any, y: any): any; - static LT(x: any, y: any): boolean; - static LE(x: any, y: any): boolean; - static GT(x: any, y: any): boolean; - static GE(x: any, y: any): boolean; - static EQ(x: any, y: any): boolean; - static NE(x: any, y: any): boolean; -} diff --git a/reverse_engineering/node_modules/jsbi/package.json b/reverse_engineering/node_modules/jsbi/package.json deleted file mode 100644 index a9ccf37..0000000 --- a/reverse_engineering/node_modules/jsbi/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "jsbi", - "version": "3.2.5", - "repository": "GoogleChromeLabs/jsbi", - "devDependencies": { - "@babel/preset-env": "^7.5.5", - "@rollup/plugin-typescript": "^8.2.5", - "@typescript-eslint/eslint-plugin": "^4.29.1", - "@typescript-eslint/parser": "^4.29.1", - "eslint": "^6.2.0", - "eslint-config-google": "^0.13.0", - "rollup": "^1.19.4", - "rollup-plugin-babel": "^4.3.3", - "rollup-plugin-babel-minify": "^9.0.0", - "typescript": "^4.4.2" - }, - "main": "dist/jsbi-cjs.js", - "module": "dist/jsbi.mjs", - "browser": "dist/jsbi-umd.js", - "types": "jsbi.d.ts", - "files": [ - "dist", - "jsbi.d.ts" - ], - "scripts": { - "build": "tsc && for f in tsc-out/*.js; do mv -- \"$f\" \"${f%.js}.mjs\"; done && rollup --config rollup.config.js", - "dev": "rollup --config rollup.config.js --watch", - "test": "set -e; for file in tests/*.mjs; do node --no-warnings --experimental-modules --experimental-specifier-resolution=node --loader ./tests/resolve.source.mjs \"${file}\"; done; for file in benchmarks/*.mjs; do node --no-warnings --experimental-modules --experimental-specifier-resolution=node --loader ./tests/resolve.source.mjs \"${file}\"; done", - "pretest": "npm run build", - "prepublish": "npm run ci", - "lint": "eslint . --ext ts --fix", - "generate-benchmarks": "for op in add and div mod mul neg not or sar shl sub xor; do scripts/generate-benchmark.py generate \"${op}\" > \"benchmarks/${op}.mjs\"; done", - "ci": "npm run lint && npm run build && git status && git diff-index --quiet HEAD -- || git diff && npm test" - }, - "license": "Apache-2.0" -} diff --git a/reverse_engineering/node_modules/lodash/LICENSE b/reverse_engineering/node_modules/lodash/LICENSE deleted file mode 100644 index 77c42f1..0000000 --- a/reverse_engineering/node_modules/lodash/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/reverse_engineering/node_modules/lodash/README.md b/reverse_engineering/node_modules/lodash/README.md deleted file mode 100644 index e1c9950..0000000 --- a/reverse_engineering/node_modules/lodash/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# lodash v4.17.20 - -The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. - -## Installation - -Using npm: -```shell -$ npm i -g npm -$ npm i --save lodash -``` - -In Node.js: -```js -// Load the full build. -var _ = require('lodash'); -// Load the core build. -var _ = require('lodash/core'); -// Load the FP build for immutable auto-curried iteratee-first data-last methods. -var fp = require('lodash/fp'); - -// Load method categories. -var array = require('lodash/array'); -var object = require('lodash/fp/object'); - -// Cherry-pick methods for smaller browserify/rollup/webpack bundles. -var at = require('lodash/at'); -var curryN = require('lodash/fp/curryN'); -``` - -See the [package source](https://github.com/lodash/lodash/tree/4.17.20-npm) for more details. - -**Note:**
-Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. - -## Support - -Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
-Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/reverse_engineering/node_modules/lodash/_DataView.js b/reverse_engineering/node_modules/lodash/_DataView.js deleted file mode 100644 index ac2d57c..0000000 --- a/reverse_engineering/node_modules/lodash/_DataView.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'); - -module.exports = DataView; diff --git a/reverse_engineering/node_modules/lodash/_Hash.js b/reverse_engineering/node_modules/lodash/_Hash.js deleted file mode 100644 index b504fe3..0000000 --- a/reverse_engineering/node_modules/lodash/_Hash.js +++ /dev/null @@ -1,32 +0,0 @@ -var hashClear = require('./_hashClear'), - hashDelete = require('./_hashDelete'), - hashGet = require('./_hashGet'), - hashHas = require('./_hashHas'), - hashSet = require('./_hashSet'); - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -module.exports = Hash; diff --git a/reverse_engineering/node_modules/lodash/_LazyWrapper.js b/reverse_engineering/node_modules/lodash/_LazyWrapper.js deleted file mode 100644 index 81786c7..0000000 --- a/reverse_engineering/node_modules/lodash/_LazyWrapper.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseCreate = require('./_baseCreate'), - baseLodash = require('./_baseLodash'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; - -/** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @constructor - * @param {*} value The value to wrap. - */ -function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; -} - -// Ensure `LazyWrapper` is an instance of `baseLodash`. -LazyWrapper.prototype = baseCreate(baseLodash.prototype); -LazyWrapper.prototype.constructor = LazyWrapper; - -module.exports = LazyWrapper; diff --git a/reverse_engineering/node_modules/lodash/_ListCache.js b/reverse_engineering/node_modules/lodash/_ListCache.js deleted file mode 100644 index 26895c3..0000000 --- a/reverse_engineering/node_modules/lodash/_ListCache.js +++ /dev/null @@ -1,32 +0,0 @@ -var listCacheClear = require('./_listCacheClear'), - listCacheDelete = require('./_listCacheDelete'), - listCacheGet = require('./_listCacheGet'), - listCacheHas = require('./_listCacheHas'), - listCacheSet = require('./_listCacheSet'); - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; diff --git a/reverse_engineering/node_modules/lodash/_LodashWrapper.js b/reverse_engineering/node_modules/lodash/_LodashWrapper.js deleted file mode 100644 index c1e4d9d..0000000 --- a/reverse_engineering/node_modules/lodash/_LodashWrapper.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseCreate = require('./_baseCreate'), - baseLodash = require('./_baseLodash'); - -/** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ -function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; -} - -LodashWrapper.prototype = baseCreate(baseLodash.prototype); -LodashWrapper.prototype.constructor = LodashWrapper; - -module.exports = LodashWrapper; diff --git a/reverse_engineering/node_modules/lodash/_Map.js b/reverse_engineering/node_modules/lodash/_Map.js deleted file mode 100644 index b73f29a..0000000 --- a/reverse_engineering/node_modules/lodash/_Map.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); - -module.exports = Map; diff --git a/reverse_engineering/node_modules/lodash/_MapCache.js b/reverse_engineering/node_modules/lodash/_MapCache.js deleted file mode 100644 index 4a4eea7..0000000 --- a/reverse_engineering/node_modules/lodash/_MapCache.js +++ /dev/null @@ -1,32 +0,0 @@ -var mapCacheClear = require('./_mapCacheClear'), - mapCacheDelete = require('./_mapCacheDelete'), - mapCacheGet = require('./_mapCacheGet'), - mapCacheHas = require('./_mapCacheHas'), - mapCacheSet = require('./_mapCacheSet'); - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -module.exports = MapCache; diff --git a/reverse_engineering/node_modules/lodash/_Promise.js b/reverse_engineering/node_modules/lodash/_Promise.js deleted file mode 100644 index 247b9e1..0000000 --- a/reverse_engineering/node_modules/lodash/_Promise.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Promise = getNative(root, 'Promise'); - -module.exports = Promise; diff --git a/reverse_engineering/node_modules/lodash/_Set.js b/reverse_engineering/node_modules/lodash/_Set.js deleted file mode 100644 index b3c8dcb..0000000 --- a/reverse_engineering/node_modules/lodash/_Set.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); - -module.exports = Set; diff --git a/reverse_engineering/node_modules/lodash/_SetCache.js b/reverse_engineering/node_modules/lodash/_SetCache.js deleted file mode 100644 index 6468b06..0000000 --- a/reverse_engineering/node_modules/lodash/_SetCache.js +++ /dev/null @@ -1,27 +0,0 @@ -var MapCache = require('./_MapCache'), - setCacheAdd = require('./_setCacheAdd'), - setCacheHas = require('./_setCacheHas'); - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; - -module.exports = SetCache; diff --git a/reverse_engineering/node_modules/lodash/_Stack.js b/reverse_engineering/node_modules/lodash/_Stack.js deleted file mode 100644 index 80b2cf1..0000000 --- a/reverse_engineering/node_modules/lodash/_Stack.js +++ /dev/null @@ -1,27 +0,0 @@ -var ListCache = require('./_ListCache'), - stackClear = require('./_stackClear'), - stackDelete = require('./_stackDelete'), - stackGet = require('./_stackGet'), - stackHas = require('./_stackHas'), - stackSet = require('./_stackSet'); - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -module.exports = Stack; diff --git a/reverse_engineering/node_modules/lodash/_Symbol.js b/reverse_engineering/node_modules/lodash/_Symbol.js deleted file mode 100644 index a013f7c..0000000 --- a/reverse_engineering/node_modules/lodash/_Symbol.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; diff --git a/reverse_engineering/node_modules/lodash/_Uint8Array.js b/reverse_engineering/node_modules/lodash/_Uint8Array.js deleted file mode 100644 index 2fb30e1..0000000 --- a/reverse_engineering/node_modules/lodash/_Uint8Array.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Built-in value references. */ -var Uint8Array = root.Uint8Array; - -module.exports = Uint8Array; diff --git a/reverse_engineering/node_modules/lodash/_WeakMap.js b/reverse_engineering/node_modules/lodash/_WeakMap.js deleted file mode 100644 index 567f86c..0000000 --- a/reverse_engineering/node_modules/lodash/_WeakMap.js +++ /dev/null @@ -1,7 +0,0 @@ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); - -module.exports = WeakMap; diff --git a/reverse_engineering/node_modules/lodash/_apply.js b/reverse_engineering/node_modules/lodash/_apply.js deleted file mode 100644 index 36436dd..0000000 --- a/reverse_engineering/node_modules/lodash/_apply.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -module.exports = apply; diff --git a/reverse_engineering/node_modules/lodash/_arrayAggregator.js b/reverse_engineering/node_modules/lodash/_arrayAggregator.js deleted file mode 100644 index d96c3ca..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayAggregator.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ -function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); - } - return accumulator; -} - -module.exports = arrayAggregator; diff --git a/reverse_engineering/node_modules/lodash/_arrayEach.js b/reverse_engineering/node_modules/lodash/_arrayEach.js deleted file mode 100644 index 2c5f579..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayEach.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEach; diff --git a/reverse_engineering/node_modules/lodash/_arrayEachRight.js b/reverse_engineering/node_modules/lodash/_arrayEachRight.js deleted file mode 100644 index 976ca5c..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayEachRight.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; - - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEachRight; diff --git a/reverse_engineering/node_modules/lodash/_arrayEvery.js b/reverse_engineering/node_modules/lodash/_arrayEvery.js deleted file mode 100644 index e26a918..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayEvery.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ -function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; -} - -module.exports = arrayEvery; diff --git a/reverse_engineering/node_modules/lodash/_arrayFilter.js b/reverse_engineering/node_modules/lodash/_arrayFilter.js deleted file mode 100644 index 75ea254..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayFilter.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -module.exports = arrayFilter; diff --git a/reverse_engineering/node_modules/lodash/_arrayIncludes.js b/reverse_engineering/node_modules/lodash/_arrayIncludes.js deleted file mode 100644 index 3737a6d..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayIncludes.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; -} - -module.exports = arrayIncludes; diff --git a/reverse_engineering/node_modules/lodash/_arrayIncludesWith.js b/reverse_engineering/node_modules/lodash/_arrayIncludesWith.js deleted file mode 100644 index 235fd97..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayIncludesWith.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -module.exports = arrayIncludesWith; diff --git a/reverse_engineering/node_modules/lodash/_arrayLikeKeys.js b/reverse_engineering/node_modules/lodash/_arrayLikeKeys.js deleted file mode 100644 index b2ec9ce..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayLikeKeys.js +++ /dev/null @@ -1,49 +0,0 @@ -var baseTimes = require('./_baseTimes'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isIndex = require('./_isIndex'), - isTypedArray = require('./isTypedArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -module.exports = arrayLikeKeys; diff --git a/reverse_engineering/node_modules/lodash/_arrayMap.js b/reverse_engineering/node_modules/lodash/_arrayMap.js deleted file mode 100644 index 22b2246..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayMap.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -module.exports = arrayMap; diff --git a/reverse_engineering/node_modules/lodash/_arrayPush.js b/reverse_engineering/node_modules/lodash/_arrayPush.js deleted file mode 100644 index 7d742b3..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayPush.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -module.exports = arrayPush; diff --git a/reverse_engineering/node_modules/lodash/_arrayReduce.js b/reverse_engineering/node_modules/lodash/_arrayReduce.js deleted file mode 100644 index de8b79b..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayReduce.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -module.exports = arrayReduce; diff --git a/reverse_engineering/node_modules/lodash/_arrayReduceRight.js b/reverse_engineering/node_modules/lodash/_arrayReduceRight.js deleted file mode 100644 index 22d8976..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayReduceRight.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; -} - -module.exports = arrayReduceRight; diff --git a/reverse_engineering/node_modules/lodash/_arraySample.js b/reverse_engineering/node_modules/lodash/_arraySample.js deleted file mode 100644 index fcab010..0000000 --- a/reverse_engineering/node_modules/lodash/_arraySample.js +++ /dev/null @@ -1,15 +0,0 @@ -var baseRandom = require('./_baseRandom'); - -/** - * A specialized version of `_.sample` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. - */ -function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; -} - -module.exports = arraySample; diff --git a/reverse_engineering/node_modules/lodash/_arraySampleSize.js b/reverse_engineering/node_modules/lodash/_arraySampleSize.js deleted file mode 100644 index 8c7e364..0000000 --- a/reverse_engineering/node_modules/lodash/_arraySampleSize.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseClamp = require('./_baseClamp'), - copyArray = require('./_copyArray'), - shuffleSelf = require('./_shuffleSelf'); - -/** - * A specialized version of `_.sampleSize` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ -function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); -} - -module.exports = arraySampleSize; diff --git a/reverse_engineering/node_modules/lodash/_arrayShuffle.js b/reverse_engineering/node_modules/lodash/_arrayShuffle.js deleted file mode 100644 index 46313a3..0000000 --- a/reverse_engineering/node_modules/lodash/_arrayShuffle.js +++ /dev/null @@ -1,15 +0,0 @@ -var copyArray = require('./_copyArray'), - shuffleSelf = require('./_shuffleSelf'); - -/** - * A specialized version of `_.shuffle` for arrays. - * - * @private - * @param {Array} array The array to shuffle. - * @returns {Array} Returns the new shuffled array. - */ -function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); -} - -module.exports = arrayShuffle; diff --git a/reverse_engineering/node_modules/lodash/_arraySome.js b/reverse_engineering/node_modules/lodash/_arraySome.js deleted file mode 100644 index 6fd02fd..0000000 --- a/reverse_engineering/node_modules/lodash/_arraySome.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -module.exports = arraySome; diff --git a/reverse_engineering/node_modules/lodash/_asciiSize.js b/reverse_engineering/node_modules/lodash/_asciiSize.js deleted file mode 100644 index 11d29c3..0000000 --- a/reverse_engineering/node_modules/lodash/_asciiSize.js +++ /dev/null @@ -1,12 +0,0 @@ -var baseProperty = require('./_baseProperty'); - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = baseProperty('length'); - -module.exports = asciiSize; diff --git a/reverse_engineering/node_modules/lodash/_asciiToArray.js b/reverse_engineering/node_modules/lodash/_asciiToArray.js deleted file mode 100644 index 8e3dd5b..0000000 --- a/reverse_engineering/node_modules/lodash/_asciiToArray.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function asciiToArray(string) { - return string.split(''); -} - -module.exports = asciiToArray; diff --git a/reverse_engineering/node_modules/lodash/_asciiWords.js b/reverse_engineering/node_modules/lodash/_asciiWords.js deleted file mode 100644 index d765f0f..0000000 --- a/reverse_engineering/node_modules/lodash/_asciiWords.js +++ /dev/null @@ -1,15 +0,0 @@ -/** Used to match words composed of alphanumeric characters. */ -var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - -/** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ -function asciiWords(string) { - return string.match(reAsciiWord) || []; -} - -module.exports = asciiWords; diff --git a/reverse_engineering/node_modules/lodash/_assignMergeValue.js b/reverse_engineering/node_modules/lodash/_assignMergeValue.js deleted file mode 100644 index cb1185e..0000000 --- a/reverse_engineering/node_modules/lodash/_assignMergeValue.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - eq = require('./eq'); - -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignMergeValue; diff --git a/reverse_engineering/node_modules/lodash/_assignValue.js b/reverse_engineering/node_modules/lodash/_assignValue.js deleted file mode 100644 index 4083957..0000000 --- a/reverse_engineering/node_modules/lodash/_assignValue.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - eq = require('./eq'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignValue; diff --git a/reverse_engineering/node_modules/lodash/_assocIndexOf.js b/reverse_engineering/node_modules/lodash/_assocIndexOf.js deleted file mode 100644 index 5b77a2b..0000000 --- a/reverse_engineering/node_modules/lodash/_assocIndexOf.js +++ /dev/null @@ -1,21 +0,0 @@ -var eq = require('./eq'); - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -module.exports = assocIndexOf; diff --git a/reverse_engineering/node_modules/lodash/_baseAggregator.js b/reverse_engineering/node_modules/lodash/_baseAggregator.js deleted file mode 100644 index 4bc9e91..0000000 --- a/reverse_engineering/node_modules/lodash/_baseAggregator.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * Aggregates elements of `collection` on `accumulator` with keys transformed - * by `iteratee` and values set by `setter`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ -function baseAggregator(collection, setter, iteratee, accumulator) { - baseEach(collection, function(value, key, collection) { - setter(accumulator, value, iteratee(value), collection); - }); - return accumulator; -} - -module.exports = baseAggregator; diff --git a/reverse_engineering/node_modules/lodash/_baseAssign.js b/reverse_engineering/node_modules/lodash/_baseAssign.js deleted file mode 100644 index e5c4a1a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseAssign.js +++ /dev/null @@ -1,17 +0,0 @@ -var copyObject = require('./_copyObject'), - keys = require('./keys'); - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -module.exports = baseAssign; diff --git a/reverse_engineering/node_modules/lodash/_baseAssignIn.js b/reverse_engineering/node_modules/lodash/_baseAssignIn.js deleted file mode 100644 index 6624f90..0000000 --- a/reverse_engineering/node_modules/lodash/_baseAssignIn.js +++ /dev/null @@ -1,17 +0,0 @@ -var copyObject = require('./_copyObject'), - keysIn = require('./keysIn'); - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); -} - -module.exports = baseAssignIn; diff --git a/reverse_engineering/node_modules/lodash/_baseAssignValue.js b/reverse_engineering/node_modules/lodash/_baseAssignValue.js deleted file mode 100644 index d6f66ef..0000000 --- a/reverse_engineering/node_modules/lodash/_baseAssignValue.js +++ /dev/null @@ -1,25 +0,0 @@ -var defineProperty = require('./_defineProperty'); - -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} - -module.exports = baseAssignValue; diff --git a/reverse_engineering/node_modules/lodash/_baseAt.js b/reverse_engineering/node_modules/lodash/_baseAt.js deleted file mode 100644 index 90e4237..0000000 --- a/reverse_engineering/node_modules/lodash/_baseAt.js +++ /dev/null @@ -1,23 +0,0 @@ -var get = require('./get'); - -/** - * The base implementation of `_.at` without support for individual paths. - * - * @private - * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths to pick. - * @returns {Array} Returns the picked elements. - */ -function baseAt(object, paths) { - var index = -1, - length = paths.length, - result = Array(length), - skip = object == null; - - while (++index < length) { - result[index] = skip ? undefined : get(object, paths[index]); - } - return result; -} - -module.exports = baseAt; diff --git a/reverse_engineering/node_modules/lodash/_baseClamp.js b/reverse_engineering/node_modules/lodash/_baseClamp.js deleted file mode 100644 index a1c5692..0000000 --- a/reverse_engineering/node_modules/lodash/_baseClamp.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * The base implementation of `_.clamp` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - */ -function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; - } - } - return number; -} - -module.exports = baseClamp; diff --git a/reverse_engineering/node_modules/lodash/_baseClone.js b/reverse_engineering/node_modules/lodash/_baseClone.js deleted file mode 100644 index 69f8705..0000000 --- a/reverse_engineering/node_modules/lodash/_baseClone.js +++ /dev/null @@ -1,166 +0,0 @@ -var Stack = require('./_Stack'), - arrayEach = require('./_arrayEach'), - assignValue = require('./_assignValue'), - baseAssign = require('./_baseAssign'), - baseAssignIn = require('./_baseAssignIn'), - cloneBuffer = require('./_cloneBuffer'), - copyArray = require('./_copyArray'), - copySymbols = require('./_copySymbols'), - copySymbolsIn = require('./_copySymbolsIn'), - getAllKeys = require('./_getAllKeys'), - getAllKeysIn = require('./_getAllKeysIn'), - getTag = require('./_getTag'), - initCloneArray = require('./_initCloneArray'), - initCloneByTag = require('./_initCloneByTag'), - initCloneObject = require('./_initCloneObject'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isMap = require('./isMap'), - isObject = require('./isObject'), - isSet = require('./isSet'), - keys = require('./keys'), - keysIn = require('./keysIn'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); - - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -module.exports = baseClone; diff --git a/reverse_engineering/node_modules/lodash/_baseConforms.js b/reverse_engineering/node_modules/lodash/_baseConforms.js deleted file mode 100644 index 947e20d..0000000 --- a/reverse_engineering/node_modules/lodash/_baseConforms.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseConformsTo = require('./_baseConformsTo'), - keys = require('./keys'); - -/** - * The base implementation of `_.conforms` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - */ -function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; -} - -module.exports = baseConforms; diff --git a/reverse_engineering/node_modules/lodash/_baseConformsTo.js b/reverse_engineering/node_modules/lodash/_baseConformsTo.js deleted file mode 100644 index e449cb8..0000000 --- a/reverse_engineering/node_modules/lodash/_baseConformsTo.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * The base implementation of `_.conformsTo` which accepts `props` to check. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - */ -function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length], - predicate = source[key], - value = object[key]; - - if ((value === undefined && !(key in object)) || !predicate(value)) { - return false; - } - } - return true; -} - -module.exports = baseConformsTo; diff --git a/reverse_engineering/node_modules/lodash/_baseCreate.js b/reverse_engineering/node_modules/lodash/_baseCreate.js deleted file mode 100644 index ffa6a52..0000000 --- a/reverse_engineering/node_modules/lodash/_baseCreate.js +++ /dev/null @@ -1,30 +0,0 @@ -var isObject = require('./isObject'); - -/** Built-in value references. */ -var objectCreate = Object.create; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); - -module.exports = baseCreate; diff --git a/reverse_engineering/node_modules/lodash/_baseDelay.js b/reverse_engineering/node_modules/lodash/_baseDelay.js deleted file mode 100644 index 1486d69..0000000 --- a/reverse_engineering/node_modules/lodash/_baseDelay.js +++ /dev/null @@ -1,21 +0,0 @@ -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ -function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); -} - -module.exports = baseDelay; diff --git a/reverse_engineering/node_modules/lodash/_baseDifference.js b/reverse_engineering/node_modules/lodash/_baseDifference.js deleted file mode 100644 index 343ac19..0000000 --- a/reverse_engineering/node_modules/lodash/_baseDifference.js +++ /dev/null @@ -1,67 +0,0 @@ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - arrayMap = require('./_arrayMap'), - baseUnary = require('./_baseUnary'), - cacheHas = require('./_cacheHas'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - */ -function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; - - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); - } - else if (!includes(values, computed, comparator)) { - result.push(value); - } - } - return result; -} - -module.exports = baseDifference; diff --git a/reverse_engineering/node_modules/lodash/_baseEach.js b/reverse_engineering/node_modules/lodash/_baseEach.js deleted file mode 100644 index 512c067..0000000 --- a/reverse_engineering/node_modules/lodash/_baseEach.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseForOwn = require('./_baseForOwn'), - createBaseEach = require('./_createBaseEach'); - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -module.exports = baseEach; diff --git a/reverse_engineering/node_modules/lodash/_baseEachRight.js b/reverse_engineering/node_modules/lodash/_baseEachRight.js deleted file mode 100644 index 0a8feec..0000000 --- a/reverse_engineering/node_modules/lodash/_baseEachRight.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseForOwnRight = require('./_baseForOwnRight'), - createBaseEach = require('./_createBaseEach'); - -/** - * The base implementation of `_.forEachRight` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEachRight = createBaseEach(baseForOwnRight, true); - -module.exports = baseEachRight; diff --git a/reverse_engineering/node_modules/lodash/_baseEvery.js b/reverse_engineering/node_modules/lodash/_baseEvery.js deleted file mode 100644 index fa52f7b..0000000 --- a/reverse_engineering/node_modules/lodash/_baseEvery.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ -function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; -} - -module.exports = baseEvery; diff --git a/reverse_engineering/node_modules/lodash/_baseExtremum.js b/reverse_engineering/node_modules/lodash/_baseExtremum.js deleted file mode 100644 index 9d6aa77..0000000 --- a/reverse_engineering/node_modules/lodash/_baseExtremum.js +++ /dev/null @@ -1,32 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -module.exports = baseExtremum; diff --git a/reverse_engineering/node_modules/lodash/_baseFill.js b/reverse_engineering/node_modules/lodash/_baseFill.js deleted file mode 100644 index 46ef9c7..0000000 --- a/reverse_engineering/node_modules/lodash/_baseFill.js +++ /dev/null @@ -1,32 +0,0 @@ -var toInteger = require('./toInteger'), - toLength = require('./toLength'); - -/** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ -function baseFill(array, value, start, end) { - var length = array.length; - - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; - } - return array; -} - -module.exports = baseFill; diff --git a/reverse_engineering/node_modules/lodash/_baseFilter.js b/reverse_engineering/node_modules/lodash/_baseFilter.js deleted file mode 100644 index 4678477..0000000 --- a/reverse_engineering/node_modules/lodash/_baseFilter.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -module.exports = baseFilter; diff --git a/reverse_engineering/node_modules/lodash/_baseFindIndex.js b/reverse_engineering/node_modules/lodash/_baseFindIndex.js deleted file mode 100644 index e3f5d8a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseFindIndex.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = baseFindIndex; diff --git a/reverse_engineering/node_modules/lodash/_baseFindKey.js b/reverse_engineering/node_modules/lodash/_baseFindKey.js deleted file mode 100644 index 2e430f3..0000000 --- a/reverse_engineering/node_modules/lodash/_baseFindKey.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ -function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; - } - }); - return result; -} - -module.exports = baseFindKey; diff --git a/reverse_engineering/node_modules/lodash/_baseFlatten.js b/reverse_engineering/node_modules/lodash/_baseFlatten.js deleted file mode 100644 index 4b1e009..0000000 --- a/reverse_engineering/node_modules/lodash/_baseFlatten.js +++ /dev/null @@ -1,38 +0,0 @@ -var arrayPush = require('./_arrayPush'), - isFlattenable = require('./_isFlattenable'); - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -module.exports = baseFlatten; diff --git a/reverse_engineering/node_modules/lodash/_baseFor.js b/reverse_engineering/node_modules/lodash/_baseFor.js deleted file mode 100644 index d946590..0000000 --- a/reverse_engineering/node_modules/lodash/_baseFor.js +++ /dev/null @@ -1,16 +0,0 @@ -var createBaseFor = require('./_createBaseFor'); - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -module.exports = baseFor; diff --git a/reverse_engineering/node_modules/lodash/_baseForOwn.js b/reverse_engineering/node_modules/lodash/_baseForOwn.js deleted file mode 100644 index 503d523..0000000 --- a/reverse_engineering/node_modules/lodash/_baseForOwn.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseFor = require('./_baseFor'), - keys = require('./keys'); - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} - -module.exports = baseForOwn; diff --git a/reverse_engineering/node_modules/lodash/_baseForOwnRight.js b/reverse_engineering/node_modules/lodash/_baseForOwnRight.js deleted file mode 100644 index a4b10e6..0000000 --- a/reverse_engineering/node_modules/lodash/_baseForOwnRight.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseForRight = require('./_baseForRight'), - keys = require('./keys'); - -/** - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwnRight(object, iteratee) { - return object && baseForRight(object, iteratee, keys); -} - -module.exports = baseForOwnRight; diff --git a/reverse_engineering/node_modules/lodash/_baseForRight.js b/reverse_engineering/node_modules/lodash/_baseForRight.js deleted file mode 100644 index 32842cd..0000000 --- a/reverse_engineering/node_modules/lodash/_baseForRight.js +++ /dev/null @@ -1,15 +0,0 @@ -var createBaseFor = require('./_createBaseFor'); - -/** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseForRight = createBaseFor(true); - -module.exports = baseForRight; diff --git a/reverse_engineering/node_modules/lodash/_baseFunctions.js b/reverse_engineering/node_modules/lodash/_baseFunctions.js deleted file mode 100644 index d23bc9b..0000000 --- a/reverse_engineering/node_modules/lodash/_baseFunctions.js +++ /dev/null @@ -1,19 +0,0 @@ -var arrayFilter = require('./_arrayFilter'), - isFunction = require('./isFunction'); - -/** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ -function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); -} - -module.exports = baseFunctions; diff --git a/reverse_engineering/node_modules/lodash/_baseGet.js b/reverse_engineering/node_modules/lodash/_baseGet.js deleted file mode 100644 index a194913..0000000 --- a/reverse_engineering/node_modules/lodash/_baseGet.js +++ /dev/null @@ -1,24 +0,0 @@ -var castPath = require('./_castPath'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -module.exports = baseGet; diff --git a/reverse_engineering/node_modules/lodash/_baseGetAllKeys.js b/reverse_engineering/node_modules/lodash/_baseGetAllKeys.js deleted file mode 100644 index 8ad204e..0000000 --- a/reverse_engineering/node_modules/lodash/_baseGetAllKeys.js +++ /dev/null @@ -1,20 +0,0 @@ -var arrayPush = require('./_arrayPush'), - isArray = require('./isArray'); - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} - -module.exports = baseGetAllKeys; diff --git a/reverse_engineering/node_modules/lodash/_baseGetTag.js b/reverse_engineering/node_modules/lodash/_baseGetTag.js deleted file mode 100644 index b927ccc..0000000 --- a/reverse_engineering/node_modules/lodash/_baseGetTag.js +++ /dev/null @@ -1,28 +0,0 @@ -var Symbol = require('./_Symbol'), - getRawTag = require('./_getRawTag'), - objectToString = require('./_objectToString'); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; diff --git a/reverse_engineering/node_modules/lodash/_baseGt.js b/reverse_engineering/node_modules/lodash/_baseGt.js deleted file mode 100644 index 502d273..0000000 --- a/reverse_engineering/node_modules/lodash/_baseGt.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -module.exports = baseGt; diff --git a/reverse_engineering/node_modules/lodash/_baseHas.js b/reverse_engineering/node_modules/lodash/_baseHas.js deleted file mode 100644 index 1b73032..0000000 --- a/reverse_engineering/node_modules/lodash/_baseHas.js +++ /dev/null @@ -1,19 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); -} - -module.exports = baseHas; diff --git a/reverse_engineering/node_modules/lodash/_baseHasIn.js b/reverse_engineering/node_modules/lodash/_baseHasIn.js deleted file mode 100644 index 2e0d042..0000000 --- a/reverse_engineering/node_modules/lodash/_baseHasIn.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -module.exports = baseHasIn; diff --git a/reverse_engineering/node_modules/lodash/_baseInRange.js b/reverse_engineering/node_modules/lodash/_baseInRange.js deleted file mode 100644 index ec95666..0000000 --- a/reverse_engineering/node_modules/lodash/_baseInRange.js +++ /dev/null @@ -1,18 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * The base implementation of `_.inRange` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to check. - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - */ -function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); -} - -module.exports = baseInRange; diff --git a/reverse_engineering/node_modules/lodash/_baseIndexOf.js b/reverse_engineering/node_modules/lodash/_baseIndexOf.js deleted file mode 100644 index 167e706..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIndexOf.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIsNaN = require('./_baseIsNaN'), - strictIndexOf = require('./_strictIndexOf'); - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -module.exports = baseIndexOf; diff --git a/reverse_engineering/node_modules/lodash/_baseIndexOfWith.js b/reverse_engineering/node_modules/lodash/_baseIndexOfWith.js deleted file mode 100644 index f815fe0..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIndexOfWith.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; -} - -module.exports = baseIndexOfWith; diff --git a/reverse_engineering/node_modules/lodash/_baseIntersection.js b/reverse_engineering/node_modules/lodash/_baseIntersection.js deleted file mode 100644 index c1d250c..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIntersection.js +++ /dev/null @@ -1,74 +0,0 @@ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - arrayMap = require('./_arrayMap'), - baseUnary = require('./_baseUnary'), - cacheHas = require('./_cacheHas'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - */ -function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; - - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; - } - array = arrays[0]; - - var index = -1, - seen = caches[0]; - - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -module.exports = baseIntersection; diff --git a/reverse_engineering/node_modules/lodash/_baseInverter.js b/reverse_engineering/node_modules/lodash/_baseInverter.js deleted file mode 100644 index fbc337f..0000000 --- a/reverse_engineering/node_modules/lodash/_baseInverter.js +++ /dev/null @@ -1,21 +0,0 @@ -var baseForOwn = require('./_baseForOwn'); - -/** - * The base implementation of `_.invert` and `_.invertBy` which inverts - * `object` with values transformed by `iteratee` and set by `setter`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform values. - * @param {Object} accumulator The initial inverted object. - * @returns {Function} Returns `accumulator`. - */ -function baseInverter(object, setter, iteratee, accumulator) { - baseForOwn(object, function(value, key, object) { - setter(accumulator, iteratee(value), key, object); - }); - return accumulator; -} - -module.exports = baseInverter; diff --git a/reverse_engineering/node_modules/lodash/_baseInvoke.js b/reverse_engineering/node_modules/lodash/_baseInvoke.js deleted file mode 100644 index 49bcf3c..0000000 --- a/reverse_engineering/node_modules/lodash/_baseInvoke.js +++ /dev/null @@ -1,24 +0,0 @@ -var apply = require('./_apply'), - castPath = require('./_castPath'), - last = require('./last'), - parent = require('./_parent'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.invoke` without support for individual - * method arguments. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ -function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); -} - -module.exports = baseInvoke; diff --git a/reverse_engineering/node_modules/lodash/_baseIsArguments.js b/reverse_engineering/node_modules/lodash/_baseIsArguments.js deleted file mode 100644 index b3562cc..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsArguments.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} - -module.exports = baseIsArguments; diff --git a/reverse_engineering/node_modules/lodash/_baseIsArrayBuffer.js b/reverse_engineering/node_modules/lodash/_baseIsArrayBuffer.js deleted file mode 100644 index a2c4f30..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsArrayBuffer.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -var arrayBufferTag = '[object ArrayBuffer]'; - -/** - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - */ -function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; -} - -module.exports = baseIsArrayBuffer; diff --git a/reverse_engineering/node_modules/lodash/_baseIsDate.js b/reverse_engineering/node_modules/lodash/_baseIsDate.js deleted file mode 100644 index ba67c78..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsDate.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var dateTag = '[object Date]'; - -/** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ -function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; -} - -module.exports = baseIsDate; diff --git a/reverse_engineering/node_modules/lodash/_baseIsEqual.js b/reverse_engineering/node_modules/lodash/_baseIsEqual.js deleted file mode 100644 index 00a68a4..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsEqual.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseIsEqualDeep = require('./_baseIsEqualDeep'), - isObjectLike = require('./isObjectLike'); - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -module.exports = baseIsEqual; diff --git a/reverse_engineering/node_modules/lodash/_baseIsEqualDeep.js b/reverse_engineering/node_modules/lodash/_baseIsEqualDeep.js deleted file mode 100644 index e3cfd6a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsEqualDeep.js +++ /dev/null @@ -1,83 +0,0 @@ -var Stack = require('./_Stack'), - equalArrays = require('./_equalArrays'), - equalByTag = require('./_equalByTag'), - equalObjects = require('./_equalObjects'), - getTag = require('./_getTag'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isTypedArray = require('./isTypedArray'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -module.exports = baseIsEqualDeep; diff --git a/reverse_engineering/node_modules/lodash/_baseIsMap.js b/reverse_engineering/node_modules/lodash/_baseIsMap.js deleted file mode 100644 index 02a4021..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsMap.js +++ /dev/null @@ -1,18 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; -} - -module.exports = baseIsMap; diff --git a/reverse_engineering/node_modules/lodash/_baseIsMatch.js b/reverse_engineering/node_modules/lodash/_baseIsMatch.js deleted file mode 100644 index 72494be..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsMatch.js +++ /dev/null @@ -1,62 +0,0 @@ -var Stack = require('./_Stack'), - baseIsEqual = require('./_baseIsEqual'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -module.exports = baseIsMatch; diff --git a/reverse_engineering/node_modules/lodash/_baseIsNaN.js b/reverse_engineering/node_modules/lodash/_baseIsNaN.js deleted file mode 100644 index 316f1eb..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsNaN.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -module.exports = baseIsNaN; diff --git a/reverse_engineering/node_modules/lodash/_baseIsNative.js b/reverse_engineering/node_modules/lodash/_baseIsNative.js deleted file mode 100644 index 8702330..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsNative.js +++ /dev/null @@ -1,47 +0,0 @@ -var isFunction = require('./isFunction'), - isMasked = require('./_isMasked'), - isObject = require('./isObject'), - toSource = require('./_toSource'); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -module.exports = baseIsNative; diff --git a/reverse_engineering/node_modules/lodash/_baseIsRegExp.js b/reverse_engineering/node_modules/lodash/_baseIsRegExp.js deleted file mode 100644 index 6cd7c1a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsRegExp.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; - -/** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ -function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; -} - -module.exports = baseIsRegExp; diff --git a/reverse_engineering/node_modules/lodash/_baseIsSet.js b/reverse_engineering/node_modules/lodash/_baseIsSet.js deleted file mode 100644 index 6dee367..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsSet.js +++ /dev/null @@ -1,18 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; -} - -module.exports = baseIsSet; diff --git a/reverse_engineering/node_modules/lodash/_baseIsTypedArray.js b/reverse_engineering/node_modules/lodash/_baseIsTypedArray.js deleted file mode 100644 index 1edb32f..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIsTypedArray.js +++ /dev/null @@ -1,60 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isLength = require('./isLength'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -module.exports = baseIsTypedArray; diff --git a/reverse_engineering/node_modules/lodash/_baseIteratee.js b/reverse_engineering/node_modules/lodash/_baseIteratee.js deleted file mode 100644 index 995c257..0000000 --- a/reverse_engineering/node_modules/lodash/_baseIteratee.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseMatches = require('./_baseMatches'), - baseMatchesProperty = require('./_baseMatchesProperty'), - identity = require('./identity'), - isArray = require('./isArray'), - property = require('./property'); - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); -} - -module.exports = baseIteratee; diff --git a/reverse_engineering/node_modules/lodash/_baseKeys.js b/reverse_engineering/node_modules/lodash/_baseKeys.js deleted file mode 100644 index 45e9e6f..0000000 --- a/reverse_engineering/node_modules/lodash/_baseKeys.js +++ /dev/null @@ -1,30 +0,0 @@ -var isPrototype = require('./_isPrototype'), - nativeKeys = require('./_nativeKeys'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -module.exports = baseKeys; diff --git a/reverse_engineering/node_modules/lodash/_baseKeysIn.js b/reverse_engineering/node_modules/lodash/_baseKeysIn.js deleted file mode 100644 index ea8a0a1..0000000 --- a/reverse_engineering/node_modules/lodash/_baseKeysIn.js +++ /dev/null @@ -1,33 +0,0 @@ -var isObject = require('./isObject'), - isPrototype = require('./_isPrototype'), - nativeKeysIn = require('./_nativeKeysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = baseKeysIn; diff --git a/reverse_engineering/node_modules/lodash/_baseLodash.js b/reverse_engineering/node_modules/lodash/_baseLodash.js deleted file mode 100644 index f76c790..0000000 --- a/reverse_engineering/node_modules/lodash/_baseLodash.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ -function baseLodash() { - // No operation performed. -} - -module.exports = baseLodash; diff --git a/reverse_engineering/node_modules/lodash/_baseLt.js b/reverse_engineering/node_modules/lodash/_baseLt.js deleted file mode 100644 index 8674d29..0000000 --- a/reverse_engineering/node_modules/lodash/_baseLt.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -module.exports = baseLt; diff --git a/reverse_engineering/node_modules/lodash/_baseMap.js b/reverse_engineering/node_modules/lodash/_baseMap.js deleted file mode 100644 index 0bf5cea..0000000 --- a/reverse_engineering/node_modules/lodash/_baseMap.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseEach = require('./_baseEach'), - isArrayLike = require('./isArrayLike'); - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -module.exports = baseMap; diff --git a/reverse_engineering/node_modules/lodash/_baseMatches.js b/reverse_engineering/node_modules/lodash/_baseMatches.js deleted file mode 100644 index e56582a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseMatches.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseIsMatch = require('./_baseIsMatch'), - getMatchData = require('./_getMatchData'), - matchesStrictComparable = require('./_matchesStrictComparable'); - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; -} - -module.exports = baseMatches; diff --git a/reverse_engineering/node_modules/lodash/_baseMatchesProperty.js b/reverse_engineering/node_modules/lodash/_baseMatchesProperty.js deleted file mode 100644 index 24afd89..0000000 --- a/reverse_engineering/node_modules/lodash/_baseMatchesProperty.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseIsEqual = require('./_baseIsEqual'), - get = require('./get'), - hasIn = require('./hasIn'), - isKey = require('./_isKey'), - isStrictComparable = require('./_isStrictComparable'), - matchesStrictComparable = require('./_matchesStrictComparable'), - toKey = require('./_toKey'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; -} - -module.exports = baseMatchesProperty; diff --git a/reverse_engineering/node_modules/lodash/_baseMean.js b/reverse_engineering/node_modules/lodash/_baseMean.js deleted file mode 100644 index fa9e00a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseMean.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseSum = require('./_baseSum'); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ -function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; -} - -module.exports = baseMean; diff --git a/reverse_engineering/node_modules/lodash/_baseMerge.js b/reverse_engineering/node_modules/lodash/_baseMerge.js deleted file mode 100644 index c98b5eb..0000000 --- a/reverse_engineering/node_modules/lodash/_baseMerge.js +++ /dev/null @@ -1,42 +0,0 @@ -var Stack = require('./_Stack'), - assignMergeValue = require('./_assignMergeValue'), - baseFor = require('./_baseFor'), - baseMergeDeep = require('./_baseMergeDeep'), - isObject = require('./isObject'), - keysIn = require('./keysIn'), - safeGet = require('./_safeGet'); - -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); -} - -module.exports = baseMerge; diff --git a/reverse_engineering/node_modules/lodash/_baseMergeDeep.js b/reverse_engineering/node_modules/lodash/_baseMergeDeep.js deleted file mode 100644 index 4679e8d..0000000 --- a/reverse_engineering/node_modules/lodash/_baseMergeDeep.js +++ /dev/null @@ -1,94 +0,0 @@ -var assignMergeValue = require('./_assignMergeValue'), - cloneBuffer = require('./_cloneBuffer'), - cloneTypedArray = require('./_cloneTypedArray'), - copyArray = require('./_copyArray'), - initCloneObject = require('./_initCloneObject'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLikeObject = require('./isArrayLikeObject'), - isBuffer = require('./isBuffer'), - isFunction = require('./isFunction'), - isObject = require('./isObject'), - isPlainObject = require('./isPlainObject'), - isTypedArray = require('./isTypedArray'), - safeGet = require('./_safeGet'), - toPlainObject = require('./toPlainObject'); - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} - -module.exports = baseMergeDeep; diff --git a/reverse_engineering/node_modules/lodash/_baseNth.js b/reverse_engineering/node_modules/lodash/_baseNth.js deleted file mode 100644 index 0403c2a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseNth.js +++ /dev/null @@ -1,20 +0,0 @@ -var isIndex = require('./_isIndex'); - -/** - * The base implementation of `_.nth` which doesn't coerce arguments. - * - * @private - * @param {Array} array The array to query. - * @param {number} n The index of the element to return. - * @returns {*} Returns the nth element of `array`. - */ -function baseNth(array, n) { - var length = array.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; -} - -module.exports = baseNth; diff --git a/reverse_engineering/node_modules/lodash/_baseOrderBy.js b/reverse_engineering/node_modules/lodash/_baseOrderBy.js deleted file mode 100644 index 775a017..0000000 --- a/reverse_engineering/node_modules/lodash/_baseOrderBy.js +++ /dev/null @@ -1,49 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseGet = require('./_baseGet'), - baseIteratee = require('./_baseIteratee'), - baseMap = require('./_baseMap'), - baseSortBy = require('./_baseSortBy'), - baseUnary = require('./_baseUnary'), - compareMultiple = require('./_compareMultiple'), - identity = require('./identity'), - isArray = require('./isArray'); - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap(iteratees, function(iteratee) { - if (isArray(iteratee)) { - return function(value) { - return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity]; - } - - var index = -1; - iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); -} - -module.exports = baseOrderBy; diff --git a/reverse_engineering/node_modules/lodash/_basePick.js b/reverse_engineering/node_modules/lodash/_basePick.js deleted file mode 100644 index 09b458a..0000000 --- a/reverse_engineering/node_modules/lodash/_basePick.js +++ /dev/null @@ -1,19 +0,0 @@ -var basePickBy = require('./_basePickBy'), - hasIn = require('./hasIn'); - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); -} - -module.exports = basePick; diff --git a/reverse_engineering/node_modules/lodash/_basePickBy.js b/reverse_engineering/node_modules/lodash/_basePickBy.js deleted file mode 100644 index 85be68c..0000000 --- a/reverse_engineering/node_modules/lodash/_basePickBy.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseGet = require('./_baseGet'), - baseSet = require('./_baseSet'), - castPath = require('./_castPath'); - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); - - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } - } - return result; -} - -module.exports = basePickBy; diff --git a/reverse_engineering/node_modules/lodash/_baseProperty.js b/reverse_engineering/node_modules/lodash/_baseProperty.js deleted file mode 100644 index 496281e..0000000 --- a/reverse_engineering/node_modules/lodash/_baseProperty.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -module.exports = baseProperty; diff --git a/reverse_engineering/node_modules/lodash/_basePropertyDeep.js b/reverse_engineering/node_modules/lodash/_basePropertyDeep.js deleted file mode 100644 index 1e5aae5..0000000 --- a/reverse_engineering/node_modules/lodash/_basePropertyDeep.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseGet = require('./_baseGet'); - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; -} - -module.exports = basePropertyDeep; diff --git a/reverse_engineering/node_modules/lodash/_basePropertyOf.js b/reverse_engineering/node_modules/lodash/_basePropertyOf.js deleted file mode 100644 index 4617399..0000000 --- a/reverse_engineering/node_modules/lodash/_basePropertyOf.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; -} - -module.exports = basePropertyOf; diff --git a/reverse_engineering/node_modules/lodash/_basePullAll.js b/reverse_engineering/node_modules/lodash/_basePullAll.js deleted file mode 100644 index 305720e..0000000 --- a/reverse_engineering/node_modules/lodash/_basePullAll.js +++ /dev/null @@ -1,51 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIndexOf = require('./_baseIndexOf'), - baseIndexOfWith = require('./_baseIndexOfWith'), - baseUnary = require('./_baseUnary'), - copyArray = require('./_copyArray'); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ -function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; - - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; - - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; -} - -module.exports = basePullAll; diff --git a/reverse_engineering/node_modules/lodash/_basePullAt.js b/reverse_engineering/node_modules/lodash/_basePullAt.js deleted file mode 100644 index c3e9e71..0000000 --- a/reverse_engineering/node_modules/lodash/_basePullAt.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseUnset = require('./_baseUnset'), - isIndex = require('./_isIndex'); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * The base implementation of `_.pullAt` without support for individual - * indexes or capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ -function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, - lastIndex = length - 1; - - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } - } - return array; -} - -module.exports = basePullAt; diff --git a/reverse_engineering/node_modules/lodash/_baseRandom.js b/reverse_engineering/node_modules/lodash/_baseRandom.js deleted file mode 100644 index 94f76a7..0000000 --- a/reverse_engineering/node_modules/lodash/_baseRandom.js +++ /dev/null @@ -1,18 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor, - nativeRandom = Math.random; - -/** - * The base implementation of `_.random` without support for returning - * floating-point numbers. - * - * @private - * @param {number} lower The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the random number. - */ -function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); -} - -module.exports = baseRandom; diff --git a/reverse_engineering/node_modules/lodash/_baseRange.js b/reverse_engineering/node_modules/lodash/_baseRange.js deleted file mode 100644 index 0fb8e41..0000000 --- a/reverse_engineering/node_modules/lodash/_baseRange.js +++ /dev/null @@ -1,28 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -module.exports = baseRange; diff --git a/reverse_engineering/node_modules/lodash/_baseReduce.js b/reverse_engineering/node_modules/lodash/_baseReduce.js deleted file mode 100644 index 5a1f8b5..0000000 --- a/reverse_engineering/node_modules/lodash/_baseReduce.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -module.exports = baseReduce; diff --git a/reverse_engineering/node_modules/lodash/_baseRepeat.js b/reverse_engineering/node_modules/lodash/_baseRepeat.js deleted file mode 100644 index ee44c31..0000000 --- a/reverse_engineering/node_modules/lodash/_baseRepeat.js +++ /dev/null @@ -1,35 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * The base implementation of `_.repeat` which doesn't coerce arguments. - * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. - */ -function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - - return result; -} - -module.exports = baseRepeat; diff --git a/reverse_engineering/node_modules/lodash/_baseRest.js b/reverse_engineering/node_modules/lodash/_baseRest.js deleted file mode 100644 index d0dc4bd..0000000 --- a/reverse_engineering/node_modules/lodash/_baseRest.js +++ /dev/null @@ -1,17 +0,0 @@ -var identity = require('./identity'), - overRest = require('./_overRest'), - setToString = require('./_setToString'); - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} - -module.exports = baseRest; diff --git a/reverse_engineering/node_modules/lodash/_baseSample.js b/reverse_engineering/node_modules/lodash/_baseSample.js deleted file mode 100644 index 58582b9..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSample.js +++ /dev/null @@ -1,15 +0,0 @@ -var arraySample = require('./_arraySample'), - values = require('./values'); - -/** - * The base implementation of `_.sample`. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - */ -function baseSample(collection) { - return arraySample(values(collection)); -} - -module.exports = baseSample; diff --git a/reverse_engineering/node_modules/lodash/_baseSampleSize.js b/reverse_engineering/node_modules/lodash/_baseSampleSize.js deleted file mode 100644 index 5c90ec5..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSampleSize.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseClamp = require('./_baseClamp'), - shuffleSelf = require('./_shuffleSelf'), - values = require('./values'); - -/** - * The base implementation of `_.sampleSize` without param guards. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ -function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); -} - -module.exports = baseSampleSize; diff --git a/reverse_engineering/node_modules/lodash/_baseSet.js b/reverse_engineering/node_modules/lodash/_baseSet.js deleted file mode 100644 index 99f4fbf..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSet.js +++ /dev/null @@ -1,51 +0,0 @@ -var assignValue = require('./_assignValue'), - castPath = require('./_castPath'), - isIndex = require('./_isIndex'), - isObject = require('./isObject'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -module.exports = baseSet; diff --git a/reverse_engineering/node_modules/lodash/_baseSetData.js b/reverse_engineering/node_modules/lodash/_baseSetData.js deleted file mode 100644 index c409947..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSetData.js +++ /dev/null @@ -1,17 +0,0 @@ -var identity = require('./identity'), - metaMap = require('./_metaMap'); - -/** - * The base implementation of `setData` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; -}; - -module.exports = baseSetData; diff --git a/reverse_engineering/node_modules/lodash/_baseSetToString.js b/reverse_engineering/node_modules/lodash/_baseSetToString.js deleted file mode 100644 index 89eaca3..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSetToString.js +++ /dev/null @@ -1,22 +0,0 @@ -var constant = require('./constant'), - defineProperty = require('./_defineProperty'), - identity = require('./identity'); - -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; - -module.exports = baseSetToString; diff --git a/reverse_engineering/node_modules/lodash/_baseShuffle.js b/reverse_engineering/node_modules/lodash/_baseShuffle.js deleted file mode 100644 index 023077a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseShuffle.js +++ /dev/null @@ -1,15 +0,0 @@ -var shuffleSelf = require('./_shuffleSelf'), - values = require('./values'); - -/** - * The base implementation of `_.shuffle`. - * - * @private - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - */ -function baseShuffle(collection) { - return shuffleSelf(values(collection)); -} - -module.exports = baseShuffle; diff --git a/reverse_engineering/node_modules/lodash/_baseSlice.js b/reverse_engineering/node_modules/lodash/_baseSlice.js deleted file mode 100644 index 786f6c9..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSlice.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -module.exports = baseSlice; diff --git a/reverse_engineering/node_modules/lodash/_baseSome.js b/reverse_engineering/node_modules/lodash/_baseSome.js deleted file mode 100644 index 58f3f44..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSome.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseEach = require('./_baseEach'); - -/** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; -} - -module.exports = baseSome; diff --git a/reverse_engineering/node_modules/lodash/_baseSortBy.js b/reverse_engineering/node_modules/lodash/_baseSortBy.js deleted file mode 100644 index a25c92e..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSortBy.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -module.exports = baseSortBy; diff --git a/reverse_engineering/node_modules/lodash/_baseSortedIndex.js b/reverse_engineering/node_modules/lodash/_baseSortedIndex.js deleted file mode 100644 index 638c366..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSortedIndex.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseSortedIndexBy = require('./_baseSortedIndexBy'), - identity = require('./identity'), - isSymbol = require('./isSymbol'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - -/** - * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which - * performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function baseSortedIndex(array, value, retHighest) { - var low = 0, - high = array == null ? low : array.length; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if (computed !== null && !isSymbol(computed) && - (retHighest ? (computed <= value) : (computed < value))) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy(array, value, identity, retHighest); -} - -module.exports = baseSortedIndex; diff --git a/reverse_engineering/node_modules/lodash/_baseSortedIndexBy.js b/reverse_engineering/node_modules/lodash/_baseSortedIndexBy.js deleted file mode 100644 index c247b37..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSortedIndexBy.js +++ /dev/null @@ -1,67 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor, - nativeMin = Math.min; - -/** - * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` - * which invokes `iteratee` for `value` and each element of `array` to compute - * their sort ranking. The iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The iteratee invoked per element. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function baseSortedIndexBy(array, value, iteratee, retHighest) { - var low = 0, - high = array == null ? 0 : array.length; - if (high === 0) { - return 0; - } - - value = iteratee(value); - var valIsNaN = value !== value, - valIsNull = value === null, - valIsSymbol = isSymbol(value), - valIsUndefined = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - othIsDefined = computed !== undefined, - othIsNull = computed === null, - othIsReflexive = computed === computed, - othIsSymbol = isSymbol(computed); - - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); -} - -module.exports = baseSortedIndexBy; diff --git a/reverse_engineering/node_modules/lodash/_baseSortedUniq.js b/reverse_engineering/node_modules/lodash/_baseSortedUniq.js deleted file mode 100644 index 802159a..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSortedUniq.js +++ /dev/null @@ -1,30 +0,0 @@ -var eq = require('./eq'); - -/** - * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseSortedUniq(array, iteratee) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - if (!index || !eq(computed, seen)) { - var seen = computed; - result[resIndex++] = value === 0 ? 0 : value; - } - } - return result; -} - -module.exports = baseSortedUniq; diff --git a/reverse_engineering/node_modules/lodash/_baseSum.js b/reverse_engineering/node_modules/lodash/_baseSum.js deleted file mode 100644 index a9e84c1..0000000 --- a/reverse_engineering/node_modules/lodash/_baseSum.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ -function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; - - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); - } - } - return result; -} - -module.exports = baseSum; diff --git a/reverse_engineering/node_modules/lodash/_baseTimes.js b/reverse_engineering/node_modules/lodash/_baseTimes.js deleted file mode 100644 index 0603fc3..0000000 --- a/reverse_engineering/node_modules/lodash/_baseTimes.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -module.exports = baseTimes; diff --git a/reverse_engineering/node_modules/lodash/_baseToNumber.js b/reverse_engineering/node_modules/lodash/_baseToNumber.js deleted file mode 100644 index 04859f3..0000000 --- a/reverse_engineering/node_modules/lodash/_baseToNumber.js +++ /dev/null @@ -1,24 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** - * The base implementation of `_.toNumber` which doesn't ensure correct - * conversions of binary, hexadecimal, or octal string values. - * - * @private - * @param {*} value The value to process. - * @returns {number} Returns the number. - */ -function baseToNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - return +value; -} - -module.exports = baseToNumber; diff --git a/reverse_engineering/node_modules/lodash/_baseToPairs.js b/reverse_engineering/node_modules/lodash/_baseToPairs.js deleted file mode 100644 index bff1991..0000000 --- a/reverse_engineering/node_modules/lodash/_baseToPairs.js +++ /dev/null @@ -1,18 +0,0 @@ -var arrayMap = require('./_arrayMap'); - -/** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ -function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); -} - -module.exports = baseToPairs; diff --git a/reverse_engineering/node_modules/lodash/_baseToString.js b/reverse_engineering/node_modules/lodash/_baseToString.js deleted file mode 100644 index ada6ad2..0000000 --- a/reverse_engineering/node_modules/lodash/_baseToString.js +++ /dev/null @@ -1,37 +0,0 @@ -var Symbol = require('./_Symbol'), - arrayMap = require('./_arrayMap'), - isArray = require('./isArray'), - isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = baseToString; diff --git a/reverse_engineering/node_modules/lodash/_baseUnary.js b/reverse_engineering/node_modules/lodash/_baseUnary.js deleted file mode 100644 index 98639e9..0000000 --- a/reverse_engineering/node_modules/lodash/_baseUnary.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -module.exports = baseUnary; diff --git a/reverse_engineering/node_modules/lodash/_baseUniq.js b/reverse_engineering/node_modules/lodash/_baseUniq.js deleted file mode 100644 index aea459d..0000000 --- a/reverse_engineering/node_modules/lodash/_baseUniq.js +++ /dev/null @@ -1,72 +0,0 @@ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - cacheHas = require('./_cacheHas'), - createSet = require('./_createSet'), - setToArray = require('./_setToArray'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -module.exports = baseUniq; diff --git a/reverse_engineering/node_modules/lodash/_baseUnset.js b/reverse_engineering/node_modules/lodash/_baseUnset.js deleted file mode 100644 index eefc6e3..0000000 --- a/reverse_engineering/node_modules/lodash/_baseUnset.js +++ /dev/null @@ -1,20 +0,0 @@ -var castPath = require('./_castPath'), - last = require('./last'), - parent = require('./_parent'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.unset`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The property path to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - */ -function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; -} - -module.exports = baseUnset; diff --git a/reverse_engineering/node_modules/lodash/_baseUpdate.js b/reverse_engineering/node_modules/lodash/_baseUpdate.js deleted file mode 100644 index 92a6237..0000000 --- a/reverse_engineering/node_modules/lodash/_baseUpdate.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseGet = require('./_baseGet'), - baseSet = require('./_baseSet'); - -/** - * The base implementation of `_.update`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to update. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); -} - -module.exports = baseUpdate; diff --git a/reverse_engineering/node_modules/lodash/_baseValues.js b/reverse_engineering/node_modules/lodash/_baseValues.js deleted file mode 100644 index b95faad..0000000 --- a/reverse_engineering/node_modules/lodash/_baseValues.js +++ /dev/null @@ -1,19 +0,0 @@ -var arrayMap = require('./_arrayMap'); - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} - -module.exports = baseValues; diff --git a/reverse_engineering/node_modules/lodash/_baseWhile.js b/reverse_engineering/node_modules/lodash/_baseWhile.js deleted file mode 100644 index 07eac61..0000000 --- a/reverse_engineering/node_modules/lodash/_baseWhile.js +++ /dev/null @@ -1,26 +0,0 @@ -var baseSlice = require('./_baseSlice'); - -/** - * The base implementation of methods like `_.dropWhile` and `_.takeWhile` - * without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ -function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && - predicate(array[index], index, array)) {} - - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); -} - -module.exports = baseWhile; diff --git a/reverse_engineering/node_modules/lodash/_baseWrapperValue.js b/reverse_engineering/node_modules/lodash/_baseWrapperValue.js deleted file mode 100644 index 443e0df..0000000 --- a/reverse_engineering/node_modules/lodash/_baseWrapperValue.js +++ /dev/null @@ -1,25 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - arrayPush = require('./_arrayPush'), - arrayReduce = require('./_arrayReduce'); - -/** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ -function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - return arrayReduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); -} - -module.exports = baseWrapperValue; diff --git a/reverse_engineering/node_modules/lodash/_baseXor.js b/reverse_engineering/node_modules/lodash/_baseXor.js deleted file mode 100644 index 8e69338..0000000 --- a/reverse_engineering/node_modules/lodash/_baseXor.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseUniq = require('./_baseUniq'); - -/** - * The base implementation of methods like `_.xor`, without support for - * iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - */ -function baseXor(arrays, iteratee, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, - result = Array(length); - - while (++index < length) { - var array = arrays[index], - othIndex = -1; - - while (++othIndex < length) { - if (othIndex != index) { - result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); - } - } - } - return baseUniq(baseFlatten(result, 1), iteratee, comparator); -} - -module.exports = baseXor; diff --git a/reverse_engineering/node_modules/lodash/_baseZipObject.js b/reverse_engineering/node_modules/lodash/_baseZipObject.js deleted file mode 100644 index 401f85b..0000000 --- a/reverse_engineering/node_modules/lodash/_baseZipObject.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -module.exports = baseZipObject; diff --git a/reverse_engineering/node_modules/lodash/_cacheHas.js b/reverse_engineering/node_modules/lodash/_cacheHas.js deleted file mode 100644 index 2dec892..0000000 --- a/reverse_engineering/node_modules/lodash/_cacheHas.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -module.exports = cacheHas; diff --git a/reverse_engineering/node_modules/lodash/_castArrayLikeObject.js b/reverse_engineering/node_modules/lodash/_castArrayLikeObject.js deleted file mode 100644 index 92c75fa..0000000 --- a/reverse_engineering/node_modules/lodash/_castArrayLikeObject.js +++ /dev/null @@ -1,14 +0,0 @@ -var isArrayLikeObject = require('./isArrayLikeObject'); - -/** - * Casts `value` to an empty array if it's not an array like object. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. - */ -function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; -} - -module.exports = castArrayLikeObject; diff --git a/reverse_engineering/node_modules/lodash/_castFunction.js b/reverse_engineering/node_modules/lodash/_castFunction.js deleted file mode 100644 index 98c91ae..0000000 --- a/reverse_engineering/node_modules/lodash/_castFunction.js +++ /dev/null @@ -1,14 +0,0 @@ -var identity = require('./identity'); - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : identity; -} - -module.exports = castFunction; diff --git a/reverse_engineering/node_modules/lodash/_castPath.js b/reverse_engineering/node_modules/lodash/_castPath.js deleted file mode 100644 index 017e4c1..0000000 --- a/reverse_engineering/node_modules/lodash/_castPath.js +++ /dev/null @@ -1,21 +0,0 @@ -var isArray = require('./isArray'), - isKey = require('./_isKey'), - stringToPath = require('./_stringToPath'), - toString = require('./toString'); - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); -} - -module.exports = castPath; diff --git a/reverse_engineering/node_modules/lodash/_castRest.js b/reverse_engineering/node_modules/lodash/_castRest.js deleted file mode 100644 index 213c66f..0000000 --- a/reverse_engineering/node_modules/lodash/_castRest.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseRest = require('./_baseRest'); - -/** - * A `baseRest` alias which can be replaced with `identity` by module - * replacement plugins. - * - * @private - * @type {Function} - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -var castRest = baseRest; - -module.exports = castRest; diff --git a/reverse_engineering/node_modules/lodash/_castSlice.js b/reverse_engineering/node_modules/lodash/_castSlice.js deleted file mode 100644 index 071faeb..0000000 --- a/reverse_engineering/node_modules/lodash/_castSlice.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseSlice = require('./_baseSlice'); - -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); -} - -module.exports = castSlice; diff --git a/reverse_engineering/node_modules/lodash/_charsEndIndex.js b/reverse_engineering/node_modules/lodash/_charsEndIndex.js deleted file mode 100644 index 07908ff..0000000 --- a/reverse_engineering/node_modules/lodash/_charsEndIndex.js +++ /dev/null @@ -1,19 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -module.exports = charsEndIndex; diff --git a/reverse_engineering/node_modules/lodash/_charsStartIndex.js b/reverse_engineering/node_modules/lodash/_charsStartIndex.js deleted file mode 100644 index b17afd2..0000000 --- a/reverse_engineering/node_modules/lodash/_charsStartIndex.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ -function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -module.exports = charsStartIndex; diff --git a/reverse_engineering/node_modules/lodash/_cloneArrayBuffer.js b/reverse_engineering/node_modules/lodash/_cloneArrayBuffer.js deleted file mode 100644 index c3d8f6e..0000000 --- a/reverse_engineering/node_modules/lodash/_cloneArrayBuffer.js +++ /dev/null @@ -1,16 +0,0 @@ -var Uint8Array = require('./_Uint8Array'); - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -module.exports = cloneArrayBuffer; diff --git a/reverse_engineering/node_modules/lodash/_cloneBuffer.js b/reverse_engineering/node_modules/lodash/_cloneBuffer.js deleted file mode 100644 index 27c4810..0000000 --- a/reverse_engineering/node_modules/lodash/_cloneBuffer.js +++ /dev/null @@ -1,35 +0,0 @@ -var root = require('./_root'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - - buffer.copy(result); - return result; -} - -module.exports = cloneBuffer; diff --git a/reverse_engineering/node_modules/lodash/_cloneDataView.js b/reverse_engineering/node_modules/lodash/_cloneDataView.js deleted file mode 100644 index 9c9b7b0..0000000 --- a/reverse_engineering/node_modules/lodash/_cloneDataView.js +++ /dev/null @@ -1,16 +0,0 @@ -var cloneArrayBuffer = require('./_cloneArrayBuffer'); - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -module.exports = cloneDataView; diff --git a/reverse_engineering/node_modules/lodash/_cloneRegExp.js b/reverse_engineering/node_modules/lodash/_cloneRegExp.js deleted file mode 100644 index 64a30df..0000000 --- a/reverse_engineering/node_modules/lodash/_cloneRegExp.js +++ /dev/null @@ -1,17 +0,0 @@ -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -module.exports = cloneRegExp; diff --git a/reverse_engineering/node_modules/lodash/_cloneSymbol.js b/reverse_engineering/node_modules/lodash/_cloneSymbol.js deleted file mode 100644 index bede39f..0000000 --- a/reverse_engineering/node_modules/lodash/_cloneSymbol.js +++ /dev/null @@ -1,18 +0,0 @@ -var Symbol = require('./_Symbol'); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -module.exports = cloneSymbol; diff --git a/reverse_engineering/node_modules/lodash/_cloneTypedArray.js b/reverse_engineering/node_modules/lodash/_cloneTypedArray.js deleted file mode 100644 index 7aad84d..0000000 --- a/reverse_engineering/node_modules/lodash/_cloneTypedArray.js +++ /dev/null @@ -1,16 +0,0 @@ -var cloneArrayBuffer = require('./_cloneArrayBuffer'); - -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} - -module.exports = cloneTypedArray; diff --git a/reverse_engineering/node_modules/lodash/_compareAscending.js b/reverse_engineering/node_modules/lodash/_compareAscending.js deleted file mode 100644 index 8dc2791..0000000 --- a/reverse_engineering/node_modules/lodash/_compareAscending.js +++ /dev/null @@ -1,41 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -module.exports = compareAscending; diff --git a/reverse_engineering/node_modules/lodash/_compareMultiple.js b/reverse_engineering/node_modules/lodash/_compareMultiple.js deleted file mode 100644 index ad61f0f..0000000 --- a/reverse_engineering/node_modules/lodash/_compareMultiple.js +++ /dev/null @@ -1,44 +0,0 @@ -var compareAscending = require('./_compareAscending'); - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -module.exports = compareMultiple; diff --git a/reverse_engineering/node_modules/lodash/_composeArgs.js b/reverse_engineering/node_modules/lodash/_composeArgs.js deleted file mode 100644 index 1ce40f4..0000000 --- a/reverse_engineering/node_modules/lodash/_composeArgs.js +++ /dev/null @@ -1,39 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; -} - -module.exports = composeArgs; diff --git a/reverse_engineering/node_modules/lodash/_composeArgsRight.js b/reverse_engineering/node_modules/lodash/_composeArgsRight.js deleted file mode 100644 index 8dc588d..0000000 --- a/reverse_engineering/node_modules/lodash/_composeArgsRight.js +++ /dev/null @@ -1,41 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; - - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; -} - -module.exports = composeArgsRight; diff --git a/reverse_engineering/node_modules/lodash/_copyArray.js b/reverse_engineering/node_modules/lodash/_copyArray.js deleted file mode 100644 index cd94d5d..0000000 --- a/reverse_engineering/node_modules/lodash/_copyArray.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = copyArray; diff --git a/reverse_engineering/node_modules/lodash/_copyObject.js b/reverse_engineering/node_modules/lodash/_copyObject.js deleted file mode 100644 index 2f2a5c2..0000000 --- a/reverse_engineering/node_modules/lodash/_copyObject.js +++ /dev/null @@ -1,40 +0,0 @@ -var assignValue = require('./_assignValue'), - baseAssignValue = require('./_baseAssignValue'); - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; -} - -module.exports = copyObject; diff --git a/reverse_engineering/node_modules/lodash/_copySymbols.js b/reverse_engineering/node_modules/lodash/_copySymbols.js deleted file mode 100644 index c35944a..0000000 --- a/reverse_engineering/node_modules/lodash/_copySymbols.js +++ /dev/null @@ -1,16 +0,0 @@ -var copyObject = require('./_copyObject'), - getSymbols = require('./_getSymbols'); - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -module.exports = copySymbols; diff --git a/reverse_engineering/node_modules/lodash/_copySymbolsIn.js b/reverse_engineering/node_modules/lodash/_copySymbolsIn.js deleted file mode 100644 index fdf20a7..0000000 --- a/reverse_engineering/node_modules/lodash/_copySymbolsIn.js +++ /dev/null @@ -1,16 +0,0 @@ -var copyObject = require('./_copyObject'), - getSymbolsIn = require('./_getSymbolsIn'); - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); -} - -module.exports = copySymbolsIn; diff --git a/reverse_engineering/node_modules/lodash/_coreJsData.js b/reverse_engineering/node_modules/lodash/_coreJsData.js deleted file mode 100644 index f8e5b4e..0000000 --- a/reverse_engineering/node_modules/lodash/_coreJsData.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; diff --git a/reverse_engineering/node_modules/lodash/_countHolders.js b/reverse_engineering/node_modules/lodash/_countHolders.js deleted file mode 100644 index 718fcda..0000000 --- a/reverse_engineering/node_modules/lodash/_countHolders.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ -function countHolders(array, placeholder) { - var length = array.length, - result = 0; - - while (length--) { - if (array[length] === placeholder) { - ++result; - } - } - return result; -} - -module.exports = countHolders; diff --git a/reverse_engineering/node_modules/lodash/_createAggregator.js b/reverse_engineering/node_modules/lodash/_createAggregator.js deleted file mode 100644 index 0be42c4..0000000 --- a/reverse_engineering/node_modules/lodash/_createAggregator.js +++ /dev/null @@ -1,23 +0,0 @@ -var arrayAggregator = require('./_arrayAggregator'), - baseAggregator = require('./_baseAggregator'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); - -/** - * Creates a function like `_.groupBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} [initializer] The accumulator object initializer. - * @returns {Function} Returns the new aggregator function. - */ -function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, - accumulator = initializer ? initializer() : {}; - - return func(collection, setter, baseIteratee(iteratee, 2), accumulator); - }; -} - -module.exports = createAggregator; diff --git a/reverse_engineering/node_modules/lodash/_createAssigner.js b/reverse_engineering/node_modules/lodash/_createAssigner.js deleted file mode 100644 index 1f904c5..0000000 --- a/reverse_engineering/node_modules/lodash/_createAssigner.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseRest = require('./_baseRest'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; diff --git a/reverse_engineering/node_modules/lodash/_createBaseEach.js b/reverse_engineering/node_modules/lodash/_createBaseEach.js deleted file mode 100644 index d24fdd1..0000000 --- a/reverse_engineering/node_modules/lodash/_createBaseEach.js +++ /dev/null @@ -1,32 +0,0 @@ -var isArrayLike = require('./isArrayLike'); - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -module.exports = createBaseEach; diff --git a/reverse_engineering/node_modules/lodash/_createBaseFor.js b/reverse_engineering/node_modules/lodash/_createBaseFor.js deleted file mode 100644 index 94cbf29..0000000 --- a/reverse_engineering/node_modules/lodash/_createBaseFor.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = createBaseFor; diff --git a/reverse_engineering/node_modules/lodash/_createBind.js b/reverse_engineering/node_modules/lodash/_createBind.js deleted file mode 100644 index 07cb99f..0000000 --- a/reverse_engineering/node_modules/lodash/_createBind.js +++ /dev/null @@ -1,28 +0,0 @@ -var createCtor = require('./_createCtor'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; -} - -module.exports = createBind; diff --git a/reverse_engineering/node_modules/lodash/_createCaseFirst.js b/reverse_engineering/node_modules/lodash/_createCaseFirst.js deleted file mode 100644 index fe8ea48..0000000 --- a/reverse_engineering/node_modules/lodash/_createCaseFirst.js +++ /dev/null @@ -1,33 +0,0 @@ -var castSlice = require('./_castSlice'), - hasUnicode = require('./_hasUnicode'), - stringToArray = require('./_stringToArray'), - toString = require('./toString'); - -/** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. - */ -function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; -} - -module.exports = createCaseFirst; diff --git a/reverse_engineering/node_modules/lodash/_createCompounder.js b/reverse_engineering/node_modules/lodash/_createCompounder.js deleted file mode 100644 index 8d4cee2..0000000 --- a/reverse_engineering/node_modules/lodash/_createCompounder.js +++ /dev/null @@ -1,24 +0,0 @@ -var arrayReduce = require('./_arrayReduce'), - deburr = require('./deburr'), - words = require('./words'); - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]"; - -/** Used to match apostrophes. */ -var reApos = RegExp(rsApos, 'g'); - -/** - * Creates a function like `_.camelCase`. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ -function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; -} - -module.exports = createCompounder; diff --git a/reverse_engineering/node_modules/lodash/_createCtor.js b/reverse_engineering/node_modules/lodash/_createCtor.js deleted file mode 100644 index 9047aa5..0000000 --- a/reverse_engineering/node_modules/lodash/_createCtor.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseCreate = require('./_baseCreate'), - isObject = require('./isObject'); - -/** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ -function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; -} - -module.exports = createCtor; diff --git a/reverse_engineering/node_modules/lodash/_createCurry.js b/reverse_engineering/node_modules/lodash/_createCurry.js deleted file mode 100644 index f06c2cd..0000000 --- a/reverse_engineering/node_modules/lodash/_createCurry.js +++ /dev/null @@ -1,46 +0,0 @@ -var apply = require('./_apply'), - createCtor = require('./_createCtor'), - createHybrid = require('./_createHybrid'), - createRecurry = require('./_createRecurry'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'), - root = require('./_root'); - -/** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; -} - -module.exports = createCurry; diff --git a/reverse_engineering/node_modules/lodash/_createFind.js b/reverse_engineering/node_modules/lodash/_createFind.js deleted file mode 100644 index 8859ff8..0000000 --- a/reverse_engineering/node_modules/lodash/_createFind.js +++ /dev/null @@ -1,25 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - isArrayLike = require('./isArrayLike'), - keys = require('./keys'); - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -module.exports = createFind; diff --git a/reverse_engineering/node_modules/lodash/_createFlow.js b/reverse_engineering/node_modules/lodash/_createFlow.js deleted file mode 100644 index baaddbf..0000000 --- a/reverse_engineering/node_modules/lodash/_createFlow.js +++ /dev/null @@ -1,78 +0,0 @@ -var LodashWrapper = require('./_LodashWrapper'), - flatRest = require('./_flatRest'), - getData = require('./_getData'), - getFuncName = require('./_getFuncName'), - isArray = require('./isArray'), - isLaziable = require('./_isLaziable'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_FLAG = 8, - WRAP_PARTIAL_FLAG = 32, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256; - -/** - * Creates a `_.flow` or `_.flowRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. - */ -function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, - index = length, - prereq = LodashWrapper.prototype.thru; - - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == 'wrapper') { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : undefined; - - if (data && isLaziable(data[0]) && - data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && - !data[4].length && data[9] == 1 - ) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) - ? wrapper[funcName]() - : wrapper.thru(func); - } - } - return function() { - var args = arguments, - value = args[0]; - - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : value; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }); -} - -module.exports = createFlow; diff --git a/reverse_engineering/node_modules/lodash/_createHybrid.js b/reverse_engineering/node_modules/lodash/_createHybrid.js deleted file mode 100644 index b671bd1..0000000 --- a/reverse_engineering/node_modules/lodash/_createHybrid.js +++ /dev/null @@ -1,92 +0,0 @@ -var composeArgs = require('./_composeArgs'), - composeArgsRight = require('./_composeArgsRight'), - countHolders = require('./_countHolders'), - createCtor = require('./_createCtor'), - createRecurry = require('./_createRecurry'), - getHolder = require('./_getHolder'), - reorder = require('./_reorder'), - replaceHolders = require('./_replaceHolders'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_ARY_FLAG = 128, - WRAP_FLIP_FLAG = 512; - -/** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; -} - -module.exports = createHybrid; diff --git a/reverse_engineering/node_modules/lodash/_createInverter.js b/reverse_engineering/node_modules/lodash/_createInverter.js deleted file mode 100644 index 6c0c562..0000000 --- a/reverse_engineering/node_modules/lodash/_createInverter.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseInverter = require('./_baseInverter'); - -/** - * Creates a function like `_.invertBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} toIteratee The function to resolve iteratees. - * @returns {Function} Returns the new inverter function. - */ -function createInverter(setter, toIteratee) { - return function(object, iteratee) { - return baseInverter(object, setter, toIteratee(iteratee), {}); - }; -} - -module.exports = createInverter; diff --git a/reverse_engineering/node_modules/lodash/_createMathOperation.js b/reverse_engineering/node_modules/lodash/_createMathOperation.js deleted file mode 100644 index f1e238a..0000000 --- a/reverse_engineering/node_modules/lodash/_createMathOperation.js +++ /dev/null @@ -1,38 +0,0 @@ -var baseToNumber = require('./_baseToNumber'), - baseToString = require('./_baseToString'); - -/** - * Creates a function that performs a mathematical operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @param {number} [defaultValue] The value used for `undefined` arguments. - * @returns {Function} Returns the new mathematical operation function. - */ -function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - if (result === undefined) { - return other; - } - if (typeof value == 'string' || typeof other == 'string') { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result = operator(value, other); - } - return result; - }; -} - -module.exports = createMathOperation; diff --git a/reverse_engineering/node_modules/lodash/_createOver.js b/reverse_engineering/node_modules/lodash/_createOver.js deleted file mode 100644 index 3b94551..0000000 --- a/reverse_engineering/node_modules/lodash/_createOver.js +++ /dev/null @@ -1,27 +0,0 @@ -var apply = require('./_apply'), - arrayMap = require('./_arrayMap'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'), - baseUnary = require('./_baseUnary'), - flatRest = require('./_flatRest'); - -/** - * Creates a function like `_.over`. - * - * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new over function. - */ -function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); -} - -module.exports = createOver; diff --git a/reverse_engineering/node_modules/lodash/_createPadding.js b/reverse_engineering/node_modules/lodash/_createPadding.js deleted file mode 100644 index 2124612..0000000 --- a/reverse_engineering/node_modules/lodash/_createPadding.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseRepeat = require('./_baseRepeat'), - baseToString = require('./_baseToString'), - castSlice = require('./_castSlice'), - hasUnicode = require('./_hasUnicode'), - stringSize = require('./_stringSize'), - stringToArray = require('./_stringToArray'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; - -/** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. - * - * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. - */ -function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); - - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); -} - -module.exports = createPadding; diff --git a/reverse_engineering/node_modules/lodash/_createPartial.js b/reverse_engineering/node_modules/lodash/_createPartial.js deleted file mode 100644 index e16c248..0000000 --- a/reverse_engineering/node_modules/lodash/_createPartial.js +++ /dev/null @@ -1,43 +0,0 @@ -var apply = require('./_apply'), - createCtor = require('./_createCtor'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ -function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; -} - -module.exports = createPartial; diff --git a/reverse_engineering/node_modules/lodash/_createRange.js b/reverse_engineering/node_modules/lodash/_createRange.js deleted file mode 100644 index 9f52c77..0000000 --- a/reverse_engineering/node_modules/lodash/_createRange.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseRange = require('./_baseRange'), - isIterateeCall = require('./_isIterateeCall'), - toFinite = require('./toFinite'); - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; -} - -module.exports = createRange; diff --git a/reverse_engineering/node_modules/lodash/_createRecurry.js b/reverse_engineering/node_modules/lodash/_createRecurry.js deleted file mode 100644 index eb29fb2..0000000 --- a/reverse_engineering/node_modules/lodash/_createRecurry.js +++ /dev/null @@ -1,56 +0,0 @@ -var isLaziable = require('./_isLaziable'), - setData = require('./_setData'), - setWrapToString = require('./_setWrapToString'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/** - * Creates a function that wraps `func` to continue currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); -} - -module.exports = createRecurry; diff --git a/reverse_engineering/node_modules/lodash/_createRelationalOperation.js b/reverse_engineering/node_modules/lodash/_createRelationalOperation.js deleted file mode 100644 index a17c6b5..0000000 --- a/reverse_engineering/node_modules/lodash/_createRelationalOperation.js +++ /dev/null @@ -1,20 +0,0 @@ -var toNumber = require('./toNumber'); - -/** - * Creates a function that performs a relational operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new relational operation function. - */ -function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == 'string' && typeof other == 'string')) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; -} - -module.exports = createRelationalOperation; diff --git a/reverse_engineering/node_modules/lodash/_createRound.js b/reverse_engineering/node_modules/lodash/_createRound.js deleted file mode 100644 index 88be5df..0000000 --- a/reverse_engineering/node_modules/lodash/_createRound.js +++ /dev/null @@ -1,35 +0,0 @@ -var root = require('./_root'), - toInteger = require('./toInteger'), - toNumber = require('./toNumber'), - toString = require('./toString'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = root.isFinite, - nativeMin = Math.min; - -/** - * Creates a function like `_.round`. - * - * @private - * @param {string} methodName The name of the `Math` method to use when rounding. - * @returns {Function} Returns the new round function. - */ -function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision && nativeIsFinite(number)) { - // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. - var pair = (toString(number) + 'e').split('e'), - value = func(pair[0] + 'e' + (+pair[1] + precision)); - - pair = (toString(value) + 'e').split('e'); - return +(pair[0] + 'e' + (+pair[1] - precision)); - } - return func(number); - }; -} - -module.exports = createRound; diff --git a/reverse_engineering/node_modules/lodash/_createSet.js b/reverse_engineering/node_modules/lodash/_createSet.js deleted file mode 100644 index 0f644ee..0000000 --- a/reverse_engineering/node_modules/lodash/_createSet.js +++ /dev/null @@ -1,19 +0,0 @@ -var Set = require('./_Set'), - noop = require('./noop'), - setToArray = require('./_setToArray'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); -}; - -module.exports = createSet; diff --git a/reverse_engineering/node_modules/lodash/_createToPairs.js b/reverse_engineering/node_modules/lodash/_createToPairs.js deleted file mode 100644 index 568417a..0000000 --- a/reverse_engineering/node_modules/lodash/_createToPairs.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseToPairs = require('./_baseToPairs'), - getTag = require('./_getTag'), - mapToArray = require('./_mapToArray'), - setToPairs = require('./_setToPairs'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Creates a `_.toPairs` or `_.toPairsIn` function. - * - * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. - */ -function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); - } - return baseToPairs(object, keysFunc(object)); - }; -} - -module.exports = createToPairs; diff --git a/reverse_engineering/node_modules/lodash/_createWrap.js b/reverse_engineering/node_modules/lodash/_createWrap.js deleted file mode 100644 index 33f0633..0000000 --- a/reverse_engineering/node_modules/lodash/_createWrap.js +++ /dev/null @@ -1,106 +0,0 @@ -var baseSetData = require('./_baseSetData'), - createBind = require('./_createBind'), - createCurry = require('./_createCurry'), - createHybrid = require('./_createHybrid'), - createPartial = require('./_createPartial'), - getData = require('./_getData'), - mergeData = require('./_mergeData'), - setData = require('./_setData'), - setWrapToString = require('./_setWrapToString'), - toInteger = require('./toInteger'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; - - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); -} - -module.exports = createWrap; diff --git a/reverse_engineering/node_modules/lodash/_customDefaultsAssignIn.js b/reverse_engineering/node_modules/lodash/_customDefaultsAssignIn.js deleted file mode 100644 index 1f49e6f..0000000 --- a/reverse_engineering/node_modules/lodash/_customDefaultsAssignIn.js +++ /dev/null @@ -1,29 +0,0 @@ -var eq = require('./eq'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ -function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; -} - -module.exports = customDefaultsAssignIn; diff --git a/reverse_engineering/node_modules/lodash/_customDefaultsMerge.js b/reverse_engineering/node_modules/lodash/_customDefaultsMerge.js deleted file mode 100644 index 4cab317..0000000 --- a/reverse_engineering/node_modules/lodash/_customDefaultsMerge.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseMerge = require('./_baseMerge'), - isObject = require('./isObject'); - -/** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. - */ -function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); - } - return objValue; -} - -module.exports = customDefaultsMerge; diff --git a/reverse_engineering/node_modules/lodash/_customOmitClone.js b/reverse_engineering/node_modules/lodash/_customOmitClone.js deleted file mode 100644 index 968db2e..0000000 --- a/reverse_engineering/node_modules/lodash/_customOmitClone.js +++ /dev/null @@ -1,16 +0,0 @@ -var isPlainObject = require('./isPlainObject'); - -/** - * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain - * objects. - * - * @private - * @param {*} value The value to inspect. - * @param {string} key The key of the property to inspect. - * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. - */ -function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; -} - -module.exports = customOmitClone; diff --git a/reverse_engineering/node_modules/lodash/_deburrLetter.js b/reverse_engineering/node_modules/lodash/_deburrLetter.js deleted file mode 100644 index 3e531ed..0000000 --- a/reverse_engineering/node_modules/lodash/_deburrLetter.js +++ /dev/null @@ -1,71 +0,0 @@ -var basePropertyOf = require('./_basePropertyOf'); - -/** Used to map Latin Unicode letters to basic Latin letters. */ -var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' -}; - -/** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ -var deburrLetter = basePropertyOf(deburredLetters); - -module.exports = deburrLetter; diff --git a/reverse_engineering/node_modules/lodash/_defineProperty.js b/reverse_engineering/node_modules/lodash/_defineProperty.js deleted file mode 100644 index b6116d9..0000000 --- a/reverse_engineering/node_modules/lodash/_defineProperty.js +++ /dev/null @@ -1,11 +0,0 @@ -var getNative = require('./_getNative'); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -module.exports = defineProperty; diff --git a/reverse_engineering/node_modules/lodash/_equalArrays.js b/reverse_engineering/node_modules/lodash/_equalArrays.js deleted file mode 100644 index 824228c..0000000 --- a/reverse_engineering/node_modules/lodash/_equalArrays.js +++ /dev/null @@ -1,84 +0,0 @@ -var SetCache = require('./_SetCache'), - arraySome = require('./_arraySome'), - cacheHas = require('./_cacheHas'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -module.exports = equalArrays; diff --git a/reverse_engineering/node_modules/lodash/_equalByTag.js b/reverse_engineering/node_modules/lodash/_equalByTag.js deleted file mode 100644 index 71919e8..0000000 --- a/reverse_engineering/node_modules/lodash/_equalByTag.js +++ /dev/null @@ -1,112 +0,0 @@ -var Symbol = require('./_Symbol'), - Uint8Array = require('./_Uint8Array'), - eq = require('./eq'), - equalArrays = require('./_equalArrays'), - mapToArray = require('./_mapToArray'), - setToArray = require('./_setToArray'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -module.exports = equalByTag; diff --git a/reverse_engineering/node_modules/lodash/_equalObjects.js b/reverse_engineering/node_modules/lodash/_equalObjects.js deleted file mode 100644 index cdaacd2..0000000 --- a/reverse_engineering/node_modules/lodash/_equalObjects.js +++ /dev/null @@ -1,90 +0,0 @@ -var getAllKeys = require('./_getAllKeys'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -module.exports = equalObjects; diff --git a/reverse_engineering/node_modules/lodash/_escapeHtmlChar.js b/reverse_engineering/node_modules/lodash/_escapeHtmlChar.js deleted file mode 100644 index 7ca68ee..0000000 --- a/reverse_engineering/node_modules/lodash/_escapeHtmlChar.js +++ /dev/null @@ -1,21 +0,0 @@ -var basePropertyOf = require('./_basePropertyOf'); - -/** Used to map characters to HTML entities. */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -/** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -var escapeHtmlChar = basePropertyOf(htmlEscapes); - -module.exports = escapeHtmlChar; diff --git a/reverse_engineering/node_modules/lodash/_escapeStringChar.js b/reverse_engineering/node_modules/lodash/_escapeStringChar.js deleted file mode 100644 index 44eca96..0000000 --- a/reverse_engineering/node_modules/lodash/_escapeStringChar.js +++ /dev/null @@ -1,22 +0,0 @@ -/** Used to escape characters for inclusion in compiled string literals. */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; -} - -module.exports = escapeStringChar; diff --git a/reverse_engineering/node_modules/lodash/_flatRest.js b/reverse_engineering/node_modules/lodash/_flatRest.js deleted file mode 100644 index 94ab6cc..0000000 --- a/reverse_engineering/node_modules/lodash/_flatRest.js +++ /dev/null @@ -1,16 +0,0 @@ -var flatten = require('./flatten'), - overRest = require('./_overRest'), - setToString = require('./_setToString'); - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); -} - -module.exports = flatRest; diff --git a/reverse_engineering/node_modules/lodash/_freeGlobal.js b/reverse_engineering/node_modules/lodash/_freeGlobal.js deleted file mode 100644 index bbec998..0000000 --- a/reverse_engineering/node_modules/lodash/_freeGlobal.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; diff --git a/reverse_engineering/node_modules/lodash/_getAllKeys.js b/reverse_engineering/node_modules/lodash/_getAllKeys.js deleted file mode 100644 index a9ce699..0000000 --- a/reverse_engineering/node_modules/lodash/_getAllKeys.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseGetAllKeys = require('./_baseGetAllKeys'), - getSymbols = require('./_getSymbols'), - keys = require('./keys'); - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -module.exports = getAllKeys; diff --git a/reverse_engineering/node_modules/lodash/_getAllKeysIn.js b/reverse_engineering/node_modules/lodash/_getAllKeysIn.js deleted file mode 100644 index 1b46678..0000000 --- a/reverse_engineering/node_modules/lodash/_getAllKeysIn.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseGetAllKeys = require('./_baseGetAllKeys'), - getSymbolsIn = require('./_getSymbolsIn'), - keysIn = require('./keysIn'); - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); -} - -module.exports = getAllKeysIn; diff --git a/reverse_engineering/node_modules/lodash/_getData.js b/reverse_engineering/node_modules/lodash/_getData.js deleted file mode 100644 index a1fe7b7..0000000 --- a/reverse_engineering/node_modules/lodash/_getData.js +++ /dev/null @@ -1,15 +0,0 @@ -var metaMap = require('./_metaMap'), - noop = require('./noop'); - -/** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ -var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); -}; - -module.exports = getData; diff --git a/reverse_engineering/node_modules/lodash/_getFuncName.js b/reverse_engineering/node_modules/lodash/_getFuncName.js deleted file mode 100644 index 21e15b3..0000000 --- a/reverse_engineering/node_modules/lodash/_getFuncName.js +++ /dev/null @@ -1,31 +0,0 @@ -var realNames = require('./_realNames'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ -function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; -} - -module.exports = getFuncName; diff --git a/reverse_engineering/node_modules/lodash/_getHolder.js b/reverse_engineering/node_modules/lodash/_getHolder.js deleted file mode 100644 index 65e94b5..0000000 --- a/reverse_engineering/node_modules/lodash/_getHolder.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ -function getHolder(func) { - var object = func; - return object.placeholder; -} - -module.exports = getHolder; diff --git a/reverse_engineering/node_modules/lodash/_getMapData.js b/reverse_engineering/node_modules/lodash/_getMapData.js deleted file mode 100644 index 17f6303..0000000 --- a/reverse_engineering/node_modules/lodash/_getMapData.js +++ /dev/null @@ -1,18 +0,0 @@ -var isKeyable = require('./_isKeyable'); - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -module.exports = getMapData; diff --git a/reverse_engineering/node_modules/lodash/_getMatchData.js b/reverse_engineering/node_modules/lodash/_getMatchData.js deleted file mode 100644 index 2cc70f9..0000000 --- a/reverse_engineering/node_modules/lodash/_getMatchData.js +++ /dev/null @@ -1,24 +0,0 @@ -var isStrictComparable = require('./_isStrictComparable'), - keys = require('./keys'); - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; -} - -module.exports = getMatchData; diff --git a/reverse_engineering/node_modules/lodash/_getNative.js b/reverse_engineering/node_modules/lodash/_getNative.js deleted file mode 100644 index 97a622b..0000000 --- a/reverse_engineering/node_modules/lodash/_getNative.js +++ /dev/null @@ -1,17 +0,0 @@ -var baseIsNative = require('./_baseIsNative'), - getValue = require('./_getValue'); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -module.exports = getNative; diff --git a/reverse_engineering/node_modules/lodash/_getPrototype.js b/reverse_engineering/node_modules/lodash/_getPrototype.js deleted file mode 100644 index e808612..0000000 --- a/reverse_engineering/node_modules/lodash/_getPrototype.js +++ /dev/null @@ -1,6 +0,0 @@ -var overArg = require('./_overArg'); - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -module.exports = getPrototype; diff --git a/reverse_engineering/node_modules/lodash/_getRawTag.js b/reverse_engineering/node_modules/lodash/_getRawTag.js deleted file mode 100644 index 49a95c9..0000000 --- a/reverse_engineering/node_modules/lodash/_getRawTag.js +++ /dev/null @@ -1,46 +0,0 @@ -var Symbol = require('./_Symbol'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; diff --git a/reverse_engineering/node_modules/lodash/_getSymbols.js b/reverse_engineering/node_modules/lodash/_getSymbols.js deleted file mode 100644 index 7d6eafe..0000000 --- a/reverse_engineering/node_modules/lodash/_getSymbols.js +++ /dev/null @@ -1,30 +0,0 @@ -var arrayFilter = require('./_arrayFilter'), - stubArray = require('./stubArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -module.exports = getSymbols; diff --git a/reverse_engineering/node_modules/lodash/_getSymbolsIn.js b/reverse_engineering/node_modules/lodash/_getSymbolsIn.js deleted file mode 100644 index cec0855..0000000 --- a/reverse_engineering/node_modules/lodash/_getSymbolsIn.js +++ /dev/null @@ -1,25 +0,0 @@ -var arrayPush = require('./_arrayPush'), - getPrototype = require('./_getPrototype'), - getSymbols = require('./_getSymbols'), - stubArray = require('./stubArray'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; -}; - -module.exports = getSymbolsIn; diff --git a/reverse_engineering/node_modules/lodash/_getTag.js b/reverse_engineering/node_modules/lodash/_getTag.js deleted file mode 100644 index deaf89d..0000000 --- a/reverse_engineering/node_modules/lodash/_getTag.js +++ /dev/null @@ -1,58 +0,0 @@ -var DataView = require('./_DataView'), - Map = require('./_Map'), - Promise = require('./_Promise'), - Set = require('./_Set'), - WeakMap = require('./_WeakMap'), - baseGetTag = require('./_baseGetTag'), - toSource = require('./_toSource'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; - -var dataViewTag = '[object DataView]'; - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} - -module.exports = getTag; diff --git a/reverse_engineering/node_modules/lodash/_getValue.js b/reverse_engineering/node_modules/lodash/_getValue.js deleted file mode 100644 index 5f7d773..0000000 --- a/reverse_engineering/node_modules/lodash/_getValue.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -module.exports = getValue; diff --git a/reverse_engineering/node_modules/lodash/_getView.js b/reverse_engineering/node_modules/lodash/_getView.js deleted file mode 100644 index df1e5d4..0000000 --- a/reverse_engineering/node_modules/lodash/_getView.js +++ /dev/null @@ -1,33 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Gets the view, applying any `transforms` to the `start` and `end` positions. - * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} transforms The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. - */ -function getView(start, end, transforms) { - var index = -1, - length = transforms.length; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } - } - return { 'start': start, 'end': end }; -} - -module.exports = getView; diff --git a/reverse_engineering/node_modules/lodash/_getWrapDetails.js b/reverse_engineering/node_modules/lodash/_getWrapDetails.js deleted file mode 100644 index 3bcc6e4..0000000 --- a/reverse_engineering/node_modules/lodash/_getWrapDetails.js +++ /dev/null @@ -1,17 +0,0 @@ -/** Used to match wrap detail comments. */ -var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; - -/** - * Extracts wrapper details from the `source` body comment. - * - * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. - */ -function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; -} - -module.exports = getWrapDetails; diff --git a/reverse_engineering/node_modules/lodash/_hasPath.js b/reverse_engineering/node_modules/lodash/_hasPath.js deleted file mode 100644 index 93dbde1..0000000 --- a/reverse_engineering/node_modules/lodash/_hasPath.js +++ /dev/null @@ -1,39 +0,0 @@ -var castPath = require('./_castPath'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isIndex = require('./_isIndex'), - isLength = require('./isLength'), - toKey = require('./_toKey'); - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); -} - -module.exports = hasPath; diff --git a/reverse_engineering/node_modules/lodash/_hasUnicode.js b/reverse_engineering/node_modules/lodash/_hasUnicode.js deleted file mode 100644 index cb6ca15..0000000 --- a/reverse_engineering/node_modules/lodash/_hasUnicode.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -module.exports = hasUnicode; diff --git a/reverse_engineering/node_modules/lodash/_hasUnicodeWord.js b/reverse_engineering/node_modules/lodash/_hasUnicodeWord.js deleted file mode 100644 index 95d52c4..0000000 --- a/reverse_engineering/node_modules/lodash/_hasUnicodeWord.js +++ /dev/null @@ -1,15 +0,0 @@ -/** Used to detect strings that need a more robust regexp to match words. */ -var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - -/** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ -function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); -} - -module.exports = hasUnicodeWord; diff --git a/reverse_engineering/node_modules/lodash/_hashClear.js b/reverse_engineering/node_modules/lodash/_hashClear.js deleted file mode 100644 index 5d4b70c..0000000 --- a/reverse_engineering/node_modules/lodash/_hashClear.js +++ /dev/null @@ -1,15 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; -} - -module.exports = hashClear; diff --git a/reverse_engineering/node_modules/lodash/_hashDelete.js b/reverse_engineering/node_modules/lodash/_hashDelete.js deleted file mode 100644 index ea9dabf..0000000 --- a/reverse_engineering/node_modules/lodash/_hashDelete.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} - -module.exports = hashDelete; diff --git a/reverse_engineering/node_modules/lodash/_hashGet.js b/reverse_engineering/node_modules/lodash/_hashGet.js deleted file mode 100644 index 1fc2f34..0000000 --- a/reverse_engineering/node_modules/lodash/_hashGet.js +++ /dev/null @@ -1,30 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -module.exports = hashGet; diff --git a/reverse_engineering/node_modules/lodash/_hashHas.js b/reverse_engineering/node_modules/lodash/_hashHas.js deleted file mode 100644 index 281a551..0000000 --- a/reverse_engineering/node_modules/lodash/_hashHas.js +++ /dev/null @@ -1,23 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); -} - -module.exports = hashHas; diff --git a/reverse_engineering/node_modules/lodash/_hashSet.js b/reverse_engineering/node_modules/lodash/_hashSet.js deleted file mode 100644 index e105528..0000000 --- a/reverse_engineering/node_modules/lodash/_hashSet.js +++ /dev/null @@ -1,23 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -module.exports = hashSet; diff --git a/reverse_engineering/node_modules/lodash/_initCloneArray.js b/reverse_engineering/node_modules/lodash/_initCloneArray.js deleted file mode 100644 index 078c15a..0000000 --- a/reverse_engineering/node_modules/lodash/_initCloneArray.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -module.exports = initCloneArray; diff --git a/reverse_engineering/node_modules/lodash/_initCloneByTag.js b/reverse_engineering/node_modules/lodash/_initCloneByTag.js deleted file mode 100644 index f69a008..0000000 --- a/reverse_engineering/node_modules/lodash/_initCloneByTag.js +++ /dev/null @@ -1,77 +0,0 @@ -var cloneArrayBuffer = require('./_cloneArrayBuffer'), - cloneDataView = require('./_cloneDataView'), - cloneRegExp = require('./_cloneRegExp'), - cloneSymbol = require('./_cloneSymbol'), - cloneTypedArray = require('./_cloneTypedArray'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return cloneSymbol(object); - } -} - -module.exports = initCloneByTag; diff --git a/reverse_engineering/node_modules/lodash/_initCloneObject.js b/reverse_engineering/node_modules/lodash/_initCloneObject.js deleted file mode 100644 index 5a13e64..0000000 --- a/reverse_engineering/node_modules/lodash/_initCloneObject.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseCreate = require('./_baseCreate'), - getPrototype = require('./_getPrototype'), - isPrototype = require('./_isPrototype'); - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -module.exports = initCloneObject; diff --git a/reverse_engineering/node_modules/lodash/_insertWrapDetails.js b/reverse_engineering/node_modules/lodash/_insertWrapDetails.js deleted file mode 100644 index e790808..0000000 --- a/reverse_engineering/node_modules/lodash/_insertWrapDetails.js +++ /dev/null @@ -1,23 +0,0 @@ -/** Used to match wrap detail comments. */ -var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; - -/** - * Inserts wrapper `details` in a comment at the top of the `source` body. - * - * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. - */ -function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); -} - -module.exports = insertWrapDetails; diff --git a/reverse_engineering/node_modules/lodash/_isFlattenable.js b/reverse_engineering/node_modules/lodash/_isFlattenable.js deleted file mode 100644 index 4cc2c24..0000000 --- a/reverse_engineering/node_modules/lodash/_isFlattenable.js +++ /dev/null @@ -1,20 +0,0 @@ -var Symbol = require('./_Symbol'), - isArguments = require('./isArguments'), - isArray = require('./isArray'); - -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -module.exports = isFlattenable; diff --git a/reverse_engineering/node_modules/lodash/_isIndex.js b/reverse_engineering/node_modules/lodash/_isIndex.js deleted file mode 100644 index 061cd39..0000000 --- a/reverse_engineering/node_modules/lodash/_isIndex.js +++ /dev/null @@ -1,25 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} - -module.exports = isIndex; diff --git a/reverse_engineering/node_modules/lodash/_isIterateeCall.js b/reverse_engineering/node_modules/lodash/_isIterateeCall.js deleted file mode 100644 index a0bb5a9..0000000 --- a/reverse_engineering/node_modules/lodash/_isIterateeCall.js +++ /dev/null @@ -1,30 +0,0 @@ -var eq = require('./eq'), - isArrayLike = require('./isArrayLike'), - isIndex = require('./_isIndex'), - isObject = require('./isObject'); - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -module.exports = isIterateeCall; diff --git a/reverse_engineering/node_modules/lodash/_isKey.js b/reverse_engineering/node_modules/lodash/_isKey.js deleted file mode 100644 index ff08b06..0000000 --- a/reverse_engineering/node_modules/lodash/_isKey.js +++ /dev/null @@ -1,29 +0,0 @@ -var isArray = require('./isArray'), - isSymbol = require('./isSymbol'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -module.exports = isKey; diff --git a/reverse_engineering/node_modules/lodash/_isKeyable.js b/reverse_engineering/node_modules/lodash/_isKeyable.js deleted file mode 100644 index 39f1828..0000000 --- a/reverse_engineering/node_modules/lodash/_isKeyable.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -module.exports = isKeyable; diff --git a/reverse_engineering/node_modules/lodash/_isLaziable.js b/reverse_engineering/node_modules/lodash/_isLaziable.js deleted file mode 100644 index a57c4f2..0000000 --- a/reverse_engineering/node_modules/lodash/_isLaziable.js +++ /dev/null @@ -1,28 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - getData = require('./_getData'), - getFuncName = require('./_getFuncName'), - lodash = require('./wrapperLodash'); - -/** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. - */ -function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; -} - -module.exports = isLaziable; diff --git a/reverse_engineering/node_modules/lodash/_isMaskable.js b/reverse_engineering/node_modules/lodash/_isMaskable.js deleted file mode 100644 index eb98d09..0000000 --- a/reverse_engineering/node_modules/lodash/_isMaskable.js +++ /dev/null @@ -1,14 +0,0 @@ -var coreJsData = require('./_coreJsData'), - isFunction = require('./isFunction'), - stubFalse = require('./stubFalse'); - -/** - * Checks if `func` is capable of being masked. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `func` is maskable, else `false`. - */ -var isMaskable = coreJsData ? isFunction : stubFalse; - -module.exports = isMaskable; diff --git a/reverse_engineering/node_modules/lodash/_isMasked.js b/reverse_engineering/node_modules/lodash/_isMasked.js deleted file mode 100644 index 4b0f21b..0000000 --- a/reverse_engineering/node_modules/lodash/_isMasked.js +++ /dev/null @@ -1,20 +0,0 @@ -var coreJsData = require('./_coreJsData'); - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -module.exports = isMasked; diff --git a/reverse_engineering/node_modules/lodash/_isPrototype.js b/reverse_engineering/node_modules/lodash/_isPrototype.js deleted file mode 100644 index 0f29498..0000000 --- a/reverse_engineering/node_modules/lodash/_isPrototype.js +++ /dev/null @@ -1,18 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -module.exports = isPrototype; diff --git a/reverse_engineering/node_modules/lodash/_isStrictComparable.js b/reverse_engineering/node_modules/lodash/_isStrictComparable.js deleted file mode 100644 index b59f40b..0000000 --- a/reverse_engineering/node_modules/lodash/_isStrictComparable.js +++ /dev/null @@ -1,15 +0,0 @@ -var isObject = require('./isObject'); - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - -module.exports = isStrictComparable; diff --git a/reverse_engineering/node_modules/lodash/_iteratorToArray.js b/reverse_engineering/node_modules/lodash/_iteratorToArray.js deleted file mode 100644 index 4768566..0000000 --- a/reverse_engineering/node_modules/lodash/_iteratorToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ -function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; -} - -module.exports = iteratorToArray; diff --git a/reverse_engineering/node_modules/lodash/_lazyClone.js b/reverse_engineering/node_modules/lodash/_lazyClone.js deleted file mode 100644 index d8a51f8..0000000 --- a/reverse_engineering/node_modules/lodash/_lazyClone.js +++ /dev/null @@ -1,23 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - copyArray = require('./_copyArray'); - -/** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ -function lazyClone() { - var result = new LazyWrapper(this.__wrapped__); - result.__actions__ = copyArray(this.__actions__); - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = copyArray(this.__iteratees__); - result.__takeCount__ = this.__takeCount__; - result.__views__ = copyArray(this.__views__); - return result; -} - -module.exports = lazyClone; diff --git a/reverse_engineering/node_modules/lodash/_lazyReverse.js b/reverse_engineering/node_modules/lodash/_lazyReverse.js deleted file mode 100644 index c5b5219..0000000 --- a/reverse_engineering/node_modules/lodash/_lazyReverse.js +++ /dev/null @@ -1,23 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'); - -/** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ -function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; -} - -module.exports = lazyReverse; diff --git a/reverse_engineering/node_modules/lodash/_lazyValue.js b/reverse_engineering/node_modules/lodash/_lazyValue.js deleted file mode 100644 index 371ca8d..0000000 --- a/reverse_engineering/node_modules/lodash/_lazyValue.js +++ /dev/null @@ -1,69 +0,0 @@ -var baseWrapperValue = require('./_baseWrapperValue'), - getView = require('./_getView'), - isArray = require('./isArray'); - -/** Used to indicate the type of lazy iteratees. */ -var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ -function lazyValue() { - var array = this.__wrapped__.value(), - dir = this.__dir__, - isArr = isArray(array), - isRight = dir < 0, - arrLength = isArr ? array.length : 0, - view = getView(0, arrLength, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - iteratees = this.__iteratees__, - iterLength = iteratees.length, - resIndex = 0, - takeCount = nativeMin(length, this.__takeCount__); - - if (!isArr || (!isRight && arrLength == length && takeCount == length)) { - return baseWrapperValue(array, this.__actions__); - } - var result = []; - - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type, - computed = iteratee(value); - - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - result[resIndex++] = value; - } - return result; -} - -module.exports = lazyValue; diff --git a/reverse_engineering/node_modules/lodash/_listCacheClear.js b/reverse_engineering/node_modules/lodash/_listCacheClear.js deleted file mode 100644 index acbe39a..0000000 --- a/reverse_engineering/node_modules/lodash/_listCacheClear.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} - -module.exports = listCacheClear; diff --git a/reverse_engineering/node_modules/lodash/_listCacheDelete.js b/reverse_engineering/node_modules/lodash/_listCacheDelete.js deleted file mode 100644 index b1384ad..0000000 --- a/reverse_engineering/node_modules/lodash/_listCacheDelete.js +++ /dev/null @@ -1,35 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} - -module.exports = listCacheDelete; diff --git a/reverse_engineering/node_modules/lodash/_listCacheGet.js b/reverse_engineering/node_modules/lodash/_listCacheGet.js deleted file mode 100644 index f8192fc..0000000 --- a/reverse_engineering/node_modules/lodash/_listCacheGet.js +++ /dev/null @@ -1,19 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -module.exports = listCacheGet; diff --git a/reverse_engineering/node_modules/lodash/_listCacheHas.js b/reverse_engineering/node_modules/lodash/_listCacheHas.js deleted file mode 100644 index 2adf671..0000000 --- a/reverse_engineering/node_modules/lodash/_listCacheHas.js +++ /dev/null @@ -1,16 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -module.exports = listCacheHas; diff --git a/reverse_engineering/node_modules/lodash/_listCacheSet.js b/reverse_engineering/node_modules/lodash/_listCacheSet.js deleted file mode 100644 index 5855c95..0000000 --- a/reverse_engineering/node_modules/lodash/_listCacheSet.js +++ /dev/null @@ -1,26 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -module.exports = listCacheSet; diff --git a/reverse_engineering/node_modules/lodash/_mapCacheClear.js b/reverse_engineering/node_modules/lodash/_mapCacheClear.js deleted file mode 100644 index bc9ca20..0000000 --- a/reverse_engineering/node_modules/lodash/_mapCacheClear.js +++ /dev/null @@ -1,21 +0,0 @@ -var Hash = require('./_Hash'), - ListCache = require('./_ListCache'), - Map = require('./_Map'); - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -module.exports = mapCacheClear; diff --git a/reverse_engineering/node_modules/lodash/_mapCacheDelete.js b/reverse_engineering/node_modules/lodash/_mapCacheDelete.js deleted file mode 100644 index 946ca3c..0000000 --- a/reverse_engineering/node_modules/lodash/_mapCacheDelete.js +++ /dev/null @@ -1,18 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} - -module.exports = mapCacheDelete; diff --git a/reverse_engineering/node_modules/lodash/_mapCacheGet.js b/reverse_engineering/node_modules/lodash/_mapCacheGet.js deleted file mode 100644 index f29f55c..0000000 --- a/reverse_engineering/node_modules/lodash/_mapCacheGet.js +++ /dev/null @@ -1,16 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -module.exports = mapCacheGet; diff --git a/reverse_engineering/node_modules/lodash/_mapCacheHas.js b/reverse_engineering/node_modules/lodash/_mapCacheHas.js deleted file mode 100644 index a1214c0..0000000 --- a/reverse_engineering/node_modules/lodash/_mapCacheHas.js +++ /dev/null @@ -1,16 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -module.exports = mapCacheHas; diff --git a/reverse_engineering/node_modules/lodash/_mapCacheSet.js b/reverse_engineering/node_modules/lodash/_mapCacheSet.js deleted file mode 100644 index 7346849..0000000 --- a/reverse_engineering/node_modules/lodash/_mapCacheSet.js +++ /dev/null @@ -1,22 +0,0 @@ -var getMapData = require('./_getMapData'); - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} - -module.exports = mapCacheSet; diff --git a/reverse_engineering/node_modules/lodash/_mapToArray.js b/reverse_engineering/node_modules/lodash/_mapToArray.js deleted file mode 100644 index fe3dd53..0000000 --- a/reverse_engineering/node_modules/lodash/_mapToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -module.exports = mapToArray; diff --git a/reverse_engineering/node_modules/lodash/_matchesStrictComparable.js b/reverse_engineering/node_modules/lodash/_matchesStrictComparable.js deleted file mode 100644 index f608af9..0000000 --- a/reverse_engineering/node_modules/lodash/_matchesStrictComparable.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -module.exports = matchesStrictComparable; diff --git a/reverse_engineering/node_modules/lodash/_memoizeCapped.js b/reverse_engineering/node_modules/lodash/_memoizeCapped.js deleted file mode 100644 index 7f71c8f..0000000 --- a/reverse_engineering/node_modules/lodash/_memoizeCapped.js +++ /dev/null @@ -1,26 +0,0 @@ -var memoize = require('./memoize'); - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -module.exports = memoizeCapped; diff --git a/reverse_engineering/node_modules/lodash/_mergeData.js b/reverse_engineering/node_modules/lodash/_mergeData.js deleted file mode 100644 index cb570f9..0000000 --- a/reverse_engineering/node_modules/lodash/_mergeData.js +++ /dev/null @@ -1,90 +0,0 @@ -var composeArgs = require('./_composeArgs'), - composeArgsRight = require('./_composeArgsRight'), - replaceHolders = require('./_replaceHolders'); - -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ -function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; -} - -module.exports = mergeData; diff --git a/reverse_engineering/node_modules/lodash/_metaMap.js b/reverse_engineering/node_modules/lodash/_metaMap.js deleted file mode 100644 index 0157a0b..0000000 --- a/reverse_engineering/node_modules/lodash/_metaMap.js +++ /dev/null @@ -1,6 +0,0 @@ -var WeakMap = require('./_WeakMap'); - -/** Used to store function metadata. */ -var metaMap = WeakMap && new WeakMap; - -module.exports = metaMap; diff --git a/reverse_engineering/node_modules/lodash/_nativeCreate.js b/reverse_engineering/node_modules/lodash/_nativeCreate.js deleted file mode 100644 index c7aede8..0000000 --- a/reverse_engineering/node_modules/lodash/_nativeCreate.js +++ /dev/null @@ -1,6 +0,0 @@ -var getNative = require('./_getNative'); - -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); - -module.exports = nativeCreate; diff --git a/reverse_engineering/node_modules/lodash/_nativeKeys.js b/reverse_engineering/node_modules/lodash/_nativeKeys.js deleted file mode 100644 index 479a104..0000000 --- a/reverse_engineering/node_modules/lodash/_nativeKeys.js +++ /dev/null @@ -1,6 +0,0 @@ -var overArg = require('./_overArg'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); - -module.exports = nativeKeys; diff --git a/reverse_engineering/node_modules/lodash/_nativeKeysIn.js b/reverse_engineering/node_modules/lodash/_nativeKeysIn.js deleted file mode 100644 index 00ee505..0000000 --- a/reverse_engineering/node_modules/lodash/_nativeKeysIn.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -module.exports = nativeKeysIn; diff --git a/reverse_engineering/node_modules/lodash/_nodeUtil.js b/reverse_engineering/node_modules/lodash/_nodeUtil.js deleted file mode 100644 index 983d78f..0000000 --- a/reverse_engineering/node_modules/lodash/_nodeUtil.js +++ /dev/null @@ -1,30 +0,0 @@ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; - - if (types) { - return types; - } - - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); - -module.exports = nodeUtil; diff --git a/reverse_engineering/node_modules/lodash/_objectToString.js b/reverse_engineering/node_modules/lodash/_objectToString.js deleted file mode 100644 index c614ec0..0000000 --- a/reverse_engineering/node_modules/lodash/_objectToString.js +++ /dev/null @@ -1,22 +0,0 @@ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -module.exports = objectToString; diff --git a/reverse_engineering/node_modules/lodash/_overArg.js b/reverse_engineering/node_modules/lodash/_overArg.js deleted file mode 100644 index 651c5c5..0000000 --- a/reverse_engineering/node_modules/lodash/_overArg.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -module.exports = overArg; diff --git a/reverse_engineering/node_modules/lodash/_overRest.js b/reverse_engineering/node_modules/lodash/_overRest.js deleted file mode 100644 index c7cdef3..0000000 --- a/reverse_engineering/node_modules/lodash/_overRest.js +++ /dev/null @@ -1,36 +0,0 @@ -var apply = require('./_apply'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; -} - -module.exports = overRest; diff --git a/reverse_engineering/node_modules/lodash/_parent.js b/reverse_engineering/node_modules/lodash/_parent.js deleted file mode 100644 index f174328..0000000 --- a/reverse_engineering/node_modules/lodash/_parent.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseGet = require('./_baseGet'), - baseSlice = require('./_baseSlice'); - -/** - * Gets the parent value at `path` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path to get the parent value of. - * @returns {*} Returns the parent value. - */ -function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); -} - -module.exports = parent; diff --git a/reverse_engineering/node_modules/lodash/_reEscape.js b/reverse_engineering/node_modules/lodash/_reEscape.js deleted file mode 100644 index 7f47eda..0000000 --- a/reverse_engineering/node_modules/lodash/_reEscape.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reEscape = /<%-([\s\S]+?)%>/g; - -module.exports = reEscape; diff --git a/reverse_engineering/node_modules/lodash/_reEvaluate.js b/reverse_engineering/node_modules/lodash/_reEvaluate.js deleted file mode 100644 index 6adfc31..0000000 --- a/reverse_engineering/node_modules/lodash/_reEvaluate.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reEvaluate = /<%([\s\S]+?)%>/g; - -module.exports = reEvaluate; diff --git a/reverse_engineering/node_modules/lodash/_reInterpolate.js b/reverse_engineering/node_modules/lodash/_reInterpolate.js deleted file mode 100644 index d02ff0b..0000000 --- a/reverse_engineering/node_modules/lodash/_reInterpolate.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to match template delimiters. */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -module.exports = reInterpolate; diff --git a/reverse_engineering/node_modules/lodash/_realNames.js b/reverse_engineering/node_modules/lodash/_realNames.js deleted file mode 100644 index aa0d529..0000000 --- a/reverse_engineering/node_modules/lodash/_realNames.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Used to lookup unminified function names. */ -var realNames = {}; - -module.exports = realNames; diff --git a/reverse_engineering/node_modules/lodash/_reorder.js b/reverse_engineering/node_modules/lodash/_reorder.js deleted file mode 100644 index a3502b0..0000000 --- a/reverse_engineering/node_modules/lodash/_reorder.js +++ /dev/null @@ -1,29 +0,0 @@ -var copyArray = require('./_copyArray'), - isIndex = require('./_isIndex'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ -function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; -} - -module.exports = reorder; diff --git a/reverse_engineering/node_modules/lodash/_replaceHolders.js b/reverse_engineering/node_modules/lodash/_replaceHolders.js deleted file mode 100644 index 74360ec..0000000 --- a/reverse_engineering/node_modules/lodash/_replaceHolders.js +++ /dev/null @@ -1,29 +0,0 @@ -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; - } - } - return result; -} - -module.exports = replaceHolders; diff --git a/reverse_engineering/node_modules/lodash/_root.js b/reverse_engineering/node_modules/lodash/_root.js deleted file mode 100644 index d2852be..0000000 --- a/reverse_engineering/node_modules/lodash/_root.js +++ /dev/null @@ -1,9 +0,0 @@ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; diff --git a/reverse_engineering/node_modules/lodash/_safeGet.js b/reverse_engineering/node_modules/lodash/_safeGet.js deleted file mode 100644 index b070897..0000000 --- a/reverse_engineering/node_modules/lodash/_safeGet.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Gets the value at `key`, unless `key` is "__proto__" or "constructor". - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function safeGet(object, key) { - if (key === 'constructor' && typeof object[key] === 'function') { - return; - } - - if (key == '__proto__') { - return; - } - - return object[key]; -} - -module.exports = safeGet; diff --git a/reverse_engineering/node_modules/lodash/_setCacheAdd.js b/reverse_engineering/node_modules/lodash/_setCacheAdd.js deleted file mode 100644 index 1081a74..0000000 --- a/reverse_engineering/node_modules/lodash/_setCacheAdd.js +++ /dev/null @@ -1,19 +0,0 @@ -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -module.exports = setCacheAdd; diff --git a/reverse_engineering/node_modules/lodash/_setCacheHas.js b/reverse_engineering/node_modules/lodash/_setCacheHas.js deleted file mode 100644 index 9a49255..0000000 --- a/reverse_engineering/node_modules/lodash/_setCacheHas.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -module.exports = setCacheHas; diff --git a/reverse_engineering/node_modules/lodash/_setData.js b/reverse_engineering/node_modules/lodash/_setData.js deleted file mode 100644 index e5cf3eb..0000000 --- a/reverse_engineering/node_modules/lodash/_setData.js +++ /dev/null @@ -1,20 +0,0 @@ -var baseSetData = require('./_baseSetData'), - shortOut = require('./_shortOut'); - -/** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var setData = shortOut(baseSetData); - -module.exports = setData; diff --git a/reverse_engineering/node_modules/lodash/_setToArray.js b/reverse_engineering/node_modules/lodash/_setToArray.js deleted file mode 100644 index b87f074..0000000 --- a/reverse_engineering/node_modules/lodash/_setToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -module.exports = setToArray; diff --git a/reverse_engineering/node_modules/lodash/_setToPairs.js b/reverse_engineering/node_modules/lodash/_setToPairs.js deleted file mode 100644 index 36ad37a..0000000 --- a/reverse_engineering/node_modules/lodash/_setToPairs.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ -function setToPairs(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; -} - -module.exports = setToPairs; diff --git a/reverse_engineering/node_modules/lodash/_setToString.js b/reverse_engineering/node_modules/lodash/_setToString.js deleted file mode 100644 index 6ca8419..0000000 --- a/reverse_engineering/node_modules/lodash/_setToString.js +++ /dev/null @@ -1,14 +0,0 @@ -var baseSetToString = require('./_baseSetToString'), - shortOut = require('./_shortOut'); - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); - -module.exports = setToString; diff --git a/reverse_engineering/node_modules/lodash/_setWrapToString.js b/reverse_engineering/node_modules/lodash/_setWrapToString.js deleted file mode 100644 index decdc44..0000000 --- a/reverse_engineering/node_modules/lodash/_setWrapToString.js +++ /dev/null @@ -1,21 +0,0 @@ -var getWrapDetails = require('./_getWrapDetails'), - insertWrapDetails = require('./_insertWrapDetails'), - setToString = require('./_setToString'), - updateWrapDetails = require('./_updateWrapDetails'); - -/** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. - * - * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. - */ -function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); -} - -module.exports = setWrapToString; diff --git a/reverse_engineering/node_modules/lodash/_shortOut.js b/reverse_engineering/node_modules/lodash/_shortOut.js deleted file mode 100644 index 3300a07..0000000 --- a/reverse_engineering/node_modules/lodash/_shortOut.js +++ /dev/null @@ -1,37 +0,0 @@ -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; - -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; -} - -module.exports = shortOut; diff --git a/reverse_engineering/node_modules/lodash/_shuffleSelf.js b/reverse_engineering/node_modules/lodash/_shuffleSelf.js deleted file mode 100644 index 8bcc4f5..0000000 --- a/reverse_engineering/node_modules/lodash/_shuffleSelf.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseRandom = require('./_baseRandom'); - -/** - * A specialized version of `_.shuffle` which mutates and sets the size of `array`. - * - * @private - * @param {Array} array The array to shuffle. - * @param {number} [size=array.length] The size of `array`. - * @returns {Array} Returns `array`. - */ -function shuffleSelf(array, size) { - var index = -1, - length = array.length, - lastIndex = length - 1; - - size = size === undefined ? length : size; - while (++index < size) { - var rand = baseRandom(index, lastIndex), - value = array[rand]; - - array[rand] = array[index]; - array[index] = value; - } - array.length = size; - return array; -} - -module.exports = shuffleSelf; diff --git a/reverse_engineering/node_modules/lodash/_stackClear.js b/reverse_engineering/node_modules/lodash/_stackClear.js deleted file mode 100644 index ce8e5a9..0000000 --- a/reverse_engineering/node_modules/lodash/_stackClear.js +++ /dev/null @@ -1,15 +0,0 @@ -var ListCache = require('./_ListCache'); - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; - this.size = 0; -} - -module.exports = stackClear; diff --git a/reverse_engineering/node_modules/lodash/_stackDelete.js b/reverse_engineering/node_modules/lodash/_stackDelete.js deleted file mode 100644 index ff9887a..0000000 --- a/reverse_engineering/node_modules/lodash/_stackDelete.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - - this.size = data.size; - return result; -} - -module.exports = stackDelete; diff --git a/reverse_engineering/node_modules/lodash/_stackGet.js b/reverse_engineering/node_modules/lodash/_stackGet.js deleted file mode 100644 index 1cdf004..0000000 --- a/reverse_engineering/node_modules/lodash/_stackGet.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -module.exports = stackGet; diff --git a/reverse_engineering/node_modules/lodash/_stackHas.js b/reverse_engineering/node_modules/lodash/_stackHas.js deleted file mode 100644 index 16a3ad1..0000000 --- a/reverse_engineering/node_modules/lodash/_stackHas.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -module.exports = stackHas; diff --git a/reverse_engineering/node_modules/lodash/_stackSet.js b/reverse_engineering/node_modules/lodash/_stackSet.js deleted file mode 100644 index b790ac5..0000000 --- a/reverse_engineering/node_modules/lodash/_stackSet.js +++ /dev/null @@ -1,34 +0,0 @@ -var ListCache = require('./_ListCache'), - Map = require('./_Map'), - MapCache = require('./_MapCache'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; -} - -module.exports = stackSet; diff --git a/reverse_engineering/node_modules/lodash/_strictIndexOf.js b/reverse_engineering/node_modules/lodash/_strictIndexOf.js deleted file mode 100644 index 0486a49..0000000 --- a/reverse_engineering/node_modules/lodash/_strictIndexOf.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -module.exports = strictIndexOf; diff --git a/reverse_engineering/node_modules/lodash/_strictLastIndexOf.js b/reverse_engineering/node_modules/lodash/_strictLastIndexOf.js deleted file mode 100644 index d7310dc..0000000 --- a/reverse_engineering/node_modules/lodash/_strictLastIndexOf.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; - } - } - return index; -} - -module.exports = strictLastIndexOf; diff --git a/reverse_engineering/node_modules/lodash/_stringSize.js b/reverse_engineering/node_modules/lodash/_stringSize.js deleted file mode 100644 index 17ef462..0000000 --- a/reverse_engineering/node_modules/lodash/_stringSize.js +++ /dev/null @@ -1,18 +0,0 @@ -var asciiSize = require('./_asciiSize'), - hasUnicode = require('./_hasUnicode'), - unicodeSize = require('./_unicodeSize'); - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); -} - -module.exports = stringSize; diff --git a/reverse_engineering/node_modules/lodash/_stringToArray.js b/reverse_engineering/node_modules/lodash/_stringToArray.js deleted file mode 100644 index d161158..0000000 --- a/reverse_engineering/node_modules/lodash/_stringToArray.js +++ /dev/null @@ -1,18 +0,0 @@ -var asciiToArray = require('./_asciiToArray'), - hasUnicode = require('./_hasUnicode'), - unicodeToArray = require('./_unicodeToArray'); - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); -} - -module.exports = stringToArray; diff --git a/reverse_engineering/node_modules/lodash/_stringToPath.js b/reverse_engineering/node_modules/lodash/_stringToPath.js deleted file mode 100644 index 8f39f8a..0000000 --- a/reverse_engineering/node_modules/lodash/_stringToPath.js +++ /dev/null @@ -1,27 +0,0 @@ -var memoizeCapped = require('./_memoizeCapped'); - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -module.exports = stringToPath; diff --git a/reverse_engineering/node_modules/lodash/_toKey.js b/reverse_engineering/node_modules/lodash/_toKey.js deleted file mode 100644 index c6d645c..0000000 --- a/reverse_engineering/node_modules/lodash/_toKey.js +++ /dev/null @@ -1,21 +0,0 @@ -var isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = toKey; diff --git a/reverse_engineering/node_modules/lodash/_toSource.js b/reverse_engineering/node_modules/lodash/_toSource.js deleted file mode 100644 index a020b38..0000000 --- a/reverse_engineering/node_modules/lodash/_toSource.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var funcProto = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -module.exports = toSource; diff --git a/reverse_engineering/node_modules/lodash/_unescapeHtmlChar.js b/reverse_engineering/node_modules/lodash/_unescapeHtmlChar.js deleted file mode 100644 index a71fecb..0000000 --- a/reverse_engineering/node_modules/lodash/_unescapeHtmlChar.js +++ /dev/null @@ -1,21 +0,0 @@ -var basePropertyOf = require('./_basePropertyOf'); - -/** Used to map HTML entities to characters. */ -var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" -}; - -/** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ -var unescapeHtmlChar = basePropertyOf(htmlUnescapes); - -module.exports = unescapeHtmlChar; diff --git a/reverse_engineering/node_modules/lodash/_unicodeSize.js b/reverse_engineering/node_modules/lodash/_unicodeSize.js deleted file mode 100644 index 68137ec..0000000 --- a/reverse_engineering/node_modules/lodash/_unicodeSize.js +++ /dev/null @@ -1,44 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -module.exports = unicodeSize; diff --git a/reverse_engineering/node_modules/lodash/_unicodeToArray.js b/reverse_engineering/node_modules/lodash/_unicodeToArray.js deleted file mode 100644 index 2a725c0..0000000 --- a/reverse_engineering/node_modules/lodash/_unicodeToArray.js +++ /dev/null @@ -1,40 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function unicodeToArray(string) { - return string.match(reUnicode) || []; -} - -module.exports = unicodeToArray; diff --git a/reverse_engineering/node_modules/lodash/_unicodeWords.js b/reverse_engineering/node_modules/lodash/_unicodeWords.js deleted file mode 100644 index e72e6e0..0000000 --- a/reverse_engineering/node_modules/lodash/_unicodeWords.js +++ /dev/null @@ -1,69 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\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', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]", - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', - rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; - -/** Used to match complex or compound words. */ -var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji -].join('|'), 'g'); - -/** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ -function unicodeWords(string) { - return string.match(reUnicodeWord) || []; -} - -module.exports = unicodeWords; diff --git a/reverse_engineering/node_modules/lodash/_updateWrapDetails.js b/reverse_engineering/node_modules/lodash/_updateWrapDetails.js deleted file mode 100644 index 8759fbd..0000000 --- a/reverse_engineering/node_modules/lodash/_updateWrapDetails.js +++ /dev/null @@ -1,46 +0,0 @@ -var arrayEach = require('./_arrayEach'), - arrayIncludes = require('./_arrayIncludes'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; - -/** Used to associate wrap methods with their bit flags. */ -var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] -]; - -/** - * Updates wrapper `details` based on `bitmask` flags. - * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. - */ -function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); -} - -module.exports = updateWrapDetails; diff --git a/reverse_engineering/node_modules/lodash/_wrapperClone.js b/reverse_engineering/node_modules/lodash/_wrapperClone.js deleted file mode 100644 index 7bb58a2..0000000 --- a/reverse_engineering/node_modules/lodash/_wrapperClone.js +++ /dev/null @@ -1,23 +0,0 @@ -var LazyWrapper = require('./_LazyWrapper'), - LodashWrapper = require('./_LodashWrapper'), - copyArray = require('./_copyArray'); - -/** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ -function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; -} - -module.exports = wrapperClone; diff --git a/reverse_engineering/node_modules/lodash/add.js b/reverse_engineering/node_modules/lodash/add.js deleted file mode 100644 index f069515..0000000 --- a/reverse_engineering/node_modules/lodash/add.js +++ /dev/null @@ -1,22 +0,0 @@ -var createMathOperation = require('./_createMathOperation'); - -/** - * Adds two numbers. - * - * @static - * @memberOf _ - * @since 3.4.0 - * @category Math - * @param {number} augend The first number in an addition. - * @param {number} addend The second number in an addition. - * @returns {number} Returns the total. - * @example - * - * _.add(6, 4); - * // => 10 - */ -var add = createMathOperation(function(augend, addend) { - return augend + addend; -}, 0); - -module.exports = add; diff --git a/reverse_engineering/node_modules/lodash/after.js b/reverse_engineering/node_modules/lodash/after.js deleted file mode 100644 index 3900c97..0000000 --- a/reverse_engineering/node_modules/lodash/after.js +++ /dev/null @@ -1,42 +0,0 @@ -var toInteger = require('./toInteger'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it's called `n` or more times. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => Logs 'done saving!' after the two async saves have completed. - */ -function after(n, func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; -} - -module.exports = after; diff --git a/reverse_engineering/node_modules/lodash/array.js b/reverse_engineering/node_modules/lodash/array.js deleted file mode 100644 index af688d3..0000000 --- a/reverse_engineering/node_modules/lodash/array.js +++ /dev/null @@ -1,67 +0,0 @@ -module.exports = { - 'chunk': require('./chunk'), - 'compact': require('./compact'), - 'concat': require('./concat'), - 'difference': require('./difference'), - 'differenceBy': require('./differenceBy'), - 'differenceWith': require('./differenceWith'), - 'drop': require('./drop'), - 'dropRight': require('./dropRight'), - 'dropRightWhile': require('./dropRightWhile'), - 'dropWhile': require('./dropWhile'), - 'fill': require('./fill'), - 'findIndex': require('./findIndex'), - 'findLastIndex': require('./findLastIndex'), - 'first': require('./first'), - 'flatten': require('./flatten'), - 'flattenDeep': require('./flattenDeep'), - 'flattenDepth': require('./flattenDepth'), - 'fromPairs': require('./fromPairs'), - 'head': require('./head'), - 'indexOf': require('./indexOf'), - 'initial': require('./initial'), - 'intersection': require('./intersection'), - 'intersectionBy': require('./intersectionBy'), - 'intersectionWith': require('./intersectionWith'), - 'join': require('./join'), - 'last': require('./last'), - 'lastIndexOf': require('./lastIndexOf'), - 'nth': require('./nth'), - 'pull': require('./pull'), - 'pullAll': require('./pullAll'), - 'pullAllBy': require('./pullAllBy'), - 'pullAllWith': require('./pullAllWith'), - 'pullAt': require('./pullAt'), - 'remove': require('./remove'), - 'reverse': require('./reverse'), - 'slice': require('./slice'), - 'sortedIndex': require('./sortedIndex'), - 'sortedIndexBy': require('./sortedIndexBy'), - 'sortedIndexOf': require('./sortedIndexOf'), - 'sortedLastIndex': require('./sortedLastIndex'), - 'sortedLastIndexBy': require('./sortedLastIndexBy'), - 'sortedLastIndexOf': require('./sortedLastIndexOf'), - 'sortedUniq': require('./sortedUniq'), - 'sortedUniqBy': require('./sortedUniqBy'), - 'tail': require('./tail'), - 'take': require('./take'), - 'takeRight': require('./takeRight'), - 'takeRightWhile': require('./takeRightWhile'), - 'takeWhile': require('./takeWhile'), - 'union': require('./union'), - 'unionBy': require('./unionBy'), - 'unionWith': require('./unionWith'), - 'uniq': require('./uniq'), - 'uniqBy': require('./uniqBy'), - 'uniqWith': require('./uniqWith'), - 'unzip': require('./unzip'), - 'unzipWith': require('./unzipWith'), - 'without': require('./without'), - 'xor': require('./xor'), - 'xorBy': require('./xorBy'), - 'xorWith': require('./xorWith'), - 'zip': require('./zip'), - 'zipObject': require('./zipObject'), - 'zipObjectDeep': require('./zipObjectDeep'), - 'zipWith': require('./zipWith') -}; diff --git a/reverse_engineering/node_modules/lodash/ary.js b/reverse_engineering/node_modules/lodash/ary.js deleted file mode 100644 index 70c87d0..0000000 --- a/reverse_engineering/node_modules/lodash/ary.js +++ /dev/null @@ -1,29 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_ARY_FLAG = 128; - -/** - * Creates a function that invokes `func`, with up to `n` arguments, - * ignoring any additional arguments. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new capped function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ -function ary(func, n, guard) { - n = guard ? undefined : n; - n = (func && n == null) ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); -} - -module.exports = ary; diff --git a/reverse_engineering/node_modules/lodash/assign.js b/reverse_engineering/node_modules/lodash/assign.js deleted file mode 100644 index 909db26..0000000 --- a/reverse_engineering/node_modules/lodash/assign.js +++ /dev/null @@ -1,58 +0,0 @@ -var assignValue = require('./_assignValue'), - copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - isArrayLike = require('./isArrayLike'), - isPrototype = require('./_isPrototype'), - keys = require('./keys'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ -var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } -}); - -module.exports = assign; diff --git a/reverse_engineering/node_modules/lodash/assignIn.js b/reverse_engineering/node_modules/lodash/assignIn.js deleted file mode 100644 index e663473..0000000 --- a/reverse_engineering/node_modules/lodash/assignIn.js +++ /dev/null @@ -1,40 +0,0 @@ -var copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - keysIn = require('./keysIn'); - -/** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ -var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); -}); - -module.exports = assignIn; diff --git a/reverse_engineering/node_modules/lodash/assignInWith.js b/reverse_engineering/node_modules/lodash/assignInWith.js deleted file mode 100644 index 68fcc0b..0000000 --- a/reverse_engineering/node_modules/lodash/assignInWith.js +++ /dev/null @@ -1,38 +0,0 @@ -var copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - keysIn = require('./keysIn'); - -/** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); -}); - -module.exports = assignInWith; diff --git a/reverse_engineering/node_modules/lodash/assignWith.js b/reverse_engineering/node_modules/lodash/assignWith.js deleted file mode 100644 index 7dc6c76..0000000 --- a/reverse_engineering/node_modules/lodash/assignWith.js +++ /dev/null @@ -1,37 +0,0 @@ -var copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - keys = require('./keys'); - -/** - * This method is like `_.assign` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignInWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); -}); - -module.exports = assignWith; diff --git a/reverse_engineering/node_modules/lodash/at.js b/reverse_engineering/node_modules/lodash/at.js deleted file mode 100644 index 781ee9e..0000000 --- a/reverse_engineering/node_modules/lodash/at.js +++ /dev/null @@ -1,23 +0,0 @@ -var baseAt = require('./_baseAt'), - flatRest = require('./_flatRest'); - -/** - * Creates an array of values corresponding to `paths` of `object`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Array} Returns the picked values. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; - * - * _.at(object, ['a[0].b.c', 'a[1]']); - * // => [3, 4] - */ -var at = flatRest(baseAt); - -module.exports = at; diff --git a/reverse_engineering/node_modules/lodash/attempt.js b/reverse_engineering/node_modules/lodash/attempt.js deleted file mode 100644 index 624d015..0000000 --- a/reverse_engineering/node_modules/lodash/attempt.js +++ /dev/null @@ -1,35 +0,0 @@ -var apply = require('./_apply'), - baseRest = require('./_baseRest'), - isError = require('./isError'); - -/** - * Attempts to invoke `func`, returning either the result or the caught error - * object. Any additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Function} func The function to attempt. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {*} Returns the `func` result or error object. - * @example - * - * // Avoid throwing errors for invalid selectors. - * var elements = _.attempt(function(selector) { - * return document.querySelectorAll(selector); - * }, '>_>'); - * - * if (_.isError(elements)) { - * elements = []; - * } - */ -var attempt = baseRest(function(func, args) { - try { - return apply(func, undefined, args); - } catch (e) { - return isError(e) ? e : new Error(e); - } -}); - -module.exports = attempt; diff --git a/reverse_engineering/node_modules/lodash/before.js b/reverse_engineering/node_modules/lodash/before.js deleted file mode 100644 index a3e0a16..0000000 --- a/reverse_engineering/node_modules/lodash/before.js +++ /dev/null @@ -1,40 +0,0 @@ -var toInteger = require('./toInteger'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; -} - -module.exports = before; diff --git a/reverse_engineering/node_modules/lodash/bind.js b/reverse_engineering/node_modules/lodash/bind.js deleted file mode 100644 index b1076e9..0000000 --- a/reverse_engineering/node_modules/lodash/bind.js +++ /dev/null @@ -1,57 +0,0 @@ -var baseRest = require('./_baseRest'), - createWrap = require('./_createWrap'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ -var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(func, bitmask, thisArg, partials, holders); -}); - -// Assign default placeholders. -bind.placeholder = {}; - -module.exports = bind; diff --git a/reverse_engineering/node_modules/lodash/bindAll.js b/reverse_engineering/node_modules/lodash/bindAll.js deleted file mode 100644 index a35706d..0000000 --- a/reverse_engineering/node_modules/lodash/bindAll.js +++ /dev/null @@ -1,41 +0,0 @@ -var arrayEach = require('./_arrayEach'), - baseAssignValue = require('./_baseAssignValue'), - bind = require('./bind'), - flatRest = require('./_flatRest'), - toKey = require('./_toKey'); - -/** - * Binds methods of an object to the object itself, overwriting the existing - * method. - * - * **Note:** This method doesn't set the "length" property of bound functions. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Object} object The object to bind and assign the bound methods to. - * @param {...(string|string[])} methodNames The object method names to bind. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'click': function() { - * console.log('clicked ' + this.label); - * } - * }; - * - * _.bindAll(view, ['click']); - * jQuery(element).on('click', view.click); - * // => Logs 'clicked docs' when clicked. - */ -var bindAll = flatRest(function(object, methodNames) { - arrayEach(methodNames, function(key) { - key = toKey(key); - baseAssignValue(object, key, bind(object[key], object)); - }); - return object; -}); - -module.exports = bindAll; diff --git a/reverse_engineering/node_modules/lodash/bindKey.js b/reverse_engineering/node_modules/lodash/bindKey.js deleted file mode 100644 index f7fd64c..0000000 --- a/reverse_engineering/node_modules/lodash/bindKey.js +++ /dev/null @@ -1,68 +0,0 @@ -var baseRest = require('./_baseRest'), - createWrap = require('./_createWrap'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes the method at `object[key]` with `partials` - * prepended to the arguments it receives. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. See - * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Function - * @param {Object} object The object to invoke the method on. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // Bound with placeholders. - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ -var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(key, bitmask, object, partials, holders); -}); - -// Assign default placeholders. -bindKey.placeholder = {}; - -module.exports = bindKey; diff --git a/reverse_engineering/node_modules/lodash/camelCase.js b/reverse_engineering/node_modules/lodash/camelCase.js deleted file mode 100644 index d7390de..0000000 --- a/reverse_engineering/node_modules/lodash/camelCase.js +++ /dev/null @@ -1,29 +0,0 @@ -var capitalize = require('./capitalize'), - createCompounder = require('./_createCompounder'); - -/** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' - * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' - */ -var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); -}); - -module.exports = camelCase; diff --git a/reverse_engineering/node_modules/lodash/capitalize.js b/reverse_engineering/node_modules/lodash/capitalize.js deleted file mode 100644 index 3e1600e..0000000 --- a/reverse_engineering/node_modules/lodash/capitalize.js +++ /dev/null @@ -1,23 +0,0 @@ -var toString = require('./toString'), - upperFirst = require('./upperFirst'); - -/** - * Converts the first character of `string` to upper case and the remaining - * to lower case. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('FRED'); - * // => 'Fred' - */ -function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); -} - -module.exports = capitalize; diff --git a/reverse_engineering/node_modules/lodash/castArray.js b/reverse_engineering/node_modules/lodash/castArray.js deleted file mode 100644 index e470bdb..0000000 --- a/reverse_engineering/node_modules/lodash/castArray.js +++ /dev/null @@ -1,44 +0,0 @@ -var isArray = require('./isArray'); - -/** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ -function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; -} - -module.exports = castArray; diff --git a/reverse_engineering/node_modules/lodash/ceil.js b/reverse_engineering/node_modules/lodash/ceil.js deleted file mode 100644 index 56c8722..0000000 --- a/reverse_engineering/node_modules/lodash/ceil.js +++ /dev/null @@ -1,26 +0,0 @@ -var createRound = require('./_createRound'); - -/** - * Computes `number` rounded up to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round up. - * @param {number} [precision=0] The precision to round up to. - * @returns {number} Returns the rounded up number. - * @example - * - * _.ceil(4.006); - * // => 5 - * - * _.ceil(6.004, 2); - * // => 6.01 - * - * _.ceil(6040, -2); - * // => 6100 - */ -var ceil = createRound('ceil'); - -module.exports = ceil; diff --git a/reverse_engineering/node_modules/lodash/chain.js b/reverse_engineering/node_modules/lodash/chain.js deleted file mode 100644 index f6cd647..0000000 --- a/reverse_engineering/node_modules/lodash/chain.js +++ /dev/null @@ -1,38 +0,0 @@ -var lodash = require('./wrapperLodash'); - -/** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ -function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; -} - -module.exports = chain; diff --git a/reverse_engineering/node_modules/lodash/chunk.js b/reverse_engineering/node_modules/lodash/chunk.js deleted file mode 100644 index 5b562fe..0000000 --- a/reverse_engineering/node_modules/lodash/chunk.js +++ /dev/null @@ -1,50 +0,0 @@ -var baseSlice = require('./_baseSlice'), - isIterateeCall = require('./_isIterateeCall'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * Creates an array of elements split into groups the length of `size`. - * If `array` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array of chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ -function chunk(array, size, guard) { - if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { - size = 1; - } else { - size = nativeMax(toInteger(size), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size < 1) { - return []; - } - var index = 0, - resIndex = 0, - result = Array(nativeCeil(length / size)); - - while (index < length) { - result[resIndex++] = baseSlice(array, index, (index += size)); - } - return result; -} - -module.exports = chunk; diff --git a/reverse_engineering/node_modules/lodash/clamp.js b/reverse_engineering/node_modules/lodash/clamp.js deleted file mode 100644 index 91a72c9..0000000 --- a/reverse_engineering/node_modules/lodash/clamp.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseClamp = require('./_baseClamp'), - toNumber = require('./toNumber'); - -/** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ -function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; - } - return baseClamp(toNumber(number), lower, upper); -} - -module.exports = clamp; diff --git a/reverse_engineering/node_modules/lodash/clone.js b/reverse_engineering/node_modules/lodash/clone.js deleted file mode 100644 index dd439d6..0000000 --- a/reverse_engineering/node_modules/lodash/clone.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); -} - -module.exports = clone; diff --git a/reverse_engineering/node_modules/lodash/cloneDeep.js b/reverse_engineering/node_modules/lodash/cloneDeep.js deleted file mode 100644 index 4425fbe..0000000 --- a/reverse_engineering/node_modules/lodash/cloneDeep.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -module.exports = cloneDeep; diff --git a/reverse_engineering/node_modules/lodash/cloneDeepWith.js b/reverse_engineering/node_modules/lodash/cloneDeepWith.js deleted file mode 100644 index fd9c6c0..0000000 --- a/reverse_engineering/node_modules/lodash/cloneDeepWith.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.cloneWith` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * } - * - * var el = _.cloneDeepWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 - */ -function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); -} - -module.exports = cloneDeepWith; diff --git a/reverse_engineering/node_modules/lodash/cloneWith.js b/reverse_engineering/node_modules/lodash/cloneWith.js deleted file mode 100644 index d2f4e75..0000000 --- a/reverse_engineering/node_modules/lodash/cloneWith.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined`, - * cloning is handled by the method instead. The `customizer` is invoked with - * up to four arguments; (value [, index|key, object, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the cloned value. - * @see _.cloneDeepWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * } - * - * var el = _.cloneWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 0 - */ -function cloneWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); -} - -module.exports = cloneWith; diff --git a/reverse_engineering/node_modules/lodash/collection.js b/reverse_engineering/node_modules/lodash/collection.js deleted file mode 100644 index 77fe837..0000000 --- a/reverse_engineering/node_modules/lodash/collection.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - 'countBy': require('./countBy'), - 'each': require('./each'), - 'eachRight': require('./eachRight'), - 'every': require('./every'), - 'filter': require('./filter'), - 'find': require('./find'), - 'findLast': require('./findLast'), - 'flatMap': require('./flatMap'), - 'flatMapDeep': require('./flatMapDeep'), - 'flatMapDepth': require('./flatMapDepth'), - 'forEach': require('./forEach'), - 'forEachRight': require('./forEachRight'), - 'groupBy': require('./groupBy'), - 'includes': require('./includes'), - 'invokeMap': require('./invokeMap'), - 'keyBy': require('./keyBy'), - 'map': require('./map'), - 'orderBy': require('./orderBy'), - 'partition': require('./partition'), - 'reduce': require('./reduce'), - 'reduceRight': require('./reduceRight'), - 'reject': require('./reject'), - 'sample': require('./sample'), - 'sampleSize': require('./sampleSize'), - 'shuffle': require('./shuffle'), - 'size': require('./size'), - 'some': require('./some'), - 'sortBy': require('./sortBy') -}; diff --git a/reverse_engineering/node_modules/lodash/commit.js b/reverse_engineering/node_modules/lodash/commit.js deleted file mode 100644 index fe4db71..0000000 --- a/reverse_engineering/node_modules/lodash/commit.js +++ /dev/null @@ -1,33 +0,0 @@ -var LodashWrapper = require('./_LodashWrapper'); - -/** - * Executes the chain sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapped = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapped = wrapped.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapped.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ -function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); -} - -module.exports = wrapperCommit; diff --git a/reverse_engineering/node_modules/lodash/compact.js b/reverse_engineering/node_modules/lodash/compact.js deleted file mode 100644 index 031fab4..0000000 --- a/reverse_engineering/node_modules/lodash/compact.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ -function compact(array) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[resIndex++] = value; - } - } - return result; -} - -module.exports = compact; diff --git a/reverse_engineering/node_modules/lodash/concat.js b/reverse_engineering/node_modules/lodash/concat.js deleted file mode 100644 index 1da48a4..0000000 --- a/reverse_engineering/node_modules/lodash/concat.js +++ /dev/null @@ -1,43 +0,0 @@ -var arrayPush = require('./_arrayPush'), - baseFlatten = require('./_baseFlatten'), - copyArray = require('./_copyArray'), - isArray = require('./isArray'); - -/** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ -function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); -} - -module.exports = concat; diff --git a/reverse_engineering/node_modules/lodash/cond.js b/reverse_engineering/node_modules/lodash/cond.js deleted file mode 100644 index 6455598..0000000 --- a/reverse_engineering/node_modules/lodash/cond.js +++ /dev/null @@ -1,60 +0,0 @@ -var apply = require('./_apply'), - arrayMap = require('./_arrayMap'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that iterates over `pairs` and invokes the corresponding - * function of the first predicate to return truthy. The predicate-function - * pairs are invoked with the `this` binding and arguments of the created - * function. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new composite function. - * @example - * - * var func = _.cond([ - * [_.matches({ 'a': 1 }), _.constant('matches A')], - * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.stubTrue, _.constant('no match')] - * ]); - * - * func({ 'a': 1, 'b': 2 }); - * // => 'matches A' - * - * func({ 'a': 0, 'b': 1 }); - * // => 'matches B' - * - * func({ 'a': '1', 'b': '2' }); - * // => 'no match' - */ -function cond(pairs) { - var length = pairs == null ? 0 : pairs.length, - toIteratee = baseIteratee; - - pairs = !length ? [] : arrayMap(pairs, function(pair) { - if (typeof pair[1] != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return [toIteratee(pair[0]), pair[1]]; - }); - - return baseRest(function(args) { - var index = -1; - while (++index < length) { - var pair = pairs[index]; - if (apply(pair[0], this, args)) { - return apply(pair[1], this, args); - } - } - }); -} - -module.exports = cond; diff --git a/reverse_engineering/node_modules/lodash/conforms.js b/reverse_engineering/node_modules/lodash/conforms.js deleted file mode 100644 index 5501a94..0000000 --- a/reverse_engineering/node_modules/lodash/conforms.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseClone = require('./_baseClone'), - baseConforms = require('./_baseConforms'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that invokes the predicate properties of `source` with - * the corresponding property values of a given object, returning `true` if - * all predicates return truthy, else `false`. - * - * **Note:** The created function is equivalent to `_.conformsTo` with - * `source` partially applied. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 2, 'b': 1 }, - * { 'a': 1, 'b': 2 } - * ]; - * - * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); - * // => [{ 'a': 1, 'b': 2 }] - */ -function conforms(source) { - return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); -} - -module.exports = conforms; diff --git a/reverse_engineering/node_modules/lodash/conformsTo.js b/reverse_engineering/node_modules/lodash/conformsTo.js deleted file mode 100644 index b8a93eb..0000000 --- a/reverse_engineering/node_modules/lodash/conformsTo.js +++ /dev/null @@ -1,32 +0,0 @@ -var baseConformsTo = require('./_baseConformsTo'), - keys = require('./keys'); - -/** - * Checks if `object` conforms to `source` by invoking the predicate - * properties of `source` with the corresponding property values of `object`. - * - * **Note:** This method is equivalent to `_.conforms` when `source` is - * partially applied. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); - * // => true - * - * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); - * // => false - */ -function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); -} - -module.exports = conformsTo; diff --git a/reverse_engineering/node_modules/lodash/constant.js b/reverse_engineering/node_modules/lodash/constant.js deleted file mode 100644 index 655ece3..0000000 --- a/reverse_engineering/node_modules/lodash/constant.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} - -module.exports = constant; diff --git a/reverse_engineering/node_modules/lodash/core.js b/reverse_engineering/node_modules/lodash/core.js deleted file mode 100644 index 6d70dca..0000000 --- a/reverse_engineering/node_modules/lodash/core.js +++ /dev/null @@ -1,3877 +0,0 @@ -/** - * @license - * Lodash (Custom Build) - * Build: `lodash core -o ./dist/lodash.core.js` - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - - /** Used as the semantic version number. */ - var VERSION = '4.17.20'; - - /** Error message constants. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_PARTIAL_FLAG = 32; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - numberTag = '[object Number]', - objectTag = '[object Object]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - - /** Used to match HTML entities and HTML characters. */ - var reUnescapedHtml = /[&<>"']/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); - - /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - - /*--------------------------------------------------------------------------*/ - - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - array.push.apply(array, values); - return array; - } - - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return baseMap(props, function(key) { - return object[key]; - }); - } - - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); - - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - - /*--------------------------------------------------------------------------*/ - - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - objectProto = Object.prototype; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to generate unique IDs. */ - var idCounter = 0; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var nativeObjectToString = objectProto.toString; - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = root._; - - /** Built-in value references. */ - var objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeIsFinite = root.isFinite, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - return value instanceof LodashWrapper - ? value - : new LodashWrapper(value); - } - - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; - }()); - - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - } - - LodashWrapper.prototype = baseCreate(lodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; - - /*------------------------------------------------------------------------*/ - - /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } - - /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function baseAssignValue(object, key, value) { - object[key] = value; - } - - /** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } - - /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !false) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; - } - - /** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; - } - - /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); - } - - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ - function baseFunctions(object, props) { - return baseFilter(props, function(key) { - return isFunction(object[key]); - }); - } - - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - function baseGetTag(value) { - return objectToString(value); - } - - /** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ - function baseGt(value, other) { - return value > other; - } - - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - var baseIsArguments = noop; - - /** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } - - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : baseGetTag(object), - othTag = othIsArr ? arrayTag : baseGetTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - stack || (stack = []); - var objStack = find(stack, function(entry) { - return entry[0] == object; - }); - var othStack = find(stack, function(entry) { - return entry[0] == other; - }); - if (objStack && othStack) { - return objStack[1] == other; - } - stack.push([object, other]); - stack.push([other, object]); - if (isSameTag && !objIsObj) { - var result = (objIsArr) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - stack.pop(); - return result; - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - stack.pop(); - return result; - } - } - if (!isSameTag) { - return false; - } - var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); - stack.pop(); - return result; - } - - /** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; - } - - /** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ - function baseIteratee(func) { - if (typeof func == 'function') { - return func; - } - if (func == null) { - return identity; - } - return (typeof func == 'object' ? baseMatches : baseProperty)(func); - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ - function baseLt(value, other) { - return value < other; - } - - /** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; - } - - /** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatches(source) { - var props = nativeKeys(source); - return function(object) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length]; - if (!(key in object && - baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) - )) { - return false; - } - } - return true; - }; - } - - /** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ - function basePick(object, props) { - object = Object(object); - return reduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); - } - - /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); - } - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function copyArray(source) { - return baseSlice(source, 0, source.length); - } - - /** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } - - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - return reduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); - } - - /** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = false; - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = false; - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; - } - - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; - } - - /** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); - } - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - - /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ - function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } - - /** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; - } - - /** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ - function createPartial(func, bitmask, thisArg, partials) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return fn.apply(isBind ? thisArg : this, args); - } - return wrapper; - } - - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - var compared; - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!baseSome(other, function(othValue, othIndex) { - if (!indexOf(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - return result; - } - - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - } - return false; - } - - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - var compared; - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - return result; - } - - /** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); - } - - /** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenable(value) { - return isArray(value) || isArguments(value); - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); - } - - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; - } - - /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ - function objectToString(value) { - return nativeObjectToString.call(value); - } - - /** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return func.apply(this, otherArgs); - }; - } - - /** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var setToString = identity; - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - return baseFilter(array, Boolean); - } - - /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); - } - - /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); - } - - /** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; - } - - /** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; - } - - /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ - function head(array) { - return (array && array.length) ? array[0] : undefined; - } - - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else { - fromIndex = 0; - } - var index = (fromIndex || 0) - 1, - isReflexive = value === value; - - while (++index < length) { - var other = array[index]; - if ((isReflexive ? other === value : other !== other)) { - return index; - } - } - return -1; - } - - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - start = start == null ? 0 : +start; - end = end === undefined ? length : +end; - return length ? baseSlice(array, start, end) : []; - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; - } - - /** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ - function tap(value, interceptor) { - interceptor(value); - return value; - } - - /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * The purpose of this method is to "pass thru" values replacing intermediate - * results in a method chain sequence. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ - function thru(value, interceptor) { - return interceptor(value); - } - - /** - * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. - * - * @name chain - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // A sequence without explicit chaining. - * _(users).head(); - * // => { 'user': 'barney', 'age': 36 } - * - * // A sequence with explicit chaining. - * _(users) - * .chain() - * .head() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ - function wrapperChain() { - return chain(this); - } - - /** - * Executes the chain sequence to resolve the unwrapped value. - * - * @name value - * @memberOf _ - * @since 0.1.0 - * @alias toJSON, valueOf - * @category Seq - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ - - /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ - function every(collection, predicate, guard) { - predicate = guard ? undefined : predicate; - return baseEvery(collection, baseIteratee(predicate)); - } - - /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ - function filter(collection, predicate) { - return baseFilter(collection, baseIteratee(predicate)); - } - - /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ - var find = createFind(findIndex); - - /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ - function forEach(collection, iteratee) { - return baseEach(collection, baseIteratee(iteratee)); - } - - /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ - function map(collection, iteratee) { - return baseMap(collection, baseIteratee(iteratee)); - } - - /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ - function reduce(collection, iteratee, accumulator) { - return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); - } - - /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ - function size(collection) { - if (collection == null) { - return 0; - } - collection = isArrayLike(collection) ? collection : nativeKeys(collection); - return collection.length; - } - - /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true - */ - function some(collection, predicate, guard) { - predicate = guard ? undefined : predicate; - return baseSome(collection, baseIteratee(predicate)); - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ - function sortBy(collection, iteratee) { - var index = 0; - iteratee = baseIteratee(iteratee); - - return baseMap(baseMap(collection, function(value, key, collection) { - return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; - }).sort(function(object, other) { - return compareAscending(object.criteria, other.criteria) || (object.index - other.index); - }), baseProperty('value')); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ - function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ - var bind = baseRest(function(func, thisArg, partials) { - return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); - }); - - /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); - }); - - /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); - }); - - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - return !predicate.apply(this, args); - }; - } - - /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ - function once(func) { - return before(2, func); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ - function clone(value) { - if (!isObject(value)) { - return value; - } - return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); - } - - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } - - /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); - }; - - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - var isArray = Array.isArray; - - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - - /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); - } - - /** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ - var isDate = baseIsDate; - - /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (isArrayLike(value) && - (isArray(value) || isString(value) || - isFunction(value.splice) || isArguments(value))) { - return !value.length; - } - return !nativeKeys(value).length; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - function isEqual(value, other) { - return baseIsEqual(value, other); - } - - /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ - function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); - } - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } - - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; - } - - /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ - function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); - } - - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - var isRegExp = baseIsRegExp; - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); - } - - /** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Converts `value` to an array. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] - * - * _.toArray(1); - * // => [] - * - * _.toArray(null); - * // => [] - */ - function toArray(value) { - if (!isArrayLike(value)) { - return values(value); - } - return value.length ? copyArray(value) : []; - } - - /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ - var toInteger = Number; - - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ - var toNumber = Number; - - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); - } - - /*------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ - var assign = createAssigner(function(object, source) { - copyObject(source, nativeKeys(source), object); - }); - - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ - var assignIn = createAssigner(function(object, source) { - copyObject(source, nativeKeysIn(source), object); - }); - - /** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ - function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : assign(result, properties); - } - - /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; - }); - - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - function has(object, path) { - return object != null && hasOwnProperty.call(object, path); - } - - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - var keys = nativeKeys; - - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - var keysIn = nativeKeysIn; - - /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); - }); - - /** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' - * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' - */ - function result(object, path, defaultValue) { - var value = object == null ? undefined : object[path]; - if (value === undefined) { - value = defaultValue; - } - return isFunction(value) ? value.call(object) : value; - } - - /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /*------------------------------------------------------------------------*/ - - /** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ - function identity(value) { - return value; - } - - /** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name, the created function returns the - * property value for a given element. If `func` is an array or object, the - * created function returns `true` for elements that contain the equivalent - * source properties, otherwise it returns `false`. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); - * // => [{ 'user': 'barney', 'age': 36, 'active': true }] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, _.iteratee(['user', 'fred'])); - * // => [{ 'user': 'fred', 'age': 40 }] - * - * // The `_.property` iteratee shorthand. - * _.map(users, _.iteratee('user')); - * // => ['barney', 'fred'] - * - * // Create custom iteratee shorthands. - * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { - * return !_.isRegExp(func) ? iteratee(func) : function(string) { - * return func.test(string); - * }; - * }); - * - * _.filter(['abc', 'def'], /ef/); - * // => ['def'] - */ - var iteratee = baseIteratee; - - /** - * Creates a function that performs a partial deep comparison between a given - * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. - * - * **Note:** The created function is equivalent to `_.isMatch` with `source` - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * **Note:** Multiple values can be checked by combining several matchers - * using `_.overSome` - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 1, 'b': 2, 'c': 3 }, - * { 'a': 4, 'b': 5, 'c': 6 } - * ]; - * - * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); - * // => [{ 'a': 4, 'b': 5, 'c': 6 }] - * - * // Checking for several possible values - * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); - * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] - */ - function matches(source) { - return baseMatches(assign({}, source)); - } - - /** - * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function, then methods - * are added to its prototype as well. - * - * **Note:** Use `_.runInContext` to create a pristine `lodash` function to - * avoid conflicts caused by modifying the original. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Function|Object} [object=lodash] The destination object. - * @param {Object} source The object of functions to add. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.chain=true] Specify whether mixins are chainable. - * @returns {Function|Object} Returns `object`. - * @example - * - * function vowels(string) { - * return _.filter(string, function(v) { - * return /[aeiou]/i.test(v); - * }); - * } - * - * _.mixin({ 'vowels': vowels }); - * _.vowels('fred'); - * // => ['e'] - * - * _('fred').vowels().value(); - * // => ['e'] - * - * _.mixin({ 'vowels': vowels }, { 'chain': false }); - * _('fred').vowels(); - * // => ['e'] - */ - function mixin(object, source, options) { - var props = keys(source), - methodNames = baseFunctions(source, props); - - if (options == null && - !(isObject(source) && (methodNames.length || !props.length))) { - options = source; - source = object; - object = this; - methodNames = baseFunctions(source, keys(source)); - } - var chain = !(isObject(options) && 'chain' in options) || !!options.chain, - isFunc = isFunction(object); - - baseEach(methodNames, function(methodName) { - var func = source[methodName]; - object[methodName] = func; - if (isFunc) { - object.prototype[methodName] = function() { - var chainAll = this.__chain__; - if (chain || chainAll) { - var result = object(this.__wrapped__), - actions = result.__actions__ = copyArray(this.__actions__); - - actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); - result.__chain__ = chainAll; - return result; - } - return func.apply(object, arrayPush([this.value()], arguments)); - }; - } - }); - - return object; - } - - /** - * Reverts the `_` variable to its previous value and returns a reference to - * the `lodash` function. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @returns {Function} Returns the `lodash` function. - * @example - * - * var lodash = _.noConflict(); - */ - function noConflict() { - if (root._ === this) { - root._ = oldDash; - } - return this; - } - - /** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ - function noop() { - // No operation performed. - } - - /** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ - function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; - } - - /*------------------------------------------------------------------------*/ - - /** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ - function max(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseGt) - : undefined; - } - - /** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ - function min(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseLt) - : undefined; - } - - /*------------------------------------------------------------------------*/ - - // Add methods that return wrapped values in chain sequences. - lodash.assignIn = assignIn; - lodash.before = before; - lodash.bind = bind; - lodash.chain = chain; - lodash.compact = compact; - lodash.concat = concat; - lodash.create = create; - lodash.defaults = defaults; - lodash.defer = defer; - lodash.delay = delay; - lodash.filter = filter; - lodash.flatten = flatten; - lodash.flattenDeep = flattenDeep; - lodash.iteratee = iteratee; - lodash.keys = keys; - lodash.map = map; - lodash.matches = matches; - lodash.mixin = mixin; - lodash.negate = negate; - lodash.once = once; - lodash.pick = pick; - lodash.slice = slice; - lodash.sortBy = sortBy; - lodash.tap = tap; - lodash.thru = thru; - lodash.toArray = toArray; - lodash.values = values; - - // Add aliases. - lodash.extend = assignIn; - - // Add methods to `lodash.prototype`. - mixin(lodash, lodash); - - /*------------------------------------------------------------------------*/ - - // Add methods that return unwrapped values in chain sequences. - lodash.clone = clone; - lodash.escape = escape; - lodash.every = every; - lodash.find = find; - lodash.forEach = forEach; - lodash.has = has; - lodash.head = head; - lodash.identity = identity; - lodash.indexOf = indexOf; - lodash.isArguments = isArguments; - lodash.isArray = isArray; - lodash.isBoolean = isBoolean; - lodash.isDate = isDate; - lodash.isEmpty = isEmpty; - lodash.isEqual = isEqual; - lodash.isFinite = isFinite; - lodash.isFunction = isFunction; - lodash.isNaN = isNaN; - lodash.isNull = isNull; - lodash.isNumber = isNumber; - lodash.isObject = isObject; - lodash.isRegExp = isRegExp; - lodash.isString = isString; - lodash.isUndefined = isUndefined; - lodash.last = last; - lodash.max = max; - lodash.min = min; - lodash.noConflict = noConflict; - lodash.noop = noop; - lodash.reduce = reduce; - lodash.result = result; - lodash.size = size; - lodash.some = some; - lodash.uniqueId = uniqueId; - - // Add aliases. - lodash.each = forEach; - lodash.first = head; - - mixin(lodash, (function() { - var source = {}; - baseForOwn(lodash, function(func, methodName) { - if (!hasOwnProperty.call(lodash.prototype, methodName)) { - source[methodName] = func; - } - }); - return source; - }()), { 'chain': false }); - - /*------------------------------------------------------------------------*/ - - /** - * The semantic version number. - * - * @static - * @memberOf _ - * @type {string} - */ - lodash.VERSION = VERSION; - - // Add `Array` methods to `lodash.prototype`. - baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { - var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], - chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', - retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); - - lodash.prototype[methodName] = function() { - var args = arguments; - if (retUnwrapped && !this.__chain__) { - var value = this.value(); - return func.apply(isArray(value) ? value : [], args); - } - return this[chainName](function(value) { - return func.apply(isArray(value) ? value : [], args); - }); - }; - }); - - // Add chain sequence methods to the `lodash` wrapper. - lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; - - /*--------------------------------------------------------------------------*/ - - // Some AMD build optimizers, like r.js, check for condition patterns like: - if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - // Expose Lodash on the global object to prevent errors when Lodash is - // loaded by a script tag in the presence of an AMD loader. - // See http://requirejs.org/docs/errors.html#mismatch for more details. - // Use `_.noConflict` to remove Lodash from the global object. - root._ = lodash; - - // Define as an anonymous module so, through path mapping, it can be - // referenced as the "underscore" module. - define(function() { - return lodash; - }); - } - // Check for `exports` after `define` in case a build optimizer adds it. - else if (freeModule) { - // Export for Node.js. - (freeModule.exports = lodash)._ = lodash; - // Export for CommonJS support. - freeExports._ = lodash; - } - else { - // Export to the global object. - root._ = lodash; - } -}.call(this)); diff --git a/reverse_engineering/node_modules/lodash/core.min.js b/reverse_engineering/node_modules/lodash/core.min.js deleted file mode 100644 index f409525..0000000 --- a/reverse_engineering/node_modules/lodash/core.min.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @license - * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash core -o ./dist/lodash.core.js` - */ -;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r,e){for(var u=n.length,o=r+(e?1:-1);e?o--:++o0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Vt(n,t,cr)}function _(n,t){return v(t,function(t){return Tn(n[t])})}function b(n){return W(n)}function j(n,t){return n>t}function d(n){return In(n)&&b(n)==ht}function m(n,t,r,e,u){return n===t||(null==n||null==t||!In(n)&&!In(t)?n!==n&&t!==t:O(n,t,r,e,m,u))}function O(n,t,r,e,u,o){ -var i=Zt(n),c=Zt(t),f=i?lt:b(n),a=c?lt:b(t);f=f==at?bt:f,a=a==at?bt:a;var l=f==bt,p=a==bt,s=f==a;o||(o=[]);var h=Lt(o,function(t){return t[0]==n}),v=Lt(o,function(n){return n[0]==t});if(h&&v)return h[1]==t;if(o.push([n,t]),o.push([t,n]),s&&!l){var y=i?J(n,t,r,e,u,o):M(n,t,f,r,e,u,o);return o.pop(),y}if(!(r&et)){var g=l&&Rt.call(n,"__wrapped__"),_=p&&Rt.call(t,"__wrapped__");if(g||_){var j=g?n.value():n,d=_?t.value():t,y=u(j,d,r,e,o);return o.pop(),y}}if(!s)return false;var y=U(n,t,r,e,u,o);return o.pop(), -y}function x(n){return In(n)&&b(n)==dt}function w(n){return typeof n=="function"?n:null==n?Hn:(typeof n=="object"?N:r)(n)}function A(n,t){return nu?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(u);++et||o&&i&&f&&!c&&!a||e&&i&&f||!r&&f||!u)return 1; -if(!e&&!o&&!a&&n1?r[u-1]:nt;for(o=n.length>3&&typeof o=="function"?(u--,o):nt,t=Object(t);++e-1?u[o?t[i]:i]:nt}}function G(n,t,r,e){function u(){for(var t=-1,c=arguments.length,f=-1,a=e.length,l=Array(a+c),p=this&&this!==kt&&this instanceof u?i:n;++fc))return false;var a=o.get(n),l=o.get(t);if(a&&l)return a==t&&l==n;for(var p=-1,s=true,h=r&ut?[]:nt;++p-1&&n%1==0&&n0&&(r=t.apply(this,arguments)),n<=1&&(t=nt),r}}function mn(n){if(typeof n!="function")throw new TypeError(rt);return function(){return!n.apply(this,arguments)}; -}function On(n){return dn(2,n)}function xn(n){return Bn(n)?Zt(n)?S(n):$(n,Gt(n)):n}function wn(n,t){return n===t||n!==n&&t!==t}function An(n){return null!=n&&Sn(n.length)&&!Tn(n)}function En(n){return n===true||n===false||In(n)&&b(n)==st}function Nn(n){return An(n)&&(Zt(n)||Dn(n)||Tn(n.splice)||Yt(n))?!n.length:!Gt(n).length}function kn(n,t){return m(n,t)}function Fn(n){return typeof n=="number"&&Ct(n)}function Tn(n){if(!Bn(n))return false;var t=b(n);return t==yt||t==gt||t==pt||t==jt}function Sn(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ft; -}function Bn(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function In(n){return null!=n&&typeof n=="object"}function Rn(n){return qn(n)&&n!=+n}function $n(n){return null===n}function qn(n){return typeof n=="number"||In(n)&&b(n)==_t}function Dn(n){return typeof n=="string"||!Zt(n)&&In(n)&&b(n)==mt}function Pn(n){return n===nt}function zn(n){return An(n)?n.length?S(n):[]:Un(n)}function Cn(n){return typeof n=="string"?n:null==n?"":n+""}function Gn(n,t){var r=Mt(n);return null==t?r:ur(r,t); -}function Jn(n,t){return null!=n&&Rt.call(n,t)}function Mn(n,t,r){var e=null==n?nt:n[t];return e===nt&&(e=r),Tn(e)?e.call(n):e}function Un(n){return null==n?[]:o(n,cr(n))}function Vn(n){return n=Cn(n),n&&xt.test(n)?n.replace(Ot,St):n}function Hn(n){return n}function Kn(n){return N(ur({},n))}function Ln(t,r,e){var u=cr(r),o=_(r,u);null!=e||Bn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=_(r,cr(r)));var i=!(Bn(e)&&"chain"in e&&!e.chain),c=Tn(t);return Ut(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){ -var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=S(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}function Qn(){return kt._===this&&(kt._=Dt),this}function Wn(){}function Xn(n){var t=++$t;return Cn(n)+t}function Yn(n){return n&&n.length?h(n,Hn,j):nt}function Zn(n){return n&&n.length?h(n,Hn,A):nt}var nt,tt="4.17.20",rt="Expected a function",et=1,ut=2,ot=1,it=32,ct=1/0,ft=9007199254740991,at="[object Arguments]",lt="[object Array]",pt="[object AsyncFunction]",st="[object Boolean]",ht="[object Date]",vt="[object Error]",yt="[object Function]",gt="[object GeneratorFunction]",_t="[object Number]",bt="[object Object]",jt="[object Proxy]",dt="[object RegExp]",mt="[object String]",Ot=/[&<>"']/g,xt=RegExp(Ot.source),wt=/^(?:0|[1-9]\d*)$/,At={ -"&":"&","<":"<",">":">",'"':""","'":"'"},Et=typeof global=="object"&&global&&global.Object===Object&&global,Nt=typeof self=="object"&&self&&self.Object===Object&&self,kt=Et||Nt||Function("return this")(),Ft=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tt=Ft&&typeof module=="object"&&module&&!module.nodeType&&module,St=e(At),Bt=Array.prototype,It=Object.prototype,Rt=It.hasOwnProperty,$t=0,qt=It.toString,Dt=kt._,Pt=Object.create,zt=It.propertyIsEnumerable,Ct=kt.isFinite,Gt=i(Object.keys,Object),Jt=Math.max,Mt=function(){ -function n(){}return function(t){if(!Bn(t))return{};if(Pt)return Pt(t);n.prototype=t;var r=new n;return n.prototype=nt,r}}();f.prototype=Mt(c.prototype),f.prototype.constructor=f;var Ut=D(g),Vt=P(),Ht=Wn,Kt=Hn,Lt=C(nn),Qt=F(function(n,t,r){return G(n,ot|it,t,r)}),Wt=F(function(n,t){return p(n,1,t)}),Xt=F(function(n,t,r){return p(n,er(t)||0,r)}),Yt=Ht(function(){return arguments}())?Ht:function(n){return In(n)&&Rt.call(n,"callee")&&!zt.call(n,"callee")},Zt=Array.isArray,nr=d,tr=x,rr=Number,er=Number,ur=q(function(n,t){ -$(t,Gt(t),n)}),or=q(function(n,t){$(t,Q(t),n)}),ir=F(function(n,t){n=Object(n);var r=-1,e=t.length,u=e>2?t[2]:nt;for(u&&L(t[0],t[1],u)&&(e=1);++r { '4': 1, '6': 2 } - * - * // The `_.property` iteratee shorthand. - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ -var countBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - ++result[key]; - } else { - baseAssignValue(result, key, 1); - } -}); - -module.exports = countBy; diff --git a/reverse_engineering/node_modules/lodash/create.js b/reverse_engineering/node_modules/lodash/create.js deleted file mode 100644 index 919edb8..0000000 --- a/reverse_engineering/node_modules/lodash/create.js +++ /dev/null @@ -1,43 +0,0 @@ -var baseAssign = require('./_baseAssign'), - baseCreate = require('./_baseCreate'); - -/** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ -function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : baseAssign(result, properties); -} - -module.exports = create; diff --git a/reverse_engineering/node_modules/lodash/curry.js b/reverse_engineering/node_modules/lodash/curry.js deleted file mode 100644 index 918db1a..0000000 --- a/reverse_engineering/node_modules/lodash/curry.js +++ /dev/null @@ -1,57 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_FLAG = 8; - -/** - * Creates a function that accepts arguments of `func` and either invokes - * `func` returning its result, if at least `arity` number of arguments have - * been provided, or returns a function that accepts the remaining `func` - * arguments, and so on. The arity of `func` may be specified if `func.length` - * is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ -function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; - return result; -} - -// Assign default placeholders. -curry.placeholder = {}; - -module.exports = curry; diff --git a/reverse_engineering/node_modules/lodash/curryRight.js b/reverse_engineering/node_modules/lodash/curryRight.js deleted file mode 100644 index c85b6f3..0000000 --- a/reverse_engineering/node_modules/lodash/curryRight.js +++ /dev/null @@ -1,54 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_CURRY_RIGHT_FLAG = 16; - -/** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ -function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; - return result; -} - -// Assign default placeholders. -curryRight.placeholder = {}; - -module.exports = curryRight; diff --git a/reverse_engineering/node_modules/lodash/date.js b/reverse_engineering/node_modules/lodash/date.js deleted file mode 100644 index cbf5b41..0000000 --- a/reverse_engineering/node_modules/lodash/date.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - 'now': require('./now') -}; diff --git a/reverse_engineering/node_modules/lodash/debounce.js b/reverse_engineering/node_modules/lodash/debounce.js deleted file mode 100644 index 8f751d5..0000000 --- a/reverse_engineering/node_modules/lodash/debounce.js +++ /dev/null @@ -1,191 +0,0 @@ -var isObject = require('./isObject'), - now = require('./now'), - toNumber = require('./toNumber'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ -function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} - -module.exports = debounce; diff --git a/reverse_engineering/node_modules/lodash/deburr.js b/reverse_engineering/node_modules/lodash/deburr.js deleted file mode 100644 index f85e314..0000000 --- a/reverse_engineering/node_modules/lodash/deburr.js +++ /dev/null @@ -1,45 +0,0 @@ -var deburrLetter = require('./_deburrLetter'), - toString = require('./toString'); - -/** Used to match Latin Unicode letters (excluding mathematical operators). */ -var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - -/** Used to compose unicode character classes. */ -var rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; - -/** Used to compose unicode capture groups. */ -var rsCombo = '[' + rsComboRange + ']'; - -/** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ -var reComboMark = RegExp(rsCombo, 'g'); - -/** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ -function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); -} - -module.exports = deburr; diff --git a/reverse_engineering/node_modules/lodash/defaultTo.js b/reverse_engineering/node_modules/lodash/defaultTo.js deleted file mode 100644 index 5b33359..0000000 --- a/reverse_engineering/node_modules/lodash/defaultTo.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Checks `value` to determine whether a default value should be returned in - * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, - * or `undefined`. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Util - * @param {*} value The value to check. - * @param {*} defaultValue The default value. - * @returns {*} Returns the resolved value. - * @example - * - * _.defaultTo(1, 10); - * // => 1 - * - * _.defaultTo(undefined, 10); - * // => 10 - */ -function defaultTo(value, defaultValue) { - return (value == null || value !== value) ? defaultValue : value; -} - -module.exports = defaultTo; diff --git a/reverse_engineering/node_modules/lodash/defaults.js b/reverse_engineering/node_modules/lodash/defaults.js deleted file mode 100644 index c74df04..0000000 --- a/reverse_engineering/node_modules/lodash/defaults.js +++ /dev/null @@ -1,64 +0,0 @@ -var baseRest = require('./_baseRest'), - eq = require('./eq'), - isIterateeCall = require('./_isIterateeCall'), - keysIn = require('./keysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -module.exports = defaults; diff --git a/reverse_engineering/node_modules/lodash/defaultsDeep.js b/reverse_engineering/node_modules/lodash/defaultsDeep.js deleted file mode 100644 index 9b5fa3e..0000000 --- a/reverse_engineering/node_modules/lodash/defaultsDeep.js +++ /dev/null @@ -1,30 +0,0 @@ -var apply = require('./_apply'), - baseRest = require('./_baseRest'), - customDefaultsMerge = require('./_customDefaultsMerge'), - mergeWith = require('./mergeWith'); - -/** - * This method is like `_.defaults` except that it recursively assigns - * default properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example - * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } - */ -var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); -}); - -module.exports = defaultsDeep; diff --git a/reverse_engineering/node_modules/lodash/defer.js b/reverse_engineering/node_modules/lodash/defer.js deleted file mode 100644 index f6d6c6f..0000000 --- a/reverse_engineering/node_modules/lodash/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -var baseDelay = require('./_baseDelay'), - baseRest = require('./_baseRest'); - -/** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ -var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); -}); - -module.exports = defer; diff --git a/reverse_engineering/node_modules/lodash/delay.js b/reverse_engineering/node_modules/lodash/delay.js deleted file mode 100644 index bd55479..0000000 --- a/reverse_engineering/node_modules/lodash/delay.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseDelay = require('./_baseDelay'), - baseRest = require('./_baseRest'), - toNumber = require('./toNumber'); - -/** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ -var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); -}); - -module.exports = delay; diff --git a/reverse_engineering/node_modules/lodash/difference.js b/reverse_engineering/node_modules/lodash/difference.js deleted file mode 100644 index fa28bb3..0000000 --- a/reverse_engineering/node_modules/lodash/difference.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseRest = require('./_baseRest'), - isArrayLikeObject = require('./isArrayLikeObject'); - -/** - * Creates an array of `array` values not included in the other given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * **Note:** Unlike `_.pullAll`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.without, _.xor - * @example - * - * _.difference([2, 1], [2, 3]); - * // => [1] - */ -var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; -}); - -module.exports = difference; diff --git a/reverse_engineering/node_modules/lodash/differenceBy.js b/reverse_engineering/node_modules/lodash/differenceBy.js deleted file mode 100644 index 2cd63e7..0000000 --- a/reverse_engineering/node_modules/lodash/differenceBy.js +++ /dev/null @@ -1,44 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'), - isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.difference` except that it accepts `iteratee` which - * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * **Note:** Unlike `_.pullAllBy`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2] - * - * // The `_.property` iteratee shorthand. - * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ -var differenceBy = baseRest(function(array, values) { - var iteratee = last(values); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) - : []; -}); - -module.exports = differenceBy; diff --git a/reverse_engineering/node_modules/lodash/differenceWith.js b/reverse_engineering/node_modules/lodash/differenceWith.js deleted file mode 100644 index c0233f4..0000000 --- a/reverse_engineering/node_modules/lodash/differenceWith.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - baseRest = require('./_baseRest'), - isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The order and - * references of result values are determined by the first array. The comparator - * is invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.pullAllWith`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * - * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); - * // => [{ 'x': 2, 'y': 1 }] - */ -var differenceWith = baseRest(function(array, values) { - var comparator = last(values); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) - : []; -}); - -module.exports = differenceWith; diff --git a/reverse_engineering/node_modules/lodash/divide.js b/reverse_engineering/node_modules/lodash/divide.js deleted file mode 100644 index 8cae0cd..0000000 --- a/reverse_engineering/node_modules/lodash/divide.js +++ /dev/null @@ -1,22 +0,0 @@ -var createMathOperation = require('./_createMathOperation'); - -/** - * Divide two numbers. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {number} dividend The first number in a division. - * @param {number} divisor The second number in a division. - * @returns {number} Returns the quotient. - * @example - * - * _.divide(6, 4); - * // => 1.5 - */ -var divide = createMathOperation(function(dividend, divisor) { - return dividend / divisor; -}, 1); - -module.exports = divide; diff --git a/reverse_engineering/node_modules/lodash/drop.js b/reverse_engineering/node_modules/lodash/drop.js deleted file mode 100644 index d5c3cba..0000000 --- a/reverse_engineering/node_modules/lodash/drop.js +++ /dev/null @@ -1,38 +0,0 @@ -var baseSlice = require('./_baseSlice'), - toInteger = require('./toInteger'); - -/** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); -} - -module.exports = drop; diff --git a/reverse_engineering/node_modules/lodash/dropRight.js b/reverse_engineering/node_modules/lodash/dropRight.js deleted file mode 100644 index 441fe99..0000000 --- a/reverse_engineering/node_modules/lodash/dropRight.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseSlice = require('./_baseSlice'), - toInteger = require('./toInteger'); - -/** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ -function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); -} - -module.exports = dropRight; diff --git a/reverse_engineering/node_modules/lodash/dropRightWhile.js b/reverse_engineering/node_modules/lodash/dropRightWhile.js deleted file mode 100644 index 9ad36a0..0000000 --- a/reverse_engineering/node_modules/lodash/dropRightWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - baseWhile = require('./_baseWhile'); - -/** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.dropRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney'] - * - * // The `_.matches` iteratee shorthand. - * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropRightWhile(users, ['active', false]); - * // => objects for ['barney'] - * - * // The `_.property` iteratee shorthand. - * _.dropRightWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ -function dropRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3), true, true) - : []; -} - -module.exports = dropRightWhile; diff --git a/reverse_engineering/node_modules/lodash/dropWhile.js b/reverse_engineering/node_modules/lodash/dropWhile.js deleted file mode 100644 index 903ef56..0000000 --- a/reverse_engineering/node_modules/lodash/dropWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - baseWhile = require('./_baseWhile'); - -/** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.dropWhile(users, function(o) { return !o.active; }); - * // => objects for ['pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.dropWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropWhile(users, ['active', false]); - * // => objects for ['pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.dropWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ -function dropWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, baseIteratee(predicate, 3), true) - : []; -} - -module.exports = dropWhile; diff --git a/reverse_engineering/node_modules/lodash/each.js b/reverse_engineering/node_modules/lodash/each.js deleted file mode 100644 index 8800f42..0000000 --- a/reverse_engineering/node_modules/lodash/each.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEach'); diff --git a/reverse_engineering/node_modules/lodash/eachRight.js b/reverse_engineering/node_modules/lodash/eachRight.js deleted file mode 100644 index 3252b2a..0000000 --- a/reverse_engineering/node_modules/lodash/eachRight.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEachRight'); diff --git a/reverse_engineering/node_modules/lodash/endsWith.js b/reverse_engineering/node_modules/lodash/endsWith.js deleted file mode 100644 index 76fc866..0000000 --- a/reverse_engineering/node_modules/lodash/endsWith.js +++ /dev/null @@ -1,43 +0,0 @@ -var baseClamp = require('./_baseClamp'), - baseToString = require('./_baseToString'), - toInteger = require('./toInteger'), - toString = require('./toString'); - -/** - * Checks if `string` ends with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search up to. - * @returns {boolean} Returns `true` if `string` ends with `target`, - * else `false`. - * @example - * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true - */ -function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - - var length = string.length; - position = position === undefined - ? length - : baseClamp(toInteger(position), 0, length); - - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; -} - -module.exports = endsWith; diff --git a/reverse_engineering/node_modules/lodash/entries.js b/reverse_engineering/node_modules/lodash/entries.js deleted file mode 100644 index 7a88df2..0000000 --- a/reverse_engineering/node_modules/lodash/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairs'); diff --git a/reverse_engineering/node_modules/lodash/entriesIn.js b/reverse_engineering/node_modules/lodash/entriesIn.js deleted file mode 100644 index f6c6331..0000000 --- a/reverse_engineering/node_modules/lodash/entriesIn.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairsIn'); diff --git a/reverse_engineering/node_modules/lodash/eq.js b/reverse_engineering/node_modules/lodash/eq.js deleted file mode 100644 index a940688..0000000 --- a/reverse_engineering/node_modules/lodash/eq.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -module.exports = eq; diff --git a/reverse_engineering/node_modules/lodash/escape.js b/reverse_engineering/node_modules/lodash/escape.js deleted file mode 100644 index 9247e00..0000000 --- a/reverse_engineering/node_modules/lodash/escape.js +++ /dev/null @@ -1,43 +0,0 @@ -var escapeHtmlChar = require('./_escapeHtmlChar'), - toString = require('./toString'); - -/** Used to match HTML entities and HTML characters. */ -var reUnescapedHtml = /[&<>"']/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - -/** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ -function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; -} - -module.exports = escape; diff --git a/reverse_engineering/node_modules/lodash/escapeRegExp.js b/reverse_engineering/node_modules/lodash/escapeRegExp.js deleted file mode 100644 index 0a58c69..0000000 --- a/reverse_engineering/node_modules/lodash/escapeRegExp.js +++ /dev/null @@ -1,32 +0,0 @@ -var toString = require('./toString'); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); - -/** - * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", - * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https://lodash\.com/\)' - */ -function escapeRegExp(string) { - string = toString(string); - return (string && reHasRegExpChar.test(string)) - ? string.replace(reRegExpChar, '\\$&') - : string; -} - -module.exports = escapeRegExp; diff --git a/reverse_engineering/node_modules/lodash/every.js b/reverse_engineering/node_modules/lodash/every.js deleted file mode 100644 index 25080da..0000000 --- a/reverse_engineering/node_modules/lodash/every.js +++ /dev/null @@ -1,56 +0,0 @@ -var arrayEvery = require('./_arrayEvery'), - baseEvery = require('./_baseEvery'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ -function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, baseIteratee(predicate, 3)); -} - -module.exports = every; diff --git a/reverse_engineering/node_modules/lodash/extend.js b/reverse_engineering/node_modules/lodash/extend.js deleted file mode 100644 index e00166c..0000000 --- a/reverse_engineering/node_modules/lodash/extend.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignIn'); diff --git a/reverse_engineering/node_modules/lodash/extendWith.js b/reverse_engineering/node_modules/lodash/extendWith.js deleted file mode 100644 index dbdcb3b..0000000 --- a/reverse_engineering/node_modules/lodash/extendWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInWith'); diff --git a/reverse_engineering/node_modules/lodash/fill.js b/reverse_engineering/node_modules/lodash/fill.js deleted file mode 100644 index ae13aa1..0000000 --- a/reverse_engineering/node_modules/lodash/fill.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseFill = require('./_baseFill'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8, 10], '*', 1, 3); - * // => [4, '*', '*', 10] - */ -function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); -} - -module.exports = fill; diff --git a/reverse_engineering/node_modules/lodash/filter.js b/reverse_engineering/node_modules/lodash/filter.js deleted file mode 100644 index 89e0c8c..0000000 --- a/reverse_engineering/node_modules/lodash/filter.js +++ /dev/null @@ -1,52 +0,0 @@ -var arrayFilter = require('./_arrayFilter'), - baseFilter = require('./_baseFilter'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, baseIteratee(predicate, 3)); -} - -module.exports = filter; diff --git a/reverse_engineering/node_modules/lodash/find.js b/reverse_engineering/node_modules/lodash/find.js deleted file mode 100644 index de732cc..0000000 --- a/reverse_engineering/node_modules/lodash/find.js +++ /dev/null @@ -1,42 +0,0 @@ -var createFind = require('./_createFind'), - findIndex = require('./findIndex'); - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = createFind(findIndex); - -module.exports = find; diff --git a/reverse_engineering/node_modules/lodash/findIndex.js b/reverse_engineering/node_modules/lodash/findIndex.js deleted file mode 100644 index 4689069..0000000 --- a/reverse_engineering/node_modules/lodash/findIndex.js +++ /dev/null @@ -1,55 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); -} - -module.exports = findIndex; diff --git a/reverse_engineering/node_modules/lodash/findKey.js b/reverse_engineering/node_modules/lodash/findKey.js deleted file mode 100644 index cac0248..0000000 --- a/reverse_engineering/node_modules/lodash/findKey.js +++ /dev/null @@ -1,44 +0,0 @@ -var baseFindKey = require('./_baseFindKey'), - baseForOwn = require('./_baseForOwn'), - baseIteratee = require('./_baseIteratee'); - -/** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(o) { return o.age < 40; }); - * // => 'barney' (iteration order is not guaranteed) - * - * // The `_.matches` iteratee shorthand. - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findKey(users, 'active'); - * // => 'barney' - */ -function findKey(object, predicate) { - return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); -} - -module.exports = findKey; diff --git a/reverse_engineering/node_modules/lodash/findLast.js b/reverse_engineering/node_modules/lodash/findLast.js deleted file mode 100644 index 70b4271..0000000 --- a/reverse_engineering/node_modules/lodash/findLast.js +++ /dev/null @@ -1,25 +0,0 @@ -var createFind = require('./_createFind'), - findLastIndex = require('./findLastIndex'); - -/** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=collection.length-1] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ -var findLast = createFind(findLastIndex); - -module.exports = findLast; diff --git a/reverse_engineering/node_modules/lodash/findLastIndex.js b/reverse_engineering/node_modules/lodash/findLastIndex.js deleted file mode 100644 index 7da3431..0000000 --- a/reverse_engineering/node_modules/lodash/findLastIndex.js +++ /dev/null @@ -1,59 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); - * // => 2 - * - * // The `_.matches` iteratee shorthand. - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastIndex(users, ['active', false]); - * // => 2 - * - * // The `_.property` iteratee shorthand. - * _.findLastIndex(users, 'active'); - * // => 0 - */ -function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index, true); -} - -module.exports = findLastIndex; diff --git a/reverse_engineering/node_modules/lodash/findLastKey.js b/reverse_engineering/node_modules/lodash/findLastKey.js deleted file mode 100644 index 66fb9fb..0000000 --- a/reverse_engineering/node_modules/lodash/findLastKey.js +++ /dev/null @@ -1,44 +0,0 @@ -var baseFindKey = require('./_baseFindKey'), - baseForOwnRight = require('./_baseForOwnRight'), - baseIteratee = require('./_baseIteratee'); - -/** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findLastKey(users, 'active'); - * // => 'pebbles' - */ -function findLastKey(object, predicate) { - return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); -} - -module.exports = findLastKey; diff --git a/reverse_engineering/node_modules/lodash/first.js b/reverse_engineering/node_modules/lodash/first.js deleted file mode 100644 index 53f4ad1..0000000 --- a/reverse_engineering/node_modules/lodash/first.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./head'); diff --git a/reverse_engineering/node_modules/lodash/flatMap.js b/reverse_engineering/node_modules/lodash/flatMap.js deleted file mode 100644 index e668506..0000000 --- a/reverse_engineering/node_modules/lodash/flatMap.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - map = require('./map'); - -/** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [n, n]; - * } - * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ -function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); -} - -module.exports = flatMap; diff --git a/reverse_engineering/node_modules/lodash/flatMapDeep.js b/reverse_engineering/node_modules/lodash/flatMapDeep.js deleted file mode 100644 index 4653d60..0000000 --- a/reverse_engineering/node_modules/lodash/flatMapDeep.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - map = require('./map'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDeep([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ -function flatMapDeep(collection, iteratee) { - return baseFlatten(map(collection, iteratee), INFINITY); -} - -module.exports = flatMapDeep; diff --git a/reverse_engineering/node_modules/lodash/flatMapDepth.js b/reverse_engineering/node_modules/lodash/flatMapDepth.js deleted file mode 100644 index 6d72005..0000000 --- a/reverse_engineering/node_modules/lodash/flatMapDepth.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - map = require('./map'), - toInteger = require('./toInteger'); - -/** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDepth([1, 2], duplicate, 2); - * // => [[1, 1], [2, 2]] - */ -function flatMapDepth(collection, iteratee, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee), depth); -} - -module.exports = flatMapDepth; diff --git a/reverse_engineering/node_modules/lodash/flatten.js b/reverse_engineering/node_modules/lodash/flatten.js deleted file mode 100644 index 3f09f7f..0000000 --- a/reverse_engineering/node_modules/lodash/flatten.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseFlatten = require('./_baseFlatten'); - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; -} - -module.exports = flatten; diff --git a/reverse_engineering/node_modules/lodash/flattenDeep.js b/reverse_engineering/node_modules/lodash/flattenDeep.js deleted file mode 100644 index 8ad585c..0000000 --- a/reverse_engineering/node_modules/lodash/flattenDeep.js +++ /dev/null @@ -1,25 +0,0 @@ -var baseFlatten = require('./_baseFlatten'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ -function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; -} - -module.exports = flattenDeep; diff --git a/reverse_engineering/node_modules/lodash/flattenDepth.js b/reverse_engineering/node_modules/lodash/flattenDepth.js deleted file mode 100644 index 441fdcc..0000000 --- a/reverse_engineering/node_modules/lodash/flattenDepth.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseFlatten = require('./_baseFlatten'), - toInteger = require('./toInteger'); - -/** - * Recursively flatten `array` up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Array - * @param {Array} array The array to flatten. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * var array = [1, [2, [3, [4]], 5]]; - * - * _.flattenDepth(array, 1); - * // => [1, 2, [3, [4]], 5] - * - * _.flattenDepth(array, 2); - * // => [1, 2, 3, [4], 5] - */ -function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); -} - -module.exports = flattenDepth; diff --git a/reverse_engineering/node_modules/lodash/flip.js b/reverse_engineering/node_modules/lodash/flip.js deleted file mode 100644 index c28dd78..0000000 --- a/reverse_engineering/node_modules/lodash/flip.js +++ /dev/null @@ -1,28 +0,0 @@ -var createWrap = require('./_createWrap'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_FLIP_FLAG = 512; - -/** - * Creates a function that invokes `func` with arguments reversed. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new flipped function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ -function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); -} - -module.exports = flip; diff --git a/reverse_engineering/node_modules/lodash/floor.js b/reverse_engineering/node_modules/lodash/floor.js deleted file mode 100644 index ab6dfa2..0000000 --- a/reverse_engineering/node_modules/lodash/floor.js +++ /dev/null @@ -1,26 +0,0 @@ -var createRound = require('./_createRound'); - -/** - * Computes `number` rounded down to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round down. - * @param {number} [precision=0] The precision to round down to. - * @returns {number} Returns the rounded down number. - * @example - * - * _.floor(4.006); - * // => 4 - * - * _.floor(0.046, 2); - * // => 0.04 - * - * _.floor(4060, -2); - * // => 4000 - */ -var floor = createRound('floor'); - -module.exports = floor; diff --git a/reverse_engineering/node_modules/lodash/flow.js b/reverse_engineering/node_modules/lodash/flow.js deleted file mode 100644 index 74b6b62..0000000 --- a/reverse_engineering/node_modules/lodash/flow.js +++ /dev/null @@ -1,27 +0,0 @@ -var createFlow = require('./_createFlow'); - -/** - * Creates a function that returns the result of invoking the given functions - * with the `this` binding of the created function, where each successive - * invocation is supplied the return value of the previous. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flowRight - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flow([_.add, square]); - * addSquare(1, 2); - * // => 9 - */ -var flow = createFlow(); - -module.exports = flow; diff --git a/reverse_engineering/node_modules/lodash/flowRight.js b/reverse_engineering/node_modules/lodash/flowRight.js deleted file mode 100644 index 1146141..0000000 --- a/reverse_engineering/node_modules/lodash/flowRight.js +++ /dev/null @@ -1,26 +0,0 @@ -var createFlow = require('./_createFlow'); - -/** - * This method is like `_.flow` except that it creates a function that - * invokes the given functions from right to left. - * - * @static - * @since 3.0.0 - * @memberOf _ - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flow - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flowRight([square, _.add]); - * addSquare(1, 2); - * // => 9 - */ -var flowRight = createFlow(true); - -module.exports = flowRight; diff --git a/reverse_engineering/node_modules/lodash/forEach.js b/reverse_engineering/node_modules/lodash/forEach.js deleted file mode 100644 index c64eaa7..0000000 --- a/reverse_engineering/node_modules/lodash/forEach.js +++ /dev/null @@ -1,41 +0,0 @@ -var arrayEach = require('./_arrayEach'), - baseEach = require('./_baseEach'), - castFunction = require('./_castFunction'), - isArray = require('./isArray'); - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, castFunction(iteratee)); -} - -module.exports = forEach; diff --git a/reverse_engineering/node_modules/lodash/forEachRight.js b/reverse_engineering/node_modules/lodash/forEachRight.js deleted file mode 100644 index 7390eba..0000000 --- a/reverse_engineering/node_modules/lodash/forEachRight.js +++ /dev/null @@ -1,31 +0,0 @@ -var arrayEachRight = require('./_arrayEachRight'), - baseEachRight = require('./_baseEachRight'), - castFunction = require('./_castFunction'), - isArray = require('./isArray'); - -/** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @alias eachRight - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEach - * @example - * - * _.forEachRight([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `2` then `1`. - */ -function forEachRight(collection, iteratee) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, castFunction(iteratee)); -} - -module.exports = forEachRight; diff --git a/reverse_engineering/node_modules/lodash/forIn.js b/reverse_engineering/node_modules/lodash/forIn.js deleted file mode 100644 index 583a596..0000000 --- a/reverse_engineering/node_modules/lodash/forIn.js +++ /dev/null @@ -1,39 +0,0 @@ -var baseFor = require('./_baseFor'), - castFunction = require('./_castFunction'), - keysIn = require('./keysIn'); - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, castFunction(iteratee), keysIn); -} - -module.exports = forIn; diff --git a/reverse_engineering/node_modules/lodash/forInRight.js b/reverse_engineering/node_modules/lodash/forInRight.js deleted file mode 100644 index 4aedf58..0000000 --- a/reverse_engineering/node_modules/lodash/forInRight.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseForRight = require('./_baseForRight'), - castFunction = require('./_castFunction'), - keysIn = require('./keysIn'); - -/** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forIn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. - */ -function forInRight(object, iteratee) { - return object == null - ? object - : baseForRight(object, castFunction(iteratee), keysIn); -} - -module.exports = forInRight; diff --git a/reverse_engineering/node_modules/lodash/forOwn.js b/reverse_engineering/node_modules/lodash/forOwn.js deleted file mode 100644 index 94eed84..0000000 --- a/reverse_engineering/node_modules/lodash/forOwn.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseForOwn = require('./_baseForOwn'), - castFunction = require('./_castFunction'); - -/** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forOwn(object, iteratee) { - return object && baseForOwn(object, castFunction(iteratee)); -} - -module.exports = forOwn; diff --git a/reverse_engineering/node_modules/lodash/forOwnRight.js b/reverse_engineering/node_modules/lodash/forOwnRight.js deleted file mode 100644 index 86f338f..0000000 --- a/reverse_engineering/node_modules/lodash/forOwnRight.js +++ /dev/null @@ -1,34 +0,0 @@ -var baseForOwnRight = require('./_baseForOwnRight'), - castFunction = require('./_castFunction'); - -/** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. - */ -function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, castFunction(iteratee)); -} - -module.exports = forOwnRight; diff --git a/reverse_engineering/node_modules/lodash/fp.js b/reverse_engineering/node_modules/lodash/fp.js deleted file mode 100644 index e372dbb..0000000 --- a/reverse_engineering/node_modules/lodash/fp.js +++ /dev/null @@ -1,2 +0,0 @@ -var _ = require('./lodash.min').runInContext(); -module.exports = require('./fp/_baseConvert')(_, _); diff --git a/reverse_engineering/node_modules/lodash/fp/F.js b/reverse_engineering/node_modules/lodash/fp/F.js deleted file mode 100644 index a05a63a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/F.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./stubFalse'); diff --git a/reverse_engineering/node_modules/lodash/fp/T.js b/reverse_engineering/node_modules/lodash/fp/T.js deleted file mode 100644 index e2ba8ea..0000000 --- a/reverse_engineering/node_modules/lodash/fp/T.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./stubTrue'); diff --git a/reverse_engineering/node_modules/lodash/fp/__.js b/reverse_engineering/node_modules/lodash/fp/__.js deleted file mode 100644 index 4af98de..0000000 --- a/reverse_engineering/node_modules/lodash/fp/__.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./placeholder'); diff --git a/reverse_engineering/node_modules/lodash/fp/_baseConvert.js b/reverse_engineering/node_modules/lodash/fp/_baseConvert.js deleted file mode 100644 index 9baf8e1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/_baseConvert.js +++ /dev/null @@ -1,569 +0,0 @@ -var mapping = require('./_mapping'), - fallbackHolder = require('./placeholder'); - -/** Built-in value reference. */ -var push = Array.prototype.push; - -/** - * Creates a function, with an arity of `n`, that invokes `func` with the - * arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} n The arity of the new function. - * @returns {Function} Returns the new function. - */ -function baseArity(func, n) { - return n == 2 - ? function(a, b) { return func.apply(undefined, arguments); } - : function(a) { return func.apply(undefined, arguments); }; -} - -/** - * Creates a function that invokes `func`, with up to `n` arguments, ignoring - * any additional arguments. - * - * @private - * @param {Function} func The function to cap arguments for. - * @param {number} n The arity cap. - * @returns {Function} Returns the new function. - */ -function baseAry(func, n) { - return n == 2 - ? function(a, b) { return func(a, b); } - : function(a) { return func(a); }; -} - -/** - * Creates a clone of `array`. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the cloned array. - */ -function cloneArray(array) { - var length = array ? array.length : 0, - result = Array(length); - - while (length--) { - result[length] = array[length]; - } - return result; -} - -/** - * Creates a function that clones a given object using the assignment `func`. - * - * @private - * @param {Function} func The assignment function. - * @returns {Function} Returns the new cloner function. - */ -function createCloner(func) { - return function(object) { - return func({}, object); - }; -} - -/** - * A specialized version of `_.spread` which flattens the spread array into - * the arguments of the invoked `func`. - * - * @private - * @param {Function} func The function to spread arguments over. - * @param {number} start The start position of the spread. - * @returns {Function} Returns the new function. - */ -function flatSpread(func, start) { - return function() { - var length = arguments.length, - lastIndex = length - 1, - args = Array(length); - - while (length--) { - args[length] = arguments[length]; - } - var array = args[start], - otherArgs = args.slice(0, start); - - if (array) { - push.apply(otherArgs, array); - } - if (start != lastIndex) { - push.apply(otherArgs, args.slice(start + 1)); - } - return func.apply(this, otherArgs); - }; -} - -/** - * Creates a function that wraps `func` and uses `cloner` to clone the first - * argument it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} cloner The function to clone arguments. - * @returns {Function} Returns the new immutable function. - */ -function wrapImmutable(func, cloner) { - return function() { - var length = arguments.length; - if (!length) { - return; - } - var args = Array(length); - while (length--) { - args[length] = arguments[length]; - } - var result = args[0] = cloner.apply(undefined, args); - func.apply(undefined, args); - return result; - }; -} - -/** - * The base implementation of `convert` which accepts a `util` object of methods - * required to perform conversions. - * - * @param {Object} util The util object. - * @param {string} name The name of the function to convert. - * @param {Function} func The function to convert. - * @param {Object} [options] The options object. - * @param {boolean} [options.cap=true] Specify capping iteratee arguments. - * @param {boolean} [options.curry=true] Specify currying. - * @param {boolean} [options.fixed=true] Specify fixed arity. - * @param {boolean} [options.immutable=true] Specify immutable operations. - * @param {boolean} [options.rearg=true] Specify rearranging arguments. - * @returns {Function|Object} Returns the converted function or object. - */ -function baseConvert(util, name, func, options) { - var isLib = typeof name == 'function', - isObj = name === Object(name); - - if (isObj) { - options = func; - func = name; - name = undefined; - } - if (func == null) { - throw new TypeError; - } - options || (options = {}); - - var config = { - 'cap': 'cap' in options ? options.cap : true, - 'curry': 'curry' in options ? options.curry : true, - 'fixed': 'fixed' in options ? options.fixed : true, - 'immutable': 'immutable' in options ? options.immutable : true, - 'rearg': 'rearg' in options ? options.rearg : true - }; - - var defaultHolder = isLib ? func : fallbackHolder, - forceCurry = ('curry' in options) && options.curry, - forceFixed = ('fixed' in options) && options.fixed, - forceRearg = ('rearg' in options) && options.rearg, - pristine = isLib ? func.runInContext() : undefined; - - var helpers = isLib ? func : { - 'ary': util.ary, - 'assign': util.assign, - 'clone': util.clone, - 'curry': util.curry, - 'forEach': util.forEach, - 'isArray': util.isArray, - 'isError': util.isError, - 'isFunction': util.isFunction, - 'isWeakMap': util.isWeakMap, - 'iteratee': util.iteratee, - 'keys': util.keys, - 'rearg': util.rearg, - 'toInteger': util.toInteger, - 'toPath': util.toPath - }; - - var ary = helpers.ary, - assign = helpers.assign, - clone = helpers.clone, - curry = helpers.curry, - each = helpers.forEach, - isArray = helpers.isArray, - isError = helpers.isError, - isFunction = helpers.isFunction, - isWeakMap = helpers.isWeakMap, - keys = helpers.keys, - rearg = helpers.rearg, - toInteger = helpers.toInteger, - toPath = helpers.toPath; - - var aryMethodKeys = keys(mapping.aryMethod); - - var wrappers = { - 'castArray': function(castArray) { - return function() { - var value = arguments[0]; - return isArray(value) - ? castArray(cloneArray(value)) - : castArray.apply(undefined, arguments); - }; - }, - 'iteratee': function(iteratee) { - return function() { - var func = arguments[0], - arity = arguments[1], - result = iteratee(func, arity), - length = result.length; - - if (config.cap && typeof arity == 'number') { - arity = arity > 2 ? (arity - 2) : 1; - return (length && length <= arity) ? result : baseAry(result, arity); - } - return result; - }; - }, - 'mixin': function(mixin) { - return function(source) { - var func = this; - if (!isFunction(func)) { - return mixin(func, Object(source)); - } - var pairs = []; - each(keys(source), function(key) { - if (isFunction(source[key])) { - pairs.push([key, func.prototype[key]]); - } - }); - - mixin(func, Object(source)); - - each(pairs, function(pair) { - var value = pair[1]; - if (isFunction(value)) { - func.prototype[pair[0]] = value; - } else { - delete func.prototype[pair[0]]; - } - }); - return func; - }; - }, - 'nthArg': function(nthArg) { - return function(n) { - var arity = n < 0 ? 1 : (toInteger(n) + 1); - return curry(nthArg(n), arity); - }; - }, - 'rearg': function(rearg) { - return function(func, indexes) { - var arity = indexes ? indexes.length : 0; - return curry(rearg(func, indexes), arity); - }; - }, - 'runInContext': function(runInContext) { - return function(context) { - return baseConvert(util, runInContext(context), options); - }; - } - }; - - /*--------------------------------------------------------------------------*/ - - /** - * Casts `func` to a function with an arity capped iteratee if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @returns {Function} Returns the cast function. - */ - function castCap(name, func) { - if (config.cap) { - var indexes = mapping.iterateeRearg[name]; - if (indexes) { - return iterateeRearg(func, indexes); - } - var n = !isLib && mapping.iterateeAry[name]; - if (n) { - return iterateeAry(func, n); - } - } - return func; - } - - /** - * Casts `func` to a curried function if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @param {number} n The arity of `func`. - * @returns {Function} Returns the cast function. - */ - function castCurry(name, func, n) { - return (forceCurry || (config.curry && n > 1)) - ? curry(func, n) - : func; - } - - /** - * Casts `func` to a fixed arity function if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @param {number} n The arity cap. - * @returns {Function} Returns the cast function. - */ - function castFixed(name, func, n) { - if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { - var data = mapping.methodSpread[name], - start = data && data.start; - - return start === undefined ? ary(func, n) : flatSpread(func, start); - } - return func; - } - - /** - * Casts `func` to an rearged function if needed. - * - * @private - * @param {string} name The name of the function to inspect. - * @param {Function} func The function to inspect. - * @param {number} n The arity of `func`. - * @returns {Function} Returns the cast function. - */ - function castRearg(name, func, n) { - return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) - ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) - : func; - } - - /** - * Creates a clone of `object` by `path`. - * - * @private - * @param {Object} object The object to clone. - * @param {Array|string} path The path to clone by. - * @returns {Object} Returns the cloned object. - */ - function cloneByPath(object, path) { - path = toPath(path); - - var index = -1, - length = path.length, - lastIndex = length - 1, - result = clone(Object(object)), - nested = result; - - while (nested != null && ++index < length) { - var key = path[index], - value = nested[key]; - - if (value != null && - !(isFunction(value) || isError(value) || isWeakMap(value))) { - nested[key] = clone(index == lastIndex ? value : Object(value)); - } - nested = nested[key]; - } - return result; - } - - /** - * Converts `lodash` to an immutable auto-curried iteratee-first data-last - * version with conversion `options` applied. - * - * @param {Object} [options] The options object. See `baseConvert` for more details. - * @returns {Function} Returns the converted `lodash`. - */ - function convertLib(options) { - return _.runInContext.convert(options)(undefined); - } - - /** - * Create a converter function for `func` of `name`. - * - * @param {string} name The name of the function to convert. - * @param {Function} func The function to convert. - * @returns {Function} Returns the new converter function. - */ - function createConverter(name, func) { - var realName = mapping.aliasToReal[name] || name, - methodName = mapping.remap[realName] || realName, - oldOptions = options; - - return function(options) { - var newUtil = isLib ? pristine : helpers, - newFunc = isLib ? pristine[methodName] : func, - newOptions = assign(assign({}, oldOptions), options); - - return baseConvert(newUtil, realName, newFunc, newOptions); - }; - } - - /** - * Creates a function that wraps `func` to invoke its iteratee, with up to `n` - * arguments, ignoring any additional arguments. - * - * @private - * @param {Function} func The function to cap iteratee arguments for. - * @param {number} n The arity cap. - * @returns {Function} Returns the new function. - */ - function iterateeAry(func, n) { - return overArg(func, function(func) { - return typeof func == 'function' ? baseAry(func, n) : func; - }); - } - - /** - * Creates a function that wraps `func` to invoke its iteratee with arguments - * arranged according to the specified `indexes` where the argument value at - * the first index is provided as the first argument, the argument value at - * the second index is provided as the second argument, and so on. - * - * @private - * @param {Function} func The function to rearrange iteratee arguments for. - * @param {number[]} indexes The arranged argument indexes. - * @returns {Function} Returns the new function. - */ - function iterateeRearg(func, indexes) { - return overArg(func, function(func) { - var n = indexes.length; - return baseArity(rearg(baseAry(func, n), indexes), n); - }); - } - - /** - * Creates a function that invokes `func` with its first argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function() { - var length = arguments.length; - if (!length) { - return func(); - } - var args = Array(length); - while (length--) { - args[length] = arguments[length]; - } - var index = config.rearg ? 0 : (length - 1); - args[index] = transform(args[index]); - return func.apply(undefined, args); - }; - } - - /** - * Creates a function that wraps `func` and applys the conversions - * rules by `name`. - * - * @private - * @param {string} name The name of the function to wrap. - * @param {Function} func The function to wrap. - * @returns {Function} Returns the converted function. - */ - function wrap(name, func, placeholder) { - var result, - realName = mapping.aliasToReal[name] || name, - wrapped = func, - wrapper = wrappers[realName]; - - if (wrapper) { - wrapped = wrapper(func); - } - else if (config.immutable) { - if (mapping.mutate.array[realName]) { - wrapped = wrapImmutable(func, cloneArray); - } - else if (mapping.mutate.object[realName]) { - wrapped = wrapImmutable(func, createCloner(func)); - } - else if (mapping.mutate.set[realName]) { - wrapped = wrapImmutable(func, cloneByPath); - } - } - each(aryMethodKeys, function(aryKey) { - each(mapping.aryMethod[aryKey], function(otherName) { - if (realName == otherName) { - var data = mapping.methodSpread[realName], - afterRearg = data && data.afterRearg; - - result = afterRearg - ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) - : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); - - result = castCap(realName, result); - result = castCurry(realName, result, aryKey); - return false; - } - }); - return !result; - }); - - result || (result = wrapped); - if (result == func) { - result = forceCurry ? curry(result, 1) : function() { - return func.apply(this, arguments); - }; - } - result.convert = createConverter(realName, func); - result.placeholder = func.placeholder = placeholder; - - return result; - } - - /*--------------------------------------------------------------------------*/ - - if (!isObj) { - return wrap(name, func, defaultHolder); - } - var _ = func; - - // Convert methods by ary cap. - var pairs = []; - each(aryMethodKeys, function(aryKey) { - each(mapping.aryMethod[aryKey], function(key) { - var func = _[mapping.remap[key] || key]; - if (func) { - pairs.push([key, wrap(key, func, _)]); - } - }); - }); - - // Convert remaining methods. - each(keys(_), function(key) { - var func = _[key]; - if (typeof func == 'function') { - var length = pairs.length; - while (length--) { - if (pairs[length][0] == key) { - return; - } - } - func.convert = createConverter(key, func); - pairs.push([key, func]); - } - }); - - // Assign to `_` leaving `_.prototype` unchanged to allow chaining. - each(pairs, function(pair) { - _[pair[0]] = pair[1]; - }); - - _.convert = convertLib; - _.placeholder = _; - - // Assign aliases. - each(keys(_), function(key) { - each(mapping.realToAlias[key] || [], function(alias) { - _[alias] = _[key]; - }); - }); - - return _; -} - -module.exports = baseConvert; diff --git a/reverse_engineering/node_modules/lodash/fp/_convertBrowser.js b/reverse_engineering/node_modules/lodash/fp/_convertBrowser.js deleted file mode 100644 index bde030d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/_convertBrowser.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseConvert = require('./_baseConvert'); - -/** - * Converts `lodash` to an immutable auto-curried iteratee-first data-last - * version with conversion `options` applied. - * - * @param {Function} lodash The lodash function to convert. - * @param {Object} [options] The options object. See `baseConvert` for more details. - * @returns {Function} Returns the converted `lodash`. - */ -function browserConvert(lodash, options) { - return baseConvert(lodash, lodash, options); -} - -if (typeof _ == 'function' && typeof _.runInContext == 'function') { - _ = browserConvert(_.runInContext()); -} -module.exports = browserConvert; diff --git a/reverse_engineering/node_modules/lodash/fp/_falseOptions.js b/reverse_engineering/node_modules/lodash/fp/_falseOptions.js deleted file mode 100644 index 773235e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/_falseOptions.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - 'cap': false, - 'curry': false, - 'fixed': false, - 'immutable': false, - 'rearg': false -}; diff --git a/reverse_engineering/node_modules/lodash/fp/_mapping.js b/reverse_engineering/node_modules/lodash/fp/_mapping.js deleted file mode 100644 index a642ec0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/_mapping.js +++ /dev/null @@ -1,358 +0,0 @@ -/** Used to map aliases to their real names. */ -exports.aliasToReal = { - - // Lodash aliases. - 'each': 'forEach', - 'eachRight': 'forEachRight', - 'entries': 'toPairs', - 'entriesIn': 'toPairsIn', - 'extend': 'assignIn', - 'extendAll': 'assignInAll', - 'extendAllWith': 'assignInAllWith', - 'extendWith': 'assignInWith', - 'first': 'head', - - // Methods that are curried variants of others. - 'conforms': 'conformsTo', - 'matches': 'isMatch', - 'property': 'get', - - // Ramda aliases. - '__': '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' -}; - -/** Used to map ary to method names. */ -exports.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' - ] -}; - -/** Used to map ary to rearg configs. */ -exports.aryRearg = { - '2': [1, 0], - '3': [2, 0, 1], - '4': [3, 2, 0, 1] -}; - -/** Used to map method names to their iteratee ary. */ -exports.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 -}; - -/** Used to map method names to iteratee rearg configs. */ -exports.iterateeRearg = { - 'mapKeys': [1], - 'reduceRight': [1, 0] -}; - -/** Used to map method names to rearg configs. */ -exports.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] -}; - -/** Used to map method names to spread configs. */ -exports.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 } -}; - -/** Used to identify methods which mutate arrays or objects. */ -exports.mutate = { - 'array': { - 'fill': true, - 'pull': true, - 'pullAll': true, - 'pullAllBy': true, - 'pullAllWith': true, - 'pullAt': true, - 'remove': true, - 'reverse': true - }, - 'object': { - 'assign': true, - 'assignAll': true, - 'assignAllWith': true, - 'assignIn': true, - 'assignInAll': true, - 'assignInAllWith': true, - 'assignInWith': true, - 'assignWith': true, - 'defaults': true, - 'defaultsAll': true, - 'defaultsDeep': true, - 'defaultsDeepAll': true, - 'merge': true, - 'mergeAll': true, - 'mergeAllWith': true, - 'mergeWith': true, - }, - 'set': { - 'set': true, - 'setWith': true, - 'unset': true, - 'update': true, - 'updateWith': true - } -}; - -/** Used to map real names to their aliases. */ -exports.realToAlias = (function() { - var hasOwnProperty = Object.prototype.hasOwnProperty, - object = exports.aliasToReal, - result = {}; - - for (var key in object) { - var value = object[key]; - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - } - return result; -}()); - -/** Used to map method names to other names. */ -exports.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' -}; - -/** Used to track methods that skip fixing their arity. */ -exports.skipFixed = { - 'castArray': true, - 'flow': true, - 'flowRight': true, - 'iteratee': true, - 'mixin': true, - 'rearg': true, - 'runInContext': true -}; - -/** Used to track methods that skip rearranging arguments. */ -exports.skipRearg = { - 'add': true, - 'assign': true, - 'assignIn': true, - 'bind': true, - 'bindKey': true, - 'concat': true, - 'difference': true, - 'divide': true, - 'eq': true, - 'gt': true, - 'gte': true, - 'isEqual': true, - 'lt': true, - 'lte': true, - 'matchesProperty': true, - 'merge': true, - 'multiply': true, - 'overArgs': true, - 'partial': true, - 'partialRight': true, - 'propertyOf': true, - 'random': true, - 'range': true, - 'rangeRight': true, - 'subtract': true, - 'zip': true, - 'zipObject': true, - 'zipObjectDeep': true -}; diff --git a/reverse_engineering/node_modules/lodash/fp/_util.js b/reverse_engineering/node_modules/lodash/fp/_util.js deleted file mode 100644 index 1dbf36f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/_util.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - 'ary': require('../ary'), - 'assign': require('../_baseAssign'), - 'clone': require('../clone'), - 'curry': require('../curry'), - 'forEach': require('../_arrayEach'), - 'isArray': require('../isArray'), - 'isError': require('../isError'), - 'isFunction': require('../isFunction'), - 'isWeakMap': require('../isWeakMap'), - 'iteratee': require('../iteratee'), - 'keys': require('../_baseKeys'), - 'rearg': require('../rearg'), - 'toInteger': require('../toInteger'), - 'toPath': require('../toPath') -}; diff --git a/reverse_engineering/node_modules/lodash/fp/add.js b/reverse_engineering/node_modules/lodash/fp/add.js deleted file mode 100644 index 816eeec..0000000 --- a/reverse_engineering/node_modules/lodash/fp/add.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('add', require('../add')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/after.js b/reverse_engineering/node_modules/lodash/fp/after.js deleted file mode 100644 index 21a0167..0000000 --- a/reverse_engineering/node_modules/lodash/fp/after.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('after', require('../after')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/all.js b/reverse_engineering/node_modules/lodash/fp/all.js deleted file mode 100644 index d0839f7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/all.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./every'); diff --git a/reverse_engineering/node_modules/lodash/fp/allPass.js b/reverse_engineering/node_modules/lodash/fp/allPass.js deleted file mode 100644 index 79b73ef..0000000 --- a/reverse_engineering/node_modules/lodash/fp/allPass.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./overEvery'); diff --git a/reverse_engineering/node_modules/lodash/fp/always.js b/reverse_engineering/node_modules/lodash/fp/always.js deleted file mode 100644 index 9887703..0000000 --- a/reverse_engineering/node_modules/lodash/fp/always.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./constant'); diff --git a/reverse_engineering/node_modules/lodash/fp/any.js b/reverse_engineering/node_modules/lodash/fp/any.js deleted file mode 100644 index 900ac25..0000000 --- a/reverse_engineering/node_modules/lodash/fp/any.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./some'); diff --git a/reverse_engineering/node_modules/lodash/fp/anyPass.js b/reverse_engineering/node_modules/lodash/fp/anyPass.js deleted file mode 100644 index 2774ab3..0000000 --- a/reverse_engineering/node_modules/lodash/fp/anyPass.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./overSome'); diff --git a/reverse_engineering/node_modules/lodash/fp/apply.js b/reverse_engineering/node_modules/lodash/fp/apply.js deleted file mode 100644 index 2b75712..0000000 --- a/reverse_engineering/node_modules/lodash/fp/apply.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./spread'); diff --git a/reverse_engineering/node_modules/lodash/fp/array.js b/reverse_engineering/node_modules/lodash/fp/array.js deleted file mode 100644 index fe939c2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/array.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../array')); diff --git a/reverse_engineering/node_modules/lodash/fp/ary.js b/reverse_engineering/node_modules/lodash/fp/ary.js deleted file mode 100644 index 8edf187..0000000 --- a/reverse_engineering/node_modules/lodash/fp/ary.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('ary', require('../ary')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assign.js b/reverse_engineering/node_modules/lodash/fp/assign.js deleted file mode 100644 index 23f47af..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assign.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assign', require('../assign')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assignAll.js b/reverse_engineering/node_modules/lodash/fp/assignAll.js deleted file mode 100644 index b1d36c7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assignAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignAll', require('../assign')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assignAllWith.js b/reverse_engineering/node_modules/lodash/fp/assignAllWith.js deleted file mode 100644 index 21e836e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assignAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignAllWith', require('../assignWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assignIn.js b/reverse_engineering/node_modules/lodash/fp/assignIn.js deleted file mode 100644 index 6e7c65f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assignIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignIn', require('../assignIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assignInAll.js b/reverse_engineering/node_modules/lodash/fp/assignInAll.js deleted file mode 100644 index 7ba75db..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assignInAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignInAll', require('../assignIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assignInAllWith.js b/reverse_engineering/node_modules/lodash/fp/assignInAllWith.js deleted file mode 100644 index e766903..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assignInAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignInAllWith', require('../assignInWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assignInWith.js b/reverse_engineering/node_modules/lodash/fp/assignInWith.js deleted file mode 100644 index acb5923..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assignInWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignInWith', require('../assignInWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assignWith.js b/reverse_engineering/node_modules/lodash/fp/assignWith.js deleted file mode 100644 index eb92521..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assignWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('assignWith', require('../assignWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/assoc.js b/reverse_engineering/node_modules/lodash/fp/assoc.js deleted file mode 100644 index 7648820..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assoc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./set'); diff --git a/reverse_engineering/node_modules/lodash/fp/assocPath.js b/reverse_engineering/node_modules/lodash/fp/assocPath.js deleted file mode 100644 index 7648820..0000000 --- a/reverse_engineering/node_modules/lodash/fp/assocPath.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./set'); diff --git a/reverse_engineering/node_modules/lodash/fp/at.js b/reverse_engineering/node_modules/lodash/fp/at.js deleted file mode 100644 index cc39d25..0000000 --- a/reverse_engineering/node_modules/lodash/fp/at.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('at', require('../at')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/attempt.js b/reverse_engineering/node_modules/lodash/fp/attempt.js deleted file mode 100644 index 26ca42e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/attempt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('attempt', require('../attempt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/before.js b/reverse_engineering/node_modules/lodash/fp/before.js deleted file mode 100644 index 7a2de65..0000000 --- a/reverse_engineering/node_modules/lodash/fp/before.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('before', require('../before')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/bind.js b/reverse_engineering/node_modules/lodash/fp/bind.js deleted file mode 100644 index 5cbe4f3..0000000 --- a/reverse_engineering/node_modules/lodash/fp/bind.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('bind', require('../bind')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/bindAll.js b/reverse_engineering/node_modules/lodash/fp/bindAll.js deleted file mode 100644 index 6b4a4a0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/bindAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('bindAll', require('../bindAll')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/bindKey.js b/reverse_engineering/node_modules/lodash/fp/bindKey.js deleted file mode 100644 index 6a46c6b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/bindKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('bindKey', require('../bindKey')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/camelCase.js b/reverse_engineering/node_modules/lodash/fp/camelCase.js deleted file mode 100644 index 87b77b4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/camelCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/capitalize.js b/reverse_engineering/node_modules/lodash/fp/capitalize.js deleted file mode 100644 index cac74e1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/capitalize.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/castArray.js b/reverse_engineering/node_modules/lodash/fp/castArray.js deleted file mode 100644 index 8681c09..0000000 --- a/reverse_engineering/node_modules/lodash/fp/castArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('castArray', require('../castArray')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/ceil.js b/reverse_engineering/node_modules/lodash/fp/ceil.js deleted file mode 100644 index f416b72..0000000 --- a/reverse_engineering/node_modules/lodash/fp/ceil.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('ceil', require('../ceil')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/chain.js b/reverse_engineering/node_modules/lodash/fp/chain.js deleted file mode 100644 index 604fe39..0000000 --- a/reverse_engineering/node_modules/lodash/fp/chain.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('chain', require('../chain'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/chunk.js b/reverse_engineering/node_modules/lodash/fp/chunk.js deleted file mode 100644 index 871ab08..0000000 --- a/reverse_engineering/node_modules/lodash/fp/chunk.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('chunk', require('../chunk')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/clamp.js b/reverse_engineering/node_modules/lodash/fp/clamp.js deleted file mode 100644 index 3b06c01..0000000 --- a/reverse_engineering/node_modules/lodash/fp/clamp.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('clamp', require('../clamp')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/clone.js b/reverse_engineering/node_modules/lodash/fp/clone.js deleted file mode 100644 index cadb59c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/clone.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('clone', require('../clone'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/cloneDeep.js b/reverse_engineering/node_modules/lodash/fp/cloneDeep.js deleted file mode 100644 index a6107aa..0000000 --- a/reverse_engineering/node_modules/lodash/fp/cloneDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/cloneDeepWith.js b/reverse_engineering/node_modules/lodash/fp/cloneDeepWith.js deleted file mode 100644 index 6f01e44..0000000 --- a/reverse_engineering/node_modules/lodash/fp/cloneDeepWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cloneDeepWith', require('../cloneDeepWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/cloneWith.js b/reverse_engineering/node_modules/lodash/fp/cloneWith.js deleted file mode 100644 index aa88578..0000000 --- a/reverse_engineering/node_modules/lodash/fp/cloneWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cloneWith', require('../cloneWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/collection.js b/reverse_engineering/node_modules/lodash/fp/collection.js deleted file mode 100644 index fc8b328..0000000 --- a/reverse_engineering/node_modules/lodash/fp/collection.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../collection')); diff --git a/reverse_engineering/node_modules/lodash/fp/commit.js b/reverse_engineering/node_modules/lodash/fp/commit.js deleted file mode 100644 index 130a894..0000000 --- a/reverse_engineering/node_modules/lodash/fp/commit.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('commit', require('../commit'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/compact.js b/reverse_engineering/node_modules/lodash/fp/compact.js deleted file mode 100644 index ce8f7a1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/compact.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('compact', require('../compact'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/complement.js b/reverse_engineering/node_modules/lodash/fp/complement.js deleted file mode 100644 index 93eb462..0000000 --- a/reverse_engineering/node_modules/lodash/fp/complement.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./negate'); diff --git a/reverse_engineering/node_modules/lodash/fp/compose.js b/reverse_engineering/node_modules/lodash/fp/compose.js deleted file mode 100644 index 1954e94..0000000 --- a/reverse_engineering/node_modules/lodash/fp/compose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flowRight'); diff --git a/reverse_engineering/node_modules/lodash/fp/concat.js b/reverse_engineering/node_modules/lodash/fp/concat.js deleted file mode 100644 index e59346a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/concat.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('concat', require('../concat')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/cond.js b/reverse_engineering/node_modules/lodash/fp/cond.js deleted file mode 100644 index 6a0120e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/cond.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('cond', require('../cond'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/conforms.js b/reverse_engineering/node_modules/lodash/fp/conforms.js deleted file mode 100644 index 3247f64..0000000 --- a/reverse_engineering/node_modules/lodash/fp/conforms.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./conformsTo'); diff --git a/reverse_engineering/node_modules/lodash/fp/conformsTo.js b/reverse_engineering/node_modules/lodash/fp/conformsTo.js deleted file mode 100644 index aa7f41e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/conformsTo.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('conformsTo', require('../conformsTo')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/constant.js b/reverse_engineering/node_modules/lodash/fp/constant.js deleted file mode 100644 index 9e406fc..0000000 --- a/reverse_engineering/node_modules/lodash/fp/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('constant', require('../constant'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/contains.js b/reverse_engineering/node_modules/lodash/fp/contains.js deleted file mode 100644 index 594722a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/contains.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./includes'); diff --git a/reverse_engineering/node_modules/lodash/fp/convert.js b/reverse_engineering/node_modules/lodash/fp/convert.js deleted file mode 100644 index 4795dc4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/convert.js +++ /dev/null @@ -1,18 +0,0 @@ -var baseConvert = require('./_baseConvert'), - util = require('./_util'); - -/** - * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last - * version with conversion `options` applied. If `name` is an object its methods - * will be converted. - * - * @param {string} name The name of the function to wrap. - * @param {Function} [func] The function to wrap. - * @param {Object} [options] The options object. See `baseConvert` for more details. - * @returns {Function|Object} Returns the converted function or object. - */ -function convert(name, func, options) { - return baseConvert(util, name, func, options); -} - -module.exports = convert; diff --git a/reverse_engineering/node_modules/lodash/fp/countBy.js b/reverse_engineering/node_modules/lodash/fp/countBy.js deleted file mode 100644 index dfa4643..0000000 --- a/reverse_engineering/node_modules/lodash/fp/countBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('countBy', require('../countBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/create.js b/reverse_engineering/node_modules/lodash/fp/create.js deleted file mode 100644 index 752025f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/create.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('create', require('../create')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/curry.js b/reverse_engineering/node_modules/lodash/fp/curry.js deleted file mode 100644 index b0b4168..0000000 --- a/reverse_engineering/node_modules/lodash/fp/curry.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curry', require('../curry')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/curryN.js b/reverse_engineering/node_modules/lodash/fp/curryN.js deleted file mode 100644 index 2ae7d00..0000000 --- a/reverse_engineering/node_modules/lodash/fp/curryN.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curryN', require('../curry')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/curryRight.js b/reverse_engineering/node_modules/lodash/fp/curryRight.js deleted file mode 100644 index cb619eb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/curryRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curryRight', require('../curryRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/curryRightN.js b/reverse_engineering/node_modules/lodash/fp/curryRightN.js deleted file mode 100644 index 2495afc..0000000 --- a/reverse_engineering/node_modules/lodash/fp/curryRightN.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('curryRightN', require('../curryRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/date.js b/reverse_engineering/node_modules/lodash/fp/date.js deleted file mode 100644 index 82cb952..0000000 --- a/reverse_engineering/node_modules/lodash/fp/date.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../date')); diff --git a/reverse_engineering/node_modules/lodash/fp/debounce.js b/reverse_engineering/node_modules/lodash/fp/debounce.js deleted file mode 100644 index 2612229..0000000 --- a/reverse_engineering/node_modules/lodash/fp/debounce.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('debounce', require('../debounce')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/deburr.js b/reverse_engineering/node_modules/lodash/fp/deburr.js deleted file mode 100644 index 96463ab..0000000 --- a/reverse_engineering/node_modules/lodash/fp/deburr.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('deburr', require('../deburr'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/defaultTo.js b/reverse_engineering/node_modules/lodash/fp/defaultTo.js deleted file mode 100644 index d6b52a4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/defaultTo.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultTo', require('../defaultTo')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/defaults.js b/reverse_engineering/node_modules/lodash/fp/defaults.js deleted file mode 100644 index e1a8e6e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/defaults.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaults', require('../defaults')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/defaultsAll.js b/reverse_engineering/node_modules/lodash/fp/defaultsAll.js deleted file mode 100644 index 238fcc3..0000000 --- a/reverse_engineering/node_modules/lodash/fp/defaultsAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultsAll', require('../defaults')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/defaultsDeep.js b/reverse_engineering/node_modules/lodash/fp/defaultsDeep.js deleted file mode 100644 index 1f172ff..0000000 --- a/reverse_engineering/node_modules/lodash/fp/defaultsDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultsDeep', require('../defaultsDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/defaultsDeepAll.js b/reverse_engineering/node_modules/lodash/fp/defaultsDeepAll.js deleted file mode 100644 index 6835f2f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/defaultsDeepAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defaultsDeepAll', require('../defaultsDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/defer.js b/reverse_engineering/node_modules/lodash/fp/defer.js deleted file mode 100644 index ec7990f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/defer.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('defer', require('../defer'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/delay.js b/reverse_engineering/node_modules/lodash/fp/delay.js deleted file mode 100644 index 556dbd5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/delay.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('delay', require('../delay')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/difference.js b/reverse_engineering/node_modules/lodash/fp/difference.js deleted file mode 100644 index 2d03765..0000000 --- a/reverse_engineering/node_modules/lodash/fp/difference.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('difference', require('../difference')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/differenceBy.js b/reverse_engineering/node_modules/lodash/fp/differenceBy.js deleted file mode 100644 index 2f91491..0000000 --- a/reverse_engineering/node_modules/lodash/fp/differenceBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('differenceBy', require('../differenceBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/differenceWith.js b/reverse_engineering/node_modules/lodash/fp/differenceWith.js deleted file mode 100644 index bcf5ad2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/differenceWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('differenceWith', require('../differenceWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/dissoc.js b/reverse_engineering/node_modules/lodash/fp/dissoc.js deleted file mode 100644 index 7ec7be1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/dissoc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./unset'); diff --git a/reverse_engineering/node_modules/lodash/fp/dissocPath.js b/reverse_engineering/node_modules/lodash/fp/dissocPath.js deleted file mode 100644 index 7ec7be1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/dissocPath.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./unset'); diff --git a/reverse_engineering/node_modules/lodash/fp/divide.js b/reverse_engineering/node_modules/lodash/fp/divide.js deleted file mode 100644 index 82048c5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/divide.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('divide', require('../divide')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/drop.js b/reverse_engineering/node_modules/lodash/fp/drop.js deleted file mode 100644 index 2fa9b4f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/drop.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('drop', require('../drop')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/dropLast.js b/reverse_engineering/node_modules/lodash/fp/dropLast.js deleted file mode 100644 index 174e525..0000000 --- a/reverse_engineering/node_modules/lodash/fp/dropLast.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dropRight'); diff --git a/reverse_engineering/node_modules/lodash/fp/dropLastWhile.js b/reverse_engineering/node_modules/lodash/fp/dropLastWhile.js deleted file mode 100644 index be2a9d2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/dropLastWhile.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dropRightWhile'); diff --git a/reverse_engineering/node_modules/lodash/fp/dropRight.js b/reverse_engineering/node_modules/lodash/fp/dropRight.js deleted file mode 100644 index e98881f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/dropRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('dropRight', require('../dropRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/dropRightWhile.js b/reverse_engineering/node_modules/lodash/fp/dropRightWhile.js deleted file mode 100644 index cacaa70..0000000 --- a/reverse_engineering/node_modules/lodash/fp/dropRightWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('dropRightWhile', require('../dropRightWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/dropWhile.js b/reverse_engineering/node_modules/lodash/fp/dropWhile.js deleted file mode 100644 index 285f864..0000000 --- a/reverse_engineering/node_modules/lodash/fp/dropWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('dropWhile', require('../dropWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/each.js b/reverse_engineering/node_modules/lodash/fp/each.js deleted file mode 100644 index 8800f42..0000000 --- a/reverse_engineering/node_modules/lodash/fp/each.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEach'); diff --git a/reverse_engineering/node_modules/lodash/fp/eachRight.js b/reverse_engineering/node_modules/lodash/fp/eachRight.js deleted file mode 100644 index 3252b2a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/eachRight.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./forEachRight'); diff --git a/reverse_engineering/node_modules/lodash/fp/endsWith.js b/reverse_engineering/node_modules/lodash/fp/endsWith.js deleted file mode 100644 index 17dc2a4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/endsWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('endsWith', require('../endsWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/entries.js b/reverse_engineering/node_modules/lodash/fp/entries.js deleted file mode 100644 index 7a88df2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairs'); diff --git a/reverse_engineering/node_modules/lodash/fp/entriesIn.js b/reverse_engineering/node_modules/lodash/fp/entriesIn.js deleted file mode 100644 index f6c6331..0000000 --- a/reverse_engineering/node_modules/lodash/fp/entriesIn.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./toPairsIn'); diff --git a/reverse_engineering/node_modules/lodash/fp/eq.js b/reverse_engineering/node_modules/lodash/fp/eq.js deleted file mode 100644 index 9a3d21b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/eq.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('eq', require('../eq')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/equals.js b/reverse_engineering/node_modules/lodash/fp/equals.js deleted file mode 100644 index e6a5ce0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/equals.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./isEqual'); diff --git a/reverse_engineering/node_modules/lodash/fp/escape.js b/reverse_engineering/node_modules/lodash/fp/escape.js deleted file mode 100644 index 52c1fbb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/escape.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('escape', require('../escape'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/escapeRegExp.js b/reverse_engineering/node_modules/lodash/fp/escapeRegExp.js deleted file mode 100644 index 369b2ef..0000000 --- a/reverse_engineering/node_modules/lodash/fp/escapeRegExp.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/every.js b/reverse_engineering/node_modules/lodash/fp/every.js deleted file mode 100644 index 95c2776..0000000 --- a/reverse_engineering/node_modules/lodash/fp/every.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('every', require('../every')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/extend.js b/reverse_engineering/node_modules/lodash/fp/extend.js deleted file mode 100644 index e00166c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/extend.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignIn'); diff --git a/reverse_engineering/node_modules/lodash/fp/extendAll.js b/reverse_engineering/node_modules/lodash/fp/extendAll.js deleted file mode 100644 index cc55b64..0000000 --- a/reverse_engineering/node_modules/lodash/fp/extendAll.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInAll'); diff --git a/reverse_engineering/node_modules/lodash/fp/extendAllWith.js b/reverse_engineering/node_modules/lodash/fp/extendAllWith.js deleted file mode 100644 index 6679d20..0000000 --- a/reverse_engineering/node_modules/lodash/fp/extendAllWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInAllWith'); diff --git a/reverse_engineering/node_modules/lodash/fp/extendWith.js b/reverse_engineering/node_modules/lodash/fp/extendWith.js deleted file mode 100644 index dbdcb3b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/extendWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./assignInWith'); diff --git a/reverse_engineering/node_modules/lodash/fp/fill.js b/reverse_engineering/node_modules/lodash/fp/fill.js deleted file mode 100644 index b2d47e8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/fill.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('fill', require('../fill')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/filter.js b/reverse_engineering/node_modules/lodash/fp/filter.js deleted file mode 100644 index 796d501..0000000 --- a/reverse_engineering/node_modules/lodash/fp/filter.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('filter', require('../filter')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/find.js b/reverse_engineering/node_modules/lodash/fp/find.js deleted file mode 100644 index f805d33..0000000 --- a/reverse_engineering/node_modules/lodash/fp/find.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('find', require('../find')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findFrom.js b/reverse_engineering/node_modules/lodash/fp/findFrom.js deleted file mode 100644 index da8275e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findFrom', require('../find')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findIndex.js b/reverse_engineering/node_modules/lodash/fp/findIndex.js deleted file mode 100644 index 8c15fd1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findIndex', require('../findIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findIndexFrom.js b/reverse_engineering/node_modules/lodash/fp/findIndexFrom.js deleted file mode 100644 index 32e98cb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findIndexFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findIndexFrom', require('../findIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findKey.js b/reverse_engineering/node_modules/lodash/fp/findKey.js deleted file mode 100644 index 475bcfa..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findKey', require('../findKey')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findLast.js b/reverse_engineering/node_modules/lodash/fp/findLast.js deleted file mode 100644 index 093fe94..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findLast.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLast', require('../findLast')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findLastFrom.js b/reverse_engineering/node_modules/lodash/fp/findLastFrom.js deleted file mode 100644 index 76c38fb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findLastFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastFrom', require('../findLast')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findLastIndex.js b/reverse_engineering/node_modules/lodash/fp/findLastIndex.js deleted file mode 100644 index 36986df..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findLastIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastIndex', require('../findLastIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findLastIndexFrom.js b/reverse_engineering/node_modules/lodash/fp/findLastIndexFrom.js deleted file mode 100644 index 34c8176..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findLastIndexFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastIndexFrom', require('../findLastIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/findLastKey.js b/reverse_engineering/node_modules/lodash/fp/findLastKey.js deleted file mode 100644 index 5f81b60..0000000 --- a/reverse_engineering/node_modules/lodash/fp/findLastKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('findLastKey', require('../findLastKey')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/first.js b/reverse_engineering/node_modules/lodash/fp/first.js deleted file mode 100644 index 53f4ad1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/first.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./head'); diff --git a/reverse_engineering/node_modules/lodash/fp/flatMap.js b/reverse_engineering/node_modules/lodash/fp/flatMap.js deleted file mode 100644 index d01dc4d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flatMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatMap', require('../flatMap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flatMapDeep.js b/reverse_engineering/node_modules/lodash/fp/flatMapDeep.js deleted file mode 100644 index 569c42e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flatMapDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatMapDeep', require('../flatMapDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flatMapDepth.js b/reverse_engineering/node_modules/lodash/fp/flatMapDepth.js deleted file mode 100644 index 6eb68fd..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flatMapDepth.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatMapDepth', require('../flatMapDepth')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flatten.js b/reverse_engineering/node_modules/lodash/fp/flatten.js deleted file mode 100644 index 30425d8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flatten.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flatten', require('../flatten'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flattenDeep.js b/reverse_engineering/node_modules/lodash/fp/flattenDeep.js deleted file mode 100644 index aed5db2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flattenDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flattenDepth.js b/reverse_engineering/node_modules/lodash/fp/flattenDepth.js deleted file mode 100644 index ad65e37..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flattenDepth.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flattenDepth', require('../flattenDepth')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flip.js b/reverse_engineering/node_modules/lodash/fp/flip.js deleted file mode 100644 index 0547e7b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flip.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flip', require('../flip'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/floor.js b/reverse_engineering/node_modules/lodash/fp/floor.js deleted file mode 100644 index a6cf335..0000000 --- a/reverse_engineering/node_modules/lodash/fp/floor.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('floor', require('../floor')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flow.js b/reverse_engineering/node_modules/lodash/fp/flow.js deleted file mode 100644 index cd83677..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flow.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flow', require('../flow')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/flowRight.js b/reverse_engineering/node_modules/lodash/fp/flowRight.js deleted file mode 100644 index 972a5b9..0000000 --- a/reverse_engineering/node_modules/lodash/fp/flowRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('flowRight', require('../flowRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/forEach.js b/reverse_engineering/node_modules/lodash/fp/forEach.js deleted file mode 100644 index 2f49452..0000000 --- a/reverse_engineering/node_modules/lodash/fp/forEach.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forEach', require('../forEach')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/forEachRight.js b/reverse_engineering/node_modules/lodash/fp/forEachRight.js deleted file mode 100644 index 3ff9733..0000000 --- a/reverse_engineering/node_modules/lodash/fp/forEachRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forEachRight', require('../forEachRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/forIn.js b/reverse_engineering/node_modules/lodash/fp/forIn.js deleted file mode 100644 index 9341749..0000000 --- a/reverse_engineering/node_modules/lodash/fp/forIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forIn', require('../forIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/forInRight.js b/reverse_engineering/node_modules/lodash/fp/forInRight.js deleted file mode 100644 index cecf8bb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/forInRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forInRight', require('../forInRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/forOwn.js b/reverse_engineering/node_modules/lodash/fp/forOwn.js deleted file mode 100644 index 246449e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/forOwn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forOwn', require('../forOwn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/forOwnRight.js b/reverse_engineering/node_modules/lodash/fp/forOwnRight.js deleted file mode 100644 index c5e826e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/forOwnRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('forOwnRight', require('../forOwnRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/fromPairs.js b/reverse_engineering/node_modules/lodash/fp/fromPairs.js deleted file mode 100644 index f8cc596..0000000 --- a/reverse_engineering/node_modules/lodash/fp/fromPairs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('fromPairs', require('../fromPairs')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/function.js b/reverse_engineering/node_modules/lodash/fp/function.js deleted file mode 100644 index dfe69b1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/function.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../function')); diff --git a/reverse_engineering/node_modules/lodash/fp/functions.js b/reverse_engineering/node_modules/lodash/fp/functions.js deleted file mode 100644 index 09d1bb1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/functions.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('functions', require('../functions'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/functionsIn.js b/reverse_engineering/node_modules/lodash/fp/functionsIn.js deleted file mode 100644 index 2cfeb83..0000000 --- a/reverse_engineering/node_modules/lodash/fp/functionsIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/get.js b/reverse_engineering/node_modules/lodash/fp/get.js deleted file mode 100644 index 6d3a328..0000000 --- a/reverse_engineering/node_modules/lodash/fp/get.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('get', require('../get')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/getOr.js b/reverse_engineering/node_modules/lodash/fp/getOr.js deleted file mode 100644 index 7dbf771..0000000 --- a/reverse_engineering/node_modules/lodash/fp/getOr.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('getOr', require('../get')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/groupBy.js b/reverse_engineering/node_modules/lodash/fp/groupBy.js deleted file mode 100644 index fc0bc78..0000000 --- a/reverse_engineering/node_modules/lodash/fp/groupBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('groupBy', require('../groupBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/gt.js b/reverse_engineering/node_modules/lodash/fp/gt.js deleted file mode 100644 index 9e57c80..0000000 --- a/reverse_engineering/node_modules/lodash/fp/gt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('gt', require('../gt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/gte.js b/reverse_engineering/node_modules/lodash/fp/gte.js deleted file mode 100644 index 4584786..0000000 --- a/reverse_engineering/node_modules/lodash/fp/gte.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('gte', require('../gte')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/has.js b/reverse_engineering/node_modules/lodash/fp/has.js deleted file mode 100644 index b901298..0000000 --- a/reverse_engineering/node_modules/lodash/fp/has.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('has', require('../has')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/hasIn.js b/reverse_engineering/node_modules/lodash/fp/hasIn.js deleted file mode 100644 index b3c3d1a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/hasIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('hasIn', require('../hasIn')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/head.js b/reverse_engineering/node_modules/lodash/fp/head.js deleted file mode 100644 index 2694f0a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/head.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('head', require('../head'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/identical.js b/reverse_engineering/node_modules/lodash/fp/identical.js deleted file mode 100644 index 85563f4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/identical.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./eq'); diff --git a/reverse_engineering/node_modules/lodash/fp/identity.js b/reverse_engineering/node_modules/lodash/fp/identity.js deleted file mode 100644 index 096415a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/identity.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('identity', require('../identity'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/inRange.js b/reverse_engineering/node_modules/lodash/fp/inRange.js deleted file mode 100644 index 202d940..0000000 --- a/reverse_engineering/node_modules/lodash/fp/inRange.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('inRange', require('../inRange')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/includes.js b/reverse_engineering/node_modules/lodash/fp/includes.js deleted file mode 100644 index 1146780..0000000 --- a/reverse_engineering/node_modules/lodash/fp/includes.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('includes', require('../includes')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/includesFrom.js b/reverse_engineering/node_modules/lodash/fp/includesFrom.js deleted file mode 100644 index 683afdb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/includesFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('includesFrom', require('../includes')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/indexBy.js b/reverse_engineering/node_modules/lodash/fp/indexBy.js deleted file mode 100644 index 7e64bc0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/indexBy.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./keyBy'); diff --git a/reverse_engineering/node_modules/lodash/fp/indexOf.js b/reverse_engineering/node_modules/lodash/fp/indexOf.js deleted file mode 100644 index 524658e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/indexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('indexOf', require('../indexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/indexOfFrom.js b/reverse_engineering/node_modules/lodash/fp/indexOfFrom.js deleted file mode 100644 index d99c822..0000000 --- a/reverse_engineering/node_modules/lodash/fp/indexOfFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('indexOfFrom', require('../indexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/init.js b/reverse_engineering/node_modules/lodash/fp/init.js deleted file mode 100644 index 2f88d8b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/init.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./initial'); diff --git a/reverse_engineering/node_modules/lodash/fp/initial.js b/reverse_engineering/node_modules/lodash/fp/initial.js deleted file mode 100644 index b732ba0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/initial.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('initial', require('../initial'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/intersection.js b/reverse_engineering/node_modules/lodash/fp/intersection.js deleted file mode 100644 index 52936d5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/intersection.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('intersection', require('../intersection')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/intersectionBy.js b/reverse_engineering/node_modules/lodash/fp/intersectionBy.js deleted file mode 100644 index 72629f2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/intersectionBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('intersectionBy', require('../intersectionBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/intersectionWith.js b/reverse_engineering/node_modules/lodash/fp/intersectionWith.js deleted file mode 100644 index e064f40..0000000 --- a/reverse_engineering/node_modules/lodash/fp/intersectionWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('intersectionWith', require('../intersectionWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/invert.js b/reverse_engineering/node_modules/lodash/fp/invert.js deleted file mode 100644 index 2d5d1f0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/invert.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invert', require('../invert')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/invertBy.js b/reverse_engineering/node_modules/lodash/fp/invertBy.js deleted file mode 100644 index 63ca97e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/invertBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invertBy', require('../invertBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/invertObj.js b/reverse_engineering/node_modules/lodash/fp/invertObj.js deleted file mode 100644 index f1d842e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/invertObj.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./invert'); diff --git a/reverse_engineering/node_modules/lodash/fp/invoke.js b/reverse_engineering/node_modules/lodash/fp/invoke.js deleted file mode 100644 index fcf17f0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/invoke.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invoke', require('../invoke')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/invokeArgs.js b/reverse_engineering/node_modules/lodash/fp/invokeArgs.js deleted file mode 100644 index d3f2953..0000000 --- a/reverse_engineering/node_modules/lodash/fp/invokeArgs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invokeArgs', require('../invoke')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/invokeArgsMap.js b/reverse_engineering/node_modules/lodash/fp/invokeArgsMap.js deleted file mode 100644 index eaa9f84..0000000 --- a/reverse_engineering/node_modules/lodash/fp/invokeArgsMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invokeArgsMap', require('../invokeMap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/invokeMap.js b/reverse_engineering/node_modules/lodash/fp/invokeMap.js deleted file mode 100644 index 6515fd7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/invokeMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('invokeMap', require('../invokeMap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isArguments.js b/reverse_engineering/node_modules/lodash/fp/isArguments.js deleted file mode 100644 index 1d93c9e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isArguments.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isArray.js b/reverse_engineering/node_modules/lodash/fp/isArray.js deleted file mode 100644 index ba7ade8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArray', require('../isArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isArrayBuffer.js b/reverse_engineering/node_modules/lodash/fp/isArrayBuffer.js deleted file mode 100644 index 5088513..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isArrayBuffer.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isArrayLike.js b/reverse_engineering/node_modules/lodash/fp/isArrayLike.js deleted file mode 100644 index 8f1856b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isArrayLike.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isArrayLikeObject.js b/reverse_engineering/node_modules/lodash/fp/isArrayLikeObject.js deleted file mode 100644 index 2108498..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isArrayLikeObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isBoolean.js b/reverse_engineering/node_modules/lodash/fp/isBoolean.js deleted file mode 100644 index 9339f75..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isBoolean.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isBuffer.js b/reverse_engineering/node_modules/lodash/fp/isBuffer.js deleted file mode 100644 index e60b123..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isBuffer.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isDate.js b/reverse_engineering/node_modules/lodash/fp/isDate.js deleted file mode 100644 index dc41d08..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isDate.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isDate', require('../isDate'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isElement.js b/reverse_engineering/node_modules/lodash/fp/isElement.js deleted file mode 100644 index 18ee039..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isElement.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isElement', require('../isElement'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isEmpty.js b/reverse_engineering/node_modules/lodash/fp/isEmpty.js deleted file mode 100644 index 0f4ae84..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isEmpty.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isEqual.js b/reverse_engineering/node_modules/lodash/fp/isEqual.js deleted file mode 100644 index 4138386..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isEqual.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isEqual', require('../isEqual')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isEqualWith.js b/reverse_engineering/node_modules/lodash/fp/isEqualWith.js deleted file mode 100644 index 029ff5c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isEqualWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isEqualWith', require('../isEqualWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isError.js b/reverse_engineering/node_modules/lodash/fp/isError.js deleted file mode 100644 index 3dfd81c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isError.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isError', require('../isError'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isFinite.js b/reverse_engineering/node_modules/lodash/fp/isFinite.js deleted file mode 100644 index 0b647b8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isFinite.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isFunction.js b/reverse_engineering/node_modules/lodash/fp/isFunction.js deleted file mode 100644 index ff8e5c4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isFunction.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isInteger.js b/reverse_engineering/node_modules/lodash/fp/isInteger.js deleted file mode 100644 index 67af4ff..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isLength.js b/reverse_engineering/node_modules/lodash/fp/isLength.js deleted file mode 100644 index fc101c5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isLength.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isLength', require('../isLength'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isMap.js b/reverse_engineering/node_modules/lodash/fp/isMap.js deleted file mode 100644 index a209aa6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isMap', require('../isMap'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isMatch.js b/reverse_engineering/node_modules/lodash/fp/isMatch.js deleted file mode 100644 index 6264ca1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isMatch.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isMatch', require('../isMatch')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isMatchWith.js b/reverse_engineering/node_modules/lodash/fp/isMatchWith.js deleted file mode 100644 index d95f319..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isMatchWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isMatchWith', require('../isMatchWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isNaN.js b/reverse_engineering/node_modules/lodash/fp/isNaN.js deleted file mode 100644 index 66a978f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isNaN.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isNative.js b/reverse_engineering/node_modules/lodash/fp/isNative.js deleted file mode 100644 index 3d775ba..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isNative.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNative', require('../isNative'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isNil.js b/reverse_engineering/node_modules/lodash/fp/isNil.js deleted file mode 100644 index 5952c02..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isNil.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNil', require('../isNil'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isNull.js b/reverse_engineering/node_modules/lodash/fp/isNull.js deleted file mode 100644 index f201a35..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isNull.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNull', require('../isNull'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isNumber.js b/reverse_engineering/node_modules/lodash/fp/isNumber.js deleted file mode 100644 index a2b5fa0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isNumber.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isObject.js b/reverse_engineering/node_modules/lodash/fp/isObject.js deleted file mode 100644 index 231ace0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isObject', require('../isObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isObjectLike.js b/reverse_engineering/node_modules/lodash/fp/isObjectLike.js deleted file mode 100644 index f16082e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isObjectLike.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isPlainObject.js b/reverse_engineering/node_modules/lodash/fp/isPlainObject.js deleted file mode 100644 index b5bea90..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isPlainObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isRegExp.js b/reverse_engineering/node_modules/lodash/fp/isRegExp.js deleted file mode 100644 index 12a1a3d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isRegExp.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isSafeInteger.js b/reverse_engineering/node_modules/lodash/fp/isSafeInteger.js deleted file mode 100644 index 7230f55..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isSafeInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isSet.js b/reverse_engineering/node_modules/lodash/fp/isSet.js deleted file mode 100644 index 35c01f6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isSet.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isSet', require('../isSet'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isString.js b/reverse_engineering/node_modules/lodash/fp/isString.js deleted file mode 100644 index 1fd0679..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isString.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isString', require('../isString'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isSymbol.js b/reverse_engineering/node_modules/lodash/fp/isSymbol.js deleted file mode 100644 index 3867695..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isSymbol.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isTypedArray.js b/reverse_engineering/node_modules/lodash/fp/isTypedArray.js deleted file mode 100644 index 8567953..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isTypedArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isUndefined.js b/reverse_engineering/node_modules/lodash/fp/isUndefined.js deleted file mode 100644 index ddbca31..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isUndefined.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isWeakMap.js b/reverse_engineering/node_modules/lodash/fp/isWeakMap.js deleted file mode 100644 index ef60c61..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isWeakMap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/isWeakSet.js b/reverse_engineering/node_modules/lodash/fp/isWeakSet.js deleted file mode 100644 index c99bfaa..0000000 --- a/reverse_engineering/node_modules/lodash/fp/isWeakSet.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/iteratee.js b/reverse_engineering/node_modules/lodash/fp/iteratee.js deleted file mode 100644 index 9f0f717..0000000 --- a/reverse_engineering/node_modules/lodash/fp/iteratee.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('iteratee', require('../iteratee')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/join.js b/reverse_engineering/node_modules/lodash/fp/join.js deleted file mode 100644 index a220e00..0000000 --- a/reverse_engineering/node_modules/lodash/fp/join.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('join', require('../join')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/juxt.js b/reverse_engineering/node_modules/lodash/fp/juxt.js deleted file mode 100644 index f71e04e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/juxt.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./over'); diff --git a/reverse_engineering/node_modules/lodash/fp/kebabCase.js b/reverse_engineering/node_modules/lodash/fp/kebabCase.js deleted file mode 100644 index 60737f1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/kebabCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/keyBy.js b/reverse_engineering/node_modules/lodash/fp/keyBy.js deleted file mode 100644 index 9a6a85d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/keyBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('keyBy', require('../keyBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/keys.js b/reverse_engineering/node_modules/lodash/fp/keys.js deleted file mode 100644 index e12bb07..0000000 --- a/reverse_engineering/node_modules/lodash/fp/keys.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('keys', require('../keys'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/keysIn.js b/reverse_engineering/node_modules/lodash/fp/keysIn.js deleted file mode 100644 index f3eb36a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/keysIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/lang.js b/reverse_engineering/node_modules/lodash/fp/lang.js deleted file mode 100644 index 08cc9c1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/lang.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../lang')); diff --git a/reverse_engineering/node_modules/lodash/fp/last.js b/reverse_engineering/node_modules/lodash/fp/last.js deleted file mode 100644 index 0f71699..0000000 --- a/reverse_engineering/node_modules/lodash/fp/last.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('last', require('../last'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/lastIndexOf.js b/reverse_engineering/node_modules/lodash/fp/lastIndexOf.js deleted file mode 100644 index ddf39c3..0000000 --- a/reverse_engineering/node_modules/lodash/fp/lastIndexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lastIndexOf', require('../lastIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/lastIndexOfFrom.js b/reverse_engineering/node_modules/lodash/fp/lastIndexOfFrom.js deleted file mode 100644 index 1ff6a0b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/lastIndexOfFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lastIndexOfFrom', require('../lastIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/lowerCase.js b/reverse_engineering/node_modules/lodash/fp/lowerCase.js deleted file mode 100644 index ea64bc1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/lowerCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/lowerFirst.js b/reverse_engineering/node_modules/lodash/fp/lowerFirst.js deleted file mode 100644 index 539720a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/lowerFirst.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/lt.js b/reverse_engineering/node_modules/lodash/fp/lt.js deleted file mode 100644 index a31d21e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/lt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lt', require('../lt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/lte.js b/reverse_engineering/node_modules/lodash/fp/lte.js deleted file mode 100644 index d795d10..0000000 --- a/reverse_engineering/node_modules/lodash/fp/lte.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('lte', require('../lte')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/map.js b/reverse_engineering/node_modules/lodash/fp/map.js deleted file mode 100644 index cf98794..0000000 --- a/reverse_engineering/node_modules/lodash/fp/map.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('map', require('../map')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/mapKeys.js b/reverse_engineering/node_modules/lodash/fp/mapKeys.js deleted file mode 100644 index 1684587..0000000 --- a/reverse_engineering/node_modules/lodash/fp/mapKeys.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mapKeys', require('../mapKeys')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/mapValues.js b/reverse_engineering/node_modules/lodash/fp/mapValues.js deleted file mode 100644 index 4004972..0000000 --- a/reverse_engineering/node_modules/lodash/fp/mapValues.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mapValues', require('../mapValues')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/matches.js b/reverse_engineering/node_modules/lodash/fp/matches.js deleted file mode 100644 index 29d1e1e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/matches.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./isMatch'); diff --git a/reverse_engineering/node_modules/lodash/fp/matchesProperty.js b/reverse_engineering/node_modules/lodash/fp/matchesProperty.js deleted file mode 100644 index 4575bd2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/matchesProperty.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('matchesProperty', require('../matchesProperty')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/math.js b/reverse_engineering/node_modules/lodash/fp/math.js deleted file mode 100644 index e8f50f7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/math.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../math')); diff --git a/reverse_engineering/node_modules/lodash/fp/max.js b/reverse_engineering/node_modules/lodash/fp/max.js deleted file mode 100644 index a66acac..0000000 --- a/reverse_engineering/node_modules/lodash/fp/max.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('max', require('../max'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/maxBy.js b/reverse_engineering/node_modules/lodash/fp/maxBy.js deleted file mode 100644 index d083fd6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/maxBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('maxBy', require('../maxBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/mean.js b/reverse_engineering/node_modules/lodash/fp/mean.js deleted file mode 100644 index 3117246..0000000 --- a/reverse_engineering/node_modules/lodash/fp/mean.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mean', require('../mean'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/meanBy.js b/reverse_engineering/node_modules/lodash/fp/meanBy.js deleted file mode 100644 index 556f25e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/meanBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('meanBy', require('../meanBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/memoize.js b/reverse_engineering/node_modules/lodash/fp/memoize.js deleted file mode 100644 index 638eec6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/memoize.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('memoize', require('../memoize')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/merge.js b/reverse_engineering/node_modules/lodash/fp/merge.js deleted file mode 100644 index ac66add..0000000 --- a/reverse_engineering/node_modules/lodash/fp/merge.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('merge', require('../merge')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/mergeAll.js b/reverse_engineering/node_modules/lodash/fp/mergeAll.js deleted file mode 100644 index a3674d6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/mergeAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mergeAll', require('../merge')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/mergeAllWith.js b/reverse_engineering/node_modules/lodash/fp/mergeAllWith.js deleted file mode 100644 index 4bd4206..0000000 --- a/reverse_engineering/node_modules/lodash/fp/mergeAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mergeAllWith', require('../mergeWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/mergeWith.js b/reverse_engineering/node_modules/lodash/fp/mergeWith.js deleted file mode 100644 index 00d44d5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/mergeWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mergeWith', require('../mergeWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/method.js b/reverse_engineering/node_modules/lodash/fp/method.js deleted file mode 100644 index f4060c6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/method.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('method', require('../method')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/methodOf.js b/reverse_engineering/node_modules/lodash/fp/methodOf.js deleted file mode 100644 index 6139905..0000000 --- a/reverse_engineering/node_modules/lodash/fp/methodOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('methodOf', require('../methodOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/min.js b/reverse_engineering/node_modules/lodash/fp/min.js deleted file mode 100644 index d12c6b4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/min.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('min', require('../min'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/minBy.js b/reverse_engineering/node_modules/lodash/fp/minBy.js deleted file mode 100644 index fdb9e24..0000000 --- a/reverse_engineering/node_modules/lodash/fp/minBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('minBy', require('../minBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/mixin.js b/reverse_engineering/node_modules/lodash/fp/mixin.js deleted file mode 100644 index 332e6fb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/mixin.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('mixin', require('../mixin')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/multiply.js b/reverse_engineering/node_modules/lodash/fp/multiply.js deleted file mode 100644 index 4dcf0b0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/multiply.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('multiply', require('../multiply')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/nAry.js b/reverse_engineering/node_modules/lodash/fp/nAry.js deleted file mode 100644 index f262a76..0000000 --- a/reverse_engineering/node_modules/lodash/fp/nAry.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./ary'); diff --git a/reverse_engineering/node_modules/lodash/fp/negate.js b/reverse_engineering/node_modules/lodash/fp/negate.js deleted file mode 100644 index 8b6dc7c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/negate.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('negate', require('../negate'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/next.js b/reverse_engineering/node_modules/lodash/fp/next.js deleted file mode 100644 index 140155e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/next.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('next', require('../next'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/noop.js b/reverse_engineering/node_modules/lodash/fp/noop.js deleted file mode 100644 index b9e32cc..0000000 --- a/reverse_engineering/node_modules/lodash/fp/noop.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('noop', require('../noop'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/now.js b/reverse_engineering/node_modules/lodash/fp/now.js deleted file mode 100644 index 6de2068..0000000 --- a/reverse_engineering/node_modules/lodash/fp/now.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('now', require('../now'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/nth.js b/reverse_engineering/node_modules/lodash/fp/nth.js deleted file mode 100644 index da4fda7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/nth.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('nth', require('../nth')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/nthArg.js b/reverse_engineering/node_modules/lodash/fp/nthArg.js deleted file mode 100644 index fce3165..0000000 --- a/reverse_engineering/node_modules/lodash/fp/nthArg.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('nthArg', require('../nthArg')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/number.js b/reverse_engineering/node_modules/lodash/fp/number.js deleted file mode 100644 index 5c10b88..0000000 --- a/reverse_engineering/node_modules/lodash/fp/number.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../number')); diff --git a/reverse_engineering/node_modules/lodash/fp/object.js b/reverse_engineering/node_modules/lodash/fp/object.js deleted file mode 100644 index ae39a13..0000000 --- a/reverse_engineering/node_modules/lodash/fp/object.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../object')); diff --git a/reverse_engineering/node_modules/lodash/fp/omit.js b/reverse_engineering/node_modules/lodash/fp/omit.js deleted file mode 100644 index fd68529..0000000 --- a/reverse_engineering/node_modules/lodash/fp/omit.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('omit', require('../omit')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/omitAll.js b/reverse_engineering/node_modules/lodash/fp/omitAll.js deleted file mode 100644 index 144cf4b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/omitAll.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./omit'); diff --git a/reverse_engineering/node_modules/lodash/fp/omitBy.js b/reverse_engineering/node_modules/lodash/fp/omitBy.js deleted file mode 100644 index 90df738..0000000 --- a/reverse_engineering/node_modules/lodash/fp/omitBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('omitBy', require('../omitBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/once.js b/reverse_engineering/node_modules/lodash/fp/once.js deleted file mode 100644 index f8f0a5c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/once.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('once', require('../once'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/orderBy.js b/reverse_engineering/node_modules/lodash/fp/orderBy.js deleted file mode 100644 index 848e210..0000000 --- a/reverse_engineering/node_modules/lodash/fp/orderBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('orderBy', require('../orderBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/over.js b/reverse_engineering/node_modules/lodash/fp/over.js deleted file mode 100644 index 01eba7b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/over.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('over', require('../over')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/overArgs.js b/reverse_engineering/node_modules/lodash/fp/overArgs.js deleted file mode 100644 index 738556f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/overArgs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('overArgs', require('../overArgs')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/overEvery.js b/reverse_engineering/node_modules/lodash/fp/overEvery.js deleted file mode 100644 index 9f5a032..0000000 --- a/reverse_engineering/node_modules/lodash/fp/overEvery.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('overEvery', require('../overEvery')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/overSome.js b/reverse_engineering/node_modules/lodash/fp/overSome.js deleted file mode 100644 index 15939d5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/overSome.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('overSome', require('../overSome')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pad.js b/reverse_engineering/node_modules/lodash/fp/pad.js deleted file mode 100644 index f1dea4a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pad.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pad', require('../pad')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/padChars.js b/reverse_engineering/node_modules/lodash/fp/padChars.js deleted file mode 100644 index d6e0804..0000000 --- a/reverse_engineering/node_modules/lodash/fp/padChars.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padChars', require('../pad')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/padCharsEnd.js b/reverse_engineering/node_modules/lodash/fp/padCharsEnd.js deleted file mode 100644 index d4ab79a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/padCharsEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padCharsEnd', require('../padEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/padCharsStart.js b/reverse_engineering/node_modules/lodash/fp/padCharsStart.js deleted file mode 100644 index a08a300..0000000 --- a/reverse_engineering/node_modules/lodash/fp/padCharsStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padCharsStart', require('../padStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/padEnd.js b/reverse_engineering/node_modules/lodash/fp/padEnd.js deleted file mode 100644 index a8522ec..0000000 --- a/reverse_engineering/node_modules/lodash/fp/padEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padEnd', require('../padEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/padStart.js b/reverse_engineering/node_modules/lodash/fp/padStart.js deleted file mode 100644 index f4ca79d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/padStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('padStart', require('../padStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/parseInt.js b/reverse_engineering/node_modules/lodash/fp/parseInt.js deleted file mode 100644 index 27314cc..0000000 --- a/reverse_engineering/node_modules/lodash/fp/parseInt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('parseInt', require('../parseInt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/partial.js b/reverse_engineering/node_modules/lodash/fp/partial.js deleted file mode 100644 index 5d46015..0000000 --- a/reverse_engineering/node_modules/lodash/fp/partial.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('partial', require('../partial')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/partialRight.js b/reverse_engineering/node_modules/lodash/fp/partialRight.js deleted file mode 100644 index 7f05fed..0000000 --- a/reverse_engineering/node_modules/lodash/fp/partialRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('partialRight', require('../partialRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/partition.js b/reverse_engineering/node_modules/lodash/fp/partition.js deleted file mode 100644 index 2ebcacc..0000000 --- a/reverse_engineering/node_modules/lodash/fp/partition.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('partition', require('../partition')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/path.js b/reverse_engineering/node_modules/lodash/fp/path.js deleted file mode 100644 index b29cfb2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/path.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./get'); diff --git a/reverse_engineering/node_modules/lodash/fp/pathEq.js b/reverse_engineering/node_modules/lodash/fp/pathEq.js deleted file mode 100644 index 36c027a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pathEq.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./matchesProperty'); diff --git a/reverse_engineering/node_modules/lodash/fp/pathOr.js b/reverse_engineering/node_modules/lodash/fp/pathOr.js deleted file mode 100644 index 4ab5820..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pathOr.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./getOr'); diff --git a/reverse_engineering/node_modules/lodash/fp/paths.js b/reverse_engineering/node_modules/lodash/fp/paths.js deleted file mode 100644 index 1eb7950..0000000 --- a/reverse_engineering/node_modules/lodash/fp/paths.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./at'); diff --git a/reverse_engineering/node_modules/lodash/fp/pick.js b/reverse_engineering/node_modules/lodash/fp/pick.js deleted file mode 100644 index 197393d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pick.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pick', require('../pick')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pickAll.js b/reverse_engineering/node_modules/lodash/fp/pickAll.js deleted file mode 100644 index a8ecd46..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pickAll.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./pick'); diff --git a/reverse_engineering/node_modules/lodash/fp/pickBy.js b/reverse_engineering/node_modules/lodash/fp/pickBy.js deleted file mode 100644 index d832d16..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pickBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pickBy', require('../pickBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pipe.js b/reverse_engineering/node_modules/lodash/fp/pipe.js deleted file mode 100644 index b2e1e2c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pipe.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flow'); diff --git a/reverse_engineering/node_modules/lodash/fp/placeholder.js b/reverse_engineering/node_modules/lodash/fp/placeholder.js deleted file mode 100644 index 1ce1739..0000000 --- a/reverse_engineering/node_modules/lodash/fp/placeholder.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * The default argument placeholder value for methods. - * - * @type {Object} - */ -module.exports = {}; diff --git a/reverse_engineering/node_modules/lodash/fp/plant.js b/reverse_engineering/node_modules/lodash/fp/plant.js deleted file mode 100644 index eca8f32..0000000 --- a/reverse_engineering/node_modules/lodash/fp/plant.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('plant', require('../plant'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pluck.js b/reverse_engineering/node_modules/lodash/fp/pluck.js deleted file mode 100644 index 0d1e1ab..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pluck.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./map'); diff --git a/reverse_engineering/node_modules/lodash/fp/prop.js b/reverse_engineering/node_modules/lodash/fp/prop.js deleted file mode 100644 index b29cfb2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/prop.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./get'); diff --git a/reverse_engineering/node_modules/lodash/fp/propEq.js b/reverse_engineering/node_modules/lodash/fp/propEq.js deleted file mode 100644 index 36c027a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/propEq.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./matchesProperty'); diff --git a/reverse_engineering/node_modules/lodash/fp/propOr.js b/reverse_engineering/node_modules/lodash/fp/propOr.js deleted file mode 100644 index 4ab5820..0000000 --- a/reverse_engineering/node_modules/lodash/fp/propOr.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./getOr'); diff --git a/reverse_engineering/node_modules/lodash/fp/property.js b/reverse_engineering/node_modules/lodash/fp/property.js deleted file mode 100644 index b29cfb2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./get'); diff --git a/reverse_engineering/node_modules/lodash/fp/propertyOf.js b/reverse_engineering/node_modules/lodash/fp/propertyOf.js deleted file mode 100644 index f6273ee..0000000 --- a/reverse_engineering/node_modules/lodash/fp/propertyOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('propertyOf', require('../get')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/props.js b/reverse_engineering/node_modules/lodash/fp/props.js deleted file mode 100644 index 1eb7950..0000000 --- a/reverse_engineering/node_modules/lodash/fp/props.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./at'); diff --git a/reverse_engineering/node_modules/lodash/fp/pull.js b/reverse_engineering/node_modules/lodash/fp/pull.js deleted file mode 100644 index 8d7084f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pull.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pull', require('../pull')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pullAll.js b/reverse_engineering/node_modules/lodash/fp/pullAll.js deleted file mode 100644 index 98d5c9a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pullAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAll', require('../pullAll')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pullAllBy.js b/reverse_engineering/node_modules/lodash/fp/pullAllBy.js deleted file mode 100644 index 876bc3b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pullAllBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAllBy', require('../pullAllBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pullAllWith.js b/reverse_engineering/node_modules/lodash/fp/pullAllWith.js deleted file mode 100644 index f71ba4d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pullAllWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAllWith', require('../pullAllWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/pullAt.js b/reverse_engineering/node_modules/lodash/fp/pullAt.js deleted file mode 100644 index e8b3bb6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/pullAt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('pullAt', require('../pullAt')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/random.js b/reverse_engineering/node_modules/lodash/fp/random.js deleted file mode 100644 index 99d852e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/random.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('random', require('../random')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/range.js b/reverse_engineering/node_modules/lodash/fp/range.js deleted file mode 100644 index a6bb591..0000000 --- a/reverse_engineering/node_modules/lodash/fp/range.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('range', require('../range')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/rangeRight.js b/reverse_engineering/node_modules/lodash/fp/rangeRight.js deleted file mode 100644 index fdb712f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/rangeRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rangeRight', require('../rangeRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/rangeStep.js b/reverse_engineering/node_modules/lodash/fp/rangeStep.js deleted file mode 100644 index d72dfc2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/rangeStep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rangeStep', require('../range')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/rangeStepRight.js b/reverse_engineering/node_modules/lodash/fp/rangeStepRight.js deleted file mode 100644 index 8b2a67b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/rangeStepRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rangeStepRight', require('../rangeRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/rearg.js b/reverse_engineering/node_modules/lodash/fp/rearg.js deleted file mode 100644 index 678e02a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/rearg.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rearg', require('../rearg')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/reduce.js b/reverse_engineering/node_modules/lodash/fp/reduce.js deleted file mode 100644 index 4cef0a0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/reduce.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reduce', require('../reduce')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/reduceRight.js b/reverse_engineering/node_modules/lodash/fp/reduceRight.js deleted file mode 100644 index caf5bb5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/reduceRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reduceRight', require('../reduceRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/reject.js b/reverse_engineering/node_modules/lodash/fp/reject.js deleted file mode 100644 index c163273..0000000 --- a/reverse_engineering/node_modules/lodash/fp/reject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reject', require('../reject')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/remove.js b/reverse_engineering/node_modules/lodash/fp/remove.js deleted file mode 100644 index e9d1327..0000000 --- a/reverse_engineering/node_modules/lodash/fp/remove.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('remove', require('../remove')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/repeat.js b/reverse_engineering/node_modules/lodash/fp/repeat.js deleted file mode 100644 index 08470f2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/repeat.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('repeat', require('../repeat')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/replace.js b/reverse_engineering/node_modules/lodash/fp/replace.js deleted file mode 100644 index 2227db6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/replace.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('replace', require('../replace')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/rest.js b/reverse_engineering/node_modules/lodash/fp/rest.js deleted file mode 100644 index c1f3d64..0000000 --- a/reverse_engineering/node_modules/lodash/fp/rest.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('rest', require('../rest')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/restFrom.js b/reverse_engineering/node_modules/lodash/fp/restFrom.js deleted file mode 100644 index 714e42b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/restFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('restFrom', require('../rest')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/result.js b/reverse_engineering/node_modules/lodash/fp/result.js deleted file mode 100644 index f86ce07..0000000 --- a/reverse_engineering/node_modules/lodash/fp/result.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('result', require('../result')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/reverse.js b/reverse_engineering/node_modules/lodash/fp/reverse.js deleted file mode 100644 index 07c9f5e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/reverse.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('reverse', require('../reverse')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/round.js b/reverse_engineering/node_modules/lodash/fp/round.js deleted file mode 100644 index 4c0e5c8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/round.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('round', require('../round')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sample.js b/reverse_engineering/node_modules/lodash/fp/sample.js deleted file mode 100644 index 6bea125..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sample.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sample', require('../sample'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sampleSize.js b/reverse_engineering/node_modules/lodash/fp/sampleSize.js deleted file mode 100644 index 359ed6f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sampleSize.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sampleSize', require('../sampleSize')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/seq.js b/reverse_engineering/node_modules/lodash/fp/seq.js deleted file mode 100644 index d8f42b0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/seq.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../seq')); diff --git a/reverse_engineering/node_modules/lodash/fp/set.js b/reverse_engineering/node_modules/lodash/fp/set.js deleted file mode 100644 index 0b56a56..0000000 --- a/reverse_engineering/node_modules/lodash/fp/set.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('set', require('../set')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/setWith.js b/reverse_engineering/node_modules/lodash/fp/setWith.js deleted file mode 100644 index 0b58495..0000000 --- a/reverse_engineering/node_modules/lodash/fp/setWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('setWith', require('../setWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/shuffle.js b/reverse_engineering/node_modules/lodash/fp/shuffle.js deleted file mode 100644 index aa3a1ca..0000000 --- a/reverse_engineering/node_modules/lodash/fp/shuffle.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/size.js b/reverse_engineering/node_modules/lodash/fp/size.js deleted file mode 100644 index 7490136..0000000 --- a/reverse_engineering/node_modules/lodash/fp/size.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('size', require('../size'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/slice.js b/reverse_engineering/node_modules/lodash/fp/slice.js deleted file mode 100644 index 15945d3..0000000 --- a/reverse_engineering/node_modules/lodash/fp/slice.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('slice', require('../slice')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/snakeCase.js b/reverse_engineering/node_modules/lodash/fp/snakeCase.js deleted file mode 100644 index a0ff780..0000000 --- a/reverse_engineering/node_modules/lodash/fp/snakeCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/some.js b/reverse_engineering/node_modules/lodash/fp/some.js deleted file mode 100644 index a4fa2d0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/some.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('some', require('../some')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortBy.js b/reverse_engineering/node_modules/lodash/fp/sortBy.js deleted file mode 100644 index e0790ad..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortBy', require('../sortBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedIndex.js b/reverse_engineering/node_modules/lodash/fp/sortedIndex.js deleted file mode 100644 index 364a054..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedIndex', require('../sortedIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedIndexBy.js b/reverse_engineering/node_modules/lodash/fp/sortedIndexBy.js deleted file mode 100644 index 9593dbd..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedIndexBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedIndexBy', require('../sortedIndexBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedIndexOf.js b/reverse_engineering/node_modules/lodash/fp/sortedIndexOf.js deleted file mode 100644 index c9084ca..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedIndexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedIndexOf', require('../sortedIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedLastIndex.js b/reverse_engineering/node_modules/lodash/fp/sortedLastIndex.js deleted file mode 100644 index 47fe241..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedLastIndex.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedLastIndex', require('../sortedLastIndex')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedLastIndexBy.js b/reverse_engineering/node_modules/lodash/fp/sortedLastIndexBy.js deleted file mode 100644 index 0f9a347..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedLastIndexBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedLastIndexOf.js b/reverse_engineering/node_modules/lodash/fp/sortedLastIndexOf.js deleted file mode 100644 index 0d4d932..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedLastIndexOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedUniq.js b/reverse_engineering/node_modules/lodash/fp/sortedUniq.js deleted file mode 100644 index 882d283..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedUniq.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sortedUniqBy.js b/reverse_engineering/node_modules/lodash/fp/sortedUniqBy.js deleted file mode 100644 index 033db91..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sortedUniqBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sortedUniqBy', require('../sortedUniqBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/split.js b/reverse_engineering/node_modules/lodash/fp/split.js deleted file mode 100644 index 14de1a7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/split.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('split', require('../split')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/spread.js b/reverse_engineering/node_modules/lodash/fp/spread.js deleted file mode 100644 index 2d11b70..0000000 --- a/reverse_engineering/node_modules/lodash/fp/spread.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('spread', require('../spread')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/spreadFrom.js b/reverse_engineering/node_modules/lodash/fp/spreadFrom.js deleted file mode 100644 index 0b630df..0000000 --- a/reverse_engineering/node_modules/lodash/fp/spreadFrom.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('spreadFrom', require('../spread')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/startCase.js b/reverse_engineering/node_modules/lodash/fp/startCase.js deleted file mode 100644 index ada98c9..0000000 --- a/reverse_engineering/node_modules/lodash/fp/startCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('startCase', require('../startCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/startsWith.js b/reverse_engineering/node_modules/lodash/fp/startsWith.js deleted file mode 100644 index 985e2f2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/startsWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('startsWith', require('../startsWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/string.js b/reverse_engineering/node_modules/lodash/fp/string.js deleted file mode 100644 index 773b037..0000000 --- a/reverse_engineering/node_modules/lodash/fp/string.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../string')); diff --git a/reverse_engineering/node_modules/lodash/fp/stubArray.js b/reverse_engineering/node_modules/lodash/fp/stubArray.js deleted file mode 100644 index cd604cb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/stubArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/stubFalse.js b/reverse_engineering/node_modules/lodash/fp/stubFalse.js deleted file mode 100644 index 3296664..0000000 --- a/reverse_engineering/node_modules/lodash/fp/stubFalse.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/stubObject.js b/reverse_engineering/node_modules/lodash/fp/stubObject.js deleted file mode 100644 index c6c8ec4..0000000 --- a/reverse_engineering/node_modules/lodash/fp/stubObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/stubString.js b/reverse_engineering/node_modules/lodash/fp/stubString.js deleted file mode 100644 index 701051e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/stubString.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubString', require('../stubString'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/stubTrue.js b/reverse_engineering/node_modules/lodash/fp/stubTrue.js deleted file mode 100644 index 9249082..0000000 --- a/reverse_engineering/node_modules/lodash/fp/stubTrue.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/subtract.js b/reverse_engineering/node_modules/lodash/fp/subtract.js deleted file mode 100644 index d32b16d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/subtract.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('subtract', require('../subtract')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sum.js b/reverse_engineering/node_modules/lodash/fp/sum.js deleted file mode 100644 index 5cce12b..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sum.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sum', require('../sum'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/sumBy.js b/reverse_engineering/node_modules/lodash/fp/sumBy.js deleted file mode 100644 index c882656..0000000 --- a/reverse_engineering/node_modules/lodash/fp/sumBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('sumBy', require('../sumBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/symmetricDifference.js b/reverse_engineering/node_modules/lodash/fp/symmetricDifference.js deleted file mode 100644 index 78c16ad..0000000 --- a/reverse_engineering/node_modules/lodash/fp/symmetricDifference.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./xor'); diff --git a/reverse_engineering/node_modules/lodash/fp/symmetricDifferenceBy.js b/reverse_engineering/node_modules/lodash/fp/symmetricDifferenceBy.js deleted file mode 100644 index 298fc7f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/symmetricDifferenceBy.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./xorBy'); diff --git a/reverse_engineering/node_modules/lodash/fp/symmetricDifferenceWith.js b/reverse_engineering/node_modules/lodash/fp/symmetricDifferenceWith.js deleted file mode 100644 index 70bc6fa..0000000 --- a/reverse_engineering/node_modules/lodash/fp/symmetricDifferenceWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./xorWith'); diff --git a/reverse_engineering/node_modules/lodash/fp/tail.js b/reverse_engineering/node_modules/lodash/fp/tail.js deleted file mode 100644 index f122f0a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/tail.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('tail', require('../tail'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/take.js b/reverse_engineering/node_modules/lodash/fp/take.js deleted file mode 100644 index 9af98a7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/take.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('take', require('../take')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/takeLast.js b/reverse_engineering/node_modules/lodash/fp/takeLast.js deleted file mode 100644 index e98c84a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/takeLast.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./takeRight'); diff --git a/reverse_engineering/node_modules/lodash/fp/takeLastWhile.js b/reverse_engineering/node_modules/lodash/fp/takeLastWhile.js deleted file mode 100644 index 5367968..0000000 --- a/reverse_engineering/node_modules/lodash/fp/takeLastWhile.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./takeRightWhile'); diff --git a/reverse_engineering/node_modules/lodash/fp/takeRight.js b/reverse_engineering/node_modules/lodash/fp/takeRight.js deleted file mode 100644 index b82950a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/takeRight.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('takeRight', require('../takeRight')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/takeRightWhile.js b/reverse_engineering/node_modules/lodash/fp/takeRightWhile.js deleted file mode 100644 index 8ffb0a2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/takeRightWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('takeRightWhile', require('../takeRightWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/takeWhile.js b/reverse_engineering/node_modules/lodash/fp/takeWhile.js deleted file mode 100644 index 2813664..0000000 --- a/reverse_engineering/node_modules/lodash/fp/takeWhile.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('takeWhile', require('../takeWhile')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/tap.js b/reverse_engineering/node_modules/lodash/fp/tap.js deleted file mode 100644 index d33ad6e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/tap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('tap', require('../tap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/template.js b/reverse_engineering/node_modules/lodash/fp/template.js deleted file mode 100644 index 74857e1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/template.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('template', require('../template')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/templateSettings.js b/reverse_engineering/node_modules/lodash/fp/templateSettings.js deleted file mode 100644 index 7bcc0a8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/templateSettings.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/throttle.js b/reverse_engineering/node_modules/lodash/fp/throttle.js deleted file mode 100644 index 77fff14..0000000 --- a/reverse_engineering/node_modules/lodash/fp/throttle.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('throttle', require('../throttle')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/thru.js b/reverse_engineering/node_modules/lodash/fp/thru.js deleted file mode 100644 index d42b3b1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/thru.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('thru', require('../thru')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/times.js b/reverse_engineering/node_modules/lodash/fp/times.js deleted file mode 100644 index 0dab06d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/times.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('times', require('../times')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toArray.js b/reverse_engineering/node_modules/lodash/fp/toArray.js deleted file mode 100644 index f0c360a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toArray', require('../toArray'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toFinite.js b/reverse_engineering/node_modules/lodash/fp/toFinite.js deleted file mode 100644 index 3a47687..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toFinite.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toInteger.js b/reverse_engineering/node_modules/lodash/fp/toInteger.js deleted file mode 100644 index e0af6a7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toIterator.js b/reverse_engineering/node_modules/lodash/fp/toIterator.js deleted file mode 100644 index 65e6baa..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toIterator.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toJSON.js b/reverse_engineering/node_modules/lodash/fp/toJSON.js deleted file mode 100644 index 2d718d0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toJSON.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toLength.js b/reverse_engineering/node_modules/lodash/fp/toLength.js deleted file mode 100644 index b97cdd9..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toLength.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toLength', require('../toLength'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toLower.js b/reverse_engineering/node_modules/lodash/fp/toLower.js deleted file mode 100644 index 616ef36..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toLower.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toLower', require('../toLower'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toNumber.js b/reverse_engineering/node_modules/lodash/fp/toNumber.js deleted file mode 100644 index d0c6f4d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toNumber.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toPairs.js b/reverse_engineering/node_modules/lodash/fp/toPairs.js deleted file mode 100644 index af78378..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toPairs.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toPairsIn.js b/reverse_engineering/node_modules/lodash/fp/toPairsIn.js deleted file mode 100644 index 66504ab..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toPairsIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toPath.js b/reverse_engineering/node_modules/lodash/fp/toPath.js deleted file mode 100644 index b4d5e50..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toPath.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPath', require('../toPath'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toPlainObject.js b/reverse_engineering/node_modules/lodash/fp/toPlainObject.js deleted file mode 100644 index 278bb86..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toPlainObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toSafeInteger.js b/reverse_engineering/node_modules/lodash/fp/toSafeInteger.js deleted file mode 100644 index 367a26f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toSafeInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toString.js b/reverse_engineering/node_modules/lodash/fp/toString.js deleted file mode 100644 index cec4f8e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toString.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toString', require('../toString'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/toUpper.js b/reverse_engineering/node_modules/lodash/fp/toUpper.js deleted file mode 100644 index 54f9a56..0000000 --- a/reverse_engineering/node_modules/lodash/fp/toUpper.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/transform.js b/reverse_engineering/node_modules/lodash/fp/transform.js deleted file mode 100644 index 759d088..0000000 --- a/reverse_engineering/node_modules/lodash/fp/transform.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('transform', require('../transform')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/trim.js b/reverse_engineering/node_modules/lodash/fp/trim.js deleted file mode 100644 index e6319a7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/trim.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trim', require('../trim')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/trimChars.js b/reverse_engineering/node_modules/lodash/fp/trimChars.js deleted file mode 100644 index c9294de..0000000 --- a/reverse_engineering/node_modules/lodash/fp/trimChars.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimChars', require('../trim')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/trimCharsEnd.js b/reverse_engineering/node_modules/lodash/fp/trimCharsEnd.js deleted file mode 100644 index 284bc2f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/trimCharsEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimCharsEnd', require('../trimEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/trimCharsStart.js b/reverse_engineering/node_modules/lodash/fp/trimCharsStart.js deleted file mode 100644 index ff0ee65..0000000 --- a/reverse_engineering/node_modules/lodash/fp/trimCharsStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimCharsStart', require('../trimStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/trimEnd.js b/reverse_engineering/node_modules/lodash/fp/trimEnd.js deleted file mode 100644 index 7190880..0000000 --- a/reverse_engineering/node_modules/lodash/fp/trimEnd.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimEnd', require('../trimEnd')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/trimStart.js b/reverse_engineering/node_modules/lodash/fp/trimStart.js deleted file mode 100644 index fda902c..0000000 --- a/reverse_engineering/node_modules/lodash/fp/trimStart.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('trimStart', require('../trimStart')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/truncate.js b/reverse_engineering/node_modules/lodash/fp/truncate.js deleted file mode 100644 index d265c1d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/truncate.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('truncate', require('../truncate')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/unapply.js b/reverse_engineering/node_modules/lodash/fp/unapply.js deleted file mode 100644 index c5dfe77..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unapply.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./rest'); diff --git a/reverse_engineering/node_modules/lodash/fp/unary.js b/reverse_engineering/node_modules/lodash/fp/unary.js deleted file mode 100644 index 286c945..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unary.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unary', require('../unary'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/unescape.js b/reverse_engineering/node_modules/lodash/fp/unescape.js deleted file mode 100644 index fddcb46..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unescape.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unescape', require('../unescape'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/union.js b/reverse_engineering/node_modules/lodash/fp/union.js deleted file mode 100644 index ef8228d..0000000 --- a/reverse_engineering/node_modules/lodash/fp/union.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('union', require('../union')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/unionBy.js b/reverse_engineering/node_modules/lodash/fp/unionBy.js deleted file mode 100644 index 603687a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unionBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unionBy', require('../unionBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/unionWith.js b/reverse_engineering/node_modules/lodash/fp/unionWith.js deleted file mode 100644 index 65bb3a7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unionWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unionWith', require('../unionWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/uniq.js b/reverse_engineering/node_modules/lodash/fp/uniq.js deleted file mode 100644 index bc18524..0000000 --- a/reverse_engineering/node_modules/lodash/fp/uniq.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniq', require('../uniq'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/uniqBy.js b/reverse_engineering/node_modules/lodash/fp/uniqBy.js deleted file mode 100644 index 634c6a8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/uniqBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniqBy', require('../uniqBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/uniqWith.js b/reverse_engineering/node_modules/lodash/fp/uniqWith.js deleted file mode 100644 index 0ec601a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/uniqWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniqWith', require('../uniqWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/uniqueId.js b/reverse_engineering/node_modules/lodash/fp/uniqueId.js deleted file mode 100644 index aa8fc2f..0000000 --- a/reverse_engineering/node_modules/lodash/fp/uniqueId.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('uniqueId', require('../uniqueId')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/unnest.js b/reverse_engineering/node_modules/lodash/fp/unnest.js deleted file mode 100644 index 5d34060..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unnest.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./flatten'); diff --git a/reverse_engineering/node_modules/lodash/fp/unset.js b/reverse_engineering/node_modules/lodash/fp/unset.js deleted file mode 100644 index ea203a0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unset.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unset', require('../unset')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/unzip.js b/reverse_engineering/node_modules/lodash/fp/unzip.js deleted file mode 100644 index cc364b3..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unzip.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unzip', require('../unzip'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/unzipWith.js b/reverse_engineering/node_modules/lodash/fp/unzipWith.js deleted file mode 100644 index 182eaa1..0000000 --- a/reverse_engineering/node_modules/lodash/fp/unzipWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('unzipWith', require('../unzipWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/update.js b/reverse_engineering/node_modules/lodash/fp/update.js deleted file mode 100644 index b8ce2cc..0000000 --- a/reverse_engineering/node_modules/lodash/fp/update.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('update', require('../update')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/updateWith.js b/reverse_engineering/node_modules/lodash/fp/updateWith.js deleted file mode 100644 index d5e8282..0000000 --- a/reverse_engineering/node_modules/lodash/fp/updateWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('updateWith', require('../updateWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/upperCase.js b/reverse_engineering/node_modules/lodash/fp/upperCase.js deleted file mode 100644 index c886f20..0000000 --- a/reverse_engineering/node_modules/lodash/fp/upperCase.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/upperFirst.js b/reverse_engineering/node_modules/lodash/fp/upperFirst.js deleted file mode 100644 index d8c04df..0000000 --- a/reverse_engineering/node_modules/lodash/fp/upperFirst.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/useWith.js b/reverse_engineering/node_modules/lodash/fp/useWith.js deleted file mode 100644 index d8b3df5..0000000 --- a/reverse_engineering/node_modules/lodash/fp/useWith.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./overArgs'); diff --git a/reverse_engineering/node_modules/lodash/fp/util.js b/reverse_engineering/node_modules/lodash/fp/util.js deleted file mode 100644 index 18c00ba..0000000 --- a/reverse_engineering/node_modules/lodash/fp/util.js +++ /dev/null @@ -1,2 +0,0 @@ -var convert = require('./convert'); -module.exports = convert(require('../util')); diff --git a/reverse_engineering/node_modules/lodash/fp/value.js b/reverse_engineering/node_modules/lodash/fp/value.js deleted file mode 100644 index 555eec7..0000000 --- a/reverse_engineering/node_modules/lodash/fp/value.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('value', require('../value'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/valueOf.js b/reverse_engineering/node_modules/lodash/fp/valueOf.js deleted file mode 100644 index f968807..0000000 --- a/reverse_engineering/node_modules/lodash/fp/valueOf.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/values.js b/reverse_engineering/node_modules/lodash/fp/values.js deleted file mode 100644 index 2dfc561..0000000 --- a/reverse_engineering/node_modules/lodash/fp/values.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('values', require('../values'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/valuesIn.js b/reverse_engineering/node_modules/lodash/fp/valuesIn.js deleted file mode 100644 index a1b2bb8..0000000 --- a/reverse_engineering/node_modules/lodash/fp/valuesIn.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/where.js b/reverse_engineering/node_modules/lodash/fp/where.js deleted file mode 100644 index 3247f64..0000000 --- a/reverse_engineering/node_modules/lodash/fp/where.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./conformsTo'); diff --git a/reverse_engineering/node_modules/lodash/fp/whereEq.js b/reverse_engineering/node_modules/lodash/fp/whereEq.js deleted file mode 100644 index 29d1e1e..0000000 --- a/reverse_engineering/node_modules/lodash/fp/whereEq.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./isMatch'); diff --git a/reverse_engineering/node_modules/lodash/fp/without.js b/reverse_engineering/node_modules/lodash/fp/without.js deleted file mode 100644 index bad9e12..0000000 --- a/reverse_engineering/node_modules/lodash/fp/without.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('without', require('../without')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/words.js b/reverse_engineering/node_modules/lodash/fp/words.js deleted file mode 100644 index 4a90141..0000000 --- a/reverse_engineering/node_modules/lodash/fp/words.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('words', require('../words')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/wrap.js b/reverse_engineering/node_modules/lodash/fp/wrap.js deleted file mode 100644 index e93bd8a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/wrap.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrap', require('../wrap')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/wrapperAt.js b/reverse_engineering/node_modules/lodash/fp/wrapperAt.js deleted file mode 100644 index 8f0a310..0000000 --- a/reverse_engineering/node_modules/lodash/fp/wrapperAt.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/wrapperChain.js b/reverse_engineering/node_modules/lodash/fp/wrapperChain.js deleted file mode 100644 index 2a48ea2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/wrapperChain.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/wrapperLodash.js b/reverse_engineering/node_modules/lodash/fp/wrapperLodash.js deleted file mode 100644 index a7162d0..0000000 --- a/reverse_engineering/node_modules/lodash/fp/wrapperLodash.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/wrapperReverse.js b/reverse_engineering/node_modules/lodash/fp/wrapperReverse.js deleted file mode 100644 index e1481aa..0000000 --- a/reverse_engineering/node_modules/lodash/fp/wrapperReverse.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/wrapperValue.js b/reverse_engineering/node_modules/lodash/fp/wrapperValue.js deleted file mode 100644 index 8eb9112..0000000 --- a/reverse_engineering/node_modules/lodash/fp/wrapperValue.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/xor.js b/reverse_engineering/node_modules/lodash/fp/xor.js deleted file mode 100644 index 29e2819..0000000 --- a/reverse_engineering/node_modules/lodash/fp/xor.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('xor', require('../xor')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/xorBy.js b/reverse_engineering/node_modules/lodash/fp/xorBy.js deleted file mode 100644 index b355686..0000000 --- a/reverse_engineering/node_modules/lodash/fp/xorBy.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('xorBy', require('../xorBy')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/xorWith.js b/reverse_engineering/node_modules/lodash/fp/xorWith.js deleted file mode 100644 index 8e05739..0000000 --- a/reverse_engineering/node_modules/lodash/fp/xorWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('xorWith', require('../xorWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/zip.js b/reverse_engineering/node_modules/lodash/fp/zip.js deleted file mode 100644 index 69e147a..0000000 --- a/reverse_engineering/node_modules/lodash/fp/zip.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zip', require('../zip')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/zipAll.js b/reverse_engineering/node_modules/lodash/fp/zipAll.js deleted file mode 100644 index efa8ccb..0000000 --- a/reverse_engineering/node_modules/lodash/fp/zipAll.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipAll', require('../zip')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/zipObj.js b/reverse_engineering/node_modules/lodash/fp/zipObj.js deleted file mode 100644 index f4a3453..0000000 --- a/reverse_engineering/node_modules/lodash/fp/zipObj.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./zipObject'); diff --git a/reverse_engineering/node_modules/lodash/fp/zipObject.js b/reverse_engineering/node_modules/lodash/fp/zipObject.js deleted file mode 100644 index 462dbb6..0000000 --- a/reverse_engineering/node_modules/lodash/fp/zipObject.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipObject', require('../zipObject')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/zipObjectDeep.js b/reverse_engineering/node_modules/lodash/fp/zipObjectDeep.js deleted file mode 100644 index 53a5d33..0000000 --- a/reverse_engineering/node_modules/lodash/fp/zipObjectDeep.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipObjectDeep', require('../zipObjectDeep')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fp/zipWith.js b/reverse_engineering/node_modules/lodash/fp/zipWith.js deleted file mode 100644 index c5cf9e2..0000000 --- a/reverse_engineering/node_modules/lodash/fp/zipWith.js +++ /dev/null @@ -1,5 +0,0 @@ -var convert = require('./convert'), - func = convert('zipWith', require('../zipWith')); - -func.placeholder = require('./placeholder'); -module.exports = func; diff --git a/reverse_engineering/node_modules/lodash/fromPairs.js b/reverse_engineering/node_modules/lodash/fromPairs.js deleted file mode 100644 index ee7940d..0000000 --- a/reverse_engineering/node_modules/lodash/fromPairs.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } - */ -function fromPairs(pairs) { - var index = -1, - length = pairs == null ? 0 : pairs.length, - result = {}; - - while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; - } - return result; -} - -module.exports = fromPairs; diff --git a/reverse_engineering/node_modules/lodash/function.js b/reverse_engineering/node_modules/lodash/function.js deleted file mode 100644 index b0fc6d9..0000000 --- a/reverse_engineering/node_modules/lodash/function.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - 'after': require('./after'), - 'ary': require('./ary'), - 'before': require('./before'), - 'bind': require('./bind'), - 'bindKey': require('./bindKey'), - 'curry': require('./curry'), - 'curryRight': require('./curryRight'), - 'debounce': require('./debounce'), - 'defer': require('./defer'), - 'delay': require('./delay'), - 'flip': require('./flip'), - 'memoize': require('./memoize'), - 'negate': require('./negate'), - 'once': require('./once'), - 'overArgs': require('./overArgs'), - 'partial': require('./partial'), - 'partialRight': require('./partialRight'), - 'rearg': require('./rearg'), - 'rest': require('./rest'), - 'spread': require('./spread'), - 'throttle': require('./throttle'), - 'unary': require('./unary'), - 'wrap': require('./wrap') -}; diff --git a/reverse_engineering/node_modules/lodash/functions.js b/reverse_engineering/node_modules/lodash/functions.js deleted file mode 100644 index 9722928..0000000 --- a/reverse_engineering/node_modules/lodash/functions.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFunctions = require('./_baseFunctions'), - keys = require('./keys'); - -/** - * Creates an array of function property names from own enumerable properties - * of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functionsIn - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functions(new Foo); - * // => ['a', 'b'] - */ -function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); -} - -module.exports = functions; diff --git a/reverse_engineering/node_modules/lodash/functionsIn.js b/reverse_engineering/node_modules/lodash/functionsIn.js deleted file mode 100644 index f00345d..0000000 --- a/reverse_engineering/node_modules/lodash/functionsIn.js +++ /dev/null @@ -1,31 +0,0 @@ -var baseFunctions = require('./_baseFunctions'), - keysIn = require('./keysIn'); - -/** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ -function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); -} - -module.exports = functionsIn; diff --git a/reverse_engineering/node_modules/lodash/get.js b/reverse_engineering/node_modules/lodash/get.js deleted file mode 100644 index 8805ff9..0000000 --- a/reverse_engineering/node_modules/lodash/get.js +++ /dev/null @@ -1,33 +0,0 @@ -var baseGet = require('./_baseGet'); - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -module.exports = get; diff --git a/reverse_engineering/node_modules/lodash/groupBy.js b/reverse_engineering/node_modules/lodash/groupBy.js deleted file mode 100644 index babf4f6..0000000 --- a/reverse_engineering/node_modules/lodash/groupBy.js +++ /dev/null @@ -1,41 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - createAggregator = require('./_createAggregator'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The order of grouped values - * is determined by the order they occur in `collection`. The corresponding - * value of each key is an array of elements responsible for generating the - * key. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - * - * // The `_.property` iteratee shorthand. - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ -var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - baseAssignValue(result, key, [value]); - } -}); - -module.exports = groupBy; diff --git a/reverse_engineering/node_modules/lodash/gt.js b/reverse_engineering/node_modules/lodash/gt.js deleted file mode 100644 index 3a66282..0000000 --- a/reverse_engineering/node_modules/lodash/gt.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseGt = require('./_baseGt'), - createRelationalOperation = require('./_createRelationalOperation'); - -/** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @see _.lt - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ -var gt = createRelationalOperation(baseGt); - -module.exports = gt; diff --git a/reverse_engineering/node_modules/lodash/gte.js b/reverse_engineering/node_modules/lodash/gte.js deleted file mode 100644 index 4180a68..0000000 --- a/reverse_engineering/node_modules/lodash/gte.js +++ /dev/null @@ -1,30 +0,0 @@ -var createRelationalOperation = require('./_createRelationalOperation'); - -/** - * Checks if `value` is greater than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to - * `other`, else `false`. - * @see _.lte - * @example - * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false - */ -var gte = createRelationalOperation(function(value, other) { - return value >= other; -}); - -module.exports = gte; diff --git a/reverse_engineering/node_modules/lodash/has.js b/reverse_engineering/node_modules/lodash/has.js deleted file mode 100644 index 34df55e..0000000 --- a/reverse_engineering/node_modules/lodash/has.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseHas = require('./_baseHas'), - hasPath = require('./_hasPath'); - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && hasPath(object, path, baseHas); -} - -module.exports = has; diff --git a/reverse_engineering/node_modules/lodash/hasIn.js b/reverse_engineering/node_modules/lodash/hasIn.js deleted file mode 100644 index 06a3686..0000000 --- a/reverse_engineering/node_modules/lodash/hasIn.js +++ /dev/null @@ -1,34 +0,0 @@ -var baseHasIn = require('./_baseHasIn'), - hasPath = require('./_hasPath'); - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); -} - -module.exports = hasIn; diff --git a/reverse_engineering/node_modules/lodash/head.js b/reverse_engineering/node_modules/lodash/head.js deleted file mode 100644 index dee9d1f..0000000 --- a/reverse_engineering/node_modules/lodash/head.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ -function head(array) { - return (array && array.length) ? array[0] : undefined; -} - -module.exports = head; diff --git a/reverse_engineering/node_modules/lodash/identity.js b/reverse_engineering/node_modules/lodash/identity.js deleted file mode 100644 index 2d5d963..0000000 --- a/reverse_engineering/node_modules/lodash/identity.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; diff --git a/reverse_engineering/node_modules/lodash/inRange.js b/reverse_engineering/node_modules/lodash/inRange.js deleted file mode 100644 index f20728d..0000000 --- a/reverse_engineering/node_modules/lodash/inRange.js +++ /dev/null @@ -1,55 +0,0 @@ -var baseInRange = require('./_baseInRange'), - toFinite = require('./toFinite'), - toNumber = require('./toNumber'); - -/** - * Checks if `n` is between `start` and up to, but not including, `end`. If - * `end` is not specified, it's set to `start` with `start` then set to `0`. - * If `start` is greater than `end` the params are swapped to support - * negative ranges. - * - * @static - * @memberOf _ - * @since 3.3.0 - * @category Number - * @param {number} number The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - * @see _.range, _.rangeRight - * @example - * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false - * - * _.inRange(-3, -2, -6); - * // => true - */ -function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - number = toNumber(number); - return baseInRange(number, start, end); -} - -module.exports = inRange; diff --git a/reverse_engineering/node_modules/lodash/includes.js b/reverse_engineering/node_modules/lodash/includes.js deleted file mode 100644 index ae0deed..0000000 --- a/reverse_engineering/node_modules/lodash/includes.js +++ /dev/null @@ -1,53 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'), - isArrayLike = require('./isArrayLike'), - isString = require('./isString'), - toInteger = require('./toInteger'), - values = require('./values'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ -function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); -} - -module.exports = includes; diff --git a/reverse_engineering/node_modules/lodash/index.js b/reverse_engineering/node_modules/lodash/index.js deleted file mode 100644 index 5d063e2..0000000 --- a/reverse_engineering/node_modules/lodash/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lodash'); \ No newline at end of file diff --git a/reverse_engineering/node_modules/lodash/indexOf.js b/reverse_engineering/node_modules/lodash/indexOf.js deleted file mode 100644 index 3c644af..0000000 --- a/reverse_engineering/node_modules/lodash/indexOf.js +++ /dev/null @@ -1,42 +0,0 @@ -var baseIndexOf = require('./_baseIndexOf'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ -function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseIndexOf(array, value, index); -} - -module.exports = indexOf; diff --git a/reverse_engineering/node_modules/lodash/initial.js b/reverse_engineering/node_modules/lodash/initial.js deleted file mode 100644 index f47fc50..0000000 --- a/reverse_engineering/node_modules/lodash/initial.js +++ /dev/null @@ -1,22 +0,0 @@ -var baseSlice = require('./_baseSlice'); - -/** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ -function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; -} - -module.exports = initial; diff --git a/reverse_engineering/node_modules/lodash/intersection.js b/reverse_engineering/node_modules/lodash/intersection.js deleted file mode 100644 index a94c135..0000000 --- a/reverse_engineering/node_modules/lodash/intersection.js +++ /dev/null @@ -1,30 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIntersection = require('./_baseIntersection'), - baseRest = require('./_baseRest'), - castArrayLikeObject = require('./_castArrayLikeObject'); - -/** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersection([2, 1], [2, 3]); - * // => [2] - */ -var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; -}); - -module.exports = intersection; diff --git a/reverse_engineering/node_modules/lodash/intersectionBy.js b/reverse_engineering/node_modules/lodash/intersectionBy.js deleted file mode 100644 index 31461aa..0000000 --- a/reverse_engineering/node_modules/lodash/intersectionBy.js +++ /dev/null @@ -1,45 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIntersection = require('./_baseIntersection'), - baseIteratee = require('./_baseIteratee'), - baseRest = require('./_baseRest'), - castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [2.1] - * - * // The `_.property` iteratee shorthand. - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ -var intersectionBy = baseRest(function(arrays) { - var iteratee = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - if (iteratee === last(mapped)) { - iteratee = undefined; - } else { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, baseIteratee(iteratee, 2)) - : []; -}); - -module.exports = intersectionBy; diff --git a/reverse_engineering/node_modules/lodash/intersectionWith.js b/reverse_engineering/node_modules/lodash/intersectionWith.js deleted file mode 100644 index 63cabfa..0000000 --- a/reverse_engineering/node_modules/lodash/intersectionWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var arrayMap = require('./_arrayMap'), - baseIntersection = require('./_baseIntersection'), - baseRest = require('./_baseRest'), - castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'); - -/** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ -var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; -}); - -module.exports = intersectionWith; diff --git a/reverse_engineering/node_modules/lodash/invert.js b/reverse_engineering/node_modules/lodash/invert.js deleted file mode 100644 index 8c47950..0000000 --- a/reverse_engineering/node_modules/lodash/invert.js +++ /dev/null @@ -1,42 +0,0 @@ -var constant = require('./constant'), - createInverter = require('./_createInverter'), - identity = require('./identity'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite - * property assignments of previous values. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Object - * @param {Object} object The object to invert. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } - */ -var invert = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - result[value] = key; -}, constant(identity)); - -module.exports = invert; diff --git a/reverse_engineering/node_modules/lodash/invertBy.js b/reverse_engineering/node_modules/lodash/invertBy.js deleted file mode 100644 index 3f4f7e5..0000000 --- a/reverse_engineering/node_modules/lodash/invertBy.js +++ /dev/null @@ -1,56 +0,0 @@ -var baseIteratee = require('./_baseIteratee'), - createInverter = require('./_createInverter'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` thru `iteratee`. The - * corresponding inverted value of each inverted key is an array of keys - * responsible for generating the inverted value. The iteratee is invoked - * with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Object - * @param {Object} object The object to invert. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invertBy(object); - * // => { '1': ['a', 'c'], '2': ['b'] } - * - * _.invertBy(object, function(value) { - * return 'group' + value; - * }); - * // => { 'group1': ['a', 'c'], 'group2': ['b'] } - */ -var invertBy = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } -}, baseIteratee); - -module.exports = invertBy; diff --git a/reverse_engineering/node_modules/lodash/invoke.js b/reverse_engineering/node_modules/lodash/invoke.js deleted file mode 100644 index 97d51eb..0000000 --- a/reverse_engineering/node_modules/lodash/invoke.js +++ /dev/null @@ -1,24 +0,0 @@ -var baseInvoke = require('./_baseInvoke'), - baseRest = require('./_baseRest'); - -/** - * Invokes the method at `path` of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - * @example - * - * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; - * - * _.invoke(object, 'a[0].b.c.slice', 1, 3); - * // => [2, 3] - */ -var invoke = baseRest(baseInvoke); - -module.exports = invoke; diff --git a/reverse_engineering/node_modules/lodash/invokeMap.js b/reverse_engineering/node_modules/lodash/invokeMap.js deleted file mode 100644 index 8da5126..0000000 --- a/reverse_engineering/node_modules/lodash/invokeMap.js +++ /dev/null @@ -1,41 +0,0 @@ -var apply = require('./_apply'), - baseEach = require('./_baseEach'), - baseInvoke = require('./_baseInvoke'), - baseRest = require('./_baseRest'), - isArrayLike = require('./isArrayLike'); - -/** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `path` is a function, it's invoked - * for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ -var invokeMap = baseRest(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result; -}); - -module.exports = invokeMap; diff --git a/reverse_engineering/node_modules/lodash/isArguments.js b/reverse_engineering/node_modules/lodash/isArguments.js deleted file mode 100644 index 8b9ed66..0000000 --- a/reverse_engineering/node_modules/lodash/isArguments.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseIsArguments = require('./_baseIsArguments'), - isObjectLike = require('./isObjectLike'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; - -module.exports = isArguments; diff --git a/reverse_engineering/node_modules/lodash/isArray.js b/reverse_engineering/node_modules/lodash/isArray.js deleted file mode 100644 index 88ab55f..0000000 --- a/reverse_engineering/node_modules/lodash/isArray.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; diff --git a/reverse_engineering/node_modules/lodash/isArrayBuffer.js b/reverse_engineering/node_modules/lodash/isArrayBuffer.js deleted file mode 100644 index 12904a6..0000000 --- a/reverse_engineering/node_modules/lodash/isArrayBuffer.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; - -/** - * Checks if `value` is classified as an `ArrayBuffer` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - * @example - * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true - * - * _.isArrayBuffer(new Array(2)); - * // => false - */ -var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; - -module.exports = isArrayBuffer; diff --git a/reverse_engineering/node_modules/lodash/isArrayLike.js b/reverse_engineering/node_modules/lodash/isArrayLike.js deleted file mode 100644 index 0f96680..0000000 --- a/reverse_engineering/node_modules/lodash/isArrayLike.js +++ /dev/null @@ -1,33 +0,0 @@ -var isFunction = require('./isFunction'), - isLength = require('./isLength'); - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -module.exports = isArrayLike; diff --git a/reverse_engineering/node_modules/lodash/isArrayLikeObject.js b/reverse_engineering/node_modules/lodash/isArrayLikeObject.js deleted file mode 100644 index 6c4812a..0000000 --- a/reverse_engineering/node_modules/lodash/isArrayLikeObject.js +++ /dev/null @@ -1,33 +0,0 @@ -var isArrayLike = require('./isArrayLike'), - isObjectLike = require('./isObjectLike'); - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -module.exports = isArrayLikeObject; diff --git a/reverse_engineering/node_modules/lodash/isBoolean.js b/reverse_engineering/node_modules/lodash/isBoolean.js deleted file mode 100644 index a43ed4b..0000000 --- a/reverse_engineering/node_modules/lodash/isBoolean.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; - -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); -} - -module.exports = isBoolean; diff --git a/reverse_engineering/node_modules/lodash/isBuffer.js b/reverse_engineering/node_modules/lodash/isBuffer.js deleted file mode 100644 index c103cc7..0000000 --- a/reverse_engineering/node_modules/lodash/isBuffer.js +++ /dev/null @@ -1,38 +0,0 @@ -var root = require('./_root'), - stubFalse = require('./stubFalse'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -module.exports = isBuffer; diff --git a/reverse_engineering/node_modules/lodash/isDate.js b/reverse_engineering/node_modules/lodash/isDate.js deleted file mode 100644 index 7f0209f..0000000 --- a/reverse_engineering/node_modules/lodash/isDate.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsDate = require('./_baseIsDate'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsDate = nodeUtil && nodeUtil.isDate; - -/** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ -var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; - -module.exports = isDate; diff --git a/reverse_engineering/node_modules/lodash/isElement.js b/reverse_engineering/node_modules/lodash/isElement.js deleted file mode 100644 index 76ae29c..0000000 --- a/reverse_engineering/node_modules/lodash/isElement.js +++ /dev/null @@ -1,25 +0,0 @@ -var isObjectLike = require('./isObjectLike'), - isPlainObject = require('./isPlainObject'); - -/** - * Checks if `value` is likely a DOM element. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - * - * _.isElement(''); - * // => false - */ -function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); -} - -module.exports = isElement; diff --git a/reverse_engineering/node_modules/lodash/isEmpty.js b/reverse_engineering/node_modules/lodash/isEmpty.js deleted file mode 100644 index 3597294..0000000 --- a/reverse_engineering/node_modules/lodash/isEmpty.js +++ /dev/null @@ -1,77 +0,0 @@ -var baseKeys = require('./_baseKeys'), - getTag = require('./_getTag'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLike = require('./isArrayLike'), - isBuffer = require('./isBuffer'), - isPrototype = require('./_isPrototype'), - isTypedArray = require('./isTypedArray'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; -} - -module.exports = isEmpty; diff --git a/reverse_engineering/node_modules/lodash/isEqual.js b/reverse_engineering/node_modules/lodash/isEqual.js deleted file mode 100644 index 5e23e76..0000000 --- a/reverse_engineering/node_modules/lodash/isEqual.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseIsEqual = require('./_baseIsEqual'); - -/** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ -function isEqual(value, other) { - return baseIsEqual(value, other); -} - -module.exports = isEqual; diff --git a/reverse_engineering/node_modules/lodash/isEqualWith.js b/reverse_engineering/node_modules/lodash/isEqualWith.js deleted file mode 100644 index 21bdc7f..0000000 --- a/reverse_engineering/node_modules/lodash/isEqualWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var baseIsEqual = require('./_baseIsEqual'); - -/** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ -function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; -} - -module.exports = isEqualWith; diff --git a/reverse_engineering/node_modules/lodash/isError.js b/reverse_engineering/node_modules/lodash/isError.js deleted file mode 100644 index b4f41e0..0000000 --- a/reverse_engineering/node_modules/lodash/isError.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'), - isPlainObject = require('./isPlainObject'); - -/** `Object#toString` result references. */ -var domExcTag = '[object DOMException]', - errorTag = '[object Error]'; - -/** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ -function isError(value) { - if (!isObjectLike(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); -} - -module.exports = isError; diff --git a/reverse_engineering/node_modules/lodash/isFinite.js b/reverse_engineering/node_modules/lodash/isFinite.js deleted file mode 100644 index 601842b..0000000 --- a/reverse_engineering/node_modules/lodash/isFinite.js +++ /dev/null @@ -1,36 +0,0 @@ -var root = require('./_root'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = root.isFinite; - -/** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ -function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); -} - -module.exports = isFinite; diff --git a/reverse_engineering/node_modules/lodash/isFunction.js b/reverse_engineering/node_modules/lodash/isFunction.js deleted file mode 100644 index 907a8cd..0000000 --- a/reverse_engineering/node_modules/lodash/isFunction.js +++ /dev/null @@ -1,37 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -module.exports = isFunction; diff --git a/reverse_engineering/node_modules/lodash/isInteger.js b/reverse_engineering/node_modules/lodash/isInteger.js deleted file mode 100644 index 66aa87d..0000000 --- a/reverse_engineering/node_modules/lodash/isInteger.js +++ /dev/null @@ -1,33 +0,0 @@ -var toInteger = require('./toInteger'); - -/** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ -function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); -} - -module.exports = isInteger; diff --git a/reverse_engineering/node_modules/lodash/isLength.js b/reverse_engineering/node_modules/lodash/isLength.js deleted file mode 100644 index 3a95caa..0000000 --- a/reverse_engineering/node_modules/lodash/isLength.js +++ /dev/null @@ -1,35 +0,0 @@ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; diff --git a/reverse_engineering/node_modules/lodash/isMap.js b/reverse_engineering/node_modules/lodash/isMap.js deleted file mode 100644 index 44f8517..0000000 --- a/reverse_engineering/node_modules/lodash/isMap.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsMap = require('./_baseIsMap'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsMap = nodeUtil && nodeUtil.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - -module.exports = isMap; diff --git a/reverse_engineering/node_modules/lodash/isMatch.js b/reverse_engineering/node_modules/lodash/isMatch.js deleted file mode 100644 index 9773a18..0000000 --- a/reverse_engineering/node_modules/lodash/isMatch.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseIsMatch = require('./_baseIsMatch'), - getMatchData = require('./_getMatchData'); - -/** - * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. - * - * **Note:** This method is equivalent to `_.matches` when `source` is - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.isMatch(object, { 'b': 2 }); - * // => true - * - * _.isMatch(object, { 'b': 1 }); - * // => false - */ -function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); -} - -module.exports = isMatch; diff --git a/reverse_engineering/node_modules/lodash/isMatchWith.js b/reverse_engineering/node_modules/lodash/isMatchWith.js deleted file mode 100644 index 187b6a6..0000000 --- a/reverse_engineering/node_modules/lodash/isMatchWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var baseIsMatch = require('./_baseIsMatch'), - getMatchData = require('./_getMatchData'); - -/** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with five - * arguments: (objValue, srcValue, index|key, object, source). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatchWith(object, source, customizer); - * // => true - */ -function isMatchWith(object, source, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); -} - -module.exports = isMatchWith; diff --git a/reverse_engineering/node_modules/lodash/isNaN.js b/reverse_engineering/node_modules/lodash/isNaN.js deleted file mode 100644 index 7d0d783..0000000 --- a/reverse_engineering/node_modules/lodash/isNaN.js +++ /dev/null @@ -1,38 +0,0 @@ -var isNumber = require('./isNumber'); - -/** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ -function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; -} - -module.exports = isNaN; diff --git a/reverse_engineering/node_modules/lodash/isNative.js b/reverse_engineering/node_modules/lodash/isNative.js deleted file mode 100644 index f0cb8d5..0000000 --- a/reverse_engineering/node_modules/lodash/isNative.js +++ /dev/null @@ -1,40 +0,0 @@ -var baseIsNative = require('./_baseIsNative'), - isMaskable = require('./_isMaskable'); - -/** Error message constants. */ -var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; - -/** - * Checks if `value` is a pristine native function. - * - * **Note:** This method can't reliably detect native functions in the presence - * of the core-js package because core-js circumvents this kind of detection. - * Despite multiple requests, the core-js maintainer has made it clear: any - * attempt to fix the detection will be obstructed. As a result, we're left - * with little choice but to throw an error. Unfortunately, this also affects - * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on core-js. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); -} - -module.exports = isNative; diff --git a/reverse_engineering/node_modules/lodash/isNil.js b/reverse_engineering/node_modules/lodash/isNil.js deleted file mode 100644 index 79f0505..0000000 --- a/reverse_engineering/node_modules/lodash/isNil.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Checks if `value` is `null` or `undefined`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. - * @example - * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true - * - * _.isNil(NaN); - * // => false - */ -function isNil(value) { - return value == null; -} - -module.exports = isNil; diff --git a/reverse_engineering/node_modules/lodash/isNull.js b/reverse_engineering/node_modules/lodash/isNull.js deleted file mode 100644 index c0a374d..0000000 --- a/reverse_engineering/node_modules/lodash/isNull.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ -function isNull(value) { - return value === null; -} - -module.exports = isNull; diff --git a/reverse_engineering/node_modules/lodash/isNumber.js b/reverse_engineering/node_modules/lodash/isNumber.js deleted file mode 100644 index cd34ee4..0000000 --- a/reverse_engineering/node_modules/lodash/isNumber.js +++ /dev/null @@ -1,38 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; - -/** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); -} - -module.exports = isNumber; diff --git a/reverse_engineering/node_modules/lodash/isObject.js b/reverse_engineering/node_modules/lodash/isObject.js deleted file mode 100644 index 1dc8939..0000000 --- a/reverse_engineering/node_modules/lodash/isObject.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; diff --git a/reverse_engineering/node_modules/lodash/isObjectLike.js b/reverse_engineering/node_modules/lodash/isObjectLike.js deleted file mode 100644 index 301716b..0000000 --- a/reverse_engineering/node_modules/lodash/isObjectLike.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; diff --git a/reverse_engineering/node_modules/lodash/isPlainObject.js b/reverse_engineering/node_modules/lodash/isPlainObject.js deleted file mode 100644 index 2387373..0000000 --- a/reverse_engineering/node_modules/lodash/isPlainObject.js +++ /dev/null @@ -1,62 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - getPrototype = require('./_getPrototype'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -module.exports = isPlainObject; diff --git a/reverse_engineering/node_modules/lodash/isRegExp.js b/reverse_engineering/node_modules/lodash/isRegExp.js deleted file mode 100644 index 76c9b6e..0000000 --- a/reverse_engineering/node_modules/lodash/isRegExp.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsRegExp = require('./_baseIsRegExp'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; - -/** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ -var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - -module.exports = isRegExp; diff --git a/reverse_engineering/node_modules/lodash/isSafeInteger.js b/reverse_engineering/node_modules/lodash/isSafeInteger.js deleted file mode 100644 index 2a48526..0000000 --- a/reverse_engineering/node_modules/lodash/isSafeInteger.js +++ /dev/null @@ -1,37 +0,0 @@ -var isInteger = require('./isInteger'); - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on - * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. - * @example - * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false - */ -function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; -} - -module.exports = isSafeInteger; diff --git a/reverse_engineering/node_modules/lodash/isSet.js b/reverse_engineering/node_modules/lodash/isSet.js deleted file mode 100644 index ab88bdf..0000000 --- a/reverse_engineering/node_modules/lodash/isSet.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsSet = require('./_baseIsSet'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsSet = nodeUtil && nodeUtil.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - -module.exports = isSet; diff --git a/reverse_engineering/node_modules/lodash/isString.js b/reverse_engineering/node_modules/lodash/isString.js deleted file mode 100644 index 627eb9c..0000000 --- a/reverse_engineering/node_modules/lodash/isString.js +++ /dev/null @@ -1,30 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isArray = require('./isArray'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); -} - -module.exports = isString; diff --git a/reverse_engineering/node_modules/lodash/isSymbol.js b/reverse_engineering/node_modules/lodash/isSymbol.js deleted file mode 100644 index dfb60b9..0000000 --- a/reverse_engineering/node_modules/lodash/isSymbol.js +++ /dev/null @@ -1,29 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; diff --git a/reverse_engineering/node_modules/lodash/isTypedArray.js b/reverse_engineering/node_modules/lodash/isTypedArray.js deleted file mode 100644 index da3f8dd..0000000 --- a/reverse_engineering/node_modules/lodash/isTypedArray.js +++ /dev/null @@ -1,27 +0,0 @@ -var baseIsTypedArray = require('./_baseIsTypedArray'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -module.exports = isTypedArray; diff --git a/reverse_engineering/node_modules/lodash/isUndefined.js b/reverse_engineering/node_modules/lodash/isUndefined.js deleted file mode 100644 index 377d121..0000000 --- a/reverse_engineering/node_modules/lodash/isUndefined.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -module.exports = isUndefined; diff --git a/reverse_engineering/node_modules/lodash/isWeakMap.js b/reverse_engineering/node_modules/lodash/isWeakMap.js deleted file mode 100644 index 8d36f66..0000000 --- a/reverse_engineering/node_modules/lodash/isWeakMap.js +++ /dev/null @@ -1,28 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var weakMapTag = '[object WeakMap]'; - -/** - * Checks if `value` is classified as a `WeakMap` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. - * @example - * - * _.isWeakMap(new WeakMap); - * // => true - * - * _.isWeakMap(new Map); - * // => false - */ -function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; -} - -module.exports = isWeakMap; diff --git a/reverse_engineering/node_modules/lodash/isWeakSet.js b/reverse_engineering/node_modules/lodash/isWeakSet.js deleted file mode 100644 index e628b26..0000000 --- a/reverse_engineering/node_modules/lodash/isWeakSet.js +++ /dev/null @@ -1,28 +0,0 @@ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var weakSetTag = '[object WeakSet]'; - -/** - * Checks if `value` is classified as a `WeakSet` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. - * @example - * - * _.isWeakSet(new WeakSet); - * // => true - * - * _.isWeakSet(new Set); - * // => false - */ -function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; -} - -module.exports = isWeakSet; diff --git a/reverse_engineering/node_modules/lodash/iteratee.js b/reverse_engineering/node_modules/lodash/iteratee.js deleted file mode 100644 index 61b73a8..0000000 --- a/reverse_engineering/node_modules/lodash/iteratee.js +++ /dev/null @@ -1,53 +0,0 @@ -var baseClone = require('./_baseClone'), - baseIteratee = require('./_baseIteratee'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1; - -/** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name, the created function returns the - * property value for a given element. If `func` is an array or object, the - * created function returns `true` for elements that contain the equivalent - * source properties, otherwise it returns `false`. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); - * // => [{ 'user': 'barney', 'age': 36, 'active': true }] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, _.iteratee(['user', 'fred'])); - * // => [{ 'user': 'fred', 'age': 40 }] - * - * // The `_.property` iteratee shorthand. - * _.map(users, _.iteratee('user')); - * // => ['barney', 'fred'] - * - * // Create custom iteratee shorthands. - * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { - * return !_.isRegExp(func) ? iteratee(func) : function(string) { - * return func.test(string); - * }; - * }); - * - * _.filter(['abc', 'def'], /ef/); - * // => ['def'] - */ -function iteratee(func) { - return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); -} - -module.exports = iteratee; diff --git a/reverse_engineering/node_modules/lodash/join.js b/reverse_engineering/node_modules/lodash/join.js deleted file mode 100644 index 45de079..0000000 --- a/reverse_engineering/node_modules/lodash/join.js +++ /dev/null @@ -1,26 +0,0 @@ -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeJoin = arrayProto.join; - -/** - * Converts all elements in `array` into a string separated by `separator`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to convert. - * @param {string} [separator=','] The element separator. - * @returns {string} Returns the joined string. - * @example - * - * _.join(['a', 'b', 'c'], '~'); - * // => 'a~b~c' - */ -function join(array, separator) { - return array == null ? '' : nativeJoin.call(array, separator); -} - -module.exports = join; diff --git a/reverse_engineering/node_modules/lodash/kebabCase.js b/reverse_engineering/node_modules/lodash/kebabCase.js deleted file mode 100644 index 8a52be6..0000000 --- a/reverse_engineering/node_modules/lodash/kebabCase.js +++ /dev/null @@ -1,28 +0,0 @@ -var createCompounder = require('./_createCompounder'); - -/** - * Converts `string` to - * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. - * @example - * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' - * - * _.kebabCase('__FOO_BAR__'); - * // => 'foo-bar' - */ -var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); -}); - -module.exports = kebabCase; diff --git a/reverse_engineering/node_modules/lodash/keyBy.js b/reverse_engineering/node_modules/lodash/keyBy.js deleted file mode 100644 index acc007a..0000000 --- a/reverse_engineering/node_modules/lodash/keyBy.js +++ /dev/null @@ -1,36 +0,0 @@ -var baseAssignValue = require('./_baseAssignValue'), - createAggregator = require('./_createAggregator'); - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the last element responsible for generating the key. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var array = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.keyBy(array, function(o) { - * return String.fromCharCode(o.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.keyBy(array, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - */ -var keyBy = createAggregator(function(result, value, key) { - baseAssignValue(result, key, value); -}); - -module.exports = keyBy; diff --git a/reverse_engineering/node_modules/lodash/keys.js b/reverse_engineering/node_modules/lodash/keys.js deleted file mode 100644 index d143c71..0000000 --- a/reverse_engineering/node_modules/lodash/keys.js +++ /dev/null @@ -1,37 +0,0 @@ -var arrayLikeKeys = require('./_arrayLikeKeys'), - baseKeys = require('./_baseKeys'), - isArrayLike = require('./isArrayLike'); - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -module.exports = keys; diff --git a/reverse_engineering/node_modules/lodash/keysIn.js b/reverse_engineering/node_modules/lodash/keysIn.js deleted file mode 100644 index a62308f..0000000 --- a/reverse_engineering/node_modules/lodash/keysIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var arrayLikeKeys = require('./_arrayLikeKeys'), - baseKeysIn = require('./_baseKeysIn'), - isArrayLike = require('./isArrayLike'); - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -module.exports = keysIn; diff --git a/reverse_engineering/node_modules/lodash/lang.js b/reverse_engineering/node_modules/lodash/lang.js deleted file mode 100644 index a396216..0000000 --- a/reverse_engineering/node_modules/lodash/lang.js +++ /dev/null @@ -1,58 +0,0 @@ -module.exports = { - 'castArray': require('./castArray'), - 'clone': require('./clone'), - 'cloneDeep': require('./cloneDeep'), - 'cloneDeepWith': require('./cloneDeepWith'), - 'cloneWith': require('./cloneWith'), - 'conformsTo': require('./conformsTo'), - 'eq': require('./eq'), - 'gt': require('./gt'), - 'gte': require('./gte'), - 'isArguments': require('./isArguments'), - 'isArray': require('./isArray'), - 'isArrayBuffer': require('./isArrayBuffer'), - 'isArrayLike': require('./isArrayLike'), - 'isArrayLikeObject': require('./isArrayLikeObject'), - 'isBoolean': require('./isBoolean'), - 'isBuffer': require('./isBuffer'), - 'isDate': require('./isDate'), - 'isElement': require('./isElement'), - 'isEmpty': require('./isEmpty'), - 'isEqual': require('./isEqual'), - 'isEqualWith': require('./isEqualWith'), - 'isError': require('./isError'), - 'isFinite': require('./isFinite'), - 'isFunction': require('./isFunction'), - 'isInteger': require('./isInteger'), - 'isLength': require('./isLength'), - 'isMap': require('./isMap'), - 'isMatch': require('./isMatch'), - 'isMatchWith': require('./isMatchWith'), - 'isNaN': require('./isNaN'), - 'isNative': require('./isNative'), - 'isNil': require('./isNil'), - 'isNull': require('./isNull'), - 'isNumber': require('./isNumber'), - 'isObject': require('./isObject'), - 'isObjectLike': require('./isObjectLike'), - 'isPlainObject': require('./isPlainObject'), - 'isRegExp': require('./isRegExp'), - 'isSafeInteger': require('./isSafeInteger'), - 'isSet': require('./isSet'), - 'isString': require('./isString'), - 'isSymbol': require('./isSymbol'), - 'isTypedArray': require('./isTypedArray'), - 'isUndefined': require('./isUndefined'), - 'isWeakMap': require('./isWeakMap'), - 'isWeakSet': require('./isWeakSet'), - 'lt': require('./lt'), - 'lte': require('./lte'), - 'toArray': require('./toArray'), - 'toFinite': require('./toFinite'), - 'toInteger': require('./toInteger'), - 'toLength': require('./toLength'), - 'toNumber': require('./toNumber'), - 'toPlainObject': require('./toPlainObject'), - 'toSafeInteger': require('./toSafeInteger'), - 'toString': require('./toString') -}; diff --git a/reverse_engineering/node_modules/lodash/last.js b/reverse_engineering/node_modules/lodash/last.js deleted file mode 100644 index cad1eaf..0000000 --- a/reverse_engineering/node_modules/lodash/last.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -module.exports = last; diff --git a/reverse_engineering/node_modules/lodash/lastIndexOf.js b/reverse_engineering/node_modules/lodash/lastIndexOf.js deleted file mode 100644 index dabfb61..0000000 --- a/reverse_engineering/node_modules/lodash/lastIndexOf.js +++ /dev/null @@ -1,46 +0,0 @@ -var baseFindIndex = require('./_baseFindIndex'), - baseIsNaN = require('./_baseIsNaN'), - strictLastIndexOf = require('./_strictLastIndexOf'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // Search from the `fromIndex`. - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - */ -function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return value === value - ? strictLastIndexOf(array, value, index) - : baseFindIndex(array, baseIsNaN, index, true); -} - -module.exports = lastIndexOf; diff --git a/reverse_engineering/node_modules/lodash/lodash.js b/reverse_engineering/node_modules/lodash/lodash.js deleted file mode 100644 index 1fd7116..0000000 --- a/reverse_engineering/node_modules/lodash/lodash.js +++ /dev/null @@ -1,17161 +0,0 @@ -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; - - /** Used as the semantic version number. */ - var VERSION = '4.17.20'; - - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; - - /** Error message constants. */ - var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', - FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; - - /** Used as the maximum memoize cache size. */ - var MAX_MEMOIZE_SIZE = 500; - - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; - - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; - - /** Used as default options for `_.truncate`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; - - /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 800, - HOT_SPAN = 16; - - /** Used to indicate the type of lazy iteratees. */ - var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2, - LAZY_WHILE_FLAG = 3; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - - /** Used to associate wrap methods with their bit flags. */ - var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] - ]; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - domExcTag = '[object DOMException]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]', - weakSetTag = '[object WeakSet]'; - - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, - reUnescapedHtml = /[&<>"']/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; - - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); - - /** Used to match leading and trailing whitespace. */ - var reTrim = /^\s+|\s+$/g, - reTrimStart = /^\s+/, - reTrimEnd = /\s+$/; - - /** Used to match wrap detail comments. */ - var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, - reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; - - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; - - /** - * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; - - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; - - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; - - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; - - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - - /** Used to match Latin Unicode letters (excluding mathematical operators). */ - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; - - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - - /** Used to compose unicode character classes. */ - var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\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', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - - /** Used to compose unicode capture groups. */ - var rsApos = "['\u2019]", - rsAstral = '[' + rsAstralRange + ']', - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - - /** Used to compose unicode regexes. */ - var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', - rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - - /** Used to match apostrophes. */ - var reApos = RegExp(rsApos, 'g'); - - /** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ - var reComboMark = RegExp(rsCombo, 'g'); - - /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - - /** Used to match complex or compound words. */ - var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji - ].join('|'), 'g'); - - /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - - /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - - /** Used to assign default `context` object properties. */ - var contextProps = [ - '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' - ]; - - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; - - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = - typedArrayTags[errorTag] = typedArrayTags[funcTag] = - typedArrayTags[mapTag] = typedArrayTags[numberTag] = - typedArrayTags[objectTag] = typedArrayTags[regexpTag] = - typedArrayTags[setTag] = typedArrayTags[stringTag] = - typedArrayTags[weakMapTag] = false; - - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = - cloneableTags[boolTag] = cloneableTags[dateTag] = - cloneableTags[float32Tag] = cloneableTags[float64Tag] = - cloneableTags[int8Tag] = cloneableTags[int16Tag] = - cloneableTags[int32Tag] = cloneableTags[mapTag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[setTag] = - cloneableTags[stringTag] = cloneableTags[symbolTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[weakMapTag] = false; - - /** Used to map Latin Unicode letters to basic Latin letters. */ - var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' - }; - - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Used to map HTML entities to characters. */ - var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" - }; - - /** Used to escape characters for inclusion in compiled string literals. */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /** Built-in method references without a dependency on `root`. */ - var freeParseFloat = parseFloat, - freeParseInt = parseInt; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); - - /** Detect free variable `exports`. */ - var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; - - /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; - - /** Used to access faster Node.js helpers. */ - var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; - - if (types) { - return types; - } - - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} - }()); - - /* Node.js helper references. */ - var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, - nodeIsDate = nodeUtil && nodeUtil.isDate, - nodeIsMap = nodeUtil && nodeUtil.isMap, - nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, - nodeIsSet = nodeUtil && nodeUtil.isSet, - nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - - /*--------------------------------------------------------------------------*/ - - /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ - function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); - } - - /** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); - } - return accumulator; - } - - /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; - - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; - } - - /** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ - function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; - } - - /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; - } - - /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; - } - - /** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; - } - - /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; - } - - /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; - } - - /** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; - } - - /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; - } - - /** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - var asciiSize = baseProperty('length'); - - /** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function asciiToArray(string) { - return string.split(''); - } - - /** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function asciiWords(string) { - return string.match(reAsciiWord) || []; - } - - /** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; - } - }); - return result; - } - - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); - } - - /** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; - } - - /** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ - function baseIsNaN(value) { - return value !== value; - } - - /** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ - function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; - } - - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } - - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } - - /** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ - function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; - } - - /** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ - function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; - - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); - } - } - return result; - } - - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; - } - - /** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ - function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); - } - - /** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ - function baseUnary(func) { - return function(value) { - return func(value); - }; - } - - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); - } - - /** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function cacheHas(cache, key) { - return cache.has(key); - } - - /** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ - function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } - - /** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ - function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } - - /** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ - function countHolders(array, placeholder) { - var length = array.length, - result = 0; - - while (length--) { - if (array[length] === placeholder) { - ++result; - } - } - return result; - } - - /** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - var deburrLetter = basePropertyOf(deburredLetters); - - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); - - /** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; - } - - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; - } - - /** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ - function hasUnicode(string) { - return reHasUnicode.test(string); - } - - /** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ - function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); - } - - /** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ - function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; - } - - /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; - } - - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - - /** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ - function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; - } - } - return result; - } - - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; - } - - /** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ - function setToPairs(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; - } - - /** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; - } - } - return index; - } - - /** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ - function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); - } - - /** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); - } - - /** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ - var unescapeHtmlChar = basePropertyOf(htmlUnescapes); - - /** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; - } - - /** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function unicodeToArray(string) { - return string.match(reUnicode) || []; - } - - /** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function unicodeWords(string) { - return string.match(reUnicodeWord) || []; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Create a new pristine `lodash` function using the `context` object. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Util - * @param {Object} [context=root] The context object. - * @returns {Function} Returns a new `lodash` function. - * @example - * - * _.mixin({ 'foo': _.constant('foo') }); - * - * var lodash = _.runInContext(); - * lodash.mixin({ 'bar': lodash.constant('bar') }); - * - * _.isFunction(_.foo); - * // => true - * _.isFunction(_.bar); - * // => false - * - * lodash.isFunction(lodash.foo); - * // => false - * lodash.isFunction(lodash.bar); - * // => true - * - * // Create a suped-up `defer` in Node.js. - * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; - */ - var runInContext = (function runInContext(context) { - context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); - - /** Built-in constructor references. */ - var Array = context.Array, - Date = context.Date, - Error = context.Error, - Function = context.Function, - Math = context.Math, - Object = context.Object, - RegExp = context.RegExp, - String = context.String, - TypeError = context.TypeError; - - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - - /** Used to detect overreaching core-js shims. */ - var coreJsData = context['__core-js_shared__']; - - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** Used to generate unique IDs. */ - var idCounter = 0; - - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; - }()); - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var nativeObjectToString = objectProto.toString; - - /** Used to infer the `Object` constructor. */ - var objectCtorString = funcToString.call(Object); - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = root._; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); - - /** Built-in value references. */ - var Buffer = moduleExports ? context.Buffer : undefined, - Symbol = context.Symbol, - Uint8Array = context.Uint8Array, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, - symIterator = Symbol ? Symbol.iterator : undefined, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; - - var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} - }()); - - /** Mocked built-ins. */ - var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, - ctxNow = Date && Date.now !== root.Date.now && Date.now, - ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeCeil = Math.ceil, - nativeFloor = Math.floor, - nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeIsFinite = context.isFinite, - nativeJoin = arrayProto.join, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max, - nativeMin = Math.min, - nativeNow = Date.now, - nativeParseInt = context.parseInt, - nativeRandom = Math.random, - nativeReverse = arrayProto.reverse; - - /* Built-in method references that are verified to be native. */ - var DataView = getNative(context, 'DataView'), - Map = getNative(context, 'Map'), - Promise = getNative(context, 'Promise'), - Set = getNative(context, 'Set'), - WeakMap = getNative(context, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - - /** Used to store function metadata. */ - var metaMap = WeakMap && new WeakMap; - - /** Used to lookup unminified function names. */ - var realNames = {}; - - /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); - } - - /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ - var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; - }()); - - /** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ - function baseLodash() { - // No operation performed. - } - - /** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; - } - - /** - * By default, the template delimiters used by lodash are like those in - * embedded Ruby (ERB) as well as ES2015 template strings. Change the - * following template settings to use alternative delimiters. - * - * @static - * @memberOf _ - * @type {Object} - */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'escape': reEscape, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'evaluate': reEvaluate, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type {string} - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type {Object} - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type {Function} - */ - '_': lodash - } - }; - - // Ensure wrappers are instances of `baseLodash`. - lodash.prototype = baseLodash.prototype; - lodash.prototype.constructor = lodash; - - LodashWrapper.prototype = baseCreate(baseLodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @constructor - * @param {*} value The value to wrap. - */ - function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; - } - - /** - * Creates a clone of the lazy wrapper object. - * - * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. - */ - function lazyClone() { - var result = new LazyWrapper(this.__wrapped__); - result.__actions__ = copyArray(this.__actions__); - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = copyArray(this.__iteratees__); - result.__takeCount__ = this.__takeCount__; - result.__views__ = copyArray(this.__views__); - return result; - } - - /** - * Reverses the direction of lazy iteration. - * - * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. - */ - function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; - } - return result; - } - - /** - * Extracts the unwrapped value from its lazy wrapper. - * - * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. - */ - function lazyValue() { - var array = this.__wrapped__.value(), - dir = this.__dir__, - isArr = isArray(array), - isRight = dir < 0, - arrLength = isArr ? array.length : 0, - view = getView(0, arrLength, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - iteratees = this.__iteratees__, - iterLength = iteratees.length, - resIndex = 0, - takeCount = nativeMin(length, this.__takeCount__); - - if (!isArr || (!isRight && arrLength == length && takeCount == length)) { - return baseWrapperValue(array, this.__actions__); - } - var result = []; - - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type, - computed = iteratee(value); - - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - result[resIndex++] = value; - } - return result; - } - - // Ensure `LazyWrapper` is an instance of `baseLodash`. - LazyWrapper.prototype = baseCreate(baseLodash.prototype); - LazyWrapper.prototype.constructor = LazyWrapper; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; - } - - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; - } - - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } - - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); - } - - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; - } - - // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - - /*------------------------------------------------------------------------*/ - - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - function listCacheClear() { - this.__data__ = []; - this.size = 0; - } - - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; - } - - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; - } - - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } - - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } - - // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; - } - - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; - } - - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } - - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } - - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; - } - - // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - - /*------------------------------------------------------------------------*/ - - /** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ - function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } - } - - /** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; - } - - /** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ - function setCacheHas(value) { - return this.__data__.has(value); - } - - // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - - /*------------------------------------------------------------------------*/ - - /** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; - } - - /** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ - function stackClear() { - this.__data__ = new ListCache; - this.size = 0; - } - - /** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - - this.size = data.size; - return result; - } - - /** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function stackGet(key) { - return this.__data__.get(key); - } - - /** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function stackHas(key) { - return this.__data__.has(key); - } - - /** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ - function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; - } - - // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; - } - - /** - * A specialized version of `_.sample` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. - */ - function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; - } - - /** - * A specialized version of `_.sampleSize` for arrays. - * - * @private - * @param {Array} array The array to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ - function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); - } - - /** - * A specialized version of `_.shuffle` for arrays. - * - * @private - * @param {Array} array The array to shuffle. - * @returns {Array} Returns the new shuffled array. - */ - function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); - } - - /** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } - - /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } - } - - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } - - /** - * Aggregates elements of `collection` on `accumulator` with keys transformed - * by `iteratee` and values set by `setter`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function baseAggregator(collection, setter, iteratee, accumulator) { - baseEach(collection, function(value, key, collection) { - setter(accumulator, value, iteratee(value), collection); - }); - return accumulator; - } - - /** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); - } - - /** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ - function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); - } - - /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } - } - - /** - * The base implementation of `_.at` without support for individual paths. - * - * @private - * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths to pick. - * @returns {Array} Returns the picked elements. - */ - function baseAt(object, paths) { - var index = -1, - length = paths.length, - result = Array(length), - skip = object == null; - - while (++index < length) { - result[index] = skip ? undefined : get(object, paths[index]); - } - return result; - } - - /** - * The base implementation of `_.clamp` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - */ - function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; - } - } - return number; - } - - /** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ - function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); - - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; - } - - /** - * The base implementation of `_.conforms` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - */ - function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; - } - - /** - * The base implementation of `_.conformsTo` which accepts `props` to check. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - */ - function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length], - predicate = source[key], - value = object[key]; - - if ((value === undefined && !(key in object)) || !predicate(value)) { - return false; - } - } - return true; - } - - /** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. - */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - */ - function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; - - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); - } - else if (!includes(values, computed, comparator)) { - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.forEachRight` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEachRight = createBaseEach(baseForOwnRight, true); - - /** - * The base implementation of `_.every` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; - } - - /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; - } - - /** - * The base implementation of `_.fill` without an iteratee call guard. - * - * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - */ - function baseFill(array, value, start, end) { - var length = array.length; - - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; - } - return array; - } - - /** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; - } - - /** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; - } - - /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseFor = createBaseFor(); - - /** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseForRight = createBaseFor(true); - - /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); - } - - /** - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ - function baseForOwnRight(object, iteratee) { - return object && baseForRight(object, iteratee, keys); - } - - /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. - */ - function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); - } - - /** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ - function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; - } - - /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); - } - - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); - } - - /** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ - function baseGt(value, other) { - return value > other; - } - - /** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); - } - - /** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHasIn(object, key) { - return object != null && key in Object(object); - } - - /** - * The base implementation of `_.inRange` which doesn't coerce arguments. - * - * @private - * @param {number} number The number to check. - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - */ - function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); - } - - /** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - */ - function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; - - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; - } - array = arrays[0]; - - var index = -1, - seen = caches[0]; - - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.invert` and `_.invertBy` which inverts - * `object` with values transformed by `iteratee` and set by `setter`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform values. - * @param {Object} accumulator The initial inverted object. - * @returns {Function} Returns `accumulator`. - */ - function baseInverter(object, setter, iteratee, accumulator) { - baseForOwn(object, function(value, key, object) { - setter(accumulator, iteratee(value), key, object); - }); - return accumulator; - } - - /** - * The base implementation of `_.invoke` without support for individual - * method arguments. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ - function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); - } - - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; - } - - /** - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - */ - function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; - } - - /** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } - - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - - /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); - } - - /** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ - function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; - } - - /** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ - function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; - } - - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } - - /** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; - } - - /** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ - function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; - } - - /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ - function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; - } - - /** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ - function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); - } - - /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; - } - - /** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ - function baseLt(value, other) { - return value < other; - } - - /** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; - } - - /** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; - } - - /** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ - function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; - } - - /** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); - } - - /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); - } - - /** - * The base implementation of `_.nth` which doesn't coerce arguments. - * - * @private - * @param {Array} array The array to query. - * @param {number} n The index of the element to return. - * @returns {*} Returns the nth element of `array`. - */ - function baseNth(array, n) { - var length = array.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; - } - - /** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ - function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap(iteratees, function(iteratee) { - if (isArray(iteratee)) { - return function(value) { - return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity]; - } - - var index = -1; - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); - } - - /** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ - function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); - } - - /** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ - function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); - - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } - } - return result; - } - - /** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; - } - - /** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ - function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; - - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; - - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; - } - - /** - * The base implementation of `_.pullAt` without support for individual - * indexes or capturing the removed elements. - * - * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. - */ - function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, - lastIndex = length - 1; - - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } - } - return array; - } - - /** - * The base implementation of `_.random` without support for returning - * floating-point numbers. - * - * @private - * @param {number} lower The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the random number. - */ - function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); - } - - /** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ - function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; - } - - /** - * The base implementation of `_.repeat` which doesn't coerce arguments. - * - * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. - */ - function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - - return result; - } - - /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); - } - - /** - * The base implementation of `_.sample`. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - */ - function baseSample(collection) { - return arraySample(values(collection)); - } - - /** - * The base implementation of `_.sampleSize` without param guards. - * - * @private - * @param {Array|Object} collection The collection to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. - */ - function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); - } - - /** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ - function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; - } - - /** - * The base implementation of `setData` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; - - /** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); - }; - - /** - * The base implementation of `_.shuffle`. - * - * @private - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - */ - function baseShuffle(collection) { - return shuffleSelf(values(collection)); - } - - /** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; - } - - /** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; - } - - /** - * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which - * performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function baseSortedIndex(array, value, retHighest) { - var low = 0, - high = array == null ? low : array.length; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if (computed !== null && !isSymbol(computed) && - (retHighest ? (computed <= value) : (computed < value))) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy(array, value, identity, retHighest); - } - - /** - * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` - * which invokes `iteratee` for `value` and each element of `array` to compute - * their sort ranking. The iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The iteratee invoked per element. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ - function baseSortedIndexBy(array, value, iteratee, retHighest) { - var low = 0, - high = array == null ? 0 : array.length; - if (high === 0) { - return 0; - } - - value = iteratee(value); - var valIsNaN = value !== value, - valIsNull = value === null, - valIsSymbol = isSymbol(value), - valIsUndefined = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - othIsDefined = computed !== undefined, - othIsNull = computed === null, - othIsReflexive = computed === computed, - othIsSymbol = isSymbol(computed); - - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); - } - - /** - * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ - function baseSortedUniq(array, iteratee) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - if (!index || !eq(computed, seen)) { - var seen = computed; - result[resIndex++] = value === 0 ? 0 : value; - } - } - return result; - } - - /** - * The base implementation of `_.toNumber` which doesn't ensure correct - * conversions of binary, hexadecimal, or octal string values. - * - * @private - * @param {*} value The value to process. - * @returns {number} Returns the number. - */ - function baseToNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - return +value; - } - - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; - } - - /** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ - function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * The base implementation of `_.unset`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The property path to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - */ - function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; - } - - /** - * The base implementation of `_.update`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to update. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ - function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); - } - - /** - * The base implementation of methods like `_.dropWhile` and `_.takeWhile` - * without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. - */ - function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && - predicate(array[index], index, array)) {} - - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); - } - - /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. - * - * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. - */ - function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - return arrayReduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); - } - - /** - * The base implementation of methods like `_.xor`, without support for - * iteratee shorthands, that accepts an array of arrays to inspect. - * - * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - */ - function baseXor(arrays, iteratee, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, - result = Array(length); - - while (++index < length) { - var array = arrays[index], - othIndex = -1; - - while (++othIndex < length) { - if (othIndex != index) { - result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); - } - } - } - return baseUniq(baseFlatten(result, 1), iteratee, comparator); - } - - /** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ - function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; - } - - /** - * Casts `value` to an empty array if it's not an array like object. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. - */ - function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; - } - - /** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ - function castFunction(value) { - return typeof value == 'function' ? value : identity; - } - - /** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ - function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); - } - - /** - * A `baseRest` alias which can be replaced with `identity` by module - * replacement plugins. - * - * @private - * @type {Function} - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ - var castRest = baseRest; - - /** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ - function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); - } - - /** - * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). - * - * @private - * @param {number|Object} id The timer id or timeout object of the timer to clear. - */ - var clearTimeout = ctxClearTimeout || function(id) { - return root.clearTimeout(id); - }; - - /** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ - function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - - buffer.copy(result); - return result; - } - - /** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ - function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; - } - - /** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ - function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); - } - - /** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ - function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; - } - - /** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ - function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; - } - - /** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ - function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); - } - - /** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; - } - - /** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ - function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; - } - - /** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; - } - - /** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ - function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; - - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; - } - - /** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ - function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; - } - - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; - } - - /** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ - function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); - } - - /** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ - function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); - } - - /** - * Creates a function like `_.groupBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} [initializer] The accumulator object initializer. - * @returns {Function} Returns the new aggregator function. - */ - function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, - accumulator = initializer ? initializer() : {}; - - return func(collection, setter, getIteratee(iteratee, 2), accumulator); - }; - } - - /** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); - } - - /** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - - /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - - /** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; - } - - /** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. - */ - function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; - } - - /** - * Creates a function like `_.camelCase`. - * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. - */ - function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; - } - - /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ - function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } - - /** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; - } - - /** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = getIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; - } - - /** - * Creates a `_.flow` or `_.flowRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. - */ - function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, - index = length, - prereq = LodashWrapper.prototype.thru; - - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == 'wrapper') { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : undefined; - - if (data && isLaziable(data[0]) && - data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && - !data[4].length && data[9] == 1 - ) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) - ? wrapper[funcName]() - : wrapper.thru(func); - } - } - return function() { - var args = arguments, - value = args[0]; - - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : value; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }); - } - - /** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; - } - - /** - * Creates a function like `_.invertBy`. - * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} toIteratee The function to resolve iteratees. - * @returns {Function} Returns the new inverter function. - */ - function createInverter(setter, toIteratee) { - return function(object, iteratee) { - return baseInverter(object, setter, toIteratee(iteratee), {}); - }; - } - - /** - * Creates a function that performs a mathematical operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @param {number} [defaultValue] The value used for `undefined` arguments. - * @returns {Function} Returns the new mathematical operation function. - */ - function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - if (result === undefined) { - return other; - } - if (typeof value == 'string' || typeof other == 'string') { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result = operator(value, other); - } - return result; - }; - } - - /** - * Creates a function like `_.over`. - * - * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new over function. - */ - function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); - } - - /** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. - * - * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. - */ - function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); - - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); - } - - /** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ - function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; - } - - /** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ - function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; - } - - /** - * Creates a function that performs a relational operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new relational operation function. - */ - function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == 'string' && typeof other == 'string')) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; - } - - /** - * Creates a function that wraps `func` to continue currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); - } - - /** - * Creates a function like `_.round`. - * - * @private - * @param {string} methodName The name of the `Math` method to use when rounding. - * @returns {Function} Returns the new round function. - */ - function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision && nativeIsFinite(number)) { - // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. - var pair = (toString(number) + 'e').split('e'), - value = func(pair[0] + 'e' + (+pair[1] + precision)); - - pair = (toString(value) + 'e').split('e'); - return +(pair[0] + 'e' + (+pair[1] - precision)); - } - return func(number); - }; - } - - /** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ - var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); - }; - - /** - * Creates a `_.toPairs` or `_.toPairsIn` function. - * - * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. - */ - function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); - } - return baseToPairs(object, keysFunc(object)); - }; - } - - /** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ - function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; - - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); - } - - /** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ - function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; - } - - /** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. - */ - function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); - } - return objValue; - } - - /** - * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain - * objects. - * - * @private - * @param {*} value The value to inspect. - * @param {string} key The key of the property to inspect. - * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. - */ - function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; - } - - /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; - } - - /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; - } - - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; - } - - /** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); - } - - /** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); - } - - /** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ - function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); - } - - /** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ - var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); - }; - - /** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ - function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; - } - - /** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ - function getHolder(func) { - var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; - return object.placeholder; - } - - /** - * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, - * this function returns the custom method, otherwise it returns `baseIteratee`. - * If arguments are provided, the chosen function is invoked with them and - * its result is returned. - * - * @private - * @param {*} [value] The value to convert to an iteratee. - * @param {number} [arity] The arity of the created iteratee. - * @returns {Function} Returns the chosen function or its result. - */ - function getIteratee() { - var result = lodash.iteratee || iteratee; - result = result === iteratee ? baseIteratee : result; - return arguments.length ? result(arguments[0], arguments[1]) : result; - } - - /** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; - } - - /** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ - function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; - } - - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } - - /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; - } - - /** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ - var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); - }; - - /** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ - var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; - }; - - /** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - var getTag = baseGetTag; - - // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. - if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; - } - - /** - * Gets the view, applying any `transforms` to the `start` and `end` positions. - * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} transforms The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. - */ - function getView(start, end, transforms) { - var index = -1, - length = transforms.length; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } - } - return { 'start': start, 'end': end }; - } - - /** - * Extracts wrapper details from the `source` body comment. - * - * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. - */ - function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; - } - - /** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ - function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); - } - - /** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ - function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; - } - - /** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; - } - - /** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return cloneSymbol(object); - } - } - - /** - * Inserts wrapper `details` in a comment at the top of the `source` body. - * - * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. - */ - function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); - } - - /** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); - } - - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; - } - - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); - } - - /** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ - function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); - } - - /** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. - */ - function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; - } - - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); - } - - /** - * Checks if `func` is capable of being masked. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `func` is maskable, else `false`. - */ - var isMaskable = coreJsData ? isFunction : stubFalse; - - /** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; - } - - /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ - function isStrictComparable(value) { - return value === value && !isObject(value); - } - - /** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ - function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; - } - - /** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ - function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; - } - - /** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ - function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; - } - - /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ - function objectToString(value) { - return nativeObjectToString.call(value); - } - - /** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; - } - - /** - * Gets the parent value at `path` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path to get the parent value of. - * @returns {*} Returns the parent value. - */ - function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); - } - - /** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ - function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; - } - - /** - * Gets the value at `key`, unless `key` is "__proto__" or "constructor". - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function safeGet(object, key) { - if (key === 'constructor' && typeof object[key] === 'function') { - return; - } - - if (key == '__proto__') { - return; - } - - return object[key]; - } - - /** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var setData = shortOut(baseSetData); - - /** - * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). - * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @returns {number|Object} Returns the timer id or timeout object. - */ - var setTimeout = ctxSetTimeout || function(func, wait) { - return root.setTimeout(func, wait); - }; - - /** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var setToString = shortOut(baseSetToString); - - /** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. - * - * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. - */ - function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); - } - - /** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ - function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; - } - - /** - * A specialized version of `_.shuffle` which mutates and sets the size of `array`. - * - * @private - * @param {Array} array The array to shuffle. - * @param {number} [size=array.length] The size of `array`. - * @returns {Array} Returns `array`. - */ - function shuffleSelf(array, size) { - var index = -1, - length = array.length, - lastIndex = length - 1; - - size = size === undefined ? length : size; - while (++index < size) { - var rand = baseRandom(index, lastIndex), - value = array[rand]; - - array[rand] = array[index]; - array[index] = value; - } - array.length = size; - return array; - } - - /** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ - var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - }); - - /** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ - function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; - } - - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; - } - - /** - * Updates wrapper `details` based on `bitmask` flags. - * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. - */ - function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); - } - - /** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ - function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an array of elements split into groups the length of `size`. - * If `array` can't be split evenly, the final chunk will be the remaining - * elements. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array of chunks. - * @example - * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] - * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] - */ - function chunk(array, size, guard) { - if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { - size = 1; - } else { - size = nativeMax(toInteger(size), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size < 1) { - return []; - } - var index = 0, - resIndex = 0, - result = Array(nativeCeil(length / size)); - - while (index < length) { - result[resIndex++] = baseSlice(array, index, (index += size)); - } - return result; - } - - /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[resIndex++] = value; - } - } - return result; - } - - /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); - } - - /** - * Creates an array of `array` values not included in the other given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * **Note:** Unlike `_.pullAll`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.without, _.xor - * @example - * - * _.difference([2, 1], [2, 3]); - * // => [1] - */ - var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; - }); - - /** - * This method is like `_.difference` except that it accepts `iteratee` which - * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * **Note:** Unlike `_.pullAllBy`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2] - * - * // The `_.property` iteratee shorthand. - * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ - var differenceBy = baseRest(function(array, values) { - var iteratee = last(values); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) - : []; - }); - - /** - * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The order and - * references of result values are determined by the first array. The comparator - * is invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.pullAllWith`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * - * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); - * // => [{ 'x': 2, 'y': 1 }] - */ - var differenceWith = baseRest(function(array, values) { - var comparator = last(values); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) - : []; - }); - - /** - * Creates a slice of `array` with `n` elements dropped from the beginning. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] - * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); - } - - /** - * Creates a slice of `array` with `n` elements dropped from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] - * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] - */ - function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.dropRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney'] - * - * // The `_.matches` iteratee shorthand. - * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropRightWhile(users, ['active', false]); - * // => objects for ['barney'] - * - * // The `_.property` iteratee shorthand. - * _.dropRightWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ - function dropRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true, true) - : []; - } - - /** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.dropWhile(users, function(o) { return !o.active; }); - * // => objects for ['pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.dropWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropWhile(users, ['active', false]); - * // => objects for ['pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.dropWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] - */ - function dropWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true) - : []; - } - - /** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8, 10], '*', 1, 3); - * // => [4, '*', '*', 10] - */ - function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); - } - - /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, getIteratee(predicate, 3), index); - } - - /** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); - * // => 2 - * - * // The `_.matches` iteratee shorthand. - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastIndex(users, ['active', false]); - * // => 2 - * - * // The `_.property` iteratee shorthand. - * _.findLastIndex(users, 'active'); - * // => 0 - */ - function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1); - } - return baseFindIndex(array, getIteratee(predicate, 3), index, true); - } - - /** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; - } - - /** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; - } - - /** - * Recursively flatten `array` up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Array - * @param {Array} array The array to flatten. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * var array = [1, [2, [3, [4]], 5]]; - * - * _.flattenDepth(array, 1); - * // => [1, 2, [3, [4]], 5] - * - * _.flattenDepth(array, 2); - * // => [1, 2, 3, [4], 5] - */ - function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); - } - - /** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } - */ - function fromPairs(pairs) { - var index = -1, - length = pairs == null ? 0 : pairs.length, - result = {}; - - while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; - } - return result; - } - - /** - * Gets the first element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. - * @example - * - * _.head([1, 2, 3]); - * // => 1 - * - * _.head([]); - * // => undefined - */ - function head(array) { - return (array && array.length) ? array[0] : undefined; - } - - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseIndexOf(array, value, index); - } - - /** - * Gets all but the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - */ - function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; - } - - /** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersection([2, 1], [2, 3]); - * // => [2] - */ - var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; - }); - - /** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [2.1] - * - * // The `_.property` iteratee shorthand. - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ - var intersectionBy = baseRest(function(arrays) { - var iteratee = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - if (iteratee === last(mapped)) { - iteratee = undefined; - } else { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, getIteratee(iteratee, 2)) - : []; - }); - - /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ - var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; - }); - - /** - * Converts all elements in `array` into a string separated by `separator`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to convert. - * @param {string} [separator=','] The element separator. - * @returns {string} Returns the joined string. - * @example - * - * _.join(['a', 'b', 'c'], '~'); - * // => 'a~b~c' - */ - function join(array, separator) { - return array == null ? '' : nativeJoin.call(array, separator); - } - - /** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; - } - - /** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.lastIndexOf([1, 2, 1, 2], 2); - * // => 3 - * - * // Search from the `fromIndex`. - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 - */ - function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return value === value - ? strictLastIndexOf(array, value, index) - : baseFindIndex(array, baseIsNaN, index, true); - } - - /** - * Gets the element at index `n` of `array`. If `n` is negative, the nth - * element from the end is returned. - * - * @static - * @memberOf _ - * @since 4.11.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=0] The index of the element to return. - * @returns {*} Returns the nth element of `array`. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * - * _.nth(array, 1); - * // => 'b' - * - * _.nth(array, -2); - * // => 'c'; - */ - function nth(array, n) { - return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; - } - - /** - * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` - * to remove elements from an array by predicate. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pull(array, 'a', 'c'); - * console.log(array); - * // => ['b', 'b'] - */ - var pull = baseRest(pullAll); - - /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pullAll(array, ['a', 'c']); - * console.log(array); - * // => ['b', 'b'] - */ - function pullAll(array, values) { - return (array && array.length && values && values.length) - ? basePullAll(array, values) - : array; - } - - /** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] - */ - function pullAllBy(array, values, iteratee) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, getIteratee(iteratee, 2)) - : array; - } - - /** - * This method is like `_.pullAll` except that it accepts `comparator` which - * is invoked to compare elements of `array` to `values`. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.differenceWith`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; - * - * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); - * console.log(array); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] - */ - function pullAllWith(array, values, comparator) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, undefined, comparator) - : array; - } - - /** - * Removes elements from `array` corresponding to `indexes` and returns an - * array of removed elements. - * - * **Note:** Unlike `_.at`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = ['a', 'b', 'c', 'd']; - * var pulled = _.pullAt(array, [1, 3]); - * - * console.log(array); - * // => ['a', 'c'] - * - * console.log(pulled); - * // => ['b', 'd'] - */ - var pullAt = flatRest(function(array, indexes) { - var length = array == null ? 0 : array.length, - result = baseAt(array, indexes); - - basePullAt(array, arrayMap(indexes, function(index) { - return isIndex(index, length) ? +index : index; - }).sort(compareAscending)); - - return result; - }); - - /** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is invoked - * with three arguments: (value, index, array). - * - * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` - * to pull elements from an array by value. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new array of removed elements. - * @example - * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); - * - * console.log(array); - * // => [1, 3] - * - * console.log(evens); - * // => [2, 4] - */ - function remove(array, predicate) { - var result = []; - if (!(array && array.length)) { - return result; - } - var index = -1, - indexes = [], - length = array.length; - - predicate = getIteratee(predicate, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } - } - basePullAt(array, indexes); - return result; - } - - /** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. - * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.reverse(array); - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - function reverse(array) { - return array == null ? array : nativeReverse.call(array); - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. - * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - else { - start = start == null ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); - } - return baseSlice(array, start, end); - } - - /** - * Uses a binary search to determine the lowest index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - */ - function sortedIndex(array, value) { - return baseSortedIndex(array, value); - } - - /** - * This method is like `_.sortedIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); - * // => 0 - */ - function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); - } - - /** - * This method is like `_.indexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedIndexOf([4, 5, 5, 5, 6], 5); - * // => 1 - */ - function sortedIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value); - if (index < length && eq(array[index], value)) { - return index; - } - } - return -1; - } - - /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * _.sortedLastIndex([4, 5, 5, 5, 6], 5); - * // => 4 - */ - function sortedLastIndex(array, value) { - return baseSortedIndex(array, value, true); - } - - /** - * This method is like `_.sortedLastIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example - * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; - * - * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 1 - * - * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); - * // => 1 - */ - function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); - } - - /** - * This method is like `_.lastIndexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); - * // => 3 - */ - function sortedLastIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value, true) - 1; - if (eq(array[index], value)) { - return index; - } - } - return -1; - } - - /** - * This method is like `_.uniq` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniq([1, 1, 2]); - * // => [1, 2] - */ - function sortedUniq(array) { - return (array && array.length) - ? baseSortedUniq(array) - : []; - } - - /** - * This method is like `_.uniqBy` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); - * // => [1.1, 2.3] - */ - function sortedUniqBy(array, iteratee) { - return (array && array.length) - ? baseSortedUniq(array, getIteratee(iteratee, 2)) - : []; - } - - /** - * Gets all but the first element of `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.tail([1, 2, 3]); - * // => [2, 3] - */ - function tail(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 1, length) : []; - } - - /** - * Creates a slice of `array` with `n` elements taken from the beginning. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.take([1, 2, 3]); - * // => [1] - * - * _.take([1, 2, 3], 2); - * // => [1, 2] - * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.take([1, 2, 3], 0); - * // => [] - */ - function take(array, n, guard) { - if (!(array && array.length)) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, 0, n < 0 ? 0 : n); - } - - /** - * Creates a slice of `array` with `n` elements taken from the end. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. - * @example - * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] - * - * _.takeRight([1, 2, 3], 0); - * // => [] - */ - function takeRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, n < 0 ? 0 : n, length); - } - - /** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.takeRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeRightWhile(users, ['active', false]); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.takeRightWhile(users, 'active'); - * // => [] - */ - function takeRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), false, true) - : []; - } - - /** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.takeWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matches` iteratee shorthand. - * _.takeWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeWhile(users, ['active', false]); - * // => objects for ['barney', 'fred'] - * - * // The `_.property` iteratee shorthand. - * _.takeWhile(users, 'active'); - * // => [] - */ - function takeWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3)) - : []; - } - - /** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ - var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); - }); - - /** - * This method is like `_.union` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. Result values are chosen from the first - * array in which the value occurs. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.unionBy([2.1], [1.2, 2.3], Math.floor); - * // => [2.1, 1.2] - * - * // The `_.property` iteratee shorthand. - * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - var unionBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); - }); - - /** - * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. Result values are chosen from - * the first array in which the value occurs. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.unionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - var unionWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); - }); - - /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. The order of result values is determined by the order they occur - * in the array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ - function uniq(array) { - return (array && array.length) ? baseUniq(array) : []; - } - - /** - * This method is like `_.uniq` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The order of result values is determined by the - * order they occur in the array. The iteratee is invoked with one argument: - * (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniqBy([2.1, 1.2, 2.3], Math.floor); - * // => [2.1, 1.2] - * - * // The `_.property` iteratee shorthand. - * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - function uniqBy(array, iteratee) { - return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; - } - - /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The order of result values is - * determined by the order they occur in the array.The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] - */ - function uniqWith(array, comparator) { - comparator = typeof comparator == 'function' ? comparator : undefined; - return (array && array.length) ? baseUniq(array, undefined, comparator) : []; - } - - /** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. - * - * @static - * @memberOf _ - * @since 1.2.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - * - * _.unzip(zipped); - * // => [['a', 'b'], [1, 2], [true, false]] - */ - function unzip(array) { - if (!(array && array.length)) { - return []; - } - var length = 0; - array = arrayFilter(array, function(group) { - if (isArrayLikeObject(group)) { - length = nativeMax(group.length, length); - return true; - } - }); - return baseTimes(length, function(index) { - return arrayMap(array, baseProperty(index)); - }); - } - - /** - * This method is like `_.unzip` except that it accepts `iteratee` to specify - * how regrouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @param {Function} [iteratee=_.identity] The function to combine - * regrouped values. - * @returns {Array} Returns the new array of regrouped elements. - * @example - * - * var zipped = _.zip([1, 2], [10, 20], [100, 200]); - * // => [[1, 10, 100], [2, 20, 200]] - * - * _.unzipWith(zipped, _.add); - * // => [3, 30, 300] - */ - function unzipWith(array, iteratee) { - if (!(array && array.length)) { - return []; - } - var result = unzip(array); - if (iteratee == null) { - return result; - } - return arrayMap(result, function(group) { - return apply(iteratee, undefined, group); - }); - } - - /** - * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.pull`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.xor - * @example - * - * _.without([2, 1, 2, 3], 1, 2); - * // => [3] - */ - var without = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, values) - : []; - }); - - /** - * Creates an array of unique values that is the - * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. The order of result values is determined by the order - * they occur in the arrays. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.without - * @example - * - * _.xor([2, 1], [2, 3]); - * // => [1, 3] - */ - var xor = baseRest(function(arrays) { - return baseXor(arrayFilter(arrays, isArrayLikeObject)); - }); - - /** - * This method is like `_.xor` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The order of result values is determined - * by the order they occur in the arrays. The iteratee is invoked with one - * argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2, 3.4] - * - * // The `_.property` iteratee shorthand. - * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ - var xorBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); - }); - - /** - * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The order of result values is - * determined by the order they occur in the arrays. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.xorWith(objects, others, _.isEqual); - * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - var xorWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); - }); - - /** - * Creates an array of grouped elements, the first of which contains the - * first elements of the given arrays, the second of which contains the - * second elements of the given arrays, and so on. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - */ - var zip = baseRest(unzip); - - /** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ - function zipObject(props, values) { - return baseZipObject(props || [], values || [], assignValue); - } - - /** - * This method is like `_.zipObject` except that it supports property paths. - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); - * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } - */ - function zipObjectDeep(props, values) { - return baseZipObject(props || [], values || [], baseSet); - } - - /** - * This method is like `_.zip` except that it accepts `iteratee` to specify - * how grouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine - * grouped values. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { - * return a + b + c; - * }); - * // => [111, 222] - */ - var zipWith = baseRest(function(arrays) { - var length = arrays.length, - iteratee = length > 1 ? arrays[length - 1] : undefined; - - iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; - return unzipWith(arrays, iteratee); - }); - - /*------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; - * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' - */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; - } - - /** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. - * @example - * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] - */ - function tap(value, interceptor) { - interceptor(value); - return value; - } - - /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * The purpose of this method is to "pass thru" values replacing intermediate - * results in a method chain sequence. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns the result of `interceptor`. - * @example - * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] - */ - function thru(value, interceptor) { - return interceptor(value); - } - - /** - * This method is the wrapper version of `_.at`. - * - * @name at - * @memberOf _ - * @since 1.0.0 - * @category Seq - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; - * - * _(object).at(['a[0].b.c', 'a[1]']).value(); - * // => [3, 4] - */ - var wrapperAt = flatRest(function(paths) { - var length = paths.length, - start = length ? paths[0] : 0, - value = this.__wrapped__, - interceptor = function(object) { return baseAt(object, paths); }; - - if (length > 1 || this.__actions__.length || - !(value instanceof LazyWrapper) || !isIndex(start)) { - return this.thru(interceptor); - } - value = value.slice(start, +start + (length ? 1 : 0)); - value.__actions__.push({ - 'func': thru, - 'args': [interceptor], - 'thisArg': undefined - }); - return new LodashWrapper(value, this.__chain__).thru(function(array) { - if (length && !array.length) { - array.push(undefined); - } - return array; - }); - }); - - /** - * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. - * - * @name chain - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // A sequence without explicit chaining. - * _(users).head(); - * // => { 'user': 'barney', 'age': 36 } - * - * // A sequence with explicit chaining. - * _(users) - * .chain() - * .head() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } - */ - function wrapperChain() { - return chain(this); - } - - /** - * Executes the chain sequence and returns the wrapped result. - * - * @name commit - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapped = _(array).push(3); - * - * console.log(array); - * // => [1, 2] - * - * wrapped = wrapped.commit(); - * console.log(array); - * // => [1, 2, 3] - * - * wrapped.last(); - * // => 3 - * - * console.log(array); - * // => [1, 2, 3] - */ - function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); - } - - /** - * Gets the next value on a wrapped object following the - * [iterator protocol](https://mdn.io/iteration_protocols#iterator). - * - * @name next - * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the next iterator value. - * @example - * - * var wrapped = _([1, 2]); - * - * wrapped.next(); - * // => { 'done': false, 'value': 1 } - * - * wrapped.next(); - * // => { 'done': false, 'value': 2 } - * - * wrapped.next(); - * // => { 'done': true, 'value': undefined } - */ - function wrapperNext() { - if (this.__values__ === undefined) { - this.__values__ = toArray(this.value()); - } - var done = this.__index__ >= this.__values__.length, - value = done ? undefined : this.__values__[this.__index__++]; - - return { 'done': done, 'value': value }; - } - - /** - * Enables the wrapper to be iterable. - * - * @name Symbol.iterator - * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the wrapper object. - * @example - * - * var wrapped = _([1, 2]); - * - * wrapped[Symbol.iterator]() === wrapped; - * // => true - * - * Array.from(wrapped); - * // => [1, 2] - */ - function wrapperToIterator() { - return this; - } - - /** - * Creates a clone of the chain sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @since 3.2.0 - * @category Seq - * @param {*} value The value to plant. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2]).map(square); - * var other = wrapped.plant([3, 4]); - * - * other.value(); - * // => [9, 16] - * - * wrapped.value(); - * // => [1, 4] - */ - function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - clone.__index__ = 0; - clone.__values__ = undefined; - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; - } - - /** - * This method is the wrapper version of `_.reverse`. - * - * **Note:** This method mutates the wrapped array. - * - * @name reverse - * @memberOf _ - * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - var wrapped = value; - if (this.__actions__.length) { - wrapped = new LazyWrapper(this); - } - wrapped = wrapped.reverse(); - wrapped.__actions__.push({ - 'func': thru, - 'args': [reverse], - 'thisArg': undefined - }); - return new LodashWrapper(wrapped, this.__chain__); - } - return this.thru(reverse); - } - - /** - * Executes the chain sequence to resolve the unwrapped value. - * - * @name value - * @memberOf _ - * @since 0.1.0 - * @alias toJSON, valueOf - * @category Seq - * @returns {*} Returns the resolved unwrapped value. - * @example - * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] - */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the number of times the key was returned by `iteratee`. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': 1, '6': 2 } - * - * // The `_.property` iteratee shorthand. - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ - var countBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - ++result[key]; - } else { - baseAssignValue(result, key, 1); - } - }); - - /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); - * // => false - */ - function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); - } - - /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ - function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, getIteratee(predicate, 3)); - } - - /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ - var find = createFind(findIndex); - - /** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=collection.length-1] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ - var findLast = createFind(findLastIndex); - - /** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [n, n]; - * } - * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ - function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); - } - - /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDeep([1, 2], duplicate); - * // => [1, 1, 2, 2] - */ - function flatMapDeep(collection, iteratee) { - return baseFlatten(map(collection, iteratee), INFINITY); - } - - /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results up to `depth` times. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. - * @example - * - * function duplicate(n) { - * return [[[n, n]]]; - * } - * - * _.flatMapDepth([1, 2], duplicate, 2); - * // => [[1, 1], [2, 2]] - */ - function flatMapDepth(collection, iteratee, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee), depth); - } - - /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ - function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, getIteratee(iteratee, 3)); - } - - /** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @alias eachRight - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEach - * @example - * - * _.forEachRight([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `2` then `1`. - */ - function forEachRight(collection, iteratee) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, getIteratee(iteratee, 3)); - } - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The order of grouped values - * is determined by the order they occur in `collection`. The corresponding - * value of each key is an array of elements responsible for generating the - * key. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - * - * // The `_.property` iteratee shorthand. - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ - var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - baseAssignValue(result, key, [value]); - } - }); - - /** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ - function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); - } - - /** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `path` is a function, it's invoked - * for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - var invokeMap = baseRest(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result; - }); - - /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the last element responsible for generating the key. The - * iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * var array = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.keyBy(array, function(o) { - * return String.fromCharCode(o.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } - * - * _.keyBy(array, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } - */ - var keyBy = createAggregator(function(result, value, key) { - baseAssignValue(result, key, value); - }); - - /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ - function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, getIteratee(iteratee, 3)); - } - - /** - * This method is like `_.sortBy` except that it allows specifying the sort - * orders of the iteratees to sort by. If `orders` is unspecified, all values - * are sorted in ascending order. Otherwise, specify an order of "desc" for - * descending or "asc" for ascending sort order of corresponding values. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] - * The iteratees to sort by. - * @param {string[]} [orders] The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // Sort by `user` in ascending order and by `age` in descending order. - * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] - */ - function orderBy(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - orders = guard ? undefined : orders; - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseOrderBy(collection, iteratees, orders); - } - - /** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, the second of which - * contains elements `predicate` returns falsey for. The predicate is - * invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the array of grouped elements. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * _.partition(users, function(o) { return o.active; }); - * // => objects for [['fred'], ['barney', 'pebbles']] - * - * // The `_.matches` iteratee shorthand. - * _.partition(users, { 'age': 1, 'active': false }); - * // => objects for [['pebbles'], ['barney', 'fred']] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.partition(users, ['active', false]); - * // => objects for [['barney', 'pebbles'], ['fred']] - * - * // The `_.property` iteratee shorthand. - * _.partition(users, 'active'); - * // => objects for [['fred'], ['barney', 'pebbles']] - */ - var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); - }, function() { return [[], []]; }); - - /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ - function reduce(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); - } - - /** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduce - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ - function reduceRight(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduceRight : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); - } - - /** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.filter - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * _.reject(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.reject(users, { 'age': 40, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.reject(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.reject(users, 'active'); - * // => objects for ['barney'] - */ - function reject(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, negate(getIteratee(predicate, 3))); - } - - /** - * Gets a random element from `collection`. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. - * @example - * - * _.sample([1, 2, 3, 4]); - * // => 2 - */ - function sample(collection) { - var func = isArray(collection) ? arraySample : baseSample; - return func(collection); - } - - /** - * Gets `n` random elements at unique keys from `collection` up to the - * size of `collection`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @param {number} [n=1] The number of elements to sample. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the random elements. - * @example - * - * _.sampleSize([1, 2, 3], 2); - * // => [3, 1] - * - * _.sampleSize([1, 2, 3], 4); - * // => [2, 3, 1] - */ - function sampleSize(collection, n, guard) { - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - var func = isArray(collection) ? arraySampleSize : baseSampleSize; - return func(collection, n); - } - - /** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. - * @example - * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] - */ - function shuffle(collection) { - var func = isArray(collection) ? arrayShuffle : baseShuffle; - return func(collection); - } - - /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ - function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; - } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return baseKeys(collection).length; - } - - /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true - */ - function some(collection, predicate, guard) { - var func = isArray(collection) ? arraySome : baseSome; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ - var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); - }); - - /*------------------------------------------------------------------------*/ - - /** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ - var now = ctxNow || function() { - return root.Date.now(); - }; - - /*------------------------------------------------------------------------*/ - - /** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it's called `n` or more times. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); - * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => Logs 'done saving!' after the two async saves have completed. - */ - function after(n, func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - - /** - * Creates a function that invokes `func`, with up to `n` arguments, - * ignoring any additional arguments. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new capped function. - * @example - * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] - */ - function ary(func, n, guard) { - n = guard ? undefined : n; - n = (func && n == null) ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); - } - - /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ - function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; - } - - /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ - var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(func, bitmask, thisArg, partials, holders); - }); - - /** - * Creates a function that invokes the method at `object[key]` with `partials` - * prepended to the arguments it receives. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. See - * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Function - * @param {Object} object The object to invoke the method on. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; - * - * bound('!'); - * // => 'hiya fred!' - * - * // Bound with placeholders. - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' - */ - var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(key, bitmask, object, partials, holders); - }); - - /** - * Creates a function that accepts arguments of `func` and either invokes - * `func` returning its result, if at least `arity` number of arguments have - * been provided, or returns a function that accepts the remaining `func` - * arguments, and so on. The arity of `func` may be specified if `func.length` - * is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(1)(_, 3)(2); - * // => [1, 2, 3] - */ - function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; - return result; - } - - /** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. - * @example - * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] - * - * curried(2, 3)(1); - * // => [1, 2, 3] - * - * curried(1, 2, 3); - * // => [1, 2, 3] - * - * // Curried with placeholders. - * curried(3)(1, _)(2); - * // => [1, 2, 3] - */ - function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; - return result; - } - - /** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ - function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; - } - - /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. - */ - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); - }); - - /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. - * @example - * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. - */ - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); - }); - - /** - * Creates a function that invokes `func` with arguments reversed. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new flipped function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ - function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); - } - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ - function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; - } - - // Expose `MapCache`. - memoize.Cache = MapCache; - - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: return !predicate.call(this); - case 1: return !predicate.call(this, args[0]); - case 2: return !predicate.call(this, args[0], args[1]); - case 3: return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; - } - - /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ - function once(func) { - return before(2, func); - } - - /** - * Creates a function that invokes `func` with its arguments transformed. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Function - * @param {Function} func The function to wrap. - * @param {...(Function|Function[])} [transforms=[_.identity]] - * The argument transforms. - * @returns {Function} Returns the new function. - * @example - * - * function doubled(n) { - * return n * 2; - * } - * - * function square(n) { - * return n * n; - * } - * - * var func = _.overArgs(function(x, y) { - * return [x, y]; - * }, [square, doubled]); - * - * func(9, 3); - * // => [81, 6] - * - * func(10, 5); - * // => [100, 10] - */ - var overArgs = castRest(function(func, transforms) { - transforms = (transforms.length == 1 && isArray(transforms[0])) - ? arrayMap(transforms[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); - - var funcsLength = transforms.length; - return baseRest(function(args) { - var index = -1, - length = nativeMin(args.length, funcsLength); - - while (++index < length) { - args[index] = transforms[index].call(this, args[index]); - } - return apply(func, this, args); - }); - }); - - /** - * Creates a function that invokes `func` with `partials` prepended to the - * arguments it receives. This method is like `_.bind` except it does **not** - * alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @since 0.2.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } - * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' - * - * // Partially applied with placeholders. - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ - var partial = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partial)); - return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); - }); - - /** - * This method is like `_.partial` except that partially applied arguments - * are appended to the arguments it receives. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } - * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - * - * // Partially applied with placeholders. - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' - */ - var partialRight = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); - }); - - /** - * Creates a function that invokes `func` with arguments arranged according - * to the specified `indexes` where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes. - * @returns {Function} Returns the new function. - * @example - * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, [2, 0, 1]); - * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] - */ - var rearg = flatRest(function(func, indexes) { - return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); - }); - - /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start === undefined ? start : toInteger(start); - return baseRest(func, start); - } - - /** - * Creates a function that invokes `func` with the `this` binding of the - * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). - * - * **Note:** This method is based on the - * [spread operator](https://mdn.io/spread_operator). - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Function - * @param {Function} func The function to spread arguments over. - * @param {number} [start=0] The start position of the spread. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); - * - * say(['fred', 'hello']); - * // => 'fred says hello' - * - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); - * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 - */ - function spread(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start == null ? 0 : nativeMax(toInteger(start), 0); - return baseRest(function(args) { - var array = args[start], - otherArgs = castSlice(args, 0, start); - - if (array) { - arrayPush(otherArgs, array); - } - return apply(func, this, otherArgs); - }); - } - - /** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide `options` to indicate whether `func` - * should be invoked on the leading and/or trailing edge of the `wait` - * timeout. The `func` is invoked with the last arguments provided to the - * throttled function. Subsequent calls to the throttled function return the - * result of the last `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the throttled function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=true] - * Specify invoking on the leading edge of the timeout. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // Avoid excessively updating the position while scrolling. - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. - * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); - * jQuery(element).on('click', throttled); - * - * // Cancel the trailing throttled invocation. - * jQuery(window).on('popstate', throttled.cancel); - */ - function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - return debounce(func, wait, { - 'leading': leading, - 'maxWait': wait, - 'trailing': trailing - }); - } - - /** - * Creates a function that accepts up to one argument, ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - * @example - * - * _.map(['6', '8', '10'], _.unary(parseInt)); - * // => [6, 8, 10] - */ - function unary(func) { - return ary(func, 1); - } - - /** - * Creates a function that provides `value` to `wrapper` as its first - * argument. Any additional arguments provided to the function are appended - * to those provided to the `wrapper`. The wrapper is invoked with the `this` - * binding of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {*} value The value to wrap. - * @param {Function} [wrapper=identity] The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var p = _.wrap(_.escape, function(func, text) { - * return '

' + func(text) + '

'; - * }); - * - * p('fred, barney, & pebbles'); - * // => '

fred, barney, & pebbles

' - */ - function wrap(value, wrapper) { - return partial(castFunction(wrapper), value); - } - - /*------------------------------------------------------------------------*/ - - /** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ - function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; - } - - /** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ - function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); - } - - /** - * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined`, - * cloning is handled by the method instead. The `customizer` is invoked with - * up to four arguments; (value [, index|key, object, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the cloned value. - * @see _.cloneDeepWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * } - * - * var el = _.cloneWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 0 - */ - function cloneWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); - } - - /** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ - function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); - } - - /** - * This method is like `_.cloneWith` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith - * @example - * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * } - * - * var el = _.cloneDeepWith(document.body, customizer); - * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 - */ - function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); - } - - /** - * Checks if `object` conforms to `source` by invoking the predicate - * properties of `source` with the corresponding property values of `object`. - * - * **Note:** This method is equivalent to `_.conforms` when `source` is - * partially applied. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); - * // => true - * - * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); - * // => false - */ - function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); - } - - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } - - /** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @see _.lt - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ - var gt = createRelationalOperation(baseGt); - - /** - * Checks if `value` is greater than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to - * `other`, else `false`. - * @see _.lte - * @example - * - * _.gte(3, 1); - * // => true - * - * _.gte(3, 3); - * // => true - * - * _.gte(1, 3); - * // => false - */ - var gte = createRelationalOperation(function(value, other) { - return value >= other; - }); - - /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); - }; - - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - var isArray = Array.isArray; - - /** - * Checks if `value` is classified as an `ArrayBuffer` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - * @example - * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true - * - * _.isArrayBuffer(new Array(2)); - * // => false - */ - var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; - - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - - /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); - } - - /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); - } - - /** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ - var isBuffer = nativeIsBuffer || stubFalse; - - /** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ - var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; - - /** - * Checks if `value` is likely a DOM element. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - * - * _.isElement(''); - * // => false - */ - function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); - } - - /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ - function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - function isEqual(value, other) { - return baseIsEqual(value, other); - } - - /** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ - function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; - } - - /** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ - function isError(value) { - if (!isObjectLike(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); - } - - /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. - * @example - * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true - * - * _.isFinite(Infinity); - * // => false - * - * _.isFinite('3'); - * // => false - */ - function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); - } - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - - /** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ - function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); - } - - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } - - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; - } - - /** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ - var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - - /** - * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. - * - * **Note:** This method is equivalent to `_.matches` when `source` is - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * - * _.isMatch(object, { 'b': 2 }); - * // => true - * - * _.isMatch(object, { 'b': 1 }); - * // => false - */ - function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); - } - - /** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with five - * arguments: (objValue, srcValue, index|key, object, source). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatchWith(object, source, customizer); - * // => true - */ - function isMatchWith(object, source, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); - } - - /** - * Checks if `value` is `NaN`. - * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; - } - - /** - * Checks if `value` is a pristine native function. - * - * **Note:** This method can't reliably detect native functions in the presence - * of the core-js package because core-js circumvents this kind of detection. - * Despite multiple requests, the core-js maintainer has made it clear: any - * attempt to fix the detection will be obstructed. As a result, we're left - * with little choice but to throw an error. Unfortunately, this also affects - * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on core-js. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ - function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is `null` or `undefined`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. - * @example - * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true - * - * _.isNil(NaN); - * // => false - */ - function isNil(value) { - return value == null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ - function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); - } - - /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ - function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; - } - - /** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ - var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - - /** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on - * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. - * @example - * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false - */ - function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; - } - - /** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ - var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); - } - - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); - } - - /** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - - /** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ - function isUndefined(value) { - return value === undefined; - } - - /** - * Checks if `value` is classified as a `WeakMap` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. - * @example - * - * _.isWeakMap(new WeakMap); - * // => true - * - * _.isWeakMap(new Map); - * // => false - */ - function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; - } - - /** - * Checks if `value` is classified as a `WeakSet` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. - * @example - * - * _.isWeakSet(new WeakSet); - * // => true - * - * _.isWeakSet(new Set); - * // => false - */ - function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; - } - - /** - * Checks if `value` is less than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - * @see _.gt - * @example - * - * _.lt(1, 3); - * // => true - * - * _.lt(3, 3); - * // => false - * - * _.lt(3, 1); - * // => false - */ - var lt = createRelationalOperation(baseLt); - - /** - * Checks if `value` is less than or equal to `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than or equal to - * `other`, else `false`. - * @see _.gte - * @example - * - * _.lte(1, 3); - * // => true - * - * _.lte(3, 3); - * // => true - * - * _.lte(3, 1); - * // => false - */ - var lte = createRelationalOperation(function(value, other) { - return value <= other; - }); - - /** - * Converts `value` to an array. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] - * - * _.toArray(1); - * // => [] - * - * _.toArray(null); - * // => [] - */ - function toArray(value) { - if (!value) { - return []; - } - if (isArrayLike(value)) { - return isString(value) ? stringToArray(value) : copyArray(value); - } - if (symIterator && value[symIterator]) { - return iteratorToArray(value[symIterator]()); - } - var tag = getTag(value), - func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); - - return func(value); - } - - /** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } - - /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ - function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; - } - - /** - * Converts `value` to an integer suitable for use as the length of an - * array-like object. - * - * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toLength(3.2); - * // => 3 - * - * _.toLength(Number.MIN_VALUE); - * // => 0 - * - * _.toLength(Infinity); - * // => 4294967295 - * - * _.toLength('3.2'); - * // => 3 - */ - function toLength(value) { - return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; - } - - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ - function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); - } - - /** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ - function toPlainObject(value) { - return copyObject(value, keysIn(value)); - } - - /** - * Converts `value` to a safe integer. A safe integer can be compared and - * represented correctly. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toSafeInteger(3.2); - * // => 3 - * - * _.toSafeInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toSafeInteger(Infinity); - * // => 9007199254740991 - * - * _.toSafeInteger('3.2'); - * // => 3 - */ - function toSafeInteger(value) { - return value - ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) - : (value === 0 ? value : 0); - } - - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - return value == null ? '' : baseToString(value); - } - - /*------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } - */ - var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } - }); - - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } - * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; - * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } - */ - var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); - }); - - /** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); - }); - - /** - * This method is like `_.assign` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignInWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); - }); - - /** - * Creates an array of values corresponding to `paths` of `object`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Array} Returns the picked values. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; - * - * _.at(object, ['a[0].b.c', 'a[1]']); - * // => [3, 4] - */ - var at = flatRest(baseAt); - - /** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ - function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : baseAssign(result, properties); - } - - /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; - }); - - /** - * This method is like `_.defaults` except that it recursively assigns - * default properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example - * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } - */ - var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); - }); - - /** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(o) { return o.age < 40; }); - * // => 'barney' (iteration order is not guaranteed) - * - * // The `_.matches` iteratee shorthand. - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findKey(users, 'active'); - * // => 'barney' - */ - function findKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); - } - - /** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. - * @example - * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastKey(users, ['active', false]); - * // => 'fred' - * - * // The `_.property` iteratee shorthand. - * _.findLastKey(users, 'active'); - * // => 'pebbles' - */ - function findLastKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); - } - - /** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ - function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, getIteratee(iteratee, 3), keysIn); - } - - /** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forIn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. - */ - function forInRight(object, iteratee) { - return object == null - ? object - : baseForRight(object, getIteratee(iteratee, 3), keysIn); - } - - /** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwnRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ - function forOwn(object, iteratee) { - return object && baseForOwn(object, getIteratee(iteratee, 3)); - } - - /** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwn - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. - */ - function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, getIteratee(iteratee, 3)); - } - - /** - * Creates an array of function property names from own enumerable properties - * of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functionsIn - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functions(new Foo); - * // => ['a', 'b'] - */ - function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); - } - - /** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ - function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); - } - - /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; - } - - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - function has(object, path) { - return object != null && hasPath(object, path, baseHas); - } - - /** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ - function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); - } - - /** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite - * property assignments of previous values. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Object - * @param {Object} object The object to invert. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } - */ - var invert = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - result[value] = key; - }, constant(identity)); - - /** - * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` thru `iteratee`. The - * corresponding inverted value of each inverted key is an array of keys - * responsible for generating the inverted value. The iteratee is invoked - * with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.1.0 - * @category Object - * @param {Object} object The object to invert. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Object} Returns the new inverted object. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; - * - * _.invertBy(object); - * // => { '1': ['a', 'c'], '2': ['b'] } - * - * _.invertBy(object, function(value) { - * return 'group' + value; - * }); - * // => { 'group1': ['a', 'c'], 'group2': ['b'] } - */ - var invertBy = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - }, getIteratee); - - /** - * Invokes the method at `path` of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - * @example - * - * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; - * - * _.invoke(object, 'a[0].b.c.slice', 1, 3); - * // => [2, 3] - */ - var invoke = baseRest(baseInvoke); - - /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); - } - - /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ - function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); - } - - /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` thru `iteratee`. The iteratee is invoked - * with three arguments: (value, key, object). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapValues - * @example - * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } - */ - function mapKeys(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, iteratee(value, key, object), value); - }); - return result; - } - - /** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ - function mapValues(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, key, iteratee(value, key, object)); - }); - return result; - } - - /** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ - var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); - }); - - /** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; - * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } - */ - var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); - }); - - /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable property paths of `object` that are not omitted. - * - * **Note:** This method is considerably slower than `_.pick`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to omit. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omit(object, ['a', 'c']); - * // => { 'b': '2' } - */ - var omit = flatRest(function(object, paths) { - var result = {}; - if (object == null) { - return result; - } - var isDeep = false; - paths = arrayMap(paths, function(path) { - path = castPath(path, object); - isDeep || (isDeep = path.length > 1); - return path; - }); - copyObject(object, getAllKeysIn(object), result); - if (isDeep) { - result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); - } - var length = paths.length; - while (length--) { - baseUnset(result, paths[length]); - } - return result; - }); - - /** - * The opposite of `_.pickBy`; this method creates an object composed of - * the own and inherited enumerable string keyed properties of `object` that - * `predicate` doesn't return truthy for. The predicate is invoked with two - * arguments: (value, key). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } - */ - function omitBy(object, predicate) { - return pickBy(object, negate(getIteratee(predicate))); - } - - /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); - }); - - /** - * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with two arguments: (value, key). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pickBy(object, _.isNumber); - * // => { 'a': 1, 'c': 3 } - */ - function pickBy(object, predicate) { - if (object == null) { - return {}; - } - var props = arrayMap(getAllKeysIn(object), function(prop) { - return [prop]; - }); - predicate = getIteratee(predicate); - return basePickBy(object, props, function(value, path) { - return predicate(value, path[0]); - }); - } - - /** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' - * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' - */ - function result(object, path, defaultValue) { - path = castPath(path, object); - - var index = -1, - length = path.length; - - // Ensure the loop is entered when path is empty. - if (!length) { - length = 1; - object = undefined; - } - while (++index < length) { - var value = object == null ? undefined : object[toKey(path[index])]; - if (value === undefined) { - index = length; - value = defaultValue; - } - object = isFunction(value) ? value.call(object) : value; - } - return object; - } - - /** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 - */ - function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); - } - - /** - * This method is like `_.set` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * var object = {}; - * - * _.setWith(object, '[0][1]', 'a', Object); - * // => { '0': { '1': 'a' } } - */ - function setWith(object, path, value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseSet(object, path, value, customizer); - } - - /** - * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. If `object` is a map or set, its - * entries are returned. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias entries - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.toPairs(new Foo); - * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) - */ - var toPairs = createToPairs(keys); - - /** - * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. If `object` is a map - * or set, its entries are returned. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias entriesIn - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) - */ - var toPairsIn = createToPairs(keysIn); - - /** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own - * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. If `accumulator` is not - * provided, a new object with the same `[[Prototype]]` will be used. The - * iteratee is invoked with four arguments: (accumulator, value, key, object). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @returns {*} Returns the accumulated value. - * @example - * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }, []); - * // => [4, 9] - * - * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } - */ - function transform(object, iteratee, accumulator) { - var isArr = isArray(object), - isArrLike = isArr || isBuffer(object) || isTypedArray(object); - - iteratee = getIteratee(iteratee, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor : []; - } - else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - else { - accumulator = {}; - } - } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; - } - - /** - * Removes the property at `path` of `object`. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 7 } }] }; - * _.unset(object, 'a[0].b.c'); - * // => true - * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; - * - * _.unset(object, ['a', '0', 'b', 'c']); - * // => true - * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; - */ - function unset(object, path) { - return object == null ? true : baseUnset(object, path); - } - - /** - * This method is like `_.set` except that accepts `updater` to produce the - * value to set. Use `_.updateWith` to customize `path` creation. The `updater` - * is invoked with one argument: (value). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.update(object, 'a[0].b.c', function(n) { return n * n; }); - * console.log(object.a[0].b.c); - * // => 9 - * - * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); - * console.log(object.x[0].y.z); - * // => 0 - */ - function update(object, path, updater) { - return object == null ? object : baseUpdate(object, path, castFunction(updater)); - } - - /** - * This method is like `_.update` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * var object = {}; - * - * _.updateWith(object, '[0][1]', _.constant('a'), Object); - * // => { '0': { '1': 'a' } } - */ - function updateWith(object, path, updater, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); - } - - /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); - } - - /** - * Creates an array of the own and inherited enumerable string keyed property - * values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.valuesIn(new Foo); - * // => [1, 2, 3] (iteration order is not guaranteed) - */ - function valuesIn(object) { - return object == null ? [] : baseValues(object, keysIn(object)); - } - - /*------------------------------------------------------------------------*/ - - /** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ - function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; - } - return baseClamp(toNumber(number), lower, upper); - } - - /** - * Checks if `n` is between `start` and up to, but not including, `end`. If - * `end` is not specified, it's set to `start` with `start` then set to `0`. - * If `start` is greater than `end` the params are swapped to support - * negative ranges. - * - * @static - * @memberOf _ - * @since 3.3.0 - * @category Number - * @param {number} number The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - * @see _.range, _.rangeRight - * @example - * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false - * - * _.inRange(-3, -2, -6); - * // => true - */ - function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - number = toNumber(number); - return baseInRange(number, start, end); - } - - /** - * Produces a random number between the inclusive `lower` and `upper` bounds. - * If only one argument is provided a number between `0` and the given number - * is returned. If `floating` is `true`, or either `lower` or `upper` are - * floats, a floating-point number is returned instead of an integer. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @memberOf _ - * @since 0.7.0 - * @category Number - * @param {number} [lower=0] The lower bound. - * @param {number} [upper=1] The upper bound. - * @param {boolean} [floating] Specify returning a floating-point number. - * @returns {number} Returns the random number. - * @example - * - * _.random(0, 5); - * // => an integer between 0 and 5 - * - * _.random(5); - * // => also an integer between 0 and 5 - * - * _.random(5, true); - * // => a floating-point number between 0 and 5 - * - * _.random(1.2, 5.2); - * // => a floating-point number between 1.2 and 5.2 - */ - function random(lower, upper, floating) { - if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { - upper = floating = undefined; - } - if (floating === undefined) { - if (typeof upper == 'boolean') { - floating = upper; - upper = undefined; - } - else if (typeof lower == 'boolean') { - floating = lower; - lower = undefined; - } - } - if (lower === undefined && upper === undefined) { - lower = 0; - upper = 1; - } - else { - lower = toFinite(lower); - if (upper === undefined) { - upper = lower; - lower = 0; - } else { - upper = toFinite(upper); - } - } - if (lower > upper) { - var temp = lower; - lower = upper; - upper = temp; - } - if (floating || lower % 1 || upper % 1) { - var rand = nativeRandom(); - return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); - } - return baseRandom(lower, upper); - } - - /*------------------------------------------------------------------------*/ - - /** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. - * @example - * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' - * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' - */ - var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); - }); - - /** - * Converts the first character of `string` to upper case and the remaining - * to lower case. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. - * @example - * - * _.capitalize('FRED'); - * // => 'Fred' - */ - function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); - } - - /** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ - function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); - } - - /** - * Checks if `string` ends with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search up to. - * @returns {boolean} Returns `true` if `string` ends with `target`, - * else `false`. - * @example - * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true - */ - function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - - var length = string.length; - position = position === undefined - ? length - : baseClamp(toInteger(position), 0, length); - - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; - } - - /** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /** - * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", - * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https://lodash\.com/\)' - */ - function escapeRegExp(string) { - string = toString(string); - return (string && reHasRegExpChar.test(string)) - ? string.replace(reRegExpChar, '\\$&') - : string; - } - - /** - * Converts `string` to - * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. - * @example - * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' - * - * _.kebabCase('__FOO_BAR__'); - * // => 'foo-bar' - */ - var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); - }); - - /** - * Converts `string`, as space separated words, to lower case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the lower cased string. - * @example - * - * _.lowerCase('--Foo-Bar--'); - * // => 'foo bar' - * - * _.lowerCase('fooBar'); - * // => 'foo bar' - * - * _.lowerCase('__FOO_BAR__'); - * // => 'foo bar' - */ - var lowerCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + word.toLowerCase(); - }); - - /** - * Converts the first character of `string` to lower case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.lowerFirst('Fred'); - * // => 'fred' - * - * _.lowerFirst('FRED'); - * // => 'fRED' - */ - var lowerFirst = createCaseFirst('toLowerCase'); - - /** - * Pads `string` on the left and right sides if it's shorter than `length`. - * Padding characters are truncated if they can't be evenly divided by `length`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.pad('abc', 8); - * // => ' abc ' - * - * _.pad('abc', 8, '_-'); - * // => '_-abc_-_' - * - * _.pad('abc', 3); - * // => 'abc' - */ - function pad(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - if (!length || strLength >= length) { - return string; - } - var mid = (length - strLength) / 2; - return ( - createPadding(nativeFloor(mid), chars) + - string + - createPadding(nativeCeil(mid), chars) - ); - } - - /** - * Pads `string` on the right side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padEnd('abc', 6); - * // => 'abc ' - * - * _.padEnd('abc', 6, '_-'); - * // => 'abc_-_' - * - * _.padEnd('abc', 3); - * // => 'abc' - */ - function padEnd(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (string + createPadding(length - strLength, chars)) - : string; - } - - /** - * Pads `string` on the left side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. - * @example - * - * _.padStart('abc', 6); - * // => ' abc' - * - * _.padStart('abc', 6, '_-'); - * // => '_-_abc' - * - * _.padStart('abc', 3); - * // => 'abc' - */ - function padStart(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (createPadding(length - strLength, chars) + string) - : string; - } - - /** - * Converts `string` to an integer of the specified radix. If `radix` is - * `undefined` or `0`, a `radix` of `10` is used unless `value` is a - * hexadecimal, in which case a `radix` of `16` is used. - * - * **Note:** This method aligns with the - * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category String - * @param {string} string The string to convert. - * @param {number} [radix=10] The radix to interpret `value` by. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {number} Returns the converted integer. - * @example - * - * _.parseInt('08'); - * // => 8 - * - * _.map(['6', '08', '10'], _.parseInt); - * // => [6, 8, 10] - */ - function parseInt(string, radix, guard) { - if (guard || radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); - } - - /** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=1] The number of times to repeat the string. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ - function repeat(string, n, guard) { - if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - return baseRepeat(toString(string), n); - } - - /** - * Replaces matches for `pattern` in `string` with `replacement`. - * - * **Note:** This method is based on - * [`String#replace`](https://mdn.io/String/replace). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to modify. - * @param {RegExp|string} pattern The pattern to replace. - * @param {Function|string} replacement The match replacement. - * @returns {string} Returns the modified string. - * @example - * - * _.replace('Hi Fred', 'Fred', 'Barney'); - * // => 'Hi Barney' - */ - function replace() { - var args = arguments, - string = toString(args[0]); - - return args.length < 3 ? string : string.replace(args[1], args[2]); - } - - /** - * Converts `string` to - * [snake case](https://en.wikipedia.org/wiki/Snake_case). - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the snake cased string. - * @example - * - * _.snakeCase('Foo Bar'); - * // => 'foo_bar' - * - * _.snakeCase('fooBar'); - * // => 'foo_bar' - * - * _.snakeCase('--FOO-BAR--'); - * // => 'foo_bar' - */ - var snakeCase = createCompounder(function(result, word, index) { - return result + (index ? '_' : '') + word.toLowerCase(); - }); - - /** - * Splits `string` by `separator`. - * - * **Note:** This method is based on - * [`String#split`](https://mdn.io/String/split). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to split. - * @param {RegExp|string} separator The separator pattern to split by. - * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the string segments. - * @example - * - * _.split('a-b-c', '-', 2); - * // => ['a', 'b'] - */ - function split(string, separator, limit) { - if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { - separator = limit = undefined; - } - limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; - if (!limit) { - return []; - } - string = toString(string); - if (string && ( - typeof separator == 'string' || - (separator != null && !isRegExp(separator)) - )) { - separator = baseToString(separator); - if (!separator && hasUnicode(string)) { - return castSlice(stringToArray(string), 0, limit); - } - } - return string.split(separator, limit); - } - - /** - * Converts `string` to - * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). - * - * @static - * @memberOf _ - * @since 3.1.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the start cased string. - * @example - * - * _.startCase('--foo-bar--'); - * // => 'Foo Bar' - * - * _.startCase('fooBar'); - * // => 'Foo Bar' - * - * _.startCase('__FOO_BAR__'); - * // => 'FOO BAR' - */ - var startCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + upperFirst(word); - }); - - /** - * Checks if `string` starts with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=0] The position to search from. - * @returns {boolean} Returns `true` if `string` starts with `target`, - * else `false`. - * @example - * - * _.startsWith('abc', 'a'); - * // => true - * - * _.startsWith('abc', 'b'); - * // => false - * - * _.startsWith('abc', 'b', 1); - * // => true - */ - function startsWith(string, target, position) { - string = toString(string); - position = position == null - ? 0 - : baseClamp(toInteger(position), 0, string.length); - - target = baseToString(target); - return string.slice(position, position + target.length) == target; - } - - /** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is given, it takes precedence over `_.templateSettings` values. - * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options={}] The options object. - * @param {RegExp} [options.escape=_.templateSettings.escape] - * The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] - * The "evaluate" delimiter. - * @param {Object} [options.imports=_.templateSettings.imports] - * An object to import into the template as free variables. - * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] - * The "interpolate" delimiter. - * @param {string} [options.sourceURL='lodash.templateSources[n]'] - * The sourceURL of the compiled template. - * @param {string} [options.variable='obj'] - * The data object variable name. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the compiled template function. - * @example - * - * // Use the "interpolate" delimiter to create a compiled template. - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' - * - * // Use the HTML "escape" delimiter to escape data property values. - * var compiled = _.template('<%- value %>'); - * compiled({ 'value': ' - - - - - - -
- - - diff --git a/reverse_engineering/node_modules/qs/.editorconfig b/reverse_engineering/node_modules/qs/.editorconfig deleted file mode 100644 index b442a9f..0000000 --- a/reverse_engineering/node_modules/qs/.editorconfig +++ /dev/null @@ -1,33 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 160 - -[test/*] -max_line_length = off - -[LICENSE.md] -indent_size = off - -[*.md] -max_line_length = off - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[LICENSE] -indent_size = 2 -max_line_length = off diff --git a/reverse_engineering/node_modules/qs/.eslintignore b/reverse_engineering/node_modules/qs/.eslintignore deleted file mode 100644 index 1521c8b..0000000 --- a/reverse_engineering/node_modules/qs/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/reverse_engineering/node_modules/qs/.eslintrc b/reverse_engineering/node_modules/qs/.eslintrc deleted file mode 100644 index e3bde89..0000000 --- a/reverse_engineering/node_modules/qs/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": 0, - "consistent-return": 1, - "func-name-matching": 0, - "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], - "indent": [2, 4], - "max-lines-per-function": [2, { "max": 150 }], - "max-params": [2, 14], - "max-statements": [2, 52], - "multiline-comment-style": 0, - "no-continue": 1, - "no-magic-numbers": 0, - "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], - "operator-linebreak": [2, "before"], - } -} diff --git a/reverse_engineering/node_modules/qs/.github/FUNDING.yml b/reverse_engineering/node_modules/qs/.github/FUNDING.yml deleted file mode 100644 index 0355f4f..0000000 --- a/reverse_engineering/node_modules/qs/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/qs -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/reverse_engineering/node_modules/qs/CHANGELOG.md b/reverse_engineering/node_modules/qs/CHANGELOG.md deleted file mode 100644 index 5591d20..0000000 --- a/reverse_engineering/node_modules/qs/CHANGELOG.md +++ /dev/null @@ -1,285 +0,0 @@ -## **6.9.1** -- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) -- [Fix] `parse`: with comma true, do not split non-string values (#334) -- [meta] add `funding` field -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` -- [Tests] use shared travis-ci config - -## **6.9.0** -- [New] `parse`/`stringify`: Pass extra key/value argument to `decoder` (#333) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `evalmd` -- [Tests] `parse`: add passing `arrayFormat` tests -- [Tests] add `posttest` using `npx aud` to run `npm audit` without a lockfile -- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16` -- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray - -## **6.8.0** -- [New] add `depth=false` to preserve the original key; [Fix] `depth=0` should preserve the original key (#326) -- [New] [Fix] stringify symbols and bigints -- [Fix] ensure node 0.12 can stringify Symbols -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Refactor] `formats`: tiny bit of cleanup. -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `safe-publish-latest`, `iconv-lite`, `tape` -- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended (#326) -- [Tests] use `eclint` instead of `editorconfig-tools` -- [docs] readme: add security note -- [meta] add github sponsorship -- [meta] add FUNDING.yml -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause - -## **6.7.0** -- [New] `stringify`/`parse`: add `comma` as an `arrayFormat` option (#276, #219) -- [Fix] correctly parse nested arrays (#212) -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source, also with an array source -- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty` -- [Refactor] `utils`: `isBuffer`: small tweak; add tests -- [Refactor] use cached `Array.isArray` -- [Refactor] `parse`/`stringify`: make a function to normalize the options -- [Refactor] `utils`: reduce observable [[Get]]s -- [Refactor] `stringify`/`utils`: cache `Array.isArray` -- [Tests] always use `String(x)` over `x.toString()` -- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10 -- [Tests] temporarily allow coverage to fail - -## **6.6.0** -- [New] Add support for iso-8859-1, utf8 "sentinel" and numeric entities (#268) -- [New] move two-value combine to a `utils` function (#189) -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` (#260) -- [Fix] `stringify`: do not crash in an obscure combo of `interpretNumericEntities`, a bad custom `decoder`, & `iso-8859-1` -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [Refactor] `parse`: only need to reassign the var once -- [Refactor] `parse`/`stringify`: clean up `charset` options checking; fix defaults -- [Refactor] add missing defaults -- [Refactor] `parse`: one less `concat` call -- [Refactor] `utils`: `compactQueue`: make it explicitly side-effecting -- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`, `iconv-lite`, `safe-publish-latest`, `tape` -- [Tests] up to `node` `v10.10`, `v9.11`, `v8.12`, `v6.14`, `v4.9`; pin included builds to LTS - -## **6.5.2** -- [Fix] use `safer-buffer` instead of `Buffer` constructor -- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230) -- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify` - -## **6.5.1** -- [Fix] Fix parsing & compacting very deep objects (#224) -- [Refactor] name utils functions -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` -- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node -- [Tests] Use precise dist for Node.js 0.6 runtime (#225) -- [Tests] make 0.6 required, now that it’s passing -- [Tests] on `node` `v8.2`; fix npm on node 0.6 - -## **6.5.0** -- [New] add `utils.assign` -- [New] pass default encoder/decoder to custom encoder/decoder functions (#206) -- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213) -- [Fix] Handle stringifying empty objects with addQueryPrefix (#217) -- [Fix] do not mutate `options` argument (#207) -- [Refactor] `parse`: cache index to reuse in else statement (#182) -- [Docs] add various badges to readme (#208) -- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape` -- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4 -- [Tests] add `editorconfig-tools` - -## **6.4.0** -- [New] `qs.stringify`: add `encodeValuesOnly` option -- [Fix] follow `allowPrototypes` option during merge (#201, #201) -- [Fix] support keys starting with brackets (#202, #200) -- [Fix] chmod a-x -- [Dev Deps] update `eslint` -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds -- [eslint] reduce warnings - -## **6.3.2** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Dev Deps] update `eslint` -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.3.1** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape` -- [Tests] on all node minors; improve test matrix -- [Docs] document stringify option `allowDots` (#195) -- [Docs] add empty object and array values example (#195) -- [Docs] Fix minor inconsistency/typo (#192) -- [Docs] document stringify option `sort` (#191) -- [Refactor] `stringify`: throw faster with an invalid encoder -- [Refactor] remove unnecessary escapes (#184) -- Remove contributing.md, since `qs` is no longer part of `hapi` (#183) - -## **6.3.0** -- [New] Add support for RFC 1738 (#174, #173) -- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159) -- [Fix] ensure `utils.merge` handles merging two arrays -- [Refactor] only constructors should be capitalized -- [Refactor] capitalized var names are for constructors only -- [Refactor] avoid using a sparse array -- [Robustness] `formats`: cache `String#replace` -- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` -- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix -- [Tests] flesh out arrayLimit/arrayFormat tests (#107) -- [Tests] skip Object.create tests when null objects are not available -- [Tests] Turn on eslint for test files (#175) - -## **6.2.3** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.2.2** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties - -## **6.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values -- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call` -- [Tests] remove `parallelshell` since it does not reliably report failures -- [Tests] up to `node` `v6.3`, `v5.12` -- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv` - -## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) -- [New] pass Buffers to the encoder/decoder directly (#161) -- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) -- [Fix] fix compacting of nested sparse arrays (#150) - -## **6.1.2 -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.1.1** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties - -## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) -- [New] allowDots option for `stringify` (#151) -- [Fix] "sort" option should work at a depth of 3 or more (#151) -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## **6.0.4** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.0.3** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) -- Revert ES6 requirement and restore support for node down to v0.8. - -## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) -- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json - -## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) -- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 - -## **5.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values - -## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) -- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string - -## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) -- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional -- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify - -## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) -- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false -- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm - -## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) -- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional - -## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) -- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" - -## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) -- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties -- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost -- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing -- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object -- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option -- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. -- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 -- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 -- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign -- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute - -## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) -- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function - -## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) -- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option - -## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) -- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 -- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader - -## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) -- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object - -## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) -- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". - -## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) -- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 - -## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) -- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? -- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 -- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 - -## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) -- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number - -## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) -- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array -- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x - -## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) -- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value -- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty -- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? - -## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) -- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 -- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects - -## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) -- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present -- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays -- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge -- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? - -## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) -- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter - -## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) -- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? -- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit -- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 - -## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) -- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values - -## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) -- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters -- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block - -## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) -- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument -- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed - -## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) -- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted -- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null -- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README - -## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) -- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/reverse_engineering/node_modules/qs/LICENSE.md b/reverse_engineering/node_modules/qs/LICENSE.md deleted file mode 100644 index fecf6b6..0000000 --- a/reverse_engineering/node_modules/qs/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/reverse_engineering/node_modules/qs/README.md b/reverse_engineering/node_modules/qs/README.md deleted file mode 100644 index 8592a4c..0000000 --- a/reverse_engineering/node_modules/qs/README.md +++ /dev/null @@ -1,598 +0,0 @@ -# qs [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -A querystring parsing and stringifying library with some added security. - -Lead Maintainer: [Jordan Harband](https://github.com/ljharb) - -The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). - -## Usage - -```javascript -var qs = require('qs'); -var assert = require('assert'); - -var obj = qs.parse('a=c'); -assert.deepEqual(obj, { a: 'c' }); - -var str = qs.stringify(obj); -assert.equal(str, 'a=c'); -``` - -### Parsing Objects - -[](#preventEval) -```javascript -qs.parse(string, [options]); -``` - -**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. -For example, the string `'foo[bar]=baz'` converts to: - -```javascript -assert.deepEqual(qs.parse('foo[bar]=baz'), { - foo: { - bar: 'baz' - } -}); -``` - -When using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: - -```javascript -var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); -assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } }); -``` - -By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option. - -```javascript -var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); -assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); -``` - -URI encoded strings work too: - -```javascript -assert.deepEqual(qs.parse('a%5Bb%5D=c'), { - a: { b: 'c' } -}); -``` - -You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: - -```javascript -assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { - foo: { - bar: { - baz: 'foobarbaz' - } - } -}); -``` - -By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like -`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: - -```javascript -var expected = { - a: { - b: { - c: { - d: { - e: { - f: { - '[g][h][i]': 'j' - } - } - } - } - } - } -}; -var string = 'a[b][c][d][e][f][g][h][i]=j'; -assert.deepEqual(qs.parse(string), expected); -``` - -This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: - -```javascript -var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); -assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); -``` - -The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. - -For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: - -```javascript -var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); -assert.deepEqual(limited, { a: 'b' }); -``` - -To bypass the leading question mark, use `ignoreQueryPrefix`: - -```javascript -var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true }); -assert.deepEqual(prefixed, { a: 'b', c: 'd' }); -``` - -An optional delimiter can also be passed: - -```javascript -var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); -assert.deepEqual(delimited, { a: 'b', c: 'd' }); -``` - -Delimiters can be a regular expression too: - -```javascript -var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); -assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); -``` - -Option `allowDots` can be used to enable dot notation: - -```javascript -var withDots = qs.parse('a.b=c', { allowDots: true }); -assert.deepEqual(withDots, { a: { b: 'c' } }); -``` - -If you have to deal with legacy browsers or services, there's -also support for decoding percent-encoded octets as iso-8859-1: - -```javascript -var oldCharset = qs.parse('a=%A7', { charset: 'iso-8859-1' }); -assert.deepEqual(oldCharset, { a: '§' }); -``` - -Some services add an initial `utf8=✓` value to forms so that old -Internet Explorer versions are more likely to submit the form as -utf-8. Additionally, the server can check the value against wrong -encodings of the checkmark character and detect that a query string -or `application/x-www-form-urlencoded` body was *not* sent as -utf-8, eg. if the form had an `accept-charset` parameter or the -containing page had a different character set. - -**qs** supports this mechanism via the `charsetSentinel` option. -If specified, the `utf8` parameter will be omitted from the -returned object. It will be used to switch to `iso-8859-1`/`utf-8` -mode depending on how the checkmark is encoded. - -**Important**: When you specify both the `charset` option and the -`charsetSentinel` option, the `charset` will be overridden when -the request contains a `utf8` parameter from which the actual -charset can be deduced. In that sense the `charset` will behave -as the default charset rather than the authoritative charset. - -```javascript -var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', { - charset: 'iso-8859-1', - charsetSentinel: true -}); -assert.deepEqual(detectedAsUtf8, { a: 'ø' }); - -// Browsers encode the checkmark as ✓ when submitting as iso-8859-1: -var detectedAsIso8859_1 = qs.parse('utf8=%26%2310003%3B&a=%F8', { - charset: 'utf-8', - charsetSentinel: true -}); -assert.deepEqual(detectedAsIso8859_1, { a: 'ø' }); -``` - -If you want to decode the `&#...;` syntax to the actual character, -you can specify the `interpretNumericEntities` option as well: - -```javascript -var detectedAsIso8859_1 = qs.parse('a=%26%239786%3B', { - charset: 'iso-8859-1', - interpretNumericEntities: true -}); -assert.deepEqual(detectedAsIso8859_1, { a: '☺' }); -``` - -It also works when the charset has been detected in `charsetSentinel` -mode. - -### Parsing Arrays - -**qs** can also parse arrays using a similar `[]` notation: - -```javascript -var withArray = qs.parse('a[]=b&a[]=c'); -assert.deepEqual(withArray, { a: ['b', 'c'] }); -``` - -You may specify an index as well: - -```javascript -var withIndexes = qs.parse('a[1]=c&a[0]=b'); -assert.deepEqual(withIndexes, { a: ['b', 'c'] }); -``` - -Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number -to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving -their order: - -```javascript -var noSparse = qs.parse('a[1]=b&a[15]=c'); -assert.deepEqual(noSparse, { a: ['b', 'c'] }); -``` - -Note that an empty string is also a value, and will be preserved: - -```javascript -var withEmptyString = qs.parse('a[]=&a[]=b'); -assert.deepEqual(withEmptyString, { a: ['', 'b'] }); - -var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); -assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); -``` - -**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will -instead be converted to an object with the index as the key. This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array. - -```javascript -var withMaxIndex = qs.parse('a[100]=b'); -assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); -``` - -This limit can be overridden by passing an `arrayLimit` option: - -```javascript -var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); -assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); -``` - -To disable array parsing entirely, set `parseArrays` to `false`. - -```javascript -var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); -assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); -``` - -If you mix notations, **qs** will merge the two items into an object: - -```javascript -var mixedNotation = qs.parse('a[0]=b&a[b]=c'); -assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); -``` - -You can also create arrays of objects: - -```javascript -var arraysOfObjects = qs.parse('a[][b]=c'); -assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); -``` - -Some people use comma to join array, **qs** can parse it: -```javascript -var arraysOfObjects = qs.parse('a=b,c', { comma: true }) -assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] }) -``` -(_this cannot convert nested objects, such as `a={b:1},{c:d}`_) - -### Stringifying - -[](#preventEval) -```javascript -qs.stringify(object, [options]); -``` - -When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: - -```javascript -assert.equal(qs.stringify({ a: 'b' }), 'a=b'); -assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); -``` - -This encoding can be disabled by setting the `encode` option to `false`: - -```javascript -var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); -assert.equal(unencoded, 'a[b]=c'); -``` - -Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`: -```javascript -var encodedValues = qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true } -); -assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h'); -``` - -This encoding can also be replaced by a custom encoding method set as `encoder` option: - -```javascript -var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) { - // Passed in values `a`, `b`, `c` - return // Return encoded string -}}) -``` - -_(Note: the `encoder` option does not apply if `encode` is `false`)_ - -Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values: - -```javascript -var decoded = qs.parse('x=z', { decoder: function (str) { - // Passed in values `x`, `z` - return // Return decoded string -}}) -``` - -You can encode keys and values using different logic by using the type argument provided to the encoder: - -```javascript -var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultEncoder, charset, type) { - if (type === 'key') { - return // Encoded key - } else if (type === 'value') { - return // Encoded value - } -}}) -``` - -The type argument is also provided to the decoder: - -```javascript -var decoded = qs.parse('x=z', { decoder: function (str, defaultEncoder, charset, type) { - if (type === 'key') { - return // Decoded key - } else if (type === 'value') { - return // Decoded value - } -}}) -``` - -Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. - -When arrays are stringified, by default they are given explicit indices: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }); -// 'a[0]=b&a[1]=c&a[2]=d' -``` - -You may override this by setting the `indices` option to `false`: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); -// 'a=b&a=c&a=d' -``` - -You may use the `arrayFormat` option to specify the format of the output array: - -```javascript -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) -// 'a[0]=b&a[1]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) -// 'a[]=b&a[]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) -// 'a=b&a=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' }) -// 'a=b,c' -``` - -When objects are stringified, by default they use bracket notation: - -```javascript -qs.stringify({ a: { b: { c: 'd', e: 'f' } } }); -// 'a[b][c]=d&a[b][e]=f' -``` - -You may override this to use dot notation by setting the `allowDots` option to `true`: - -```javascript -qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true }); -// 'a.b.c=d&a.b.e=f' -``` - -Empty strings and null values will omit the value, but the equals sign (=) remains in place: - -```javascript -assert.equal(qs.stringify({ a: '' }), 'a='); -``` - -Key with no values (such as an empty object or array) will return nothing: - -```javascript -assert.equal(qs.stringify({ a: [] }), ''); -assert.equal(qs.stringify({ a: {} }), ''); -assert.equal(qs.stringify({ a: [{}] }), ''); -assert.equal(qs.stringify({ a: { b: []} }), ''); -assert.equal(qs.stringify({ a: { b: {}} }), ''); -``` - -Properties that are set to `undefined` will be omitted entirely: - -```javascript -assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); -``` - -The query string may optionally be prepended with a question mark: - -```javascript -assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d'); -``` - -The delimiter may be overridden with stringify as well: - -```javascript -assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); -``` - -If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option: - -```javascript -var date = new Date(7); -assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A')); -assert.equal( - qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }), - 'a=7' -); -``` - -You may use the `sort` option to affect the order of parameter keys: - -```javascript -function alphabeticalSort(a, b) { - return a.localeCompare(b); -} -assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y'); -``` - -Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. -If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you -pass an array, it will be used to select properties and array indices for stringification: - -```javascript -function filterFunc(prefix, value) { - if (prefix == 'b') { - // Return an `undefined` value to omit a property. - return; - } - if (prefix == 'e[f]') { - return value.getTime(); - } - if (prefix == 'e[g][0]') { - return value * 2; - } - return value; -} -qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); -// 'a=b&c=d&e[f]=123&e[g][0]=4' -qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); -// 'a=b&e=f' -qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); -// 'a[0]=b&a[2]=d' -``` - -### Handling of `null` values - -By default, `null` values are treated like empty strings: - -```javascript -var withNull = qs.stringify({ a: null, b: '' }); -assert.equal(withNull, 'a=&b='); -``` - -Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings. - -```javascript -var equalsInsensitive = qs.parse('a&b='); -assert.deepEqual(equalsInsensitive, { a: '', b: '' }); -``` - -To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` -values have no `=` sign: - -```javascript -var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); -assert.equal(strictNull, 'a&b='); -``` - -To parse values without `=` back to `null` use the `strictNullHandling` flag: - -```javascript -var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); -assert.deepEqual(parsedStrictNull, { a: null, b: '' }); -``` - -To completely skip rendering keys with `null` values, use the `skipNulls` flag: - -```javascript -var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); -assert.equal(nullsSkipped, 'a=b'); -``` - -If you're communicating with legacy systems, you can switch to `iso-8859-1` -using the `charset` option: - -```javascript -var iso = qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }); -assert.equal(iso, '%E6=%E6'); -``` - -Characters that don't exist in `iso-8859-1` will be converted to numeric -entities, similar to what browsers do: - -```javascript -var numeric = qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }); -assert.equal(numeric, 'a=%26%239786%3B'); -``` - -You can use the `charsetSentinel` option to announce the character by -including an `utf8=✓` parameter with the proper encoding if the checkmark, -similar to what Ruby on Rails and others do when submitting forms. - -```javascript -var sentinel = qs.stringify({ a: '☺' }, { charsetSentinel: true }); -assert.equal(sentinel, 'utf8=%E2%9C%93&a=%E2%98%BA'); - -var isoSentinel = qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }); -assert.equal(isoSentinel, 'utf8=%26%2310003%3B&a=%E6'); -``` - -### Dealing with special character sets - -By default the encoding and decoding of characters is done in `utf-8`, -and `iso-8859-1` support is also built in via the `charset` parameter. - -If you wish to encode querystrings to a different character set (i.e. -[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the -[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library: - -```javascript -var encoder = require('qs-iconv/encoder')('shift_jis'); -var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); -assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); -``` - -This also works for decoding of query strings: - -```javascript -var decoder = require('qs-iconv/decoder')('shift_jis'); -var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); -assert.deepEqual(obj, { a: 'こんにちは!' }); -``` - -### RFC 3986 and RFC 1738 space encoding - -RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible. -In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'. - -``` -assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); -assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c'); -assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c'); -``` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[1]: https://npmjs.org/package/qs -[2]: http://versionbadg.es/ljharb/qs.svg -[3]: https://api.travis-ci.org/ljharb/qs.svg -[4]: https://travis-ci.org/ljharb/qs -[5]: https://david-dm.org/ljharb/qs.svg -[6]: https://david-dm.org/ljharb/qs -[7]: https://david-dm.org/ljharb/qs/dev-status.svg -[8]: https://david-dm.org/ljharb/qs?type=dev -[9]: https://ci.testling.com/ljharb/qs.png -[10]: https://ci.testling.com/ljharb/qs -[11]: https://nodei.co/npm/qs.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/qs.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/qs.svg -[downloads-url]: http://npm-stat.com/charts.html?package=qs diff --git a/reverse_engineering/node_modules/qs/dist/qs.js b/reverse_engineering/node_modules/qs/dist/qs.js deleted file mode 100644 index 602c3a6..0000000 --- a/reverse_engineering/node_modules/qs/dist/qs.js +++ /dev/null @@ -1,812 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) { - val = val.split(','); - } - - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } - - if (has.call(obj, key)) { - obj[key] = utils.combine(obj[key], val); - } else { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function (chain, val, options) { - var leaf = val; - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]' && options.parseArrays) { - obj = [].concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var index = parseInt(cleanRoot, 10); - if (!options.parseArrays && cleanRoot === '') { - obj = { 0: leaf }; - } else if ( - !isNaN(index) - && root !== cleanRoot - && String(index) === cleanRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else { - obj[cleanRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = options.depth > 0 && brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - - if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; - - return { - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = utils.merge(obj, newObj, options); - } - - return utils.compact(obj); -}; - -},{"./utils":5}],4:[function(require,module,exports){ -'use strict'; - -var utils = require('./utils'); -var formats = require('./formats'); -var has = Object.prototype.hasOwnProperty; - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; - -var toISO = Date.prototype.toISOString; - -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - charset: 'utf-8', - charsetSentinel: false, - delimiter: '&', - encode: true, - encoder: utils.encode, - encodeValuesOnly: false, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' - || typeof v === 'number' - || typeof v === 'boolean' - || typeof v === 'symbol' - || typeof v === 'bigint'; -}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly, - charset -) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = obj.join(','); - } - - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix; - } - - obj = ''; - } - - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key'); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (isArray(obj)) { - pushToArray(values, stringify( - obj[key], - typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly, - charset - )); - } else { - pushToArray(values, stringify( - obj[key], - prefix + (allowDots ? '.' + key : '[' + key + ']'), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly, - charset - )); - } - } - - return values; -}; - -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - - if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; - - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } - - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); - - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (opts && opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if (opts && 'indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (options.sort) { - objKeys.sort(options.sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (options.skipNulls && obj[key] === null) { - continue; - } - pushToArray(keys, stringify( - obj[key], - key, - generateArrayPrefix, - options.strictNullHandling, - options.skipNulls, - options.encode ? options.encoder : null, - options.filter, - options.sort, - options.allowDots, - options.serializeDate, - options.formatter, - options.encodeValuesOnly, - options.charset - )); - } - - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B&'; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93&'; - } - } - - return joined.length > 0 ? prefix + joined : ''; -}; - -},{"./formats":1,"./utils":5}],5:[function(require,module,exports){ -'use strict'; - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; - - if (isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - - item.obj[item.prop] = compacted; - } - } -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (!target || typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str, decoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; - -var encode = function encode(str, defaultEncoder, charset) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } - - compactQueue(queue); - - return value; -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -var combine = function combine(a, b) { - return [].concat(a, b); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - merge: merge -}; - -},{}]},{},[2])(2) -}); diff --git a/reverse_engineering/node_modules/qs/lib/formats.js b/reverse_engineering/node_modules/qs/lib/formats.js deleted file mode 100644 index a4ecca7..0000000 --- a/reverse_engineering/node_modules/qs/lib/formats.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var replace = String.prototype.replace; -var percentTwenties = /%20/g; - -var util = require('./utils'); - -var Format = { - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; - -module.exports = util.assign( - { - 'default': Format.RFC3986, - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return String(value); - } - } - }, - Format -); diff --git a/reverse_engineering/node_modules/qs/lib/index.js b/reverse_engineering/node_modules/qs/lib/index.js deleted file mode 100644 index 0d6a97d..0000000 --- a/reverse_engineering/node_modules/qs/lib/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var stringify = require('./stringify'); -var parse = require('./parse'); -var formats = require('./formats'); - -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; diff --git a/reverse_engineering/node_modules/qs/lib/parse.js b/reverse_engineering/node_modules/qs/lib/parse.js deleted file mode 100644 index 7cca884..0000000 --- a/reverse_engineering/node_modules/qs/lib/parse.js +++ /dev/null @@ -1,248 +0,0 @@ -'use strict'; - -var utils = require('./utils'); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -var defaults = { - allowDots: false, - allowPrototypes: false, - arrayLimit: 20, - charset: 'utf-8', - charsetSentinel: false, - comma: false, - decoder: utils.decode, - delimiter: '&', - depth: 5, - ignoreQueryPrefix: false, - interpretNumericEntities: false, - parameterLimit: 1000, - parseArrays: true, - plainObjects: false, - strictNullHandling: false -}; - -var interpretNumericEntities = function (str) { - return str.replace(/&#(\d+);/g, function ($0, numberStr) { - return String.fromCharCode(parseInt(numberStr, 10)); - }); -}; - -// This is what browsers will submit when the ✓ character occurs in an -// application/x-www-form-urlencoded body and the encoding of the page containing -// the form is iso-8859-1, or when the submitted form has an accept-charset -// attribute of iso-8859-1. Presumably also with other charsets that do not contain -// the ✓ character, such as us-ascii. -var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') - -// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. -var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') - -var parseValues = function parseQueryStringValues(str, options) { - var obj = {}; - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split(options.delimiter, limit); - var skipIndex = -1; // Keep track of where the utf8 sentinel was found - var i; - - var charset = options.charset; - if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf('utf8=') === 0) { - if (parts[i] === charsetSentinel) { - charset = 'utf-8'; - } else if (parts[i] === isoSentinel) { - charset = 'iso-8859-1'; - } - skipIndex = i; - i = parts.length; // The eslint settings do not allow break; - } - } - } - - for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key, val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder, charset, 'key'); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); - val = options.decoder(part.slice(pos + 1), defaults.decoder, charset, 'value'); - } - - if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { - val = interpretNumericEntities(val); - } - - if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { - val = val.split(','); - } - - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } - - if (has.call(obj, key)) { - obj[key] = utils.combine(obj[key], val); - } else { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function (chain, val, options) { - var leaf = val; - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]' && options.parseArrays) { - obj = [].concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var index = parseInt(cleanRoot, 10); - if (!options.parseArrays && cleanRoot === '') { - obj = { 0: leaf }; - } else if ( - !isNaN(index) - && root !== cleanRoot - && String(index) === cleanRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else { - obj[cleanRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = options.depth > 0 && brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - - if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; - - return { - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = utils.merge(obj, newObj, options); - } - - return utils.compact(obj); -}; diff --git a/reverse_engineering/node_modules/qs/lib/stringify.js b/reverse_engineering/node_modules/qs/lib/stringify.js deleted file mode 100644 index 72ded14..0000000 --- a/reverse_engineering/node_modules/qs/lib/stringify.js +++ /dev/null @@ -1,279 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var formats = require('./formats'); -var has = Object.prototype.hasOwnProperty; - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; - -var toISO = Date.prototype.toISOString; - -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - charset: 'utf-8', - charsetSentinel: false, - delimiter: '&', - encode: true, - encoder: utils.encode, - encodeValuesOnly: false, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' - || typeof v === 'number' - || typeof v === 'boolean' - || typeof v === 'symbol' - || typeof v === 'bigint'; -}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly, - charset -) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = obj.join(','); - } - - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix; - } - - obj = ''; - } - - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key'); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (isArray(obj)) { - pushToArray(values, stringify( - obj[key], - typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly, - charset - )); - } else { - pushToArray(values, stringify( - obj[key], - prefix + (allowDots ? '.' + key : '[' + key + ']'), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly, - charset - )); - } - } - - return values; -}; - -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - - if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; - - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } - - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); - - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (opts && opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if (opts && 'indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (options.sort) { - objKeys.sort(options.sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (options.skipNulls && obj[key] === null) { - continue; - } - pushToArray(keys, stringify( - obj[key], - key, - generateArrayPrefix, - options.strictNullHandling, - options.skipNulls, - options.encode ? options.encoder : null, - options.filter, - options.sort, - options.allowDots, - options.serializeDate, - options.formatter, - options.encodeValuesOnly, - options.charset - )); - } - - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B&'; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93&'; - } - } - - return joined.length > 0 ? prefix + joined : ''; -}; diff --git a/reverse_engineering/node_modules/qs/lib/utils.js b/reverse_engineering/node_modules/qs/lib/utils.js deleted file mode 100644 index bb97241..0000000 --- a/reverse_engineering/node_modules/qs/lib/utils.js +++ /dev/null @@ -1,236 +0,0 @@ -'use strict'; - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; - - if (isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - - item.obj[item.prop] = compacted; - } - } -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (!target || typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str, decoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; - -var encode = function encode(str, defaultEncoder, charset) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } - - compactQueue(queue); - - return value; -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -var combine = function combine(a, b) { - return [].concat(a, b); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - merge: merge -}; diff --git a/reverse_engineering/node_modules/qs/package.json b/reverse_engineering/node_modules/qs/package.json deleted file mode 100644 index 6a42e00..0000000 --- a/reverse_engineering/node_modules/qs/package.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "qs", - "scope": null, - "escapedName": "qs", - "name": "qs", - "rawSpec": "", - "spec": "latest", - "type": "tag" - }, - "/home/taras/Dev/Hackolade/CosmosDB-with-SQL-API/reverse_engineering" - ] - ], - "_from": "qs@latest", - "_hasShrinkwrap": false, - "_id": "qs@6.9.1", - "_inCache": true, - "_location": "/qs", - "_nodeVersion": "13.1.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/qs_6.9.1_1573195595196_0.762870404228227" - }, - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "_npmVersion": "6.12.1", - "_phantomChildren": {}, - "_requested": { - "raw": "qs", - "scope": null, - "escapedName": "qs", - "name": "qs", - "rawSpec": "", - "spec": "latest", - "type": "tag" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/qs/-/qs-6.9.1.tgz", - "_shasum": "20082c65cb78223635ab1a9eaca8875a29bf8ec9", - "_shrinkwrap": null, - "_spec": "qs", - "_where": "/home/taras/Dev/Hackolade/CosmosDB-with-SQL-API/reverse_engineering", - "bugs": { - "url": "https://github.com/ljharb/qs/issues" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": {}, - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.0", - "browserify": "^16.5.0", - "covert": "^1.1.1", - "eclint": "^2.8.1", - "eslint": "^6.6.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "has-symbols": "^1.0.0", - "iconv-lite": "^0.4.24", - "mkdirp": "^0.5.1", - "object-inspect": "^1.6.0", - "qs-iconv": "^1.0.4", - "safe-publish-latest": "^1.1.3", - "safer-buffer": "^2.1.2", - "tape": "^4.11.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA==", - "shasum": "20082c65cb78223635ab1a9eaca8875a29bf8ec9", - "tarball": "https://registry.npmjs.org/qs/-/qs-6.9.1.tgz", - "fileCount": 19, - "unpackedSize": 154259, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxQ9LCRA9TVsSAnZWagAAg0MP/2iGAM115NBWii9uxv1I\nMtgS6Q7RE2woj0nyK2MevzHyiBVv3AsytXhVxzAodz2Vv831O1wjTMR8g5l9\nvzx3YGTKghVUnt1ElBUCSh36LXgzahqMJV0BwS9mv/Bve4UUilxKOuKTndSy\nbCFXacaUJW/iPZFWMGo3NSOanHSedVESJR9uIfzIfnY70iQcoMnX3aEGiOwB\nGBA/U8oE+5DfNgZDjnAtEpqOjLdPRpV5Z5ug5gqnsPKqMgqW65p70hO+nFro\n9X0C58z24gLgig7llaRgvjIAP15607L/0FHn30G2p24RTAPlAHw/PfIw2lje\nQBf377T75OGlKgOEmy8wB76EUzAkk4mj6Y44IuNBO9NMeWuyKXyEczwhAIy0\nClMMNA2AIGoIBYmd3OOn0Wy7DGEr0VGLfEokwmzPLtu5E6QUkhlNa5EJQv9f\nyT3Q+vTxe/VsOMYFLyzJdXSo472mpSECau0W3Sre4ljMf6Zw386FCR7uWG03\nrUfzc6TDhkLWQBFYglbvOQ1AANdEmLXR9k0Gf+kRVm4cdlvV6EYeqrjqj203\nBqiJJ9MiDP5g3v4ol0dLN1HwgpkTH8TGsxlkdBb8mxVJiu+Xippp0T2zM1qK\nMwwICHod+pqlP0RSn4n4OVacWE78O3EgTTta+DD2musaBZFl5uQ4tKGXdfxV\nXm6H\r\n=JS/y\r\n-----END PGP SIGNATURE-----\r\n" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "gitHead": "7b368004723b8d11d4d237ff0479b9edcfb41449", - "homepage": "https://github.com/ljharb/qs", - "keywords": [ - "querystring", - "qs", - "query", - "url", - "parse", - "stringify" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "maintainers": [ - { - "name": "hueniverse", - "email": "eran@hammer.io" - }, - { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - { - "name": "nlf", - "email": "quitlahok@gmail.com" - } - ], - "name": "qs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/qs.git" - }, - "scripts": { - "coverage": "covert test", - "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", - "lint": "eslint lib/*.js test/*.js", - "postlint": "eclint check * lib/* test/*", - "posttest": "npx aud", - "prepublish": "safe-publish-latest && npm run dist", - "pretest": "npm run --silent readme && npm run --silent lint", - "readme": "evalmd README.md", - "test": "npm run --silent coverage", - "tests-only": "node test" - }, - "version": "6.9.1" -} diff --git a/reverse_engineering/node_modules/qs/test/.eslintrc b/reverse_engineering/node_modules/qs/test/.eslintrc deleted file mode 100644 index 8ab8536..0000000 --- a/reverse_engineering/node_modules/qs/test/.eslintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "consistent-return": 2, - "function-paren-newline": 0, - "max-lines": 0, - "max-lines-per-function": 0, - "max-nested-callbacks": [2, 3], - "max-statements": 0, - "no-buffer-constructor": 0, - "no-extend-native": 0, - "no-magic-numbers": 0, - "no-throw-literal": 0, - "object-curly-newline": 0, - "sort-keys": 0, - } -} diff --git a/reverse_engineering/node_modules/qs/test/index.js b/reverse_engineering/node_modules/qs/test/index.js deleted file mode 100644 index 5e6bc8f..0000000 --- a/reverse_engineering/node_modules/qs/test/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -require('./parse'); - -require('./stringify'); - -require('./utils'); diff --git a/reverse_engineering/node_modules/qs/test/parse.js b/reverse_engineering/node_modules/qs/test/parse.js deleted file mode 100644 index be10400..0000000 --- a/reverse_engineering/node_modules/qs/test/parse.js +++ /dev/null @@ -1,758 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var utils = require('../lib/utils'); -var iconv = require('iconv-lite'); -var SaferBuffer = require('safer-buffer').Buffer; - -test('parse()', function (t) { - t.test('parses a simple string', function (st) { - st.deepEqual(qs.parse('0=foo'), { 0: 'foo' }); - st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); - st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); - st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); - st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); - st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); - st.deepEqual(qs.parse('foo'), { foo: '' }); - st.deepEqual(qs.parse('foo='), { foo: '' }); - st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); - st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); - st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); - st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); - st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); - st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); - st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); - st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { - cht: 'p3', - chd: 't:60,40', - chs: '250x100', - chl: 'Hello|World' - }); - st.end(); - }); - - t.test('arrayFormat: brackets allows only explicit arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'brackets' }), { a: 'b,c' }); - st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('arrayFormat: indices allows only indexed arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'indices' }), { a: 'b,c' }); - st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('arrayFormat: comma allows only comma-separated arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'comma' }), { a: 'b,c' }); - st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('arrayFormat: repeat allows only repeated values', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'repeat' }), { a: 'b,c' }); - st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('allows enabling dot notation', function (st) { - st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); - st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); - t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); - t.deepEqual( - qs.parse('a[b][c][d][e][f][g][h]=i'), - { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, - 'defaults to a depth of 5' - ); - - t.test('only parses one level when depth = 1', function (st) { - st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); - st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); - st.end(); - }); - - t.test('uses original key when depth = 0', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: 0 }), { 'a[0]': 'b', 'a[1]': 'c' }); - st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: 0 }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); - st.end(); - }); - - t.test('uses original key when depth = false', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' }); - st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); - st.end(); - }); - - t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); - - t.test('parses an explicit array', function (st) { - st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); - st.end(); - }); - - t.test('parses a mix of simple and explicit arrays', function (st) { - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); - - st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - - st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - - st.end(); - }); - - t.test('parses a nested array', function (st) { - st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); - st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); - st.end(); - }); - - t.test('allows to specify array indices', function (st) { - st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); - st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] }); - st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } }); - st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); - st.end(); - }); - - t.test('limits specific array indices to arrayLimit', function (st) { - st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] }); - st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); - - t.test('supports encoded = signs', function (st) { - st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); - st.end(); - }); - - t.test('is ok with url encoded strings', function (st) { - st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); - st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); - st.end(); - }); - - t.test('allows brackets in the value', function (st) { - st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); - st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); - st.end(); - }); - - t.test('allows empty values', function (st) { - st.deepEqual(qs.parse(''), {}); - st.deepEqual(qs.parse(null), {}); - st.deepEqual(qs.parse(undefined), {}); - st.end(); - }); - - t.test('transforms arrays to objects', function (st) { - st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); - st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } }); - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } }); - st.end(); - }); - - t.test('transforms arrays to objects (dot notation)', function (st) { - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); - st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); - st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); - st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - st.end(); - }); - - t.test('correctly prunes undefined values when converting an array to an object', function (st) { - st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } }); - st.end(); - }); - - t.test('supports malformed uri characters', function (st) { - st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); - st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); - st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); - st.end(); - }); - - t.test('doesn\'t produce empty keys', function (st) { - st.deepEqual(qs.parse('_r=1&'), { _r: '1' }); - st.end(); - }); - - t.test('cannot access Object prototype', function (st) { - qs.parse('constructor[prototype][bad]=bad'); - qs.parse('bad[constructor][prototype][bad]=bad'); - st.equal(typeof Object.prototype.bad, 'undefined'); - st.end(); - }); - - t.test('parses arrays of objects', function (st) { - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); - st.end(); - }); - - t.test('allows for empty strings in arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); - - st.deepEqual( - qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', null, 'c', ''] }, - 'with arrayLimit 20 + array indices: null then empty string works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), - { a: ['b', null, 'c', ''] }, - 'with arrayLimit 0 + array brackets: null then empty string works' - ); - - st.deepEqual( - qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', '', 'c', null] }, - 'with arrayLimit 20 + array indices: empty string then null works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), - { a: ['b', '', 'c', null] }, - 'with arrayLimit 0 + array brackets: empty string then null works' - ); - - st.deepEqual( - qs.parse('a[]=&a[]=b&a[]=c'), - { a: ['', 'b', 'c'] }, - 'array brackets: empty strings work' - ); - st.end(); - }); - - t.test('compacts sparse arrays', function (st) { - st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] }); - st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] }); - st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] }); - st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] }); - st.end(); - }); - - t.test('parses semi-parsed strings', function (st) { - st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); - st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); - st.end(); - }); - - t.test('parses buffers correctly', function (st) { - var b = SaferBuffer.from('test'); - st.deepEqual(qs.parse({ a: b }), { a: b }); - st.end(); - }); - - t.test('parses jquery-param strings', function (st) { - // readable = 'filter[0][]=int1&filter[0][]==&filter[0][]=77&filter[]=and&filter[2][]=int2&filter[2][]==&filter[2][]=8' - var encoded = 'filter%5B0%5D%5B%5D=int1&filter%5B0%5D%5B%5D=%3D&filter%5B0%5D%5B%5D=77&filter%5B%5D=and&filter%5B2%5D%5B%5D=int2&filter%5B2%5D%5B%5D=%3D&filter%5B2%5D%5B%5D=8'; - var expected = { filter: [['int1', '=', '77'], 'and', ['int2', '=', '8']] }; - st.deepEqual(qs.parse(encoded), expected); - st.end(); - }); - - t.test('continues parsing when no parent is found', function (st) { - st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' }); - st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' }); - st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); - st.end(); - }); - - t.test('does not error when parsing a very long array', function (st) { - var str = 'a[]=a'; - while (Buffer.byteLength(str) < 128 * 1024) { - str = str + '&' + str; - } - - st.doesNotThrow(function () { - qs.parse(str); - }); - - st.end(); - }); - - t.test('should not throw when a native prototype has an enumerable property', function (st) { - Object.prototype.crash = ''; - Array.prototype.crash = ''; - st.doesNotThrow(qs.parse.bind(null, 'a=b')); - st.deepEqual(qs.parse('a=b'), { a: 'b' }); - st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - delete Object.prototype.crash; - delete Array.prototype.crash; - st.end(); - }); - - t.test('parses a string with an alternative string delimiter', function (st) { - st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('parses a string with an alternative RegExp delimiter', function (st) { - st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not use non-splittable objects as delimiters', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding parameter limit', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); - st.end(); - }); - - t.test('allows setting the parameter limit to Infinity', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding array limit', function (st) { - st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } }); - st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); - st.end(); - }); - - t.test('allows disabling array parsing', function (st) { - var indices = qs.parse('a[0]=b&a[1]=c', { parseArrays: false }); - st.deepEqual(indices, { a: { 0: 'b', 1: 'c' } }); - st.equal(Array.isArray(indices.a), false, 'parseArrays:false, indices case is not an array'); - - var emptyBrackets = qs.parse('a[]=b', { parseArrays: false }); - st.deepEqual(emptyBrackets, { a: { 0: 'b' } }); - st.equal(Array.isArray(emptyBrackets.a), false, 'parseArrays:false, empty brackets case is not an array'); - - st.end(); - }); - - t.test('allows for query string prefix', function (st) { - st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); - st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); - st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' }); - st.end(); - }); - - t.test('parses an object', function (st) { - var input = { - 'user[name]': { 'pop[bob]': 3 }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses string with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo=bar,tee', { comma: true }), { foo: ['bar', 'tee'] }); - st.deepEqual(qs.parse('foo[bar]=coffee,tee', { comma: true }), { foo: { bar: ['coffee', 'tee'] } }); - st.deepEqual(qs.parse('foo=', { comma: true }), { foo: '' }); - st.deepEqual(qs.parse('foo', { comma: true }), { foo: '' }); - st.deepEqual(qs.parse('foo', { comma: true, strictNullHandling: true }), { foo: null }); - st.end(); - }); - - t.test('use number decoder, parses string that has one number with comma option enabled', function (st) { - var decoder = function (str, defaultDecoder, charset, type) { - if (!isNaN(Number(str))) { - return parseFloat(str); - } - return defaultDecoder(str, defaultDecoder, charset, type); - }; - - st.deepEqual(qs.parse('foo=1', { comma: true, decoder: decoder }), { foo: 1 }); - st.deepEqual(qs.parse('foo=0', { comma: true, decoder: decoder }), { foo: 0 }); - - st.end(); - }); - - t.test('parses brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=', { comma: true }), { foo: [['1', '2', '3'], ''] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); - - st.end(); - }); - - t.test('parses an object in dot notation', function (st) { - var input = { - 'user.name': { 'pop[bob]': 3 }, - 'user.email.': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input, { allowDots: true }); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses an object and not child values', function (st) { - var input = { - 'user[name]': { 'pop[bob]': { test: 3 } }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': { test: 3 } }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('does not blow up when Buffer global is missing', function (st) { - var tempBuffer = global.Buffer; - delete global.Buffer; - var result = qs.parse('a=b&c=d'); - global.Buffer = tempBuffer; - st.deepEqual(result, { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not crash when parsing circular references', function (st) { - var a = {}; - a.b = a; - - var parsed; - - st.doesNotThrow(function () { - parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - st.equal('bar' in parsed.foo, true); - st.equal('baz' in parsed.foo, true); - st.equal(parsed.foo.bar, 'baz'); - st.deepEqual(parsed.foo.baz, a); - st.end(); - }); - - t.test('does not crash when parsing deep objects', function (st) { - var parsed; - var str = 'foo'; - - for (var i = 0; i < 5000; i++) { - str += '[p]'; - } - - str += '=bar'; - - st.doesNotThrow(function () { - parsed = qs.parse(str, { depth: 5000 }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - - var depth = 0; - var ref = parsed.foo; - while ((ref = ref.p)) { - depth += 1; - } - - st.equal(depth, 5000, 'parsed is 5000 properties deep'); - - st.end(); - }); - - t.test('parses null objects correctly', { skip: !Object.create }, function (st) { - var a = Object.create(null); - a.b = 'c'; - - st.deepEqual(qs.parse(a), { b: 'c' }); - var result = qs.parse({ a: a }); - st.equal('a' in result, true, 'result has "a" property'); - st.deepEqual(result.a, a); - st.end(); - }); - - t.test('parses dates correctly', function (st) { - var now = new Date(); - st.deepEqual(qs.parse({ a: now }), { a: now }); - st.end(); - }); - - t.test('parses regular expressions correctly', function (st) { - var re = /^test$/; - st.deepEqual(qs.parse({ a: re }), { a: re }); - st.end(); - }); - - t.test('does not allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {}); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {}); - - st.deepEqual( - qs.parse('toString', { allowPrototypes: false }), - {}, - 'bare "toString" results in {}' - ); - - st.end(); - }); - - t.test('can allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }); - - st.deepEqual( - qs.parse('toString', { allowPrototypes: true }), - { toString: '' }, - 'bare "toString" results in { toString: "" }' - ); - - st.end(); - }); - - t.test('params starting with a closing bracket', function (st) { - st.deepEqual(qs.parse(']=toString'), { ']': 'toString' }); - st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' }); - st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' }); - st.end(); - }); - - t.test('params starting with a starting bracket', function (st) { - st.deepEqual(qs.parse('[=toString'), { '[': 'toString' }); - st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' }); - st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' }); - st.end(); - }); - - t.test('add keys to objects', function (st) { - st.deepEqual( - qs.parse('a[b]=c&a=d'), - { a: { b: 'c', d: true } }, - 'can add keys to objects' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString'), - { a: { b: 'c' } }, - 'can not overwrite prototype' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { allowPrototypes: true }), - { a: { b: 'c', toString: true } }, - 'can overwrite prototype with allowPrototypes true' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { plainObjects: true }), - { a: { b: 'c', toString: true } }, - 'can overwrite prototype with plainObjects true' - ); - - st.end(); - }); - - t.test('can return null objects', { skip: !Object.create }, function (st) { - var expected = Object.create(null); - expected.a = Object.create(null); - expected.a.b = 'c'; - expected.a.hasOwnProperty = 'd'; - st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); - st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); - var expectedArray = Object.create(null); - expectedArray.a = Object.create(null); - expectedArray.a[0] = 'b'; - expectedArray.a.c = 'd'; - st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); - st.end(); - }); - - t.test('can parse with custom encoding', function (st) { - st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { - decoder: function (str) { - var reg = /%([0-9A-F]{2})/ig; - var result = []; - var parts = reg.exec(str); - while (parts) { - result.push(parseInt(parts[1], 16)); - parts = reg.exec(str); - } - return String(iconv.decode(SaferBuffer.from(result), 'shift_jis')); - } - }), { 県: '大阪府' }); - st.end(); - }); - - t.test('receives the default decoder as a second argument', function (st) { - st.plan(1); - qs.parse('a', { - decoder: function (str, defaultDecoder) { - st.equal(defaultDecoder, utils.decode); - } - }); - st.end(); - }); - - t.test('throws error with wrong decoder', function (st) { - st['throws'](function () { - qs.parse({}, { decoder: 'string' }); - }, new TypeError('Decoder has to be a function.')); - st.end(); - }); - - t.test('does not mutate the options argument', function (st) { - var options = {}; - qs.parse('a[b]=true', options); - st.deepEqual(options, {}); - st.end(); - }); - - t.test('throws if an invalid charset is specified', function (st) { - st['throws'](function () { - qs.parse('a=b', { charset: 'foobar' }); - }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); - st.end(); - }); - - t.test('parses an iso-8859-1 string if asked to', function (st) { - st.deepEqual(qs.parse('%A2=%BD', { charset: 'iso-8859-1' }), { '¢': '½' }); - st.end(); - }); - - var urlEncodedCheckmarkInUtf8 = '%E2%9C%93'; - var urlEncodedOSlashInUtf8 = '%C3%B8'; - var urlEncodedNumCheckmark = '%26%2310003%3B'; - var urlEncodedNumSmiley = '%26%239786%3B'; - - t.test('prefers an utf-8 charset specified by the utf8 sentinel to a default charset of iso-8859-1', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'iso-8859-1' }), { ø: 'ø' }); - st.end(); - }); - - t.test('prefers an iso-8859-1 charset specified by the utf8 sentinel to a default charset of utf-8', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { 'ø': 'ø' }); - st.end(); - }); - - t.test('does not require the utf8 sentinel to be defined before the parameters whose decoding it affects', function (st) { - st.deepEqual(qs.parse('a=' + urlEncodedOSlashInUtf8 + '&utf8=' + urlEncodedNumCheckmark, { charsetSentinel: true, charset: 'utf-8' }), { a: 'ø' }); - st.end(); - }); - - t.test('should ignore an utf8 sentinel with an unknown value', function (st) { - st.deepEqual(qs.parse('utf8=foo&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { ø: 'ø' }); - st.end(); - }); - - t.test('uses the utf8 sentinel to switch to utf-8 when no default charset is given', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { ø: 'ø' }); - st.end(); - }); - - t.test('uses the utf8 sentinel to switch to iso-8859-1 when no default charset is given', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { 'ø': 'ø' }); - st.end(); - }); - - t.test('interprets numeric entities in iso-8859-1 when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1', interpretNumericEntities: true }), { foo: '☺' }); - st.end(); - }); - - t.test('handles a custom decoder returning `null`, in the `iso-8859-1` charset, when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=&bar=' + urlEncodedNumSmiley, { - charset: 'iso-8859-1', - decoder: function (str, defaultDecoder, charset) { - return str ? defaultDecoder(str, defaultDecoder, charset) : null; - }, - interpretNumericEntities: true - }), { foo: null, bar: '☺' }); - st.end(); - }); - - t.test('does not interpret numeric entities in iso-8859-1 when `interpretNumericEntities` is absent', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1' }), { foo: '☺' }); - st.end(); - }); - - t.test('does not interpret numeric entities when the charset is utf-8, even when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'utf-8', interpretNumericEntities: true }), { foo: '☺' }); - st.end(); - }); - - t.test('does not interpret %uXXXX syntax in iso-8859-1 mode', function (st) { - st.deepEqual(qs.parse('%u263A=%u263A', { charset: 'iso-8859-1' }), { '%u263A': '%u263A' }); - st.end(); - }); - - t.test('allows for decoding keys and values differently', function (st) { - var decoder = function (str, defaultDecoder, charset, type) { - if (type === 'key') { - return defaultDecoder(str, defaultDecoder, charset, type).toLowerCase(); - } - if (type === 'value') { - return defaultDecoder(str, defaultDecoder, charset, type).toUpperCase(); - } - throw 'this should never happen! type: ' + type; - }; - - st.deepEqual(qs.parse('KeY=vAlUe', { decoder: decoder }), { key: 'VALUE' }); - st.end(); - }); - - t.end(); -}); diff --git a/reverse_engineering/node_modules/qs/test/stringify.js b/reverse_engineering/node_modules/qs/test/stringify.js deleted file mode 100644 index 760d08c..0000000 --- a/reverse_engineering/node_modules/qs/test/stringify.js +++ /dev/null @@ -1,738 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var utils = require('../lib/utils'); -var iconv = require('iconv-lite'); -var SaferBuffer = require('safer-buffer').Buffer; -var hasSymbols = require('has-symbols'); -var hasBigInt = typeof BigInt === 'function'; - -test('stringify()', function (t) { - t.test('stringifies a querystring object', function (st) { - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: 1 }), 'a=1'); - st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); - st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); - st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); - st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); - st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); - st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); - st.end(); - }); - - t.test('stringifies falsy values', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(null, { strictNullHandling: true }), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(0), ''); - st.end(); - }); - - t.test('stringifies symbols', { skip: !hasSymbols() }, function (st) { - st.equal(qs.stringify(Symbol.iterator), ''); - st.equal(qs.stringify([Symbol.iterator]), '0=Symbol%28Symbol.iterator%29'); - st.equal(qs.stringify({ a: Symbol.iterator }), 'a=Symbol%28Symbol.iterator%29'); - st.equal( - qs.stringify({ a: [Symbol.iterator] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[]=Symbol%28Symbol.iterator%29' - ); - st.end(); - }); - - t.test('stringifies bigints', { skip: !hasBigInt }, function (st) { - var three = BigInt(3); - var encodeWithN = function (value, defaultEncoder, charset) { - var result = defaultEncoder(value, defaultEncoder, charset); - return typeof value === 'bigint' ? result + 'n' : result; - }; - st.equal(qs.stringify(three), ''); - st.equal(qs.stringify([three]), '0=3'); - st.equal(qs.stringify([three], { encoder: encodeWithN }), '0=3n'); - st.equal(qs.stringify({ a: three }), 'a=3'); - st.equal(qs.stringify({ a: three }, { encoder: encodeWithN }), 'a=3n'); - st.equal( - qs.stringify({ a: [three] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[]=3' - ); - st.equal( - qs.stringify({ a: [three] }, { encodeValuesOnly: true, encoder: encodeWithN, arrayFormat: 'brackets' }), - 'a[]=3n' - ); - st.end(); - }); - - t.test('adds query prefix', function (st) { - st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); - st.end(); - }); - - t.test('with query prefix, outputs blank string given an empty object', function (st) { - st.equal(qs.stringify({}, { addQueryPrefix: true }), ''); - st.end(); - }); - - t.test('stringifies nested falsy values', function (st) { - st.equal(qs.stringify({ a: { b: { c: null } } }), 'a%5Bb%5D%5Bc%5D='); - st.equal(qs.stringify({ a: { b: { c: null } } }, { strictNullHandling: true }), 'a%5Bb%5D%5Bc%5D'); - st.equal(qs.stringify({ a: { b: { c: false } } }), 'a%5Bb%5D%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies a nested object', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies a nested object with dots notation', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); - st.end(); - }); - - t.test('stringifies an array value', function (st) { - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }), - 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }), - 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma' }), - 'a=b%2Cc%2Cd', - 'comma => comma' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }), - 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', - 'default => indices' - ); - st.end(); - }); - - t.test('omits nulls when asked', function (st) { - st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); - st.end(); - }); - - t.test('omits nested nulls when asked', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('omits array indices when asked', function (st) { - st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); - st.end(); - }); - - t.test('stringifies a nested array value', function (st) { - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'indices' }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'brackets' }), 'a%5Bb%5D%5B%5D=c&a%5Bb%5D%5B%5D=d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'comma' }), 'a%5Bb%5D=c%2Cd'); // a[b]=c,d - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); - st.end(); - }); - - t.test('stringifies a nested array value with dots notation', function (st) { - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encode: false, arrayFormat: 'indices' } - ), - 'a.b[0]=c&a.b[1]=d', - 'indices: stringifies with dots + indices' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encode: false, arrayFormat: 'brackets' } - ), - 'a.b[]=c&a.b[]=d', - 'brackets: stringifies with dots + brackets' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encode: false, arrayFormat: 'comma' } - ), - 'a.b=c,d', - 'comma: stringifies with dots + comma' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encode: false } - ), - 'a.b[0]=c&a.b[1]=d', - 'default: stringifies with dots + indices' - ); - st.end(); - }); - - t.test('stringifies an object inside an array', function (st) { - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices' }), - 'a%5B0%5D%5Bb%5D=c', // a[0][b]=c - 'indices => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets' }), - 'a%5B%5D%5Bb%5D=c', // a[][b]=c - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }), - 'a%5B0%5D%5Bb%5D=c', - 'default => indices' - ); - - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices' }), - 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1', - 'indices => indices' - ); - - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets' }), - 'a%5B%5D%5Bb%5D%5Bc%5D%5B%5D=1', - 'brackets => brackets' - ); - - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }), - 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1', - 'default => indices' - ); - - st.end(); - }); - - t.test('stringifies an array with mixed objects and primitives', function (st) { - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'indices' }), - 'a[0][b]=1&a[1]=2&a[2]=3', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'brackets' }), - 'a[][b]=1&a[]=2&a[]=3', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), - 'a[0][b]=1&a[1]=2&a[2]=3', - 'default => indices' - ); - - st.end(); - }); - - t.test('stringifies an object inside an array with dots notation', function (st) { - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false, arrayFormat: 'indices' } - ), - 'a[0].b=c', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false, arrayFormat: 'brackets' } - ), - 'a[].b=c', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false } - ), - 'a[0].b=c', - 'default => indices' - ); - - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false, arrayFormat: 'indices' } - ), - 'a[0].b.c[0]=1', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false, arrayFormat: 'brackets' } - ), - 'a[].b.c[]=1', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false } - ), - 'a[0].b.c[0]=1', - 'default => indices' - ); - - st.end(); - }); - - t.test('does not omit object keys when indices = false', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when indices=true', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); - st.end(); - }); - - t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); - st.end(); - }); - - t.test('stringifies a complicated object', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies an empty value', function (st) { - st.equal(qs.stringify({ a: '' }), 'a='); - st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); - - st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); - st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); - - st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); - - st.end(); - }); - - t.test('stringifies a null object', { skip: !Object.create }, function (st) { - var obj = Object.create(null); - obj.a = 'b'; - st.equal(qs.stringify(obj), 'a=b'); - st.end(); - }); - - t.test('returns an empty string for invalid input', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(''), ''); - st.end(); - }); - - t.test('stringifies an object with a null object as a child', { skip: !Object.create }, function (st) { - var obj = { a: Object.create(null) }; - - obj.a.b = 'c'; - st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('drops keys with a value of undefined', function (st) { - st.equal(qs.stringify({ a: undefined }), ''); - - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); - st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); - st.end(); - }); - - t.test('url encodes values', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.end(); - }); - - t.test('stringifies a date', function (st) { - var now = new Date(); - var str = 'a=' + encodeURIComponent(now.toISOString()); - st.equal(qs.stringify({ a: now }), str); - st.end(); - }); - - t.test('stringifies the weird object from qs', function (st) { - st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); - st.end(); - }); - - t.test('skips properties that are part of the object prototype', function (st) { - Object.prototype.crash = 'test'; - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - delete Object.prototype.crash; - st.end(); - }); - - t.test('stringifies boolean values', function (st) { - st.equal(qs.stringify({ a: true }), 'a=true'); - st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); - st.equal(qs.stringify({ b: false }), 'b=false'); - st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies buffer values', function (st) { - st.equal(qs.stringify({ a: SaferBuffer.from('test') }), 'a=test'); - st.equal(qs.stringify({ a: { b: SaferBuffer.from('test') } }), 'a%5Bb%5D=test'); - st.end(); - }); - - t.test('stringifies an object using an alternative delimiter', function (st) { - st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); - st.end(); - }); - - t.test('doesn\'t blow up when Buffer global is missing', function (st) { - var tempBuffer = global.Buffer; - delete global.Buffer; - var result = qs.stringify({ a: 'b', c: 'd' }); - global.Buffer = tempBuffer; - st.equal(result, 'a=b&c=d'); - st.end(); - }); - - t.test('selects properties when filter=array', function (st) { - st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); - st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); - - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' } - ), - 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' } - ), - 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2] } - ), - 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', - 'default => indices' - ); - - st.end(); - }); - - t.test('supports custom representations when filter=function', function (st) { - var calls = 0; - var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; - var filterFunc = function (prefix, value) { - calls += 1; - if (calls === 1) { - st.equal(prefix, '', 'prefix is empty'); - st.equal(value, obj); - } else if (prefix === 'c') { - return void 0; - } else if (value instanceof Date) { - st.equal(prefix, 'e[f]'); - return value.getTime(); - } - return value; - }; - - st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); - st.equal(calls, 5); - st.end(); - }); - - t.test('can disable uri encoding', function (st) { - st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); - st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); - st.end(); - }); - - t.test('can sort the keys', function (st) { - var sort = function (a, b) { - return a.localeCompare(b); - }; - st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); - st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); - st.end(); - }); - - t.test('can sort the keys at depth 3 or more too', function (st) { - var sort = function (a, b) { - return a.localeCompare(b); - }; - st.equal( - qs.stringify( - { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, - { sort: sort, encode: false } - ), - 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb' - ); - st.equal( - qs.stringify( - { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, - { sort: null, encode: false } - ), - 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b' - ); - st.end(); - }); - - t.test('can stringify with custom encoding', function (st) { - st.equal(qs.stringify({ 県: '大阪府', '': '' }, { - encoder: function (str) { - if (str.length === 0) { - return ''; - } - var buf = iconv.encode(str, 'shiftjis'); - var result = []; - for (var i = 0; i < buf.length; ++i) { - result.push(buf.readUInt8(i).toString(16)); - } - return '%' + result.join('%'); - } - }), '%8c%a7=%91%e5%8d%e3%95%7b&='); - st.end(); - }); - - t.test('receives the default encoder as a second argument', function (st) { - st.plan(2); - qs.stringify({ a: 1 }, { - encoder: function (str, defaultEncoder) { - st.equal(defaultEncoder, utils.encode); - } - }); - st.end(); - }); - - t.test('throws error with wrong encoder', function (st) { - st['throws'](function () { - qs.stringify({}, { encoder: 'string' }); - }, new TypeError('Encoder has to be a function.')); - st.end(); - }); - - t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) { - st.equal(qs.stringify({ a: SaferBuffer.from([1]) }, { - encoder: function (buffer) { - if (typeof buffer === 'string') { - return buffer; - } - return String.fromCharCode(buffer.readUInt8(0) + 97); - } - }), 'a=b'); - - st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, { - encoder: function (buffer) { - return buffer; - } - }), 'a=a b'); - st.end(); - }); - - t.test('serializeDate option', function (st) { - var date = new Date(); - st.equal( - qs.stringify({ a: date }), - 'a=' + date.toISOString().replace(/:/g, '%3A'), - 'default is toISOString' - ); - - var mutatedDate = new Date(); - mutatedDate.toISOString = function () { - throw new SyntaxError(); - }; - st['throws'](function () { - mutatedDate.toISOString(); - }, SyntaxError); - st.equal( - qs.stringify({ a: mutatedDate }), - 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'), - 'toISOString works even when method is not locally present' - ); - - var specificDate = new Date(6); - st.equal( - qs.stringify( - { a: specificDate }, - { serializeDate: function (d) { return d.getTime() * 7; } } - ), - 'a=42', - 'custom serializeDate function called' - ); - - st.end(); - }); - - t.test('RFC 1738 spaces serialization', function (st) { - st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); - st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b'); - st.end(); - }); - - t.test('RFC 3986 spaces serialization', function (st) { - st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); - st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b'); - st.end(); - }); - - t.test('Backward compatibility to RFC 3986', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b'); - st.end(); - }); - - t.test('Edge cases and unknown formats', function (st) { - ['UFO1234', false, 1234, null, {}, []].forEach( - function (format) { - st['throws']( - function () { - qs.stringify({ a: 'b c' }, { format: format }); - }, - new TypeError('Unknown format option provided.') - ); - } - ); - st.end(); - }); - - t.test('encodeValuesOnly', function (st) { - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true } - ), - 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] } - ), - 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h' - ); - st.end(); - }); - - t.test('encodeValuesOnly - strictNullHandling', function (st) { - st.equal( - qs.stringify( - { a: { b: null } }, - { encodeValuesOnly: true, strictNullHandling: true } - ), - 'a[b]' - ); - st.end(); - }); - - t.test('throws if an invalid charset is specified', function (st) { - st['throws'](function () { - qs.stringify({ a: 'b' }, { charset: 'foobar' }); - }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); - st.end(); - }); - - t.test('respects a charset of iso-8859-1', function (st) { - st.equal(qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }), '%E6=%E6'); - st.end(); - }); - - t.test('encodes unrepresentable chars as numeric entities in iso-8859-1 mode', function (st) { - st.equal(qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }), 'a=%26%239786%3B'); - st.end(); - }); - - t.test('respects an explicit charset of utf-8 (the default)', function (st) { - st.equal(qs.stringify({ a: 'æ' }, { charset: 'utf-8' }), 'a=%C3%A6'); - st.end(); - }); - - t.test('adds the right sentinel when instructed to and the charset is utf-8', function (st) { - st.equal(qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'utf-8' }), 'utf8=%E2%9C%93&a=%C3%A6'); - st.end(); - }); - - t.test('adds the right sentinel when instructed to and the charset is iso-8859-1', function (st) { - st.equal(qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }), 'utf8=%26%2310003%3B&a=%E6'); - st.end(); - }); - - t.test('does not mutate the options argument', function (st) { - var options = {}; - qs.stringify({}, options); - st.deepEqual(options, {}); - st.end(); - }); - - t.test('strictNullHandling works with custom filter', function (st) { - var filter = function (prefix, value) { - return value; - }; - - var options = { strictNullHandling: true, filter: filter }; - st.equal(qs.stringify({ key: null }, options), 'key'); - st.end(); - }); - - t.test('strictNullHandling works with null serializeDate', function (st) { - var serializeDate = function () { - return null; - }; - var options = { strictNullHandling: true, serializeDate: serializeDate }; - var date = new Date(); - st.equal(qs.stringify({ key: date }, options), 'key'); - st.end(); - }); - - t.test('allows for encoding keys and values differently', function (st) { - var encoder = function (str, defaultEncoder, charset, type) { - if (type === 'key') { - return defaultEncoder(str, defaultEncoder, charset, type).toLowerCase(); - } - if (type === 'value') { - return defaultEncoder(str, defaultEncoder, charset, type).toUpperCase(); - } - throw 'this should never happen! type: ' + type; - }; - - st.deepEqual(qs.stringify({ KeY: 'vAlUe' }, { encoder: encoder }), 'key=VALUE'); - st.end(); - }); - - t.end(); -}); diff --git a/reverse_engineering/node_modules/qs/test/utils.js b/reverse_engineering/node_modules/qs/test/utils.js deleted file mode 100644 index aa84dfd..0000000 --- a/reverse_engineering/node_modules/qs/test/utils.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -var test = require('tape'); -var inspect = require('object-inspect'); -var SaferBuffer = require('safer-buffer').Buffer; -var forEach = require('for-each'); -var utils = require('../lib/utils'); - -test('merge()', function (t) { - t.deepEqual(utils.merge(null, true), [null, true], 'merges true into null'); - - t.deepEqual(utils.merge(null, [42]), [null, 42], 'merges null into an array'); - - t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); - - var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); - t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); - - var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); - t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); - - var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); - t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); - - var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); - t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); - - var noOptionsNonObjectSource = utils.merge({ foo: 'baz' }, 'bar'); - t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true }); - - t.test( - 'avoids invoking array setters unnecessarily', - { skip: typeof Object.defineProperty !== 'function' }, - function (st) { - var setCount = 0; - var getCount = 0; - var observed = []; - Object.defineProperty(observed, 0, { - get: function () { - getCount += 1; - return { bar: 'baz' }; - }, - set: function () { setCount += 1; } - }); - utils.merge(observed, [null]); - st.equal(setCount, 0); - st.equal(getCount, 1); - observed[0] = observed[0]; // eslint-disable-line no-self-assign - st.equal(setCount, 1); - st.equal(getCount, 2); - st.end(); - } - ); - - t.end(); -}); - -test('assign()', function (t) { - var target = { a: 1, b: 2 }; - var source = { b: 3, c: 4 }; - var result = utils.assign(target, source); - - t.equal(result, target, 'returns the target'); - t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); - t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); - - t.end(); -}); - -test('combine()', function (t) { - t.test('both arrays', function (st) { - var a = [1]; - var b = [2]; - var combined = utils.combine(a, b); - - st.deepEqual(a, [1], 'a is not mutated'); - st.deepEqual(b, [2], 'b is not mutated'); - st.notEqual(a, combined, 'a !== combined'); - st.notEqual(b, combined, 'b !== combined'); - st.deepEqual(combined, [1, 2], 'combined is a + b'); - - st.end(); - }); - - t.test('one array, one non-array', function (st) { - var aN = 1; - var a = [aN]; - var bN = 2; - var b = [bN]; - - var combinedAnB = utils.combine(aN, b); - st.deepEqual(b, [bN], 'b is not mutated'); - st.notEqual(aN, combinedAnB, 'aN + b !== aN'); - st.notEqual(a, combinedAnB, 'aN + b !== a'); - st.notEqual(bN, combinedAnB, 'aN + b !== bN'); - st.notEqual(b, combinedAnB, 'aN + b !== b'); - st.deepEqual([1, 2], combinedAnB, 'first argument is array-wrapped when not an array'); - - var combinedABn = utils.combine(a, bN); - st.deepEqual(a, [aN], 'a is not mutated'); - st.notEqual(aN, combinedABn, 'a + bN !== aN'); - st.notEqual(a, combinedABn, 'a + bN !== a'); - st.notEqual(bN, combinedABn, 'a + bN !== bN'); - st.notEqual(b, combinedABn, 'a + bN !== b'); - st.deepEqual([1, 2], combinedABn, 'second argument is array-wrapped when not an array'); - - st.end(); - }); - - t.test('neither is an array', function (st) { - var combined = utils.combine(1, 2); - st.notEqual(1, combined, '1 + 2 !== 1'); - st.notEqual(2, combined, '1 + 2 !== 2'); - st.deepEqual([1, 2], combined, 'both arguments are array-wrapped when not an array'); - - st.end(); - }); - - t.end(); -}); - -test('isBuffer()', function (t) { - forEach([null, undefined, true, false, '', 'abc', 42, 0, NaN, {}, [], function () {}, /a/g], function (x) { - t.equal(utils.isBuffer(x), false, inspect(x) + ' is not a buffer'); - }); - - var fakeBuffer = { constructor: Buffer }; - t.equal(utils.isBuffer(fakeBuffer), false, 'fake buffer is not a buffer'); - - var saferBuffer = SaferBuffer.from('abc'); - t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer'); - - var buffer = Buffer.from && Buffer.alloc ? Buffer.from('abc') : new Buffer('abc'); - t.equal(utils.isBuffer(buffer), true, 'real Buffer instance is a buffer'); - t.end(); -}); diff --git a/reverse_engineering/node_modules/semaphore/.npmignore b/reverse_engineering/node_modules/semaphore/.npmignore deleted file mode 100644 index 7dccd97..0000000 --- a/reverse_engineering/node_modules/semaphore/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log \ No newline at end of file diff --git a/reverse_engineering/node_modules/semaphore/.travis.yml b/reverse_engineering/node_modules/semaphore/.travis.yml deleted file mode 100644 index d211478..0000000 --- a/reverse_engineering/node_modules/semaphore/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "0.12" - - "0.10" - - "0.8" - - "4" - - "6" - - "8" -sudo: false diff --git a/reverse_engineering/node_modules/semaphore/README.md b/reverse_engineering/node_modules/semaphore/README.md deleted file mode 100644 index 15c227f..0000000 --- a/reverse_engineering/node_modules/semaphore/README.md +++ /dev/null @@ -1,71 +0,0 @@ -semaphore.js -============ - -[![Build Status](https://travis-ci.org/abrkn/semaphore.js.svg?branch=master)](https://travis-ci.org/abrkn/semaphore.js) - -Install: -npm install semaphore - -Limit simultaneous access to a resource. - -```javascript -// Create -var sem = require('semaphore')(capacity); - -// Take -sem.take(fn[, n=1]) -sem.take(n, fn) - -// Leave -sem.leave([n]) - -// Available -sem.available([n]) -``` - - -```javascript -// Limit concurrent db access -var sem = require('semaphore')(1); -var server = require('http').createServer(req, res) { - sem.take(function() { - expensive_database_operation(function(err, res) { - sem.leave(); - - if (err) return res.end("Error"); - - return res.end(res); - }); - }); -}); -``` - -```javascript -// 2 clients at a time -var sem = require('semaphore')(2); -var server = require('http').createServer(req, res) { - res.write("Then good day, madam!"); - - sem.take(function() { - res.end("We hope to see you soon for tea."); - sem.leave(); - }); -}); -``` - -```javascript -// Rate limit -var sem = require('semaphore')(10); -var server = require('http').createServer(req, res) { - sem.take(function() { - res.end("."); - - setTimeout(sem.leave, 500) - }); -}); -``` - -License -=== - -MIT diff --git a/reverse_engineering/node_modules/semaphore/bower.json b/reverse_engineering/node_modules/semaphore/bower.json deleted file mode 100644 index af193c0..0000000 --- a/reverse_engineering/node_modules/semaphore/bower.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "semaphore.js", - "version": "1.0.3", - "homepage": "https://github.com/abrkn/semaphore.js", - "authors": [ - "Andreas Brekken " - ], - "description": "Limit simultaneous access to a resource.", - "main": "lib/semaphore.js", - "moduleType": [ - "globals", - "node" - ], - "keywords": [ - "semaphore", - "concurrency" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/reverse_engineering/node_modules/semaphore/lib/semaphore.js b/reverse_engineering/node_modules/semaphore/lib/semaphore.js deleted file mode 100644 index 6bf9098..0000000 --- a/reverse_engineering/node_modules/semaphore/lib/semaphore.js +++ /dev/null @@ -1,101 +0,0 @@ -;(function(global) { - -'use strict'; - -var nextTick = function (fn) { setTimeout(fn, 0); } -if (typeof process != 'undefined' && process && typeof process.nextTick == 'function') { - // node.js and the like - nextTick = process.nextTick; -} - -function semaphore(capacity) { - var semaphore = { - capacity: capacity || 1, - current: 0, - queue: [], - firstHere: false, - - take: function() { - if (semaphore.firstHere === false) { - semaphore.current++; - semaphore.firstHere = true; - var isFirst = 1; - } else { - var isFirst = 0; - } - var item = { n: 1 }; - - if (typeof arguments[0] == 'function') { - item.task = arguments[0]; - } else { - item.n = arguments[0]; - } - - if (arguments.length >= 2) { - if (typeof arguments[1] == 'function') item.task = arguments[1]; - else item.n = arguments[1]; - } - - var task = item.task; - item.task = function() { task(semaphore.leave); }; - - if (semaphore.current + item.n - isFirst > semaphore.capacity) { - if (isFirst === 1) { - semaphore.current--; - semaphore.firstHere = false; - } - return semaphore.queue.push(item); - } - - semaphore.current += item.n - isFirst; - item.task(semaphore.leave); - if (isFirst === 1) semaphore.firstHere = false; - }, - - leave: function(n) { - n = n || 1; - - semaphore.current -= n; - - if (!semaphore.queue.length) { - if (semaphore.current < 0) { - throw new Error('leave called too many times.'); - } - - return; - } - - var item = semaphore.queue[0]; - - if (item.n + semaphore.current > semaphore.capacity) { - return; - } - - semaphore.queue.shift(); - semaphore.current += item.n; - - nextTick(item.task); - }, - - available: function(n) { - n = n || 1; - return(semaphore.current + n <= semaphore.capacity); - } - }; - - return semaphore; -}; - -if (typeof exports === 'object') { - // node export - module.exports = semaphore; -} else if (typeof define === 'function' && define.amd) { - // amd export - define(function () { - return semaphore; - }); -} else { - // browser global - global.semaphore = semaphore; -} -}(this)); diff --git a/reverse_engineering/node_modules/semaphore/package.json b/reverse_engineering/node_modules/semaphore/package.json deleted file mode 100644 index a119487..0000000 --- a/reverse_engineering/node_modules/semaphore/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "semaphore", - "version": "1.1.0", - "description": "semaphore for node", - "engines": { - "node": ">=0.8.0" - }, - "main": "./lib/semaphore.js", - "dependencies": {}, - "devDependencies": { - "mocha": "2.x.x", - "should": "8.x.x" - }, - "homepage": "https://github.com/abrkn/semaphore.js", - "repository": { - "type": "git", - "url": "git@github.com:abrkn/semaphore.js.git" - }, - "scripts": { - "test": "mocha" - } -} diff --git a/reverse_engineering/node_modules/semaphore/test/semaphore.js b/reverse_engineering/node_modules/semaphore/test/semaphore.js deleted file mode 100644 index c3358b1..0000000 --- a/reverse_engineering/node_modules/semaphore/test/semaphore.js +++ /dev/null @@ -1,167 +0,0 @@ -var should = require('should'); -var assert = require('assert'); -var semaphore = require("../lib/semaphore.js"); -require('mocha'); - -var Phone = function() { - return { - state: "free", - - dial: function(callback) { - if (this.state != "free") { - return callback(new Error("The phone is busy")); - } - - this.state = "busy"; - - setTimeout(function() { - callback(); - }, 100); - }, - - hangup: function() { - if (this.state == "free") { - return callback(new Error("The phone is not in use")); - } - - this.state = "free"; - } - }; -}; - -it("should not be using a bad example", function(done) { - var phone = new Phone(); - - // Call Bob - phone.dial(function(err) { - if (err) return done(err); - - phone.hangup(); - }); - - // Cannot call Bret, because the phone is already busy with Bob. - phone.dial(function(err) { - should.exist(err); - done(); - }); -}); - -it("should not break the phone", function(done) { - var phone = new Phone(); - var sem = require('../lib/semaphore.js')(1); - - // Call Jane - sem.take(function() { - phone.dial(function(err) { - if (err) return done(err); - - phone.hangup(); - - sem.leave(); - }); - }); - - // Call Jon (will need to wait for call with Jane to complete) - sem.take(function() { - phone.dial(function(err) { - if (err) return done(err); - - phone.hangup(); - - sem.leave(); - - done(); - }); - }); -}); - -it('should not be slow', function(done) { - var s = require('../lib/semaphore.js')(3); - var values = []; - - s.take(function() { values.push(1); s.leave(); }); - s.take(function() { values.push(2); s.leave(); }); - s.take(function() { values.push(3); s.leave(); }); - s.take(function() { values.push(4); s.leave(); }); - s.take(function() { values.push(5); s.leave(); }); - - process.nextTick(function() { - values.length.should.equal(5); - done(); - }); -}); - -it('should not let past more than capacity', function(done) { - this.timeout(6000); - - var s = require('../lib/semaphore.js')(3); - var values = []; - var speed = 250; - - s.take(function() { values.push(1); setTimeout(function() { s.leave(); }, speed * 1); }); - s.take(function() { values.push(2); setTimeout(function() { s.leave(); }, speed * 2); }); - s.take(function(leave) { values.push(3); setTimeout(function() { leave(); }, speed * 3); }); - s.take(function() { values.push(4); }); - s.take(function() { values.push(5); }); - - var tickN = 0; - - var check = function() { - switch (tickN++) { - case 0: // After 0 sec - console.log("0 seconds passed.") - s.current.should.equal(s.capacity); - s.queue.length.should.equal(2); - values.should.eql([1, 2, 3]); - break; - case 1: // After 1 sec - console.log("1 seconds passed."); - s.current.should.equal(s.capacity); - s.queue.length.should.equal(1); - values.should.eql([1, 2, 3, 4]); - break; - case 2: // After 2 sec - console.log("2 seconds passed."); - s.current.should.equal(3); - s.queue.length.should.equal(0); - values.should.eql([1, 2, 3, 4, 5]); - break; - case 3: // After 3 sec - console.log("3 seconds passed."); - s.current.should.equal(2); - s.queue.length.should.equal(0); - values.should.eql([1, 2, 3, 4, 5]); - return done(); - } - - setTimeout(check, speed * 1.1); - }; - - check(); -}); - -describe("should respect number", function() { - it("should fail when taking more than the capacity allows", function(done) { - var s = semaphore(1); - - s.take(2, function() { - assert.fail(); - }); - - process.nextTick(done); - }); - - it("should work fine with correct input values", function(done) { - var s = semaphore(10); // 10 - - s.take(5, function(leave) { // 5 - s.take(4, function() { // 1 - leave(4); // 5 - - s.take(5, function() { - return done() - }); // 0 - }); - }); - }); -}); diff --git a/reverse_engineering/node_modules/tslib/CopyrightNotice.txt b/reverse_engineering/node_modules/tslib/CopyrightNotice.txt deleted file mode 100644 index 0e42542..0000000 --- a/reverse_engineering/node_modules/tslib/CopyrightNotice.txt +++ /dev/null @@ -1,15 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - diff --git a/reverse_engineering/node_modules/tslib/LICENSE.txt b/reverse_engineering/node_modules/tslib/LICENSE.txt deleted file mode 100644 index bfe6430..0000000 --- a/reverse_engineering/node_modules/tslib/LICENSE.txt +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/reverse_engineering/node_modules/tslib/README.md b/reverse_engineering/node_modules/tslib/README.md deleted file mode 100644 index 290cc61..0000000 --- a/reverse_engineering/node_modules/tslib/README.md +++ /dev/null @@ -1,164 +0,0 @@ -# tslib - -This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions. - -This library is primarily used by the `--importHelpers` flag in TypeScript. -When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: - -```ts -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; -}; -exports.x = {}; -exports.y = __assign({}, exports.x); - -``` - -will instead be emitted as something like the following: - -```ts -var tslib_1 = require("tslib"); -exports.x = {}; -exports.y = tslib_1.__assign({}, exports.x); -``` - -Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. -For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. - -# Installing - -For the latest stable version, run: - -## npm - -```sh -# TypeScript 3.9.2 or later -npm install tslib - -# TypeScript 3.8.4 or earlier -npm install tslib@^1 - -# TypeScript 2.3.2 or earlier -npm install tslib@1.6.1 -``` - -## yarn - -```sh -# TypeScript 3.9.2 or later -yarn add tslib - -# TypeScript 3.8.4 or earlier -yarn add tslib@^1 - -# TypeScript 2.3.2 or earlier -yarn add tslib@1.6.1 -``` - -## bower - -```sh -# TypeScript 3.9.2 or later -bower install tslib - -# TypeScript 3.8.4 or earlier -bower install tslib@^1 - -# TypeScript 2.3.2 or earlier -bower install tslib@1.6.1 -``` - -## JSPM - -```sh -# TypeScript 3.9.2 or later -jspm install tslib - -# TypeScript 3.8.4 or earlier -jspm install tslib@^1 - -# TypeScript 2.3.2 or earlier -jspm install tslib@1.6.1 -``` - -# Usage - -Set the `importHelpers` compiler option on the command line: - -``` -tsc --importHelpers file.ts -``` - -or in your tsconfig.json: - -```json -{ - "compilerOptions": { - "importHelpers": true - } -} -``` - -#### For bower and JSPM users - -You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: - -```json -{ - "compilerOptions": { - "module": "amd", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["bower_components/tslib/tslib.d.ts"] - } - } -} -``` - -For JSPM users: - -```json -{ - "compilerOptions": { - "module": "system", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] - } - } -} -``` - -## Deployment - -- Choose your new version number -- Set it in `package.json` and `bower.json` -- Create a tag: `git tag [version]` -- Push the tag: `git push --tags` -- Create a [release in GitHub](https://github.com/microsoft/tslib/releases) -- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow - -Done. - -# Contribute - -There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. - -* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. -* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). -* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). -* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. -* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). - -# Documentation - -* [Quick tutorial](http://www.typescriptlang.org/Tutorial) -* [Programming handbook](http://www.typescriptlang.org/Handbook) -* [Homepage](http://www.typescriptlang.org/) diff --git a/reverse_engineering/node_modules/tslib/SECURITY.md b/reverse_engineering/node_modules/tslib/SECURITY.md deleted file mode 100644 index 869fdfe..0000000 --- a/reverse_engineering/node_modules/tslib/SECURITY.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). - - diff --git a/reverse_engineering/node_modules/tslib/modules/index.d.ts b/reverse_engineering/node_modules/tslib/modules/index.d.ts deleted file mode 100644 index 0fedae8..0000000 --- a/reverse_engineering/node_modules/tslib/modules/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Note: named reexports are used instead of `export *` because -// TypeScript itself doesn't resolve the `export *` when checking -// if a particular helper exists. -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __createBinding, - __addDisposableResource, - __disposeResources, -} from '../tslib.js'; -export * as default from '../tslib.js'; diff --git a/reverse_engineering/node_modules/tslib/modules/index.js b/reverse_engineering/node_modules/tslib/modules/index.js deleted file mode 100644 index af9f5ac..0000000 --- a/reverse_engineering/node_modules/tslib/modules/index.js +++ /dev/null @@ -1,68 +0,0 @@ -import tslib from '../tslib.js'; -const { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, -} = tslib; -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, -}; -export default tslib; diff --git a/reverse_engineering/node_modules/tslib/modules/package.json b/reverse_engineering/node_modules/tslib/modules/package.json deleted file mode 100644 index aafa0e4..0000000 --- a/reverse_engineering/node_modules/tslib/modules/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/tslib/package.json b/reverse_engineering/node_modules/tslib/package.json deleted file mode 100644 index 0a1fdec..0000000 --- a/reverse_engineering/node_modules/tslib/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "tslib", - "author": "Microsoft Corp.", - "homepage": "https://www.typescriptlang.org/", - "version": "2.6.2", - "license": "0BSD", - "description": "Runtime library for TypeScript helper functions", - "keywords": [ - "TypeScript", - "Microsoft", - "compiler", - "language", - "javascript", - "tslib", - "runtime" - ], - "bugs": { - "url": "https://github.com/Microsoft/TypeScript/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/tslib.git" - }, - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "sideEffects": false, - "exports": { - ".": { - "module": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - }, - "import": { - "node": "./modules/index.js", - "default": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - } - }, - "default": "./tslib.js" - }, - "./*": "./*", - "./": "./" - } -} diff --git a/reverse_engineering/node_modules/tslib/tslib.d.ts b/reverse_engineering/node_modules/tslib/tslib.d.ts deleted file mode 100644 index 104369b..0000000 --- a/reverse_engineering/node_modules/tslib/tslib.d.ts +++ /dev/null @@ -1,453 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -/** - * Used to shim class extends. - * - * @param d The derived class. - * @param b The base class. - */ -export declare function __extends(d: Function, b: Function): void; - -/** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * - * @param t The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ -export declare function __assign(t: any, ...sources: any[]): any; - -/** - * Performs a rest spread on an object. - * - * @param t The source value. - * @param propertyNames The property names excluded from the rest spread. - */ -export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; - -/** - * Applies decorators to a target object - * - * @param decorators The set of decorators to apply. - * @param target The target object. - * @param key If specified, the own property to apply the decorators to. - * @param desc The property descriptor, defaults to fetching the descriptor from the target object. - * @experimental - */ -export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; - -/** - * Creates an observing function decorator from a parameter decorator. - * - * @param paramIndex The parameter index to apply the decorator to. - * @param decorator The parameter decorator to apply. Note that the return value is ignored. - * @experimental - */ -export declare function __param(paramIndex: number, decorator: Function): Function; - -/** - * Applies decorators to a class or class member, following the native ECMAScript decorator specification. - * @param ctor For non-field class members, the class constructor. Otherwise, `null`. - * @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`. - * @param decorators The decorators to apply - * @param contextIn The `DecoratorContext` to clone for each decorator application. - * @param initializers An array of field initializer mutation functions into which new initializers are written. - * @param extraInitializers An array of extra initializer functions into which new initializers are written. - */ -export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void; - -/** - * Runs field initializers or extra initializers generated by `__esDecorate`. - * @param thisArg The `this` argument to use. - * @param initializers The array of initializers to evaluate. - * @param value The initial value to pass to the initializers. - */ -export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any; - -/** - * Converts a computed property name into a `string` or `symbol` value. - */ -export declare function __propKey(x: any): string | symbol; - -/** - * Assigns the name of a function derived from the left-hand side of an assignment. - * @param f The function to rename. - * @param name The new name for the function. - * @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name. - */ -export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function; - -/** - * Creates a decorator that sets metadata. - * - * @param metadataKey The metadata key - * @param metadataValue The metadata value - * @experimental - */ -export declare function __metadata(metadataKey: any, metadataValue: any): Function; - -/** - * Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param P The optional promise constructor argument, defaults to the `Promise` property of the global object. - * @param generator The generator function - */ -export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; - -/** - * Creates an Iterator object using the body as the implementation. - * - * @param thisArg The reference to use as the `this` value in the function - * @param body The generator state-machine based implementation. - * - * @see [./docs/generator.md] - */ -export declare function __generator(thisArg: any, body: Function): any; - -/** - * Creates bindings for all enumerable properties of `m` on `exports` - * - * @param m The source object - * @param exports The `exports` object. - */ -export declare function __exportStar(m: any, o: any): void; - -/** - * Creates a value iterator from an `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`. - */ -export declare function __values(o: any): any; - -/** - * Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array. - * - * @param o The object to read from. - * @param n The maximum number of arguments to read, defaults to `Infinity`. - */ -export declare function __read(o: any, n?: number): any[]; - -/** - * Creates an array from iterable spread. - * - * @param args The Iterable objects to spread. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spread(...args: any[][]): any[]; - -/** - * Creates an array from array spread. - * - * @param args The ArrayLikes to spread into the resulting array. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spreadArrays(...args: any[][]): any[]; - -/** - * Spreads the `from` array into the `to` array. - * - * @param pack Replace empty elements with `undefined`. - */ -export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[]; - -/** - * Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded, - * and instead should be awaited and the resulting value passed back to the generator. - * - * @param v The value to await. - */ -export declare function __await(v: any): any; - -/** - * Converts a generator function into an async generator function, by using `yield __await` - * in place of normal `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param generator The generator function - */ -export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; - -/** - * Used to wrap a potentially async iterator in such a way so that it wraps the result - * of calling iterator methods of `o` in `__await` instances, and then yields the awaited values. - * - * @param o The potentially async iterator. - * @returns A synchronous iterator yielding `__await` instances on every odd invocation - * and returning the awaited `IteratorResult` passed to `next` every even invocation. - */ -export declare function __asyncDelegator(o: any): any; - -/** - * Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`. - */ -export declare function __asyncValues(o: any): any; - -/** - * Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays. - * - * @param cooked The cooked possibly-sparse array. - * @param raw The raw string content. - */ -export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; - -/** - * Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default, { Named, Other } from "mod"; - * // or - * import { default as Default, Named, Other } from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importStar(mod: T): T; - -/** - * Used to shim default imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importDefault(mod: T): T | { default: T }; - -/** - * Emulates reading a private instance field. - * - * @param receiver The instance from which to read the private field. - * @param state A WeakMap containing the private field value for an instance. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean, get(o: T): V | undefined }, - kind?: "f" -): V; - -/** - * Emulates reading a private static field. - * - * @param receiver The object from which to read the private static field. - * @param state The class constructor containing the definition of the static field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates evaluating a private instance "get" accessor. - * - * @param receiver The instance on which to evaluate the private "get" accessor. - * @param state A WeakSet used to verify an instance supports the private "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean }, - kind: "a", - f: () => V -): V; - -/** - * Emulates evaluating a private static "get" accessor. - * - * @param receiver The object on which to evaluate the private static "get" accessor. - * @param state The class constructor containing the definition of the static "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "a", - f: () => V -): V; - -/** - * Emulates reading a private instance method. - * - * @param receiver The instance from which to read a private method. - * @param state A WeakSet used to verify an instance supports the private method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private instance method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet unknown>( - receiver: T, - state: { has(o: T): boolean }, - kind: "m", - f: V -): V; - -/** - * Emulates reading a private static method. - * - * @param receiver The object from which to read the private static method. - * @param state The class constructor containing the definition of the static method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private static method. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V extends (...args: any[]) => unknown>( - receiver: T, - state: T, - kind: "m", - f: V -): V; - -/** - * Emulates writing to a private instance field. - * - * @param receiver The instance on which to set a private field value. - * @param state A WeakMap used to store the private field value for an instance. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean, set(o: T, value: V): unknown }, - value: V, - kind?: "f" -): V; - -/** - * Emulates writing to a private static field. - * - * @param receiver The object on which to set the private static field. - * @param state The class constructor containing the definition of the private static field. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates writing to a private instance "set" accessor. - * - * @param receiver The instance on which to evaluate the private instance "set" accessor. - * @param state A WeakSet used to verify an instance supports the private "set" accessor. - * @param value The value to store in the private accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean }, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Emulates writing to a private static "set" accessor. - * - * @param receiver The object on which to evaluate the private static "set" accessor. - * @param state The class constructor containing the definition of the static "set" accessor. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Checks for the existence of a private field/method/accessor. - * - * @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member. - * @param receiver The object for which to test the presence of the private member. - */ -export declare function __classPrivateFieldIn( - state: (new (...args: any[]) => unknown) | { has(o: any): boolean }, - receiver: unknown, -): boolean; - -/** - * Creates a re-export binding on `object` with key `objectKey` that references `target[key]`. - * - * @param object The local `exports` object. - * @param target The object to re-export from. - * @param key The property key of `target` to re-export. - * @param objectKey The property key to re-export as. Defaults to `key`. - */ -export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; - -/** - * Adds a disposable resource to a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`. - * @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added. - * @returns The {@link value} argument. - * - * @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not - * defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method. - */ -export declare function __addDisposableResource(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T; - -/** - * Disposes all resources in a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`. - * - * @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the - * error recorded in the resource-tracking environment object. - * @seealso {@link __addDisposableResource} - */ -export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any; diff --git a/reverse_engineering/node_modules/tslib/tslib.es6.html b/reverse_engineering/node_modules/tslib/tslib.es6.html deleted file mode 100644 index b122e41..0000000 --- a/reverse_engineering/node_modules/tslib/tslib.es6.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/reverse_engineering/node_modules/tslib/tslib.es6.js b/reverse_engineering/node_modules/tslib/tslib.es6.js deleted file mode 100644 index 7be1c94..0000000 --- a/reverse_engineering/node_modules/tslib/tslib.es6.js +++ /dev/null @@ -1,370 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); -} - -export default { - __extends: __extends, - __assign: __assign, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __createBinding: __createBinding, - __exportStar: __exportStar, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __spreadArray: __spreadArray, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldSet: __classPrivateFieldSet, - __classPrivateFieldIn: __classPrivateFieldIn, - __addDisposableResource: __addDisposableResource, - __disposeResources: __disposeResources, -}; diff --git a/reverse_engineering/node_modules/tslib/tslib.es6.mjs b/reverse_engineering/node_modules/tslib/tslib.es6.mjs deleted file mode 100644 index c8e2999..0000000 --- a/reverse_engineering/node_modules/tslib/tslib.es6.mjs +++ /dev/null @@ -1,370 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); -} - -export default { - __extends, - __assign, - __rest, - __decorate, - __param, - __metadata, - __awaiter, - __generator, - __createBinding, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, -}; diff --git a/reverse_engineering/node_modules/tslib/tslib.html b/reverse_engineering/node_modules/tslib/tslib.html deleted file mode 100644 index 44c9ba5..0000000 --- a/reverse_engineering/node_modules/tslib/tslib.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/reverse_engineering/node_modules/tslib/tslib.js b/reverse_engineering/node_modules/tslib/tslib.js deleted file mode 100644 index 343ecde..0000000 --- a/reverse_engineering/node_modules/tslib/tslib.js +++ /dev/null @@ -1,421 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, Symbol, Reflect, Promise, SuppressedError */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if (typeof module === "object" && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; - - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; - - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; - - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); -}); diff --git a/reverse_engineering/node_modules/universal-user-agent/LICENSE.md b/reverse_engineering/node_modules/universal-user-agent/LICENSE.md deleted file mode 100644 index f105ab0..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -# [ISC License](https://spdx.org/licenses/ISC) - -Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/reverse_engineering/node_modules/universal-user-agent/README.md b/reverse_engineering/node_modules/universal-user-agent/README.md deleted file mode 100644 index 170ae0c..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# universal-user-agent - -> Get a user agent string in both browser and node - -[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) -[![Build Status](https://github.com/gr2m/universal-user-agent/workflows/Test/badge.svg)](https://github.com/gr2m/universal-user-agent/actions?query=workflow%3ATest+branch%3Amaster) -[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) - -```js -const { getUserAgent } = require("universal-user-agent"); -// or import { getUserAgent } from "universal-user-agent"; - -const userAgent = getUserAgent(); -// userAgent will look like this -// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" -// in node: Node.js/v8.9.4 (macOS High Sierra; x64) -``` - -## Credits - -The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). - -## License - -[ISC](LICENSE.md) diff --git a/reverse_engineering/node_modules/universal-user-agent/dist-node/index.js b/reverse_engineering/node_modules/universal-user-agent/dist-node/index.js deleted file mode 100644 index 16c05dc..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/dist-node/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - - if (typeof process === "object" && "version" in process) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - - return ""; -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/universal-user-agent/dist-node/index.js.map b/reverse_engineering/node_modules/universal-user-agent/dist-node/index.js.map deleted file mode 100644 index 6a435c4..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/dist-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n if (typeof process === \"object\" && \"version\" in process) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n return \"\";\n}\n"],"names":["getUserAgent","navigator","userAgent","process","version","substr","platform","arch"],"mappings":";;;;AAAO,SAASA,YAAT,GAAwB;AAC3B,MAAI,OAAOC,SAAP,KAAqB,QAArB,IAAiC,eAAeA,SAApD,EAA+D;AAC3D,WAAOA,SAAS,CAACC,SAAjB;AACH;;AACD,MAAI,OAAOC,OAAP,KAAmB,QAAnB,IAA+B,aAAaA,OAAhD,EAAyD;AACrD,WAAQ,WAAUA,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIF,OAAO,CAACG,QAAS,KAAIH,OAAO,CAACI,IAAK,GAAlF;AACH;;AACD,SAAO,4BAAP;AACH;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/universal-user-agent/dist-src/index.js b/reverse_engineering/node_modules/universal-user-agent/dist-src/index.js deleted file mode 100644 index 79d75d3..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/dist-src/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - if (typeof process === "object" && "version" in process) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - return ""; -} diff --git a/reverse_engineering/node_modules/universal-user-agent/dist-types/index.d.ts b/reverse_engineering/node_modules/universal-user-agent/dist-types/index.d.ts deleted file mode 100644 index a7bb1c4..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/dist-types/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getUserAgent(): string; diff --git a/reverse_engineering/node_modules/universal-user-agent/dist-web/index.js b/reverse_engineering/node_modules/universal-user-agent/dist-web/index.js deleted file mode 100644 index c550c02..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/dist-web/index.js +++ /dev/null @@ -1,12 +0,0 @@ -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - if (typeof process === "object" && "version" in process) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - return ""; -} - -export { getUserAgent }; -//# sourceMappingURL=index.js.map diff --git a/reverse_engineering/node_modules/universal-user-agent/dist-web/index.js.map b/reverse_engineering/node_modules/universal-user-agent/dist-web/index.js.map deleted file mode 100644 index b9d9d79..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/dist-web/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["export function getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n if (typeof process === \"object\" && \"version\" in process) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n return \"\";\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;AAC/B,IAAI,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,WAAW,IAAI,SAAS,EAAE;AACnE,QAAQ,OAAO,SAAS,CAAC,SAAS,CAAC;AACnC,KAAK;AACL,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,SAAS,IAAI,OAAO,EAAE;AAC7D,QAAQ,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7F,KAAK;AACL,IAAI,OAAO,4BAA4B,CAAC;AACxC;;;;"} \ No newline at end of file diff --git a/reverse_engineering/node_modules/universal-user-agent/package.json b/reverse_engineering/node_modules/universal-user-agent/package.json deleted file mode 100644 index ac3e658..0000000 --- a/reverse_engineering/node_modules/universal-user-agent/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "universal-user-agent", - "description": "Get a user agent string in both browser and node", - "version": "6.0.0", - "license": "ISC", - "files": [ - "dist-*/", - "bin/" - ], - "pika": true, - "sideEffects": false, - "keywords": [], - "repository": "https://github.com/gr2m/universal-user-agent.git", - "dependencies": {}, - "devDependencies": { - "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.9.1", - "@pika/plugin-ts-standard-pkg": "^0.9.1", - "@types/jest": "^25.1.0", - "jest": "^24.9.0", - "prettier": "^2.0.0", - "semantic-release": "^17.0.5", - "ts-jest": "^26.0.0", - "typescript": "^3.6.2" - }, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} diff --git a/reverse_engineering/node_modules/uuid/CHANGELOG.md b/reverse_engineering/node_modules/uuid/CHANGELOG.md deleted file mode 100644 index 7519d19..0000000 --- a/reverse_engineering/node_modules/uuid/CHANGELOG.md +++ /dev/null @@ -1,229 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) - -### Bug Fixes - -- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) - -### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) - -### Bug Fixes - -- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) - -## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) - -### Features - -- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) - -## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) - -### Features - -- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) -- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) -- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) - -### Bug Fixes - -- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) - -## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) - -### Features - -- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) -- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) - -### Bug Fixes - -- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) - -## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) - -### ⚠ BREAKING CHANGES - -- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. - - ```diff - -import uuid from 'uuid'; - -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' - +import { v4 as uuidv4 } from 'uuid'; - +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' - ``` - -- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. - - Instead use the named exports that this module exports. - - For ECMAScript Modules (ESM): - - ```diff - -import uuidv4 from 'uuid/v4'; - +import { v4 as uuidv4 } from 'uuid'; - uuidv4(); - ``` - - For CommonJS: - - ```diff - -const uuidv4 = require('uuid/v4'); - +const { v4: uuidv4 } = require('uuid'); - uuidv4(); - ``` - -### Features - -- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) -- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) - -### Bug Fixes - -- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) - -### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) - -### Bug Fixes - -- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) - -### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) - -### Bug Fixes - -- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) -- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) -- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) - -### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) - -### Bug Fixes - -- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) -- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) - -## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) - -### ⚠ BREAKING CHANGES - -- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. -- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. -- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. -- Remove support for generating v3 and v5 UUIDs in Node.js<4.x -- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. - -### Features - -- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) -- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) -- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) -- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) -- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) -- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -### Bug Fixes - -- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) -- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) -- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) - -## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) - -### Features - -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) - -### Bug Fixes - -- no longer run ci tests on node v4 -- upgrade dependencies - -## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) - -### Bug Fixes - -- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) - -## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) - -### Bug Fixes - -- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) - -# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) - -### Bug Fixes - -- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) -- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) -- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) -- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) - -### Features - -- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) - -## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) - -### Bug Fixes - -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) - -### Bug Fixes - -- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -### Features - -- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) - -# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) - -### Bug Fixes - -- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) -- Fix typo (#178) -- Simple typo fix (#165) - -### Features - -- v5 support in CLI (#197) -- V5 support (#188) - -# 3.0.1 (2016-11-28) - -- split uuid versions into separate files - -# 3.0.0 (2016-11-17) - -- remove .parse and .unparse - -# 2.0.0 - -- Removed uuid.BufferClass - -# 1.4.0 - -- Improved module context detection -- Removed public RNG functions - -# 1.3.2 - -- Improve tests and handling of v1() options (Issue #24) -- Expose RNG option to allow for perf testing with different generators - -# 1.3.0 - -- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -- Support for node.js crypto API -- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/reverse_engineering/node_modules/uuid/CONTRIBUTING.md b/reverse_engineering/node_modules/uuid/CONTRIBUTING.md deleted file mode 100644 index 4a4503d..0000000 --- a/reverse_engineering/node_modules/uuid/CONTRIBUTING.md +++ /dev/null @@ -1,18 +0,0 @@ -# Contributing - -Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! - -## Testing - -```shell -npm test -``` - -## Releasing - -Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): - -```shell -npm run release -- --dry-run # verify output manually -npm run release # follow the instructions from the output of this command -``` diff --git a/reverse_engineering/node_modules/uuid/LICENSE.md b/reverse_engineering/node_modules/uuid/LICENSE.md deleted file mode 100644 index 3934168..0000000 --- a/reverse_engineering/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/reverse_engineering/node_modules/uuid/README.md b/reverse_engineering/node_modules/uuid/README.md deleted file mode 100644 index ed27e57..0000000 --- a/reverse_engineering/node_modules/uuid/README.md +++ /dev/null @@ -1,505 +0,0 @@ - - -# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) - -For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs - -- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs -- **Cross-platform** - Support for ... - - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) - - Node 8, 10, 12, 14 - - Chrome, Safari, Firefox, Edge, IE 11 browsers - - Webpack and rollup.js module bundlers - - [React Native / Expo](#react-native--expo) -- **Secure** - Cryptographically-strong random values -- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers -- **CLI** - Includes the [`uuid` command line](#command-line) utility - -**Upgrading from `uuid@3.x`?** Your code is probably okay, but check out [Upgrading From `uuid@3.x`](#upgrading-from-uuid3x) for details. - -## Quickstart - -To create a random UUID... - -**1. Install** - -```shell -npm install uuid -``` - -**2. Create a UUID** (ES6 module syntax) - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -``` - -... or using CommonJS syntax: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -For timestamp UUIDs, namespace UUIDs, and other options read on ... - -## API Summary - -| | | | -| --- | --- | --- | -| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | -| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | -| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | -| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | -| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | -| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | -| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | -| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | -| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | - -## API - -### uuid.NIL - -The nil UUID string (all zeros). - -Example: - -```javascript -import { NIL as NIL_UUID } from 'uuid'; - -NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' -``` - -### uuid.parse(str) - -Convert UUID string to array of bytes - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Uint8Array[16]` | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { parse as uuidParse } from 'uuid'; - -// Parse a UUID -const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); - -// Convert to hex strings to show byte order (for documentation purposes) -[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ - // [ - // '6e', 'c0', 'bd', '7f', - // '11', 'c0', '43', 'da', - // '97', '5e', '2a', '8a', - // 'd9', 'eb', 'ae', '0b' - // ] -``` - -### uuid.stringify(arr[, offset]) - -Convert array of bytes to UUID string - -| | | -| -------------- | ---------------------------------------------------------------------------- | -| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | -| [`offset` = 0] | `Number` Starting index in the Array | -| _returns_ | `String` | -| _throws_ | `TypeError` if a valid UUID string cannot be generated | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { stringify as uuidStringify } from 'uuid'; - -const uuidBytes = [ - 0x6e, - 0xc0, - 0xbd, - 0x7f, - 0x11, - 0xc0, - 0x43, - 0xda, - 0x97, - 0x5e, - 0x2a, - 0x8a, - 0xd9, - 0xeb, - 0xae, - 0x0b, -]; - -uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' -``` - -### uuid.v1([options[, buffer[, offset]]]) - -Create an RFC version 1 (timestamp) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | -| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | -| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | -| _throws_ | `Error` if more than 10M UUIDs/sec are requested | - -Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. - -Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. - -Example: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' -``` - -Example using `options`: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678, -}; -uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' -``` - -### uuid.v3(name, namespace[, buffer[, offset]]) - -Create an RFC version 3 (namespace w/ MD5) UUID - -API is identical to `v5()`, but uses "v3" instead. - -⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." - -### uuid.v4([options[, buffer[, offset]]]) - -Create an RFC version 4 (random) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -Example using predefined `random` values: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -const v4options = { - random: [ - 0x10, - 0x91, - 0x56, - 0xbe, - 0xc4, - 0xfb, - 0xc1, - 0xea, - 0x71, - 0xb4, - 0xef, - 0xe1, - 0x67, - 0x1c, - 0x58, - 0x36, - ], -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' -``` - -### uuid.v5(name, namespace[, buffer[, offset]]) - -Create an RFC version 5 (namespace w/ SHA-1) UUID - -| | | -| --- | --- | -| `name` | `String \| Array` | -| `namespace` | `String \| Array[16]` Namespace UUID | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. - -Example with custom namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -// Define a custom namespace. Readers, create your own using something like -// https://www.uuidgenerator.net/ -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; - -uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' -``` - -Example with RFC `URL` namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' -``` - -### uuid.validate(str) - -Test a string to see if it is a valid UUID - -| | | -| --------- | --------------------------------------------------- | -| `str` | `String` to validate | -| _returns_ | `true` if string is a valid UUID, `false` otherwise | - -Example: - -```javascript -import { validate as uuidValidate } from 'uuid'; - -uuidValidate('not a UUID'); // ⇨ false -uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true -``` - -Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. - -```javascript -import { version as uuidVersion } from 'uuid'; -import { validate as uuidValidate } from 'uuid'; - -function uuidValidateV4(uuid) { - return uuidValidate(uuid) && uuidVersion(uuid) === 4; -} - -const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; -const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; - -uuidValidateV4(v4Uuid); // ⇨ true -uuidValidateV4(v1Uuid); // ⇨ false -``` - -### uuid.version(str) - -Detect RFC version of a UUID - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Number` The RFC version of the UUID | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Example: - -```javascript -import { version as uuidVersion } from 'uuid'; - -uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 -uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 -``` - -## Command Line - -UUIDs can be generated from the command line using `uuid`. - -```shell -$ uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 -``` - -The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: - -```shell -$ uuid --help - -Usage: - uuid - uuid v1 - uuid v3 - uuid v4 - uuid v5 - uuid --help - -Note: may be "URL" or "DNS" to use the corresponding UUIDs -defined by RFC4122 -``` - -## ECMAScript Modules - -This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -To run the examples you must first create a dist build of this library in the module root: - -```shell -npm run build -``` - -## CDN Builds - -### ECMAScript Modules - -To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): - -```html - -``` - -### UMD - -To load this module directly into older browsers you can use the [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds from any of the following CDNs: - -**Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd/)**: - -```html - -``` - -**Using [jsDelivr](https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/)**: - -```html - -``` - -**Using [cdnjs](https://cdnjs.com/libraries/uuid)**: - -```html - -``` - -These CDNs all provide the same [`uuidv4()`](#uuidv4options-buffer-offset) method: - -```html - -``` - -Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`uuidv3()`](#uuidv3name-namespace-buffer-offset) and [`uuidv5()`](#uuidv5name-namespace-buffer-offset)) are available from the files `uuidv1.min.js`, `uuidv3.min.js` and `uuidv5.min.js` respectively. - -## "getRandomValues() not supported" - -This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: - -### React Native / Expo - -1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) -1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: - -```javascript -import 'react-native-get-random-values'; -import { v4 as uuidv4 } from 'uuid'; -``` - -Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. - -### Web Workers / Service Workers (Edge <= 18) - -[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). - -## Upgrading From `uuid@7.x` - -### Only Named Exports Supported When Using with Node.js ESM - -`uuid@7.x` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. - -Instead of doing: - -```javascript -import uuid from 'uuid'; -uuid.v4(); -``` - -you will now have to use the named exports: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -### Deep Requires No Longer Supported - -Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7.x`](#deep-requires-now-deprecated) are no longer supported. - -## Upgrading From `uuid@3.x` - -"_Wait... what happened to `uuid@4.x` - `uuid@6.x`?!?_" - -In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. - -### Deep Requires Now Deprecated - -`uuid@3.x` encouraged the use of deep requires to minimize the bundle size of browser builds: - -```javascript -const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! -uuidv4(); -``` - -As of `uuid@7.x` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -... or for CommonJS: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); -``` - -### Default Export Removed - -`uuid@3.x` was exporting the Version 4 UUID method as a default export: - -```javascript -const uuid = require('uuid'); // <== REMOVED! -``` - -This usage pattern was already discouraged in `uuid@3.x` and has been removed in `uuid@7.x`. - ----- -Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/bin/uuid b/reverse_engineering/node_modules/uuid/dist/bin/uuid deleted file mode 100755 index f38d2ee..0000000 --- a/reverse_engineering/node_modules/uuid/dist/bin/uuid +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('../uuid-bin'); diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/index.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/index.js deleted file mode 100644 index 1db6f6d..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export { default as v1 } from './v1.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as NIL } from './nil.js'; -export { default as version } from './version.js'; -export { default as validate } from './validate.js'; -export { default as stringify } from './stringify.js'; -export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/md5.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/md5.js deleted file mode 100644 index 8b5d46a..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/md5.js +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Browser-compatible JavaScript MD5 - * - * Modification of JavaScript MD5 - * https://github.com/blueimp/JavaScript-MD5 - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - * - * Based on - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ -function md5(bytes) { - if (typeof bytes === 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = new Uint8Array(msg.length); - - for (var i = 0; i < msg.length; ++i) { - bytes[i] = msg.charCodeAt(i); - } - } - - return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); -} -/* - * Convert an array of little-endian words to an array of bytes - */ - - -function md5ToHexEncodedArray(input) { - var output = []; - var length32 = input.length * 32; - var hexTab = '0123456789abcdef'; - - for (var i = 0; i < length32; i += 8) { - var x = input[i >> 5] >>> i % 32 & 0xff; - var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); - output.push(hex); - } - - return output; -} -/** - * Calculate output length with padding and bit length - */ - - -function getOutputLength(inputLength8) { - return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; -} -/* - * Calculate the MD5 of an array of little-endian words, and a bit length. - */ - - -function wordsToMd5(x, len) { - /* append padding */ - x[len >> 5] |= 0x80 << len % 32; - x[getOutputLength(len) - 1] = len; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - - for (var i = 0; i < x.length; i += 16) { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - - return [a, b, c, d]; -} -/* - * Convert an array bytes to an array of little-endian words - * Characters >255 have their high-byte silently ignored. - */ - - -function bytesToWords(input) { - if (input.length === 0) { - return []; - } - - var length8 = input.length * 8; - var output = new Uint32Array(getOutputLength(length8)); - - for (var i = 0; i < length8; i += 8) { - output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; - } - - return output; -} -/* - * Add integers, wrapping at 2^32. This uses 16-bit operations internally - * to work around bugs in some JS interpreters. - */ - - -function safeAdd(x, y) { - var lsw = (x & 0xffff) + (y & 0xffff); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return msw << 16 | lsw & 0xffff; -} -/* - * Bitwise rotate a 32-bit number to the left. - */ - - -function bitRotateLeft(num, cnt) { - return num << cnt | num >>> 32 - cnt; -} -/* - * These functions implement the four basic operations the algorithm uses. - */ - - -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} - -function md5ff(a, b, c, d, x, s, t) { - return md5cmn(b & c | ~b & d, a, b, x, s, t); -} - -function md5gg(a, b, c, d, x, s, t) { - return md5cmn(b & d | c & ~d, a, b, x, s, t); -} - -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} - -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | ~d), a, b, x, s, t); -} - -export default md5; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/nil.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/nil.js deleted file mode 100644 index b36324c..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/parse.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/parse.js deleted file mode 100644 index 7c5b1d5..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/parse.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; - -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - var v; - var arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -export default parse; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/regex.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/regex.js deleted file mode 100644 index 3da8673..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/rng.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/rng.js deleted file mode 100644 index 8abbf2e..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/rng.js +++ /dev/null @@ -1,19 +0,0 @@ -// Unique ID creation requires a high quality random # generator. In the browser we therefore -// require the crypto API and do not support built-in fallback to lower quality random number -// generators (like Math.random()). -var getRandomValues; -var rnds8 = new Uint8Array(16); -export default function rng() { - // lazy load so that environments that need to polyfill have a chance to do so - if (!getRandomValues) { - // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, - // find the complete implementation of crypto (msCrypto) on IE11. - getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); - - if (!getRandomValues) { - throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); - } - } - - return getRandomValues(rnds8); -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/sha1.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/sha1.js deleted file mode 100644 index 940548b..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/sha1.js +++ /dev/null @@ -1,96 +0,0 @@ -// Adapted from Chris Veness' SHA1 code at -// http://www.movable-type.co.uk/scripts/sha1.html -function f(s, x, y, z) { - switch (s) { - case 0: - return x & y ^ ~x & z; - - case 1: - return x ^ y ^ z; - - case 2: - return x & y ^ x & z ^ y & z; - - case 3: - return x ^ y ^ z; - } -} - -function ROTL(x, n) { - return x << n | x >>> 32 - n; -} - -function sha1(bytes) { - var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - - if (typeof bytes === 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = []; - - for (var i = 0; i < msg.length; ++i) { - bytes.push(msg.charCodeAt(i)); - } - } else if (!Array.isArray(bytes)) { - // Convert Array-like to Array - bytes = Array.prototype.slice.call(bytes); - } - - bytes.push(0x80); - var l = bytes.length / 4 + 2; - var N = Math.ceil(l / 16); - var M = new Array(N); - - for (var _i = 0; _i < N; ++_i) { - var arr = new Uint32Array(16); - - for (var j = 0; j < 16; ++j) { - arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3]; - } - - M[_i] = arr; - } - - M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); - M[N - 1][14] = Math.floor(M[N - 1][14]); - M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; - - for (var _i2 = 0; _i2 < N; ++_i2) { - var W = new Uint32Array(80); - - for (var t = 0; t < 16; ++t) { - W[t] = M[_i2][t]; - } - - for (var _t = 16; _t < 80; ++_t) { - W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1); - } - - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - for (var _t2 = 0; _t2 < 80; ++_t2) { - var s = Math.floor(_t2 / 20); - var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - - H[0] = H[0] + a >>> 0; - H[1] = H[1] + b >>> 0; - H[2] = H[2] + c >>> 0; - H[3] = H[3] + d >>> 0; - H[4] = H[4] + e >>> 0; - } - - return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; -} - -export default sha1; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/stringify.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/stringify.js deleted file mode 100644 index 3102111..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/stringify.js +++ /dev/null @@ -1,30 +0,0 @@ -import validate from './validate.js'; -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - -var byteToHex = []; - -for (var i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr) { - var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -export default stringify; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/v1.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/v1.js deleted file mode 100644 index 1a22591..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/v1.js +++ /dev/null @@ -1,95 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -var _nodeId; - -var _clockseq; // Previous uuid creation time - - -var _lastMSecs = 0; -var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || new Array(16); - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - var seedBytes = options.random || (options.rng || rng)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - var tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || stringify(b); -} - -export default v1; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/v3.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/v3.js deleted file mode 100644 index c9ab9a4..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/v3.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import md5 from './md5.js'; -var v3 = v35('v3', 0x30, md5); -export default v3; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/v35.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/v35.js deleted file mode 100644 index 31dd8a1..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/v35.js +++ /dev/null @@ -1,64 +0,0 @@ -import stringify from './stringify.js'; -import parse from './parse.js'; - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - var bytes = []; - - for (var i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function (name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - var bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (var i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return stringify(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/v4.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/v4.js deleted file mode 100644 index 404810a..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/v4.js +++ /dev/null @@ -1,24 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; - -function v4(options, buf, offset) { - options = options || {}; - var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (var i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return stringify(rnds); -} - -export default v4; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/v5.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/v5.js deleted file mode 100644 index c08d96b..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/v5.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import sha1 from './sha1.js'; -var v5 = v35('v5', 0x50, sha1); -export default v5; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/validate.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/validate.js deleted file mode 100644 index f1cdc7a..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/validate.js +++ /dev/null @@ -1,7 +0,0 @@ -import REGEX from './regex.js'; - -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} - -export default validate; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-browser/version.js b/reverse_engineering/node_modules/uuid/dist/esm-browser/version.js deleted file mode 100644 index 77530e9..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-browser/version.js +++ /dev/null @@ -1,11 +0,0 @@ -import validate from './validate.js'; - -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -export default version; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/index.js b/reverse_engineering/node_modules/uuid/dist/esm-node/index.js deleted file mode 100644 index 1db6f6d..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export { default as v1 } from './v1.js'; -export { default as v3 } from './v3.js'; -export { default as v4 } from './v4.js'; -export { default as v5 } from './v5.js'; -export { default as NIL } from './nil.js'; -export { default as version } from './version.js'; -export { default as validate } from './validate.js'; -export { default as stringify } from './stringify.js'; -export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/md5.js b/reverse_engineering/node_modules/uuid/dist/esm-node/md5.js deleted file mode 100644 index 4d68b04..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/md5.js +++ /dev/null @@ -1,13 +0,0 @@ -import crypto from 'crypto'; - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return crypto.createHash('md5').update(bytes).digest(); -} - -export default md5; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/nil.js b/reverse_engineering/node_modules/uuid/dist/esm-node/nil.js deleted file mode 100644 index b36324c..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/nil.js +++ /dev/null @@ -1 +0,0 @@ -export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/parse.js b/reverse_engineering/node_modules/uuid/dist/esm-node/parse.js deleted file mode 100644 index 6421c5d..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/parse.js +++ /dev/null @@ -1,35 +0,0 @@ -import validate from './validate.js'; - -function parse(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -export default parse; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/regex.js b/reverse_engineering/node_modules/uuid/dist/esm-node/regex.js deleted file mode 100644 index 3da8673..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/regex.js +++ /dev/null @@ -1 +0,0 @@ -export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/rng.js b/reverse_engineering/node_modules/uuid/dist/esm-node/rng.js deleted file mode 100644 index 8006244..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/rng.js +++ /dev/null @@ -1,12 +0,0 @@ -import crypto from 'crypto'; -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; -export default function rng() { - if (poolPtr > rnds8Pool.length - 16) { - crypto.randomFillSync(rnds8Pool); - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/sha1.js b/reverse_engineering/node_modules/uuid/dist/esm-node/sha1.js deleted file mode 100644 index e23850b..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/sha1.js +++ /dev/null @@ -1,13 +0,0 @@ -import crypto from 'crypto'; - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return crypto.createHash('sha1').update(bytes).digest(); -} - -export default sha1; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/stringify.js b/reverse_engineering/node_modules/uuid/dist/esm-node/stringify.js deleted file mode 100644 index f9bca12..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/stringify.js +++ /dev/null @@ -1,29 +0,0 @@ -import validate from './validate.js'; -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -export default stringify; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/v1.js b/reverse_engineering/node_modules/uuid/dist/esm-node/v1.js deleted file mode 100644 index ebf81ac..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/v1.js +++ /dev/null @@ -1,95 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || stringify(b); -} - -export default v1; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/v3.js b/reverse_engineering/node_modules/uuid/dist/esm-node/v3.js deleted file mode 100644 index 09063b8..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/v3.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import md5 from './md5.js'; -const v3 = v35('v3', 0x30, md5); -export default v3; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/v35.js b/reverse_engineering/node_modules/uuid/dist/esm-node/v35.js deleted file mode 100644 index 22f6a19..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/v35.js +++ /dev/null @@ -1,64 +0,0 @@ -import stringify from './stringify.js'; -import parse from './parse.js'; - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -export default function (name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = parse(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return stringify(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/v4.js b/reverse_engineering/node_modules/uuid/dist/esm-node/v4.js deleted file mode 100644 index efad926..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/v4.js +++ /dev/null @@ -1,24 +0,0 @@ -import rng from './rng.js'; -import stringify from './stringify.js'; - -function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return stringify(rnds); -} - -export default v4; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/v5.js b/reverse_engineering/node_modules/uuid/dist/esm-node/v5.js deleted file mode 100644 index e87fe31..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/v5.js +++ /dev/null @@ -1,4 +0,0 @@ -import v35 from './v35.js'; -import sha1 from './sha1.js'; -const v5 = v35('v5', 0x50, sha1); -export default v5; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/validate.js b/reverse_engineering/node_modules/uuid/dist/esm-node/validate.js deleted file mode 100644 index f1cdc7a..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/validate.js +++ /dev/null @@ -1,7 +0,0 @@ -import REGEX from './regex.js'; - -function validate(uuid) { - return typeof uuid === 'string' && REGEX.test(uuid); -} - -export default validate; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/esm-node/version.js b/reverse_engineering/node_modules/uuid/dist/esm-node/version.js deleted file mode 100644 index 77530e9..0000000 --- a/reverse_engineering/node_modules/uuid/dist/esm-node/version.js +++ /dev/null @@ -1,11 +0,0 @@ -import validate from './validate.js'; - -function version(uuid) { - if (!validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -export default version; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/index.js b/reverse_engineering/node_modules/uuid/dist/index.js deleted file mode 100644 index bf13b10..0000000 --- a/reverse_engineering/node_modules/uuid/dist/index.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "v1", { - enumerable: true, - get: function () { - return _v.default; - } -}); -Object.defineProperty(exports, "v3", { - enumerable: true, - get: function () { - return _v2.default; - } -}); -Object.defineProperty(exports, "v4", { - enumerable: true, - get: function () { - return _v3.default; - } -}); -Object.defineProperty(exports, "v5", { - enumerable: true, - get: function () { - return _v4.default; - } -}); -Object.defineProperty(exports, "NIL", { - enumerable: true, - get: function () { - return _nil.default; - } -}); -Object.defineProperty(exports, "version", { - enumerable: true, - get: function () { - return _version.default; - } -}); -Object.defineProperty(exports, "validate", { - enumerable: true, - get: function () { - return _validate.default; - } -}); -Object.defineProperty(exports, "stringify", { - enumerable: true, - get: function () { - return _stringify.default; - } -}); -Object.defineProperty(exports, "parse", { - enumerable: true, - get: function () { - return _parse.default; - } -}); - -var _v = _interopRequireDefault(require("./v1.js")); - -var _v2 = _interopRequireDefault(require("./v3.js")); - -var _v3 = _interopRequireDefault(require("./v4.js")); - -var _v4 = _interopRequireDefault(require("./v5.js")); - -var _nil = _interopRequireDefault(require("./nil.js")); - -var _version = _interopRequireDefault(require("./version.js")); - -var _validate = _interopRequireDefault(require("./validate.js")); - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -var _parse = _interopRequireDefault(require("./parse.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/md5-browser.js b/reverse_engineering/node_modules/uuid/dist/md5-browser.js deleted file mode 100644 index 7a4582a..0000000 --- a/reverse_engineering/node_modules/uuid/dist/md5-browser.js +++ /dev/null @@ -1,223 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -/* - * Browser-compatible JavaScript MD5 - * - * Modification of JavaScript MD5 - * https://github.com/blueimp/JavaScript-MD5 - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - * - * Based on - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ -function md5(bytes) { - if (typeof bytes === 'string') { - const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = new Uint8Array(msg.length); - - for (let i = 0; i < msg.length; ++i) { - bytes[i] = msg.charCodeAt(i); - } - } - - return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); -} -/* - * Convert an array of little-endian words to an array of bytes - */ - - -function md5ToHexEncodedArray(input) { - const output = []; - const length32 = input.length * 32; - const hexTab = '0123456789abcdef'; - - for (let i = 0; i < length32; i += 8) { - const x = input[i >> 5] >>> i % 32 & 0xff; - const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); - output.push(hex); - } - - return output; -} -/** - * Calculate output length with padding and bit length - */ - - -function getOutputLength(inputLength8) { - return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; -} -/* - * Calculate the MD5 of an array of little-endian words, and a bit length. - */ - - -function wordsToMd5(x, len) { - /* append padding */ - x[len >> 5] |= 0x80 << len % 32; - x[getOutputLength(len) - 1] = len; - let a = 1732584193; - let b = -271733879; - let c = -1732584194; - let d = 271733878; - - for (let i = 0; i < x.length; i += 16) { - const olda = a; - const oldb = b; - const oldc = c; - const oldd = d; - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - - return [a, b, c, d]; -} -/* - * Convert an array bytes to an array of little-endian words - * Characters >255 have their high-byte silently ignored. - */ - - -function bytesToWords(input) { - if (input.length === 0) { - return []; - } - - const length8 = input.length * 8; - const output = new Uint32Array(getOutputLength(length8)); - - for (let i = 0; i < length8; i += 8) { - output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; - } - - return output; -} -/* - * Add integers, wrapping at 2^32. This uses 16-bit operations internally - * to work around bugs in some JS interpreters. - */ - - -function safeAdd(x, y) { - const lsw = (x & 0xffff) + (y & 0xffff); - const msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return msw << 16 | lsw & 0xffff; -} -/* - * Bitwise rotate a 32-bit number to the left. - */ - - -function bitRotateLeft(num, cnt) { - return num << cnt | num >>> 32 - cnt; -} -/* - * These functions implement the four basic operations the algorithm uses. - */ - - -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} - -function md5ff(a, b, c, d, x, s, t) { - return md5cmn(b & c | ~b & d, a, b, x, s, t); -} - -function md5gg(a, b, c, d, x, s, t) { - return md5cmn(b & d | c & ~d, a, b, x, s, t); -} - -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} - -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | ~d), a, b, x, s, t); -} - -var _default = md5; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/md5.js b/reverse_engineering/node_modules/uuid/dist/md5.js deleted file mode 100644 index 824d481..0000000 --- a/reverse_engineering/node_modules/uuid/dist/md5.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _crypto = _interopRequireDefault(require("crypto")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/nil.js b/reverse_engineering/node_modules/uuid/dist/nil.js deleted file mode 100644 index 7ade577..0000000 --- a/reverse_engineering/node_modules/uuid/dist/nil.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/parse.js b/reverse_engineering/node_modules/uuid/dist/parse.js deleted file mode 100644 index 4c69fc3..0000000 --- a/reverse_engineering/node_modules/uuid/dist/parse.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _validate = _interopRequireDefault(require("./validate.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/regex.js b/reverse_engineering/node_modules/uuid/dist/regex.js deleted file mode 100644 index 1ef91d6..0000000 --- a/reverse_engineering/node_modules/uuid/dist/regex.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/rng-browser.js b/reverse_engineering/node_modules/uuid/dist/rng-browser.js deleted file mode 100644 index 91faeae..0000000 --- a/reverse_engineering/node_modules/uuid/dist/rng-browser.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = rng; -// Unique ID creation requires a high quality random # generator. In the browser we therefore -// require the crypto API and do not support built-in fallback to lower quality random number -// generators (like Math.random()). -let getRandomValues; -const rnds8 = new Uint8Array(16); - -function rng() { - // lazy load so that environments that need to polyfill have a chance to do so - if (!getRandomValues) { - // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, - // find the complete implementation of crypto (msCrypto) on IE11. - getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); - - if (!getRandomValues) { - throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); - } - } - - return getRandomValues(rnds8); -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/rng.js b/reverse_engineering/node_modules/uuid/dist/rng.js deleted file mode 100644 index 3507f93..0000000 --- a/reverse_engineering/node_modules/uuid/dist/rng.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = rng; - -var _crypto = _interopRequireDefault(require("crypto")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/sha1-browser.js b/reverse_engineering/node_modules/uuid/dist/sha1-browser.js deleted file mode 100644 index 24cbced..0000000 --- a/reverse_engineering/node_modules/uuid/dist/sha1-browser.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -// Adapted from Chris Veness' SHA1 code at -// http://www.movable-type.co.uk/scripts/sha1.html -function f(s, x, y, z) { - switch (s) { - case 0: - return x & y ^ ~x & z; - - case 1: - return x ^ y ^ z; - - case 2: - return x & y ^ x & z ^ y & z; - - case 3: - return x ^ y ^ z; - } -} - -function ROTL(x, n) { - return x << n | x >>> 32 - n; -} - -function sha1(bytes) { - const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - - if (typeof bytes === 'string') { - const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - - bytes = []; - - for (let i = 0; i < msg.length; ++i) { - bytes.push(msg.charCodeAt(i)); - } - } else if (!Array.isArray(bytes)) { - // Convert Array-like to Array - bytes = Array.prototype.slice.call(bytes); - } - - bytes.push(0x80); - const l = bytes.length / 4 + 2; - const N = Math.ceil(l / 16); - const M = new Array(N); - - for (let i = 0; i < N; ++i) { - const arr = new Uint32Array(16); - - for (let j = 0; j < 16; ++j) { - arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; - } - - M[i] = arr; - } - - M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); - M[N - 1][14] = Math.floor(M[N - 1][14]); - M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; - - for (let i = 0; i < N; ++i) { - const W = new Uint32Array(80); - - for (let t = 0; t < 16; ++t) { - W[t] = M[i][t]; - } - - for (let t = 16; t < 80; ++t) { - W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); - } - - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - let e = H[4]; - - for (let t = 0; t < 80; ++t) { - const s = Math.floor(t / 20); - const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - - H[0] = H[0] + a >>> 0; - H[1] = H[1] + b >>> 0; - H[2] = H[2] + c >>> 0; - H[3] = H[3] + d >>> 0; - H[4] = H[4] + e >>> 0; - } - - return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; -} - -var _default = sha1; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/sha1.js b/reverse_engineering/node_modules/uuid/dist/sha1.js deleted file mode 100644 index 03bdd63..0000000 --- a/reverse_engineering/node_modules/uuid/dist/sha1.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _crypto = _interopRequireDefault(require("crypto")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/stringify.js b/reverse_engineering/node_modules/uuid/dist/stringify.js deleted file mode 100644 index b8e7519..0000000 --- a/reverse_engineering/node_modules/uuid/dist/stringify.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _validate = _interopRequireDefault(require("./validate.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuid.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuid.min.js deleted file mode 100644 index 639ca2f..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuid.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).uuid={})}(this,(function(r){"use strict";var e,n=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(n)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function a(r){return"string"==typeof r&&o.test(r)}for(var i,u,f=[],s=0;s<256;++s)f.push((s+256).toString(16).substr(1));function c(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(f[r[e+0]]+f[r[e+1]]+f[r[e+2]]+f[r[e+3]]+"-"+f[r[e+4]]+f[r[e+5]]+"-"+f[r[e+6]]+f[r[e+7]]+"-"+f[r[e+8]]+f[r[e+9]]+"-"+f[r[e+10]]+f[r[e+11]]+f[r[e+12]]+f[r[e+13]]+f[r[e+14]]+f[r[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n}var l=0,d=0;function v(r){if(!a(r))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(r.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(r.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(r.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(r.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}function p(r,e,n){function t(r,t,o,a){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n>>9<<4)+1}function y(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(r,e,n,t,o,a){return y((i=y(y(e,r),y(t,a)))<<(u=o)|i>>>32-u,n);var i,u}function m(r,e,n,t,o,a,i){return g(e&n|~e&t,r,e,o,a,i)}function w(r,e,n,t,o,a,i){return g(e&t|n&~t,r,e,o,a,i)}function b(r,e,n,t,o,a,i){return g(e^n^t,r,e,o,a,i)}function A(r,e,n,t,o,a,i){return g(n^(e|~t),r,e,o,a,i)}var U=p("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,i=parseInt(t.charAt(a>>>4&15)+t.charAt(15&a),16);e.push(i)}return e}(function(r,e){r[e>>5]|=128<>5]|=(255&r[t/8])<>>32-e}var R=p("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=[];for(var o=0;o>>0;w=m,m=g,g=C(y,30)>>>0,y=h,h=U}n[0]=n[0]+h>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.NIL="00000000-0000-0000-0000-000000000000",r.parse=v,r.stringify=c,r.v1=function(r,e,n){var o=e&&n||0,a=e||new Array(16),f=(r=r||{}).node||i,s=void 0!==r.clockseq?r.clockseq:u;if(null==f||null==s){var v=r.random||(r.rng||t)();null==f&&(f=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==s&&(s=u=16383&(v[6]<<8|v[7]))}var p=void 0!==r.msecs?r.msecs:Date.now(),h=void 0!==r.nsecs?r.nsecs:d+1,y=p-l+(h-d)/1e4;if(y<0&&void 0===r.clockseq&&(s=s+1&16383),(y<0||p>l)&&void 0===r.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,d=h,u=s;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;a[o++]=g>>>24&255,a[o++]=g>>>16&255,a[o++]=g>>>8&255,a[o++]=255&g;var m=p/4294967296*1e4&268435455;a[o++]=m>>>8&255,a[o++]=255&m,a[o++]=m>>>24&15|16,a[o++]=m>>>16&255,a[o++]=s>>>8|128,a[o++]=255&s;for(var w=0;w<6;++w)a[o+w]=f[w];return e||c(a)},r.v3=U,r.v4=function(r,e,n){var o=(r=r||{}).random||(r.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=o[a];return e}return c(o)},r.v5=R,r.validate=a,r.version=function(r){if(!a(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)},Object.defineProperty(r,"__esModule",{value:!0})})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidNIL.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidNIL.min.js deleted file mode 100644 index 30b28a7..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidNIL.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidNIL=n()}(this,(function(){"use strict";return"00000000-0000-0000-0000-000000000000"})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidParse.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidParse.min.js deleted file mode 100644 index d48ea6a..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidParse.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidParse=n()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(n){if(!function(n){return"string"==typeof n&&e.test(n)}(n))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(n.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(n.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(n.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(n.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidStringify.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidStringify.min.js deleted file mode 100644 index fd39adc..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidStringify.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidStringify=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function t(t){return"string"==typeof t&&e.test(t)}for(var i=[],n=0;n<256;++n)i.push((n+256).toString(16).substr(1));return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,f=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!t(f))throw TypeError("Stringified UUID is invalid");return f}})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidValidate.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidValidate.min.js deleted file mode 100644 index 378e5b9..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidValidate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidValidate=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){return"string"==typeof t&&e.test(t)}})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidVersion.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidVersion.min.js deleted file mode 100644 index 274bb09..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidVersion.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidVersion=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){if(!function(t){return"string"==typeof t&&e.test(t)}(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidv1.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidv1.min.js deleted file mode 100644 index 2622889..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidv1.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidv1=o()}(this,(function(){"use strict";var e,o=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(e){return"string"==typeof e&&n.test(e)}for(var i,u,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var d=0,f=0;return function(e,o,n){var a=o&&n||0,c=o||new Array(16),l=(e=e||{}).node||i,p=void 0!==e.clockseq?e.clockseq:u;if(null==l||null==p){var v=e.random||(e.rng||t)();null==l&&(l=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==p&&(p=u=16383&(v[6]<<8|v[7]))}var y=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,g=y-d+(m-f)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||y>d)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=y,f=m,u=p;var h=(1e4*(268435455&(y+=122192928e5))+m)%4294967296;c[a++]=h>>>24&255,c[a++]=h>>>16&255,c[a++]=h>>>8&255,c[a++]=255&h;var w=y/4294967296*1e4&268435455;c[a++]=w>>>8&255,c[a++]=255&w,c[a++]=w>>>24&15|16,c[a++]=w>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var b=0;b<6;++b)c[a+b]=l[b];return o||function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[o+0]]+s[e[o+1]]+s[e[o+2]]+s[e[o+3]]+"-"+s[e[o+4]]+s[e[o+5]]+"-"+s[e[o+6]]+s[e[o+7]]+"-"+s[e[o+8]]+s[e[o+9]]+"-"+s[e[o+10]]+s[e[o+11]]+s[e[o+12]]+s[e[o+13]]+s[e[o+14]]+s[e[o+15]]).toLowerCase();if(!r(t))throw TypeError("Stringified UUID is invalid");return t}(c)}})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidv3.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidv3.min.js deleted file mode 100644 index 8d37b62..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidv3.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).uuidv3=r()}(this,(function(){"use strict";var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(r){return"string"==typeof r&&n.test(r)}for(var e=[],t=0;t<256;++t)e.push((t+256).toString(16).substr(1));function i(n){return 14+(n+64>>>9<<4)+1}function o(n,r){var e=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(e>>16)<<16|65535&e}function a(n,r,e,t,i,a){return o((f=o(o(r,n),o(t,a)))<<(u=i)|f>>>32-u,e);var f,u}function f(n,r,e,t,i,o,f){return a(r&e|~r&t,n,r,i,o,f)}function u(n,r,e,t,i,o,f){return a(r&t|e&~t,n,r,i,o,f)}function c(n,r,e,t,i,o,f){return a(r^e^t,n,r,i,o,f)}function s(n,r,e,t,i,o,f){return a(e^(r|~t),n,r,i,o,f)}return function(n,t,i){function o(n,o,a,f){if("string"==typeof n&&(n=function(n){n=unescape(encodeURIComponent(n));for(var r=[],e=0;e>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=255&e,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=255&e,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=255&e,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=255&e,t}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+n.length);if(u.set(o),u.set(n,o.length),(u=i(u))[6]=15&u[6]|t,u[8]=63&u[8]|128,a){f=f||0;for(var c=0;c<16;++c)a[f+c]=u[c];return a}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(e[n[t+0]]+e[n[t+1]]+e[n[t+2]]+e[n[t+3]]+"-"+e[n[t+4]]+e[n[t+5]]+"-"+e[n[t+6]]+e[n[t+7]]+"-"+e[n[t+8]]+e[n[t+9]]+"-"+e[n[t+10]]+e[n[t+11]]+e[n[t+12]]+e[n[t+13]]+e[n[t+14]]+e[n[t+15]]).toLowerCase();if(!r(i))throw TypeError("Stringified UUID is invalid");return i}(u)}try{o.name=n}catch(n){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v3",48,(function(n){if("string"==typeof n){var r=unescape(encodeURIComponent(n));n=new Uint8Array(r.length);for(var e=0;e>5]>>>i%32&255,a=parseInt(t.charAt(o>>>4&15)+t.charAt(15&o),16);r.push(a)}return r}(function(n,r){n[r>>5]|=128<>5]|=(255&n[t/8])<1&&void 0!==arguments[1]?arguments[1]:0,o=(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase();if(!r(o))throw TypeError("Stringified UUID is invalid");return o}(u)}})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/umd/uuidv5.min.js b/reverse_engineering/node_modules/uuid/dist/umd/uuidv5.min.js deleted file mode 100644 index ba6fc63..0000000 --- a/reverse_engineering/node_modules/uuid/dist/umd/uuidv5.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).uuidv5=e()}(this,(function(){"use strict";var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function e(e){return"string"==typeof e&&r.test(e)}for(var t=[],n=0;n<256;++n)t.push((n+256).toString(16).substr(1));function a(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function o(r,e){return r<>>32-e}return function(r,n,a){function o(r,o,i,f){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+r.length);if(s.set(o),s.set(r,o.length),(s=a(s))[6]=15&s[6]|n,s[8]=63&s[8]|128,i){f=f||0;for(var u=0;u<16;++u)i[f+u]=s[u];return i}return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(t[r[n+0]]+t[r[n+1]]+t[r[n+2]]+t[r[n+3]]+"-"+t[r[n+4]]+t[r[n+5]]+"-"+t[r[n+6]]+t[r[n+7]]+"-"+t[r[n+8]]+t[r[n+9]]+"-"+t[r[n+10]]+t[r[n+11]]+t[r[n+12]]+t[r[n+13]]+t[r[n+14]]+t[r[n+15]]).toLowerCase();if(!e(a))throw TypeError("Stringified UUID is invalid");return a}(s)}try{o.name=r}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=[];for(var i=0;i>>0;A=U,U=w,w=o(b,30)>>>0,b=g,g=C}t[0]=t[0]+g>>>0,t[1]=t[1]+b>>>0,t[2]=t[2]+w>>>0,t[3]=t[3]+U>>>0,t[4]=t[4]+A>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}))})); \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/uuid-bin.js b/reverse_engineering/node_modules/uuid/dist/uuid-bin.js deleted file mode 100644 index 50a7a9f..0000000 --- a/reverse_engineering/node_modules/uuid/dist/uuid-bin.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; - -var _assert = _interopRequireDefault(require("assert")); - -var _v = _interopRequireDefault(require("./v1.js")); - -var _v2 = _interopRequireDefault(require("./v3.js")); - -var _v3 = _interopRequireDefault(require("./v4.js")); - -var _v4 = _interopRequireDefault(require("./v5.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); -} - -const args = process.argv.slice(2); - -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} - -const version = args.shift() || 'v4'; - -switch (version) { - case 'v1': - console.log((0, _v.default)()); - break; - - case 'v3': - { - const name = args.shift(); - let namespace = args.shift(); - (0, _assert.default)(name != null, 'v3 name not specified'); - (0, _assert.default)(namespace != null, 'v3 namespace not specified'); - - if (namespace === 'URL') { - namespace = _v2.default.URL; - } - - if (namespace === 'DNS') { - namespace = _v2.default.DNS; - } - - console.log((0, _v2.default)(name, namespace)); - break; - } - - case 'v4': - console.log((0, _v3.default)()); - break; - - case 'v5': - { - const name = args.shift(); - let namespace = args.shift(); - (0, _assert.default)(name != null, 'v5 name not specified'); - (0, _assert.default)(namespace != null, 'v5 namespace not specified'); - - if (namespace === 'URL') { - namespace = _v4.default.URL; - } - - if (namespace === 'DNS') { - namespace = _v4.default.DNS; - } - - console.log((0, _v4.default)(name, namespace)); - break; - } - - default: - usage(); - process.exit(1); -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/v1.js b/reverse_engineering/node_modules/uuid/dist/v1.js deleted file mode 100644 index abb9b3d..0000000 --- a/reverse_engineering/node_modules/uuid/dist/v1.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _rng = _interopRequireDefault(require("./rng.js")); - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/v3.js b/reverse_engineering/node_modules/uuid/dist/v3.js deleted file mode 100644 index 6b47ff5..0000000 --- a/reverse_engineering/node_modules/uuid/dist/v3.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _v = _interopRequireDefault(require("./v35.js")); - -var _md = _interopRequireDefault(require("./md5.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/v35.js b/reverse_engineering/node_modules/uuid/dist/v35.js deleted file mode 100644 index f784c63..0000000 --- a/reverse_engineering/node_modules/uuid/dist/v35.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -var _parse = _interopRequireDefault(require("./parse.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/v4.js b/reverse_engineering/node_modules/uuid/dist/v4.js deleted file mode 100644 index 838ce0b..0000000 --- a/reverse_engineering/node_modules/uuid/dist/v4.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _rng = _interopRequireDefault(require("./rng.js")); - -var _stringify = _interopRequireDefault(require("./stringify.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/v5.js b/reverse_engineering/node_modules/uuid/dist/v5.js deleted file mode 100644 index 99d615e..0000000 --- a/reverse_engineering/node_modules/uuid/dist/v5.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _v = _interopRequireDefault(require("./v35.js")); - -var _sha = _interopRequireDefault(require("./sha1.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/validate.js b/reverse_engineering/node_modules/uuid/dist/validate.js deleted file mode 100644 index fd05215..0000000 --- a/reverse_engineering/node_modules/uuid/dist/validate.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _regex = _interopRequireDefault(require("./regex.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/dist/version.js b/reverse_engineering/node_modules/uuid/dist/version.js deleted file mode 100644 index b72949c..0000000 --- a/reverse_engineering/node_modules/uuid/dist/version.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _validate = _interopRequireDefault(require("./validate.js")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports.default = _default; \ No newline at end of file diff --git a/reverse_engineering/node_modules/uuid/package.json b/reverse_engineering/node_modules/uuid/package.json deleted file mode 100644 index f0ab371..0000000 --- a/reverse_engineering/node_modules/uuid/package.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "name": "uuid", - "version": "8.3.2", - "description": "RFC4122 (v1, v4, and v5) UUIDs", - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "license": "MIT", - "bin": { - "uuid": "./dist/bin/uuid" - }, - "sideEffects": false, - "main": "./dist/index.js", - "exports": { - ".": { - "node": { - "module": "./dist/esm-node/index.js", - "require": "./dist/index.js", - "import": "./wrapper.mjs" - }, - "default": "./dist/esm-browser/index.js" - }, - "./package.json": "./package.json" - }, - "module": "./dist/esm-node/index.js", - "browser": { - "./dist/md5.js": "./dist/md5-browser.js", - "./dist/rng.js": "./dist/rng-browser.js", - "./dist/sha1.js": "./dist/sha1-browser.js", - "./dist/esm-node/index.js": "./dist/esm-browser/index.js" - }, - "files": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "LICENSE.md", - "README.md", - "dist", - "wrapper.mjs" - ], - "devDependencies": { - "@babel/cli": "7.11.6", - "@babel/core": "7.11.6", - "@babel/preset-env": "7.11.5", - "@commitlint/cli": "11.0.0", - "@commitlint/config-conventional": "11.0.0", - "@rollup/plugin-node-resolve": "9.0.0", - "babel-eslint": "10.1.0", - "bundlewatch": "0.3.1", - "eslint": "7.10.0", - "eslint-config-prettier": "6.12.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-prettier": "3.1.4", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-standard": "4.0.1", - "husky": "4.3.0", - "jest": "25.5.4", - "lint-staged": "10.4.0", - "npm-run-all": "4.1.5", - "optional-dev-dependency": "2.0.1", - "prettier": "2.1.2", - "random-seed": "0.3.0", - "rollup": "2.28.2", - "rollup-plugin-terser": "7.0.2", - "runmd": "1.3.2", - "standard-version": "9.0.0" - }, - "optionalDevDependencies": { - "@wdio/browserstack-service": "6.4.0", - "@wdio/cli": "6.4.0", - "@wdio/jasmine-framework": "6.4.0", - "@wdio/local-runner": "6.4.0", - "@wdio/spec-reporter": "6.4.0", - "@wdio/static-server-service": "6.4.0", - "@wdio/sync": "6.4.0" - }, - "scripts": { - "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", - "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", - "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", - "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", - "lint": "npm run eslint:check && npm run prettier:check", - "eslint:check": "eslint src/ test/ examples/ *.js", - "eslint:fix": "eslint --fix src/ test/ examples/ *.js", - "pretest": "[ -n $CI ] || npm run build", - "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/", - "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", - "test:browser": "wdio run ./wdio.conf.js", - "pretest:node": "npm run build", - "test:node": "npm-run-all --parallel examples:node:**", - "test:pack": "./scripts/testpack.sh", - "pretest:benchmark": "npm run build", - "test:benchmark": "cd examples/benchmark && npm install && npm test", - "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'", - "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'", - "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", - "md": "runmd --watch --output=README.md README_js.md", - "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )", - "docs:diff": "npm run docs && git diff --quiet README.md", - "build": "./scripts/build.sh", - "prepack": "npm run build", - "release": "standard-version --no-verify" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.{js,jsx,json,md}": [ - "prettier --write" - ], - "*.{js,jsx}": [ - "eslint --fix" - ] - }, - "standard-version": { - "scripts": { - "postchangelog": "prettier --write CHANGELOG.md" - } - } -} diff --git a/reverse_engineering/node_modules/uuid/wrapper.mjs b/reverse_engineering/node_modules/uuid/wrapper.mjs deleted file mode 100644 index c31e9ce..0000000 --- a/reverse_engineering/node_modules/uuid/wrapper.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import uuid from './dist/index.js'; -export const v1 = uuid.v1; -export const v3 = uuid.v3; -export const v4 = uuid.v4; -export const v5 = uuid.v5; -export const NIL = uuid.NIL; -export const version = uuid.version; -export const validate = uuid.validate; -export const stringify = uuid.stringify; -export const parse = uuid.parse; diff --git a/reverse_engineering/package-lock.json b/reverse_engineering/package-lock.json deleted file mode 100644 index efc88f3..0000000 --- a/reverse_engineering/package-lock.json +++ /dev/null @@ -1,572 +0,0 @@ -{ - "name": "cosmosdb", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "cosmosdb", - "version": "1.0.0", - "dependencies": { - "@azure/cosmos": "^3.17.3", - "axios": "^1.6.0", - "lodash": "^4.17.20", - "qs": "^6.9.1" - } - }, - "node_modules/@azure/abort-controller": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", - "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz", - "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.0.tgz", - "integrity": "sha512-+MnSB0vGZjszSzr5AW8z93/9fkDu2RLtWmAN8gskURq7EW2sSwqy8jZa0V26rjuBVkwhdA3Hw8z3VWoeBUOw+A==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.3.0", - "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", - "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.4.0.tgz", - "integrity": "sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/cosmos": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.17.3.tgz", - "integrity": "sha512-wBglkQ6Irjv5Vo2iw8fd6eYj60WYRSSg4/0DBkeOP6BwQ4RA91znsOHd6s3qG6UAbNgYuzC9Nnq07vlFFZkHEw==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.2.0", - "@azure/core-tracing": "^1.0.0", - "debug": "^4.1.1", - "fast-json-stable-stringify": "^2.1.0", - "jsbi": "^3.1.3", - "node-abort-controller": "^3.0.0", - "priorityqueuejs": "^1.0.0", - "semaphore": "^1.0.5", - "tslib": "^2.2.0", - "universal-user-agent": "^6.0.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", - "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jsbi": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", - "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==" - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/node-abort-controller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", - "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" - }, - "node_modules/priorityqueuejs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz", - "integrity": "sha512-lg++21mreCEOuGWTbO5DnJKAdxfjrdN0S9ysoW9SzdSJvbkWpkaDdpG/cdsPCsEnoLUwmd9m3WcZhngW7yKA2g==" - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/semaphore": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - } - }, - "dependencies": { - "@azure/abort-controller": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", - "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", - "requires": { - "tslib": "^2.2.0" - } - }, - "@azure/core-auth": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz", - "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==", - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.2.0" - } - }, - "@azure/core-rest-pipeline": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.0.tgz", - "integrity": "sha512-+MnSB0vGZjszSzr5AW8z93/9fkDu2RLtWmAN8gskURq7EW2sSwqy8jZa0V26rjuBVkwhdA3Hw8z3VWoeBUOw+A==", - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.3.0", - "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0" - } - }, - "@azure/core-tracing": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", - "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", - "requires": { - "tslib": "^2.2.0" - } - }, - "@azure/core-util": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.4.0.tgz", - "integrity": "sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==", - "requires": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - } - }, - "@azure/cosmos": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.17.3.tgz", - "integrity": "sha512-wBglkQ6Irjv5Vo2iw8fd6eYj60WYRSSg4/0DBkeOP6BwQ4RA91znsOHd6s3qG6UAbNgYuzC9Nnq07vlFFZkHEw==", - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.2.0", - "@azure/core-tracing": "^1.0.0", - "debug": "^4.1.1", - "fast-json-stable-stringify": "^2.1.0", - "jsbi": "^3.1.3", - "node-abort-controller": "^3.0.0", - "priorityqueuejs": "^1.0.0", - "semaphore": "^1.0.5", - "tslib": "^2.2.0", - "universal-user-agent": "^6.0.0", - "uuid": "^8.3.0" - } - }, - "@azure/logger": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", - "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", - "requires": { - "tslib": "^2.2.0" - } - }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { - "debug": "4" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", - "requires": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "jsbi": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", - "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==" - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node-abort-controller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", - "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" - }, - "priorityqueuejs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz", - "integrity": "sha512-lg++21mreCEOuGWTbO5DnJKAdxfjrdN0S9ysoW9SzdSJvbkWpkaDdpG/cdsPCsEnoLUwmd9m3WcZhngW7yKA2g==" - }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==" - }, - "semaphore": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" - }, - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - } - } -} diff --git a/reverse_engineering/package.json b/reverse_engineering/package.json deleted file mode 100644 index 0209f51..0000000 --- a/reverse_engineering/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "cosmosdb", - "version": "1.0.0", - "description": "", - "author": "Hackolade", - "dependencies": { - "@azure/cosmos": "^3.17.3", - "axios": "^1.6.0", - "lodash": "^4.17.20", - "qs": "^6.9.1" - }, - "installed": true -} diff --git a/shared/constants.js b/shared/constants.js deleted file mode 100644 index d3cc7ca..0000000 --- a/shared/constants.js +++ /dev/null @@ -1,19 +0,0 @@ -const PARTITION_KEY_DEFINITION_VERSION = { - v2: 2, -}; - -const PARTITION_KEY_KIND = { - MultiHash: 'MultiHash', -}; - -const TTL_ON = 'On'; -const TTL_OFF = 'Off'; -const TTL_ON_DEFAULT = 'On (no default)'; - -module.exports = { - PARTITION_KEY_DEFINITION_VERSION, - PARTITION_KEY_KIND, - TTL_ON, - TTL_OFF, - TTL_ON_DEFAULT, -}; diff --git a/snippets/collection.json b/snippets/collection.json index 774aea6..2dfa34a 100644 --- a/snippets/collection.json +++ b/snippets/collection.json @@ -1,10 +1,12 @@ { "name": "collection", - "properties": [{ - "name": "partitionKey", - "type": "string", - "required": true, - "primaryKey": true, - "partitionKey": true - }] -} \ No newline at end of file + "properties": [ + { + "name": "partitionKey", + "type": "string", + "required": true, + "primaryKey": true, + "partitionKey": true + } + ] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..c5275b0 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "outDir": "./tscDist", + "allowJs": true, + "checkJs": false, + "target": "ES2016", + "lib": ["ESNext", "DOM"], + "sourceMap": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "experimentalDecorators": true, + "noUnusedParameters": true, + "noUnusedLocals": true, + "noImplicitThis": true, + "noImplicitAny": false, + "alwaysStrict": true, + "skipLibCheck": true, + "module": "ESNext", + "strict": true, + "useUnknownInCatchVariables": true, + "allowSyntheticDefaultImports": true, + "isolatedModules": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "typeRoots": ["./node_modules/@types", "./types"] + }, + "include": ["reverse_engineering", "forward_engineering"], + "exclude": ["**/node_modules/**", "release/**/*"] +} diff --git a/types/array.json b/types/array.json index 507bc4b..f8f0324 100644 --- a/types/array.json +++ b/types/array.json @@ -18,4 +18,4 @@ "maxItems": "", "uniqueItems": false } -} \ No newline at end of file +} diff --git a/types/binary.json b/types/binary.json index 40796c2..54c5a9c 100644 --- a/types/binary.json +++ b/types/binary.json @@ -15,4 +15,4 @@ "enum": [], "sample": "" } -} \ No newline at end of file +} diff --git a/types/boolean.json b/types/boolean.json index cd3e961..d3177dd 100644 --- a/types/boolean.json +++ b/types/boolean.json @@ -16,4 +16,4 @@ "foreignField": [], "sample": "" } -} \ No newline at end of file +} diff --git a/types/null.json b/types/null.json index 3770e4c..73db9f3 100644 --- a/types/null.json +++ b/types/null.json @@ -13,4 +13,4 @@ "foreignField": [], "format": "" } -} \ No newline at end of file +} diff --git a/types/number.json b/types/number.json index 9483af0..b650cd5 100644 --- a/types/number.json +++ b/types/number.json @@ -26,4 +26,4 @@ "mode": "", "sample": "" } -} \ No newline at end of file +} diff --git a/types/object.json b/types/object.json index 050e57b..1753e51 100644 --- a/types/object.json +++ b/types/object.json @@ -4,7 +4,7 @@ "dtdAbbreviation": "{...}", "parentType": "document", "defaultValues": { - "type": "document", + "type": "document", "childType": "object", "primaryKey": false, "relationshipType": "", @@ -19,4 +19,4 @@ "additionalProperties": false, "enum": [] } -} \ No newline at end of file +} diff --git a/types/string.json b/types/string.json index 1c08913..b981993 100644 --- a/types/string.json +++ b/types/string.json @@ -17,4 +17,4 @@ "foreignField": [], "enum": [] } -} \ No newline at end of file +} diff --git a/validation/validationRegularExpressions.json b/validation/validationRegularExpressions.json index ba4b132..c7c3b47 100644 --- a/validation/validationRegularExpressions.json +++ b/validation/validationRegularExpressions.json @@ -1,12 +1,10 @@ /* -* Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. -* -* The copyright to the computer software herein is the property of IntegrIT S.A. -* The software may be used and/or copied only with the written permission of -* IntegrIT S.A. or in accordance with the terms and conditions stipulated in -* the agreement/contract under which the software has been supplied. -* -*/ -{ - -} \ No newline at end of file + * Copyright © 2016-2017 by IntegrIT S.A. dba Hackolade. All rights reserved. + * + * The copyright to the computer software herein is the property of IntegrIT S.A. + * The software may be used and/or copied only with the written permission of + * IntegrIT S.A. or in accordance with the terms and conditions stipulated in + * the agreement/contract under which the software has been supplied. + * + */ +{}