Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/functions

Package Overview
Dependencies
Maintainers
7
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/functions - npm Package Compare versions

Comparing version 4.5.0 to 4.5.1

2

dist/azure-functions.min.js

@@ -1,2 +0,2 @@

(()=>{"use strict";var e={5313:function(e,t,n){var r,o,i,s=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationContext=void 0;const c=n(5312);t.InvocationContext=class{constructor(e){var t,n,o,i;r.set(this,void 0),e=e||{};const a="unknown";this.invocationId=e.invocationId||a,this.functionName=e.functionName||a,this.extraInputs=new u,this.extraOutputs=new l,this.retryContext=e.retryContext,this.traceContext=e.traceContext,this.triggerMetadata=e.triggerMetadata,this.options={trigger:(null===(t=e.options)||void 0===t?void 0:t.trigger)||{name:a,type:a},return:null===(n=e.options)||void 0===n?void 0:n.return,extraInputs:(null===(o=e.options)||void 0===o?void 0:o.extraInputs)||[],extraOutputs:(null===(i=e.options)||void 0===i?void 0:i.extraOutputs)||[]},s(this,r,e.logHandler||c.fallbackLogHandler,"f")}log(...e){a(this,r,"f").call(this,"information",...e)}trace(...e){a(this,r,"f").call(this,"trace",...e)}debug(...e){a(this,r,"f").call(this,"debug",...e)}info(...e){a(this,r,"f").call(this,"information",...e)}warn(...e){a(this,r,"f").call(this,"warning",...e)}error(...e){a(this,r,"f").call(this,"error",...e)}},r=new WeakMap;class u{constructor(){o.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return a(this,o,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;a(this,o,"f")[n]=t}}o=new WeakMap;class l{constructor(){i.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return a(this,i,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;a(this,i,"f")[n]=t}}i=new WeakMap},62:function(e,t,n){var r,o,i,s,a,c,u,l,f,p,d=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},h=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},v=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationModel=void 0;const y=n(1764),g=n(5601),m=n(9168),b=n(4130),w=n(5243),x=n(2408),P=n(9788),O=n(2186),j=n(8828),C=n(6758),_=n(2988),T=n(9726),S=n(5313),k=n(5056),E=n(7674),H=n(7557);t.InvocationModel=class{constructor(e){r.add(this),o.set(this,!1),i.set(this,void 0),s.set(this,void 0),a.set(this,void 0),c.set(this,void 0),h(this,i,e,"f"),h(this,s,(0,H.nonNullProp)(e.metadata,"name"),"f"),h(this,a,(0,H.nonNullProp)(e.metadata,"bindings"),"f");const t=(0,H.nonNullValue)(Object.values(v(this,a,"f")).find((e=>(0,E.isTrigger)(e.type))),"triggerBinding");h(this,c,(0,H.nonNullProp)(t,"type"),"f")}getArguments(){return d(this,void 0,void 0,(function*(){const e=v(this,i,"f").request,t=new S.InvocationContext({invocationId:(0,H.nonNullProp)(v(this,i,"f"),"invocationId"),functionName:v(this,s,"f"),logHandler:(e,...t)=>v(this,r,"m",p).call(this,e,...t),retryContext:(0,b.fromRpcRetryContext)(e.retryContext),traceContext:(0,b.fromRpcTraceContext)(e.traceContext),triggerMetadata:(0,w.fromRpcTriggerMetadata)(e.triggerMetadata,v(this,c,"f")),options:(0,m.fromRpcBindings)(v(this,a,"f"))}),n=[];if(e.inputData)for(const r of e.inputData){const o=(0,H.nonNullProp)(r,"name"),s=v(this,a,"f")[o];if(!s)throw new C.AzFuncSystemError(`Failed to find binding "${o}" in bindings "${Object.keys(v(this,a,"f")).join(", ")}".`);const c=s.type;let u;if((0,E.isHttpTrigger)(c)&&k.enableHttpStream){const t=yield(0,_.waitForProxyRequest)(v(this,i,"f").invocationId);u=(0,T.createStreamRequest)(t,(0,H.nonNullProp)(e,"triggerMetadata"))}else u=(0,x.fromRpcTypedData)(r.data);(0,E.isTimerTrigger)(c)&&(u=(0,P.toCamelCaseValue)(u)),(0,E.isTrigger)(c)?n.push(u):t.extraInputs.set(o,u)}return{context:t,inputs:n}}))}invokeFunction(e,t,n){return d(this,void 0,void 0,(function*(){try{return yield Promise.resolve(n(...t,e))}finally{h(this,o,!0,"f")}}))}getResponse(e,t){return d(this,void 0,void 0,(function*(){const n={invocationId:v(this,i,"f").invocationId,outputData:[]};let o=!1;for(const[i,s]of Object.entries(v(this,a,"f")))if("out"===s.direction)if(i===g.returnBindingKey)n.returnValue=yield v(this,r,"m",u).call(this,e.invocationId,s,t),o=!0;else{const t=yield v(this,r,"m",u).call(this,e.invocationId,s,e.extraOutputs.get(i));(0,H.isDefined)(t)&&n.outputData.push({name:i,data:t})}return o||(0,E.isHttpTrigger)(v(this,c,"f"))||(n.returnValue=(0,j.toRpcTypedData)(t)),n}))}},o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,r=new WeakSet,u=function(e,t,n){var r;return d(this,void 0,void 0,(function*(){return"http"===(null===(r=t.type)||void 0===r?void 0:r.toLowerCase())?(0,O.toRpcHttp)(e,n):(0,j.toRpcTypedData)(n)}))},l=function(e,t,...n){v(this,i,"f").log(e,t,(0,y.format)(...n))},f=function(e,...t){v(this,r,"m",l).call(this,e,"system",...t)},p=function(e,...t){if(v(this,o,"f")&&"postInvocationHooks"!==v(this,i,"f").state){let e="Warning: Unexpected call to 'log' on the context object after function execution has completed. Please check for asynchronous calls that are not awaited. ";e+=`Function name: ${v(this,s,"f")}. Invocation Id: ${v(this,i,"f").invocationId}.`,v(this,r,"m",f).call(this,"warning",e)}v(this,r,"m",l).call(this,e,"user",...t)}},8612:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProgrammingModel=void 0;const o=n(5601),i=n(2988),s=n(62),a=n(5056);t.ProgrammingModel=class{constructor(){this.name="@azure/functions",this.version=o.version}getInvocationModel(e){return new s.InvocationModel(e)}getCapabilities(e){return r(this,void 0,void 0,(function*(){if((0,a.lockSetup)(),a.enableHttpStream){const t=yield(0,i.setupHttpProxy)();e.HttpUri=t}return Object.assign(e,a.capabilities),e}))}}},5109:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addBindingName=void 0;const r=n(3809);t.addBindingName=function(e,t){if(!e.name){let n=e.type;n.toLowerCase().endsWith(t.toLowerCase())||(n+=t),e.name=n+(0,r.getStringHash)(JSON.stringify(e))}return e}},6752:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.warmup=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.storageBlob=t.timer=t.http=t.deleteRequest=t.patch=t.post=t.put=t.get=t.setup=t.hook=void 0;const o=n(4876),i=n(6854),s=n(8612),a=n(1892),c=n(5736);t.hook=n(689);var u=n(5056);Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return u.setup}});let l=!1;function f(e,t){const n="function"==typeof e?{handler:e}:e;return n.methods=[t],n}function p(e,t){const{handler:n,return:o,trigger:i,extraInputs:s,extraOutputs:a,retry:c}=e,u=r(e,["handler","return","trigger","extraInputs","extraOutputs","retry"]);return{trigger:null!=i?i:t(u),return:o,retry:c,extraInputs:s,extraOutputs:a,handler:n}}function d(e,t){t.return||(t.return=i.http({})),h(e,p(t,a.http))}function h(e,t){l||function(){const e=(0,c.tryGetCoreApiLazy)();e?e.setProgrammingModel(new s.ProgrammingModel):console.warn('WARNING: Failed to detect the Azure Functions runtime. Switching "@azure/functions" package to test mode - not all features are supported.'),l=!0}();const n=(0,c.tryGetCoreApiLazy)();n?n.registerFunction((0,o.toCoreFunctionMetadata)(e,t),t.handler):console.warn(`WARNING: Skipping call to register function "${e}" because the "@azure/functions" package is in test mode.`)}t.get=function(e,t){d(e,f(t,"GET"))},t.put=function(e,t){d(e,f(t,"PUT"))},t.post=function(e,t){d(e,f(t,"POST"))},t.patch=function(e,t){d(e,f(t,"PATCH"))},t.deleteRequest=function(e,t){d(e,f(t,"DELETE"))},t.http=d,t.timer=function(e,t){h(e,p(t,a.timer))},t.storageBlob=function(e,t){h(e,p(t,a.storageBlob))},t.storageQueue=function(e,t){h(e,p(t,a.storageQueue))},t.serviceBusQueue=function(e,t){h(e,p(t,a.serviceBusQueue))},t.serviceBusTopic=function(e,t){h(e,p(t,a.serviceBusTopic))},t.eventHub=function(e,t){h(e,p(t,a.eventHub))},t.eventGrid=function(e,t){h(e,p(t,a.eventGrid))},t.cosmosDB=function(e,t){h(e,p(t,a.cosmosDB))},t.warmup=function(e,t){h(e,p(t,a.warmup))},t.sql=function(e,t){h(e,p(t,a.sql))},t.generic=h},5601:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.returnBindingKey=t.version=void 0,t.version="4.5.0",t.returnBindingKey="$return"},9168:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcBindings=void 0;const r=n(5601),o=n(7674),i=n(7557);function s(e,t){return Object.assign(Object.assign({},t),{type:(0,i.nonNullProp)(t,"type"),name:e})}t.fromRpcBindings=function(e){let t,n;const a=[],c=[];for(const[u,l]of Object.entries((0,i.nonNullValue)(e,"bindings")))(0,o.isTrigger)(l.type)?t=s(u,l):u===r.returnBindingKey?n=s(u,l):"in"===l.direction?a.push(s(u,l)):"out"===l.direction&&c.push(s(u,l));return{trigger:(0,i.nonNullValue)(t,"trigger"),return:n,extraInputs:a,extraOutputs:c}}},4130:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTraceContext=t.fromRpcRetryContext=void 0;const r=n(7557);t.fromRpcRetryContext=function(e){if(e){const t={retryCount:(0,r.nonNullProp)(e,"retryCount"),maxRetryCount:(0,r.nonNullProp)(e,"maxRetryCount")};return e.exception&&(t.exception=function(e){const t={};return(0,r.copyPropIfDefined)(e,t,"message"),(0,r.copyPropIfDefined)(e,t,"source"),(0,r.copyPropIfDefined)(e,t,"stackTrace"),t}(e.exception)),t}},t.fromRpcTraceContext=function(e){if(e){const t={};return(0,r.copyPropIfDefined)(e,t,"traceParent"),(0,r.copyPropIfDefined)(e,t,"traceState"),e.attributes&&(t.attributes=e.attributes),t}}},2691:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromNullableMapping=void 0,t.fromNullableMapping=function(e,t){var n;let r={};if(e&&Object.keys(e).length>0)for(const t in e)r[t]=(null===(n=e[t])||void 0===n?void 0:n.value)||"";else t&&Object.keys(t).length>0&&(r=t);return r}},5243:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTriggerMetadata=void 0;const r=n(7674),o=n(2408),i=n(9788);t.fromRpcTriggerMetadata=function(e,t){if(e&&!(0,r.isHttpTrigger)(t)&&!(0,r.isTimerTrigger)(t)){const t={};for(const[n,r]of Object.entries(e))t[(0,i.toCamelCaseKey)(n)]=(0,i.toCamelCaseValue)((0,o.fromRpcTypedData)(r));return t}}},2408:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTypedData=void 0;const r=n(9726),o=n(7557);function i(e){try{return JSON.parse(e)}catch(t){return e}}t.fromRpcTypedData=function(e){return e?(0,o.isDefined)(e.string)?i(e.string):(0,o.isDefined)(e.json)?JSON.parse(e.json):(0,o.isDefined)(e.bytes)?Buffer.from(e.bytes):(0,o.isDefined)(e.stream)?Buffer.from(e.stream):(0,o.isDefined)(e.http)?new r.HttpRequest(e.http):(0,o.isDefined)(e.int)?e.int:(0,o.isDefined)(e.double)?e.double:e.collectionBytes&&(0,o.isDefined)(e.collectionBytes.bytes)?e.collectionBytes.bytes.map((e=>Buffer.from(e))):e.collectionString&&(0,o.isDefined)(e.collectionString.string)?e.collectionString.string.map(i):e.collectionDouble&&(0,o.isDefined)(e.collectionDouble.double)?e.collectionDouble.double:e.collectionSint64&&(0,o.isDefined)(e.collectionSint64.sint64)?e.collectionSint64.sint64:void 0:void 0}},9788:(e,t)=>{function n(e){return e.charAt(0).toLowerCase()+e.slice(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCaseKey=t.toCamelCaseValue=void 0,t.toCamelCaseValue=function e(t){if("object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map(e);{const r={};for(const[o,i]of Object.entries(t))r[n(o)]=e(i);return r}},t.toCamelCaseKey=n},4876:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toCoreFunctionMetadata=void 0;const r=n(5601),o=n(6758),i=n(7674),s=n(6133);t.toCoreFunctionMetadata=function(e,t){const n={},a=[],c=t.trigger;if(n[c.name]=Object.assign(Object.assign({},c),{direction:"in",type:(0,i.isTrigger)(c.type)?c.type:c.type+"Trigger"}),a.push(c.name),t.extraInputs)for(const e of t.extraInputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"in"}),a.push(e.name);if(t.return&&(n[r.returnBindingKey]=Object.assign(Object.assign({},t.return),{direction:"out"}),a.push(r.returnBindingKey)),t.extraOutputs)for(const e of t.extraOutputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"out"}),a.push(e.name);if(a.filter(((e,t)=>a.indexOf(e)!==t)).length>0)throw new o.AzFuncSystemError(`Duplicate bindings found for function "${e}". Remove a duplicate binding or manually specify the "name" property to make it unique.`);let u;return t.retry&&(u=Object.assign(Object.assign({},t.retry),{retryStrategy:t.retry.strategy,delayInterval:(0,s.toRpcDuration)(t.retry.delayInterval,"retry.delayInterval"),maximumInterval:(0,s.toRpcDuration)(t.retry.maximumInterval,"retry.maximumInterval"),minimumInterval:(0,s.toRpcDuration)(t.retry.minimumInterval,"retry.minimumInterval")})),{name:e,bindings:n,retryOptions:u}}},6133:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcDuration=void 0;const r=n(6758),o=n(7557);t.toRpcDuration=function(e,t){if((0,o.isDefined)(e)){try{let t;if("object"==typeof e){const n=(e.minutes||0)+60*(e.hours||0),r=(e.seconds||0)+60*n;t=(e.milliseconds||0)+1e3*r}else"number"==typeof e&&(t=e);if((0,o.isDefined)(t)&&t>=0)return{seconds:Math.round(t/1e3)}}catch(e){}throw new r.AzFuncSystemError(`A 'number' or 'Duration' object was expected instead of a '${typeof e}'. Cannot parse value of '${t}'.`)}}},2186:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcHttp=void 0;const o=n(6758),i=n(2988),s=n(2681),a=n(5056),c=n(2518),u=n(8828);t.toRpcHttp=function(e,t){return r(this,void 0,void 0,(function*(){if(null==t)return t;if("object"!=typeof t)throw new o.AzFuncSystemError('The HTTP response must be an object with optional properties "body", "status", "headers", and "cookies".');const n=t instanceof s.HttpResponse?t:new s.HttpResponse(t);if(a.enableHttpStream)return void(yield(0,i.sendProxyResponse)(e,n));const r={};r.statusCode=n.status.toString(),r.headers={};for(const[e,t]of n.headers.entries())r.headers[e]=t;r.cookies=[];for(const e of n.cookies)r.cookies.push((0,c.toRpcHttpCookie)(e));r.enableContentNegotiation=n.enableContentNegotiation;const l=yield n.arrayBuffer();return r.body=(0,u.toRpcTypedData)(l),{http:r}}))}},2518:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcHttpCookie=void 0;const r=n(679);t.toRpcHttpCookie=function(e){let t="none";if(e&&e.sameSite){const n=e.sameSite.toLocaleLowerCase();"lax"===n?t="lax":"strict"===n?t="strict":"none"===n&&(t="explicitNone")}return{name:e&&(0,r.toRpcString)(e.name,"cookie.name"),value:e&&(0,r.toRpcString)(e.value,"cookie.value"),domain:(0,r.toNullableString)(e&&e.domain,"cookie.domain"),path:(0,r.toNullableString)(e&&e.path,"cookie.path"),expires:(0,r.toNullableTimestamp)(e&&e.expires,"cookie.expires"),secure:(0,r.toNullableBool)(e&&e.secure,"cookie.secure"),httpOnly:(0,r.toNullableBool)(e&&e.httpOnly,"cookie.httpOnly"),sameSite:t,maxAge:(0,r.toNullableDouble)(e&&e.maxAge,"cookie.maxAge")}}},679:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toNullableTimestamp=t.toNullableString=t.toRpcString=t.toNullableDouble=t.toNullableBool=void 0;const r=n(6758),o=n(7557);t.toNullableBool=function(e,t){if("boolean"==typeof e)return{value:e};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'boolean' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toNullableDouble=function(e,t){if("number"==typeof e)return{value:e};if("string"==typeof e&&!isNaN(Number(e)))return{value:parseFloat(e)};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'number' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toRpcString=function(e,t){if("string"==typeof e)return e;if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'string' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`);return""},t.toNullableString=function(e,t){if("string"==typeof e)return{value:e};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'string' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toNullableTimestamp=function(e,t){if((0,o.isDefined)(e))try{const t="number"==typeof e?e:e.getTime();if(t&&t>=0)return{value:{seconds:Math.round(t/1e3)}}}catch(n){throw new r.AzFuncSystemError(`A 'number' or 'Date' input was expected instead of a '${typeof e}'. Cannot parse value of '${t}'.`)}}},8828:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcTypedData=void 0,t.toRpcTypedData=function(e){return null==e?e:"string"==typeof e?{string:e}:Buffer.isBuffer(e)?{bytes:e}:ArrayBuffer.isView(e)?{bytes:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}:e instanceof ArrayBuffer?{bytes:new Uint8Array(e)}:"number"==typeof e?Number.isInteger(e)?{int:e}:{double:e}:{json:JSON.stringify(e)}}},6758:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isError=t.ensureErrorType=t.ReadOnlyError=t.AzFuncRangeError=t.AzFuncTypeError=t.AzFuncSystemError=void 0;class n extends Error{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncSystemError=n;class r extends TypeError{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncTypeError=r;class o extends RangeError{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncRangeError=o,t.ReadOnlyError=class extends r{constructor(e){super(`Cannot assign to read only property '${e}'`)}},t.ensureErrorType=function(e){var t;if(e instanceof Error){if(!(null===(t=Object.getOwnPropertyDescriptor(e,"message"))||void 0===t?void 0:t.writable)){let t=e.message;Object.defineProperty(e,"message",{get:()=>t,set(e){t=e}})}return e}{let t;return t=null==e?"Unknown error":"string"==typeof e?e:"object"==typeof e?JSON.stringify(e):String(e),new Error(t)}},t.isError=function(e){return null!=e}},869:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppStartContext=void 0;const r=n(6013);class o extends r.HookContext{}t.AppStartContext=o},6229:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppTerminateContext=void 0;const r=n(6013);class o extends r.HookContext{}t.AppTerminateContext=o},6013:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.HookContext=void 0;const s=n(6758),a=n(7557);t.HookContext=class{constructor(e){var t,n;r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(n=i(this,r,"f")).hookData)&&void 0!==t||(n.hookData={})}get hookData(){return(0,a.nonNullProp)(i(this,r,"f"),"hookData")}set hookData(e){throw new s.ReadOnlyError("hookData")}},r=new WeakMap},3884:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationHookContext=void 0;const s=n(6758),a=n(5313),c=n(7557),u=n(6013);class l extends u.HookContext{constructor(e){var t,n,s,c;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(s=i(this,r,"f")).inputs)&&void 0!==t||(s.inputs=[]),null!==(n=(c=i(this,r,"f")).invocationContext)&&void 0!==n||(c.invocationContext=new a.InvocationContext)}get invocationContext(){return(0,c.nonNullProp)(i(this,r,"f"),"invocationContext")}set invocationContext(e){throw new s.ReadOnlyError("invocationContext")}get inputs(){return(0,c.nonNullProp)(i(this,r,"f"),"inputs")}set inputs(e){i(this,r,"f").inputs=e}}t.InvocationHookContext=l,r=new WeakMap},8256:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.LogHookContext=void 0;const s=n(6758),a=n(7557),c=n(6013);class u extends c.HookContext{constructor(e){var t,n,s,a,c,u;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(a=i(this,r,"f")).level)&&void 0!==t||(a.level="information"),null!==(n=(c=i(this,r,"f")).message)&&void 0!==n||(c.message="unknown"),null!==(s=(u=i(this,r,"f")).category)&&void 0!==s||(u.category="user")}get level(){return(0,a.nonNullProp)(i(this,r,"f"),"level")}set level(e){i(this,r,"f").level=e}get message(){return(0,a.nonNullProp)(i(this,r,"f"),"message")}set message(e){i(this,r,"f").message=e}get category(){return(0,a.nonNullProp)(i(this,r,"f"),"category")}set category(e){throw new s.ReadOnlyError("category")}get invocationContext(){return i(this,r,"f").invocationContext}set invocationContext(e){throw new s.ReadOnlyError("invocationContext")}}t.LogHookContext=u,r=new WeakMap},3390:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.PostInvocationContext=void 0;const s=n(3884);class a extends s.InvocationHookContext{constructor(e){super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f")}get result(){return i(this,r,"f").result}set result(e){i(this,r,"f").result=e}get error(){return i(this,r,"f").error}set error(e){i(this,r,"f").error=e}}t.PostInvocationContext=a,r=new WeakMap},7225:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.PreInvocationContext=void 0;const s=n(7557),a=n(3884);class c extends a.InvocationHookContext{constructor(e){var t,n;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(n=i(this,r,"f")).functionCallback)&&void 0!==t||(n.functionCallback=()=>{})}get functionHandler(){return(0,s.nonNullProp)(i(this,r,"f"),"functionCallback")}set functionHandler(e){i(this,r,"f").functionCallback=e}}t.PreInvocationContext=c,r=new WeakMap},689:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.log=t.postInvocation=t.preInvocation=t.appTerminate=t.appStart=void 0;const r=n(6758),o=n(3657),i=n(5736),s=n(869),a=n(6229),c=n(8256),u=n(3390),l=n(7225);function f(e,t){const n=(0,i.tryGetCoreApiLazy)();return n?n.registerHook(e,t):(console.warn(`WARNING: Skipping call to register ${e} hook because the "@azure/functions" package is in test mode.`),new o.Disposable((()=>{console.warn(`WARNING: Skipping call to dispose ${e} hook because the "@azure/functions" package is in test mode.`)})))}t.appStart=function(e){return f("appStart",(t=>e(new s.AppStartContext(t))))},t.appTerminate=function(e){return f("appTerminate",(t=>e(new a.AppTerminateContext(t))))},t.preInvocation=function(e){return f("preInvocation",(t=>e(new l.PreInvocationContext(t))))},t.postInvocation=function(e){return f("postInvocation",(t=>e(new u.PostInvocationContext(t))))},t.log=function(e){try{return f("log",(t=>e(new c.LogHookContext(t))))}catch(e){const t=(0,r.ensureErrorType)(e);throw"RangeError"===t.name&&t.isAzureFunctionsSystemError?new r.AzFuncSystemError("Log hooks require Azure Functions Host v4.34 or higher."):e}}},9726:function(e,t,n){var r,o,i,s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},a=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},c=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},u=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createStreamRequest=t.HttpRequest=void 0;const l=n(3122),f=n(7360),p=n(2691),d=n(2408),h=n(6758),v=n(7557),y=n(21);class g{constructor(e){var t,n,s;r.set(this,void 0),o.set(this,void 0),i.set(this,void 0),a(this,i,e,"f");let u=e.undiciRequest;if(!u){const r=(0,v.nonNullProp)(e,"url");let o;(null===(t=e.body)||void 0===t?void 0:t.bytes)?o=Buffer.from(null===(n=e.body)||void 0===n?void 0:n.bytes):(null===(s=e.body)||void 0===s?void 0:s.string)&&(o=e.body.string),u=new l.Request(r,{body:o,method:(0,v.nonNullProp)(e,"method"),headers:(0,p.fromNullableMapping)(e.nullableHeaders,e.headers)})}a(this,o,u,"f"),e.nullableQuery||e.query?this.query=new f.URLSearchParams((0,p.fromNullableMapping)(e.nullableQuery,e.query)):this.query=new URL(c(this,o,"f").url).searchParams,this.params=(0,p.fromNullableMapping)(e.nullableParams,e.params)}get url(){return c(this,o,"f").url}get method(){return c(this,o,"f").method}get headers(){return c(this,o,"f").headers}get user(){return void 0===c(this,r,"f")&&a(this,r,(0,y.extractHttpUserFromHeaders)(this.headers),"f"),c(this,r,"f")}get body(){return c(this,o,"f").body}get bodyUsed(){return c(this,o,"f").bodyUsed}arrayBuffer(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").arrayBuffer()}))}blob(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").blob()}))}formData(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").formData()}))}json(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").json()}))}text(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").text()}))}clone(){const e=structuredClone(c(this,i,"f"));return e.undiciRequest=c(this,o,"f").clone(),new g(e)}}t.HttpRequest=g,r=new WeakMap,o=new WeakMap,i=new WeakMap,t.createStreamRequest=function(e,t){var n;const r="x-forwarded-host",o="x-forwarded-proto",i=e.headers[r],s=e.headers[o];if("string"!=typeof i||"string"!=typeof s)throw new h.AzFuncSystemError(`Expected headers "${r}" and "${o}" to be set.`);const a=`${s}://${i}${(0,v.nonNullProp)(e,"url")}`;let c;const f=null===(n=e.method)||void 0===n?void 0:n.toLowerCase();"get"!==f&&"head"!==f&&(c=e);const{Query:p,Headers:y}=t,m=u(t,["Query","Headers"]);let b;const w=(0,d.fromRpcTypedData)(y);"object"==typeof w&&(0,v.isDefined)(w)&&(b=w);const x=new l.Request(a,{body:c,duplex:"half",method:(0,v.nonNullProp)(e,"method"),headers:b}),P={};for(const[e,t]of Object.entries(m)){const n=(0,d.fromRpcTypedData)(t);"string"==typeof n&&(P[e]=n)}return new g({undiciRequest:x,params:P})}},2681:function(e,t,n){var r,o,i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpResponse=void 0;const c=n(3122),u=n(7557);class l{constructor(e){var t;if(r.set(this,void 0),o.set(this,void 0),null!=e||(e={}),s(this,o,e,"f"),e.undiciResponse)s(this,r,e.undiciResponse,"f");else{const t={status:e.status,headers:e.headers};(0,u.isDefined)(e.jsonBody)?s(this,r,c.Response.json(e.jsonBody,t),"f"):s(this,r,new c.Response(e.body,t),"f")}this.cookies=null!==(t=e.cookies)&&void 0!==t?t:[],this.enableContentNegotiation=!!e.enableContentNegotiation}get status(){return a(this,r,"f").status}get headers(){return a(this,r,"f").headers}get body(){return a(this,r,"f").body}get bodyUsed(){return a(this,r,"f").bodyUsed}arrayBuffer(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").arrayBuffer()}))}blob(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").blob()}))}formData(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").formData()}))}json(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").json()}))}text(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").text()}))}clone(){const e=structuredClone(a(this,o,"f"));return e.undiciResponse=a(this,r,"f").clone(),new l(e)}}t.HttpResponse=l,r=new WeakMap,o=new WeakMap},21:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extractHttpUserFromHeaders=void 0;const r=n(7557);t.extractHttpUserFromHeaders=function(e){let t=null;const n=e.get("x-ms-client-principal");if(n){const o=JSON.parse(Buffer.from(n,"base64").toString("utf-8"));t=o.identityProvider?{type:"StaticWebApps",id:o.userId,username:o.userDetails,identityProvider:o.identityProvider,claimsPrincipalData:o}:{type:"AppService",id:(0,r.nonNullValue)(e.get("x-ms-client-principal-id"),"user-id"),username:(0,r.nonNullValue)(e.get("x-ms-client-principal-name"),"user-name"),identityProvider:(0,r.nonNullValue)(e.get("x-ms-client-principal-idp"),"user-idp"),claimsPrincipalData:o}}return t}},2988:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupHttpProxy=t.sendProxyResponse=t.waitForProxyRequest=void 0;const i=n(4344),s=n(7702),a=n(2615),c=n(6758),u=n(7557),l=n(8267),f={},p={},d=new s.EventEmitter;t.waitForProxyRequest=function(e){return r(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{const r=f[e];r?(t(r),delete f[e]):d.once(e,(()=>{const n=f[e];n&&(t(n),delete f[e])}))}))}))};const h="x-ms-invocation-id";t.sendProxyResponse=function(e,t){var n,s;return r(this,void 0,void 0,(function*(){const r=(0,u.nonNullProp)(p,e);delete p[e];for(const[e,n]of t.headers.entries())r.setHeader(e,n);if(r.setHeader(h,e),r.statusCode=t.status,t.cookies.length>0&&function(e,t){const n=e.cookies.map((e=>{let t;switch(e.sameSite){case"Lax":t="lax";break;case"None":t="none";break;case"Strict":t="strict";break;default:t=e.sameSite}return(0,i.serialize)(e.name,e.value,{domain:e.domain,path:e.path,expires:"number"==typeof e.expires?new Date(e.expires):e.expires,secure:e.secure,httpOnly:e.httpOnly,sameSite:t,maxAge:e.maxAge})}));t.setHeader("Set-Cookie",n)}(t,r),t.body)try{for(var a,c=o(t.body.values());!(a=yield c.next()).done;){const e=a.value;r.write(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(s=c.return)&&(yield s.call(c))}finally{if(n)throw n.error}}r.end()}))},t.setupHttpProxy=function(){return r(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const n=a.createServer();n.on("request",((e,t)=>{const n=e.headers[h];"string"==typeof n?(f[n]=e,p[n]=t,d.emit(n)):(0,l.workerSystemLog)("error",`Http proxy request missing header ${h}`)})),n.on("error",(e=>{e=(0,c.ensureErrorType)(e),(0,l.workerSystemLog)("error",`Http proxy error: ${e.stack||e.message}`)})),n.listen((()=>{const r=n.address();null!==r&&"object"==typeof r?e(`http://localhost:${r.port}/`):t(new c.AzFuncSystemError("Unexpected server address during http proxy setup"))})),n.on("close",(()=>{(0,l.workerSystemLog)("information","Http proxy closing")}))}))}))}},3607:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SqlChangeOperation=t.Disposable=t.trigger=t.output=t.InvocationContext=t.input=t.HttpResponse=t.HttpRequest=t.PreInvocationContext=t.PostInvocationContext=t.InvocationHookContext=t.HookContext=t.AppTerminateContext=t.AppStartContext=t.app=void 0,t.app=n(6752);var r=n(869);Object.defineProperty(t,"AppStartContext",{enumerable:!0,get:function(){return r.AppStartContext}});var o=n(6229);Object.defineProperty(t,"AppTerminateContext",{enumerable:!0,get:function(){return o.AppTerminateContext}});var i=n(6013);Object.defineProperty(t,"HookContext",{enumerable:!0,get:function(){return i.HookContext}});var s=n(3884);Object.defineProperty(t,"InvocationHookContext",{enumerable:!0,get:function(){return s.InvocationHookContext}});var a=n(3390);Object.defineProperty(t,"PostInvocationContext",{enumerable:!0,get:function(){return a.PostInvocationContext}});var c=n(7225);Object.defineProperty(t,"PreInvocationContext",{enumerable:!0,get:function(){return c.PreInvocationContext}});var u=n(9726);Object.defineProperty(t,"HttpRequest",{enumerable:!0,get:function(){return u.HttpRequest}});var l=n(2681);Object.defineProperty(t,"HttpResponse",{enumerable:!0,get:function(){return l.HttpResponse}}),t.input=n(6489);var f=n(5313);Object.defineProperty(t,"InvocationContext",{enumerable:!0,get:function(){return f.InvocationContext}}),t.output=n(6854),t.trigger=n(1892);var p,d=n(3657);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return d.Disposable}}),(p=t.SqlChangeOperation||(t.SqlChangeOperation={}))[p.Insert=0]="Insert",p[p.Update=1]="Update",p[p.Delete=2]="Delete"},6489:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.cosmosDB=t.table=t.storageBlob=void 0;const r=n(5109);function o(e){return(0,r.addBindingName)(e,"Input")}t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blob"}))},t.table=function(e){return o(Object.assign(Object.assign({},e),{type:"table"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDB"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sql"}))},t.generic=function(e){return o(e)}},6854:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.table=t.storageBlob=t.http=void 0;const r=n(5109);function o(e){return(0,r.addBindingName)(e,"Output")}t.http=function(e){return o(Object.assign(Object.assign({},e),{type:"http"}))},t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blob"}))},t.table=function(e){return o(Object.assign(Object.assign({},e),{type:"table"}))},t.storageQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"queue"}))},t.serviceBusQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBus"}))},t.serviceBusTopic=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBus"}))},t.eventHub=function(e){return o(Object.assign(Object.assign({},e),{type:"eventHub"}))},t.eventGrid=function(e){return o(Object.assign(Object.assign({},e),{type:"eventGrid"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDB"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sql"}))},t.generic=function(e){return o(e)}},5056:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.capabilities=t.enableHttpStream=t.lockSetup=void 0;const r=n(6758),o=n(7557),i=n(5736),s=n(8267);let a=!1;t.lockSetup=function(){a=!0},t.enableHttpStream=!1,t.capabilities={},t.setup=function(e){if(a)throw new r.AzFuncSystemError("Setup options can't be changed after app startup has finished.");if(e.enableHttpStream){const e=(0,i.tryGetCoreApiLazy)();if(e&&!e.log)throw new r.AzFuncSystemError("HTTP streaming requires Azure Functions Host v4.28 or higher.")}if((0,o.isDefined)(e.enableHttpStream)&&(t.enableHttpStream=e.enableHttpStream),e.capabilities)for(let[n,r]of Object.entries(e.capabilities))(0,o.isDefined)(r)&&(r=String(r),(0,s.workerSystemLog)("debug",`Capability ${n} set to ${r}.`),t.capabilities[n]=r);t.enableHttpStream&&(0,s.workerSystemLog)("debug","HTTP streaming enabled.")}},1892:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.warmup=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.storageBlob=t.timer=t.http=void 0;const r=n(5109);function o(e){return(0,r.addBindingName)(e,"Trigger")}t.http=function(e){return o(Object.assign(Object.assign({},e),{authLevel:e.authLevel||"anonymous",methods:e.methods||["GET","POST"],type:"httpTrigger"}))},t.timer=function(e){return o(Object.assign(Object.assign({},e),{type:"timerTrigger"}))},t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blobTrigger"}))},t.storageQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"queueTrigger"}))},t.serviceBusQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBusTrigger"}))},t.serviceBusTopic=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBusTrigger"}))},t.eventHub=function(e){return o(Object.assign(Object.assign({},e),{type:"eventHubTrigger"}))},t.eventGrid=function(e){return o(Object.assign(Object.assign({},e),{type:"eventGridTrigger"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDBTrigger"}))},t.warmup=function(e){return o(Object.assign(Object.assign({},e),{type:"warmupTrigger"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sqlTrigger"}))},t.generic=function(e){return o(e)}},3657:function(e,t){var n,r=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;class i{constructor(e){n.set(this,void 0),r(this,n,e,"f")}static from(...e){let t=e;return new i((function(){if(t){for(const e of t)e&&"function"==typeof e.dispose&&e.dispose();t=void 0}}))}dispose(){"function"==typeof o(this,n,"f")&&(o(this,n,"f").call(this),r(this,n,void 0,"f"))}}t.Disposable=i,n=new WeakMap},5312:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fallbackLogHandler=void 0,t.fallbackLogHandler=function(e,...t){switch(e){case"trace":console.trace(...t);break;case"debug":console.debug(...t);break;case"information":console.info(...t);break;case"warning":console.warn(...t);break;case"critical":case"error":console.error(...t);break;default:console.log(...t)}}},3809:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getStringHash=t.getRandomHexString=void 0;const r=n(4770);t.getRandomHexString=function(e=10){return r.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)},t.getStringHash=function(e,t=10){return r.createHash("sha256").update(e).digest("hex").slice(0,t)}},7674:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTimerTrigger=t.isHttpTrigger=t.isTrigger=void 0,t.isTrigger=function(e){return!!e&&/trigger$/i.test(e)},t.isHttpTrigger=function(e){return"httptrigger"===(null==e?void 0:e.toLowerCase())},t.isTimerTrigger=function(e){return"timertrigger"===(null==e?void 0:e.toLowerCase())}},7557:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.copyPropIfDefined=t.nonNullValue=t.nonNullProp=void 0;const r=n(6758);function o(e,t){if(null==e)throw new r.AzFuncSystemError("Internal error: Expected value to be neither null nor undefined"+(t?`: ${t}`:""));return e}t.nonNullProp=function(e,t){return o(e[t],t)},t.nonNullValue=o,t.copyPropIfDefined=function(e,t,n){null!==e[n]&&void 0!==e[n]&&(t[n]=e[n])},t.isDefined=function(e){return null!=e}},5736:(e,t,n)=>{let r;Object.defineProperty(t,"__esModule",{value:!0}),t.tryGetCoreApiLazy=void 0,t.tryGetCoreApiLazy=function(){if(void 0===r)try{r=n(9605)}catch(e){r=null}return r}},8267:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.workerSystemLog=void 0;const r=n(1764),o=n(5312),i=n(5736);t.workerSystemLog=function(e,...t){const n=(0,i.tryGetCoreApiLazy)();n&&n.log?n.log(e,"system",(0,r.format)(...t)):(0,o.fallbackLogHandler)(e,...t)}},9605:e=>{e.exports=require("@azure/functions-core")},4344:e=>{e.exports=require("cookie")},4770:e=>{e.exports=require("crypto")},7702:e=>{e.exports=require("events")},2615:e=>{e.exports=require("http")},3122:e=>{e.exports=require("undici")},7360:e=>{e.exports=require("url")},1764:e=>{e.exports=require("util")}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(3607);module.exports=n})();
(()=>{"use strict";var e={8157:function(e,t,n){var r,o,i,s=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationContext=void 0;const c=n(5396);t.InvocationContext=class{constructor(e){var t,n,o,i;r.set(this,void 0),e=e||{};const a="unknown";this.invocationId=e.invocationId||a,this.functionName=e.functionName||a,this.extraInputs=new u,this.extraOutputs=new l,this.retryContext=e.retryContext,this.traceContext=e.traceContext,this.triggerMetadata=e.triggerMetadata,this.options={trigger:(null===(t=e.options)||void 0===t?void 0:t.trigger)||{name:a,type:a},return:null===(n=e.options)||void 0===n?void 0:n.return,extraInputs:(null===(o=e.options)||void 0===o?void 0:o.extraInputs)||[],extraOutputs:(null===(i=e.options)||void 0===i?void 0:i.extraOutputs)||[]},s(this,r,e.logHandler||c.fallbackLogHandler,"f")}log(...e){a(this,r,"f").call(this,"information",...e)}trace(...e){a(this,r,"f").call(this,"trace",...e)}debug(...e){a(this,r,"f").call(this,"debug",...e)}info(...e){a(this,r,"f").call(this,"information",...e)}warn(...e){a(this,r,"f").call(this,"warning",...e)}error(...e){a(this,r,"f").call(this,"error",...e)}},r=new WeakMap;class u{constructor(){o.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return a(this,o,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;a(this,o,"f")[n]=t}}o=new WeakMap;class l{constructor(){i.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return a(this,i,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;a(this,i,"f")[n]=t}}i=new WeakMap},6691:function(e,t,n){var r,o,i,s,a,c,u,l,f,p,d=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},h=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},v=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationModel=void 0;const y=n(8354),g=n(6921),m=n(5521),b=n(1776),w=n(4714),x=n(679),P=n(917),O=n(5064),j=n(4454),C=n(725),_=n(2337),T=n(7992),S=n(8157),k=n(337),E=n(9898),H=n(9168);t.InvocationModel=class{constructor(e){r.add(this),o.set(this,!1),i.set(this,void 0),s.set(this,void 0),a.set(this,void 0),c.set(this,void 0),h(this,i,e,"f"),h(this,s,(0,H.nonNullProp)(e.metadata,"name"),"f"),h(this,a,(0,H.nonNullProp)(e.metadata,"bindings"),"f");const t=(0,H.nonNullValue)(Object.values(v(this,a,"f")).find((e=>(0,E.isTrigger)(e.type))),"triggerBinding");h(this,c,(0,H.nonNullProp)(t,"type"),"f")}getArguments(){return d(this,void 0,void 0,(function*(){const e=v(this,i,"f").request,t=new S.InvocationContext({invocationId:(0,H.nonNullProp)(v(this,i,"f"),"invocationId"),functionName:v(this,s,"f"),logHandler:(e,...t)=>v(this,r,"m",p).call(this,e,...t),retryContext:(0,b.fromRpcRetryContext)(e.retryContext),traceContext:(0,b.fromRpcTraceContext)(e.traceContext),triggerMetadata:(0,w.fromRpcTriggerMetadata)(e.triggerMetadata,v(this,c,"f")),options:(0,m.fromRpcBindings)(v(this,a,"f"))}),n=[];if(e.inputData)for(const r of e.inputData){const o=(0,H.nonNullProp)(r,"name"),s=v(this,a,"f")[o];if(!s)throw new C.AzFuncSystemError(`Failed to find binding "${o}" in bindings "${Object.keys(v(this,a,"f")).join(", ")}".`);const c=s.type;let u;if((0,E.isHttpTrigger)(c)&&k.enableHttpStream){const t=yield(0,_.waitForProxyRequest)(v(this,i,"f").invocationId);u=(0,T.createStreamRequest)(t,(0,H.nonNullProp)(e,"triggerMetadata"))}else u=(0,x.fromRpcTypedData)(r.data);(0,E.isTimerTrigger)(c)&&(u=(0,P.toCamelCaseValue)(u)),(0,E.isTrigger)(c)?n.push(u):t.extraInputs.set(o,u)}return{context:t,inputs:n}}))}invokeFunction(e,t,n){return d(this,void 0,void 0,(function*(){try{return yield Promise.resolve(n(...t,e))}finally{h(this,o,!0,"f")}}))}getResponse(e,t){return d(this,void 0,void 0,(function*(){const n={invocationId:v(this,i,"f").invocationId,outputData:[]};let o=!1;for(const[i,s]of Object.entries(v(this,a,"f")))if("out"===s.direction)if(i===g.returnBindingKey)n.returnValue=yield v(this,r,"m",u).call(this,e.invocationId,s,t),o=!0;else{const t=yield v(this,r,"m",u).call(this,e.invocationId,s,e.extraOutputs.get(i));(0,H.isDefined)(t)&&n.outputData.push({name:i,data:t})}return o||(0,E.isHttpTrigger)(v(this,c,"f"))||(n.returnValue=(0,j.toRpcTypedData)(t)),n}))}},o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,r=new WeakSet,u=function(e,t,n){var r;return d(this,void 0,void 0,(function*(){return"http"===(null===(r=t.type)||void 0===r?void 0:r.toLowerCase())?(0,O.toRpcHttp)(e,n):(0,j.toRpcTypedData)(n)}))},l=function(e,t,...n){v(this,i,"f").log(e,t,(0,y.format)(...n))},f=function(e,...t){v(this,r,"m",l).call(this,e,"system",...t)},p=function(e,...t){if(v(this,o,"f")&&"postInvocationHooks"!==v(this,i,"f").state){let e="Warning: Unexpected call to 'log' on the context object after function execution has completed. Please check for asynchronous calls that are not awaited. ";e+=`Function name: ${v(this,s,"f")}. Invocation Id: ${v(this,i,"f").invocationId}.`,v(this,r,"m",f).call(this,"warning",e)}v(this,r,"m",l).call(this,e,"user",...t)}},520:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProgrammingModel=void 0;const o=n(6921),i=n(2337),s=n(6691),a=n(337);t.ProgrammingModel=class{constructor(){this.name="@azure/functions",this.version=o.version}getInvocationModel(e){return new s.InvocationModel(e)}getCapabilities(e){return r(this,void 0,void 0,(function*(){if((0,a.lockSetup)(),a.enableHttpStream){const t=yield(0,i.setupHttpProxy)();e.HttpUri=t}return Object.assign(e,a.capabilities),e}))}}},6693:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addBindingName=void 0;const r=n(4169);t.addBindingName=function(e,t){if(!e.name){let n=e.type;n.toLowerCase().endsWith(t.toLowerCase())||(n+=t),e.name=n+(0,r.getStringHash)(JSON.stringify(e))}return e}},1859:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.warmup=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.storageBlob=t.timer=t.http=t.deleteRequest=t.patch=t.post=t.put=t.get=t.setup=t.hook=void 0;const o=n(2757),i=n(811),s=n(520),a=n(2888),c=n(3476);t.hook=n(6765);var u=n(337);Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return u.setup}});let l=!1;function f(e,t){const n="function"==typeof e?{handler:e}:e;return n.methods=[t],n}function p(e,t){const{handler:n,return:o,trigger:i,extraInputs:s,extraOutputs:a,retry:c}=e,u=r(e,["handler","return","trigger","extraInputs","extraOutputs","retry"]);return{trigger:null!=i?i:t(u),return:o,retry:c,extraInputs:s,extraOutputs:a,handler:n}}function d(e,t){t.return||(t.return=i.http({})),h(e,p(t,a.http))}function h(e,t){l||function(){const e=(0,c.tryGetCoreApiLazy)();e?e.setProgrammingModel(new s.ProgrammingModel):console.warn('WARNING: Failed to detect the Azure Functions runtime. Switching "@azure/functions" package to test mode - not all features are supported.'),l=!0}();const n=(0,c.tryGetCoreApiLazy)();n?n.registerFunction((0,o.toCoreFunctionMetadata)(e,t),t.handler):console.warn(`WARNING: Skipping call to register function "${e}" because the "@azure/functions" package is in test mode.`)}t.get=function(e,t){d(e,f(t,"GET"))},t.put=function(e,t){d(e,f(t,"PUT"))},t.post=function(e,t){d(e,f(t,"POST"))},t.patch=function(e,t){d(e,f(t,"PATCH"))},t.deleteRequest=function(e,t){d(e,f(t,"DELETE"))},t.http=d,t.timer=function(e,t){h(e,p(t,a.timer))},t.storageBlob=function(e,t){h(e,p(t,a.storageBlob))},t.storageQueue=function(e,t){h(e,p(t,a.storageQueue))},t.serviceBusQueue=function(e,t){h(e,p(t,a.serviceBusQueue))},t.serviceBusTopic=function(e,t){h(e,p(t,a.serviceBusTopic))},t.eventHub=function(e,t){h(e,p(t,a.eventHub))},t.eventGrid=function(e,t){h(e,p(t,a.eventGrid))},t.cosmosDB=function(e,t){h(e,p(t,a.cosmosDB))},t.warmup=function(e,t){h(e,p(t,a.warmup))},t.sql=function(e,t){h(e,p(t,a.sql))},t.generic=h},6921:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.returnBindingKey=t.version=void 0,t.version="4.5.1",t.returnBindingKey="$return"},5521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcBindings=void 0;const r=n(6921),o=n(9898),i=n(9168);function s(e,t){return Object.assign(Object.assign({},t),{type:(0,i.nonNullProp)(t,"type"),name:e})}t.fromRpcBindings=function(e){let t,n;const a=[],c=[];for(const[u,l]of Object.entries((0,i.nonNullValue)(e,"bindings")))(0,o.isTrigger)(l.type)?t=s(u,l):u===r.returnBindingKey?n=s(u,l):"in"===l.direction?a.push(s(u,l)):"out"===l.direction&&c.push(s(u,l));return{trigger:(0,i.nonNullValue)(t,"trigger"),return:n,extraInputs:a,extraOutputs:c}}},1776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTraceContext=t.fromRpcRetryContext=void 0;const r=n(9168);t.fromRpcRetryContext=function(e){if(e){const t={retryCount:(0,r.nonNullProp)(e,"retryCount"),maxRetryCount:(0,r.nonNullProp)(e,"maxRetryCount")};return e.exception&&(t.exception=function(e){const t={};return(0,r.copyPropIfDefined)(e,t,"message"),(0,r.copyPropIfDefined)(e,t,"source"),(0,r.copyPropIfDefined)(e,t,"stackTrace"),t}(e.exception)),t}},t.fromRpcTraceContext=function(e){if(e){const t={};return(0,r.copyPropIfDefined)(e,t,"traceParent"),(0,r.copyPropIfDefined)(e,t,"traceState"),e.attributes&&(t.attributes=e.attributes),t}}},5138:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromNullableMapping=void 0,t.fromNullableMapping=function(e,t){var n;let r={};if(e&&Object.keys(e).length>0)for(const t in e)r[t]=(null===(n=e[t])||void 0===n?void 0:n.value)||"";else t&&Object.keys(t).length>0&&(r=t);return r}},4714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTriggerMetadata=void 0;const r=n(9898),o=n(679),i=n(917);t.fromRpcTriggerMetadata=function(e,t){if(e&&!(0,r.isHttpTrigger)(t)&&!(0,r.isTimerTrigger)(t)){const t={};for(const[n,r]of Object.entries(e))t[(0,i.toCamelCaseKey)(n)]=(0,i.toCamelCaseValue)((0,o.fromRpcTypedData)(r));return t}}},679:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTypedData=void 0;const r=n(7992),o=n(9168);function i(e){try{return JSON.parse(e)}catch(t){return e}}t.fromRpcTypedData=function(e){return e?(0,o.isDefined)(e.string)?i(e.string):(0,o.isDefined)(e.json)?JSON.parse(e.json):(0,o.isDefined)(e.bytes)?Buffer.from(e.bytes):(0,o.isDefined)(e.stream)?Buffer.from(e.stream):(0,o.isDefined)(e.http)?new r.HttpRequest(e.http):(0,o.isDefined)(e.int)?e.int:(0,o.isDefined)(e.double)?e.double:e.collectionBytes&&(0,o.isDefined)(e.collectionBytes.bytes)?e.collectionBytes.bytes.map((e=>Buffer.from(e))):e.collectionString&&(0,o.isDefined)(e.collectionString.string)?e.collectionString.string.map(i):e.collectionDouble&&(0,o.isDefined)(e.collectionDouble.double)?e.collectionDouble.double:e.collectionSint64&&(0,o.isDefined)(e.collectionSint64.sint64)?e.collectionSint64.sint64:void 0:void 0}},917:(e,t)=>{function n(e){return e.charAt(0).toLowerCase()+e.slice(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCaseKey=t.toCamelCaseValue=void 0,t.toCamelCaseValue=function e(t){if("object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map(e);{const r={};for(const[o,i]of Object.entries(t))r[n(o)]=e(i);return r}},t.toCamelCaseKey=n},2757:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toCoreFunctionMetadata=void 0;const r=n(6921),o=n(725),i=n(9898),s=n(8360);t.toCoreFunctionMetadata=function(e,t){const n={},a=[],c=t.trigger;if(n[c.name]=Object.assign(Object.assign({},c),{direction:"in",type:(0,i.isTrigger)(c.type)?c.type:c.type+"Trigger"}),a.push(c.name),t.extraInputs)for(const e of t.extraInputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"in"}),a.push(e.name);if(t.return&&(n[r.returnBindingKey]=Object.assign(Object.assign({},t.return),{direction:"out"}),a.push(r.returnBindingKey)),t.extraOutputs)for(const e of t.extraOutputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"out"}),a.push(e.name);if(a.filter(((e,t)=>a.indexOf(e)!==t)).length>0)throw new o.AzFuncSystemError(`Duplicate bindings found for function "${e}". Remove a duplicate binding or manually specify the "name" property to make it unique.`);let u;return t.retry&&(u=Object.assign(Object.assign({},t.retry),{retryStrategy:t.retry.strategy,delayInterval:(0,s.toRpcDuration)(t.retry.delayInterval,"retry.delayInterval"),maximumInterval:(0,s.toRpcDuration)(t.retry.maximumInterval,"retry.maximumInterval"),minimumInterval:(0,s.toRpcDuration)(t.retry.minimumInterval,"retry.minimumInterval")})),{name:e,bindings:n,retryOptions:u}}},8360:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcDuration=void 0;const r=n(725),o=n(9168);t.toRpcDuration=function(e,t){if((0,o.isDefined)(e)){try{let t;if("object"==typeof e){const n=(e.minutes||0)+60*(e.hours||0),r=(e.seconds||0)+60*n;t=(e.milliseconds||0)+1e3*r}else"number"==typeof e&&(t=e);if((0,o.isDefined)(t)&&t>=0)return{seconds:Math.round(t/1e3)}}catch(e){}throw new r.AzFuncSystemError(`A 'number' or 'Duration' object was expected instead of a '${typeof e}'. Cannot parse value of '${t}'.`)}}},5064:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcHttp=void 0;const o=n(725),i=n(2337),s=n(8950),a=n(337),c=n(7866),u=n(4454);t.toRpcHttp=function(e,t){return r(this,void 0,void 0,(function*(){if(null==t)return t;if("object"!=typeof t)throw new o.AzFuncSystemError('The HTTP response must be an object with optional properties "body", "status", "headers", and "cookies".');const n=t instanceof s.HttpResponse?t:new s.HttpResponse(t);if(a.enableHttpStream)return void(yield(0,i.sendProxyResponse)(e,n));const r={};r.statusCode=n.status.toString(),r.headers={};for(const[e,t]of n.headers.entries())r.headers[e]=t;r.cookies=[];for(const e of n.cookies)r.cookies.push((0,c.toRpcHttpCookie)(e));r.enableContentNegotiation=n.enableContentNegotiation;const l=yield n.arrayBuffer();return r.body=(0,u.toRpcTypedData)(l),{http:r}}))}},7866:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcHttpCookie=void 0;const r=n(1705);t.toRpcHttpCookie=function(e){let t="none";if(e&&e.sameSite){const n=e.sameSite.toLocaleLowerCase();"lax"===n?t="lax":"strict"===n?t="strict":"none"===n&&(t="explicitNone")}return{name:e&&(0,r.toRpcString)(e.name,"cookie.name"),value:e&&(0,r.toRpcString)(e.value,"cookie.value"),domain:(0,r.toNullableString)(e&&e.domain,"cookie.domain"),path:(0,r.toNullableString)(e&&e.path,"cookie.path"),expires:(0,r.toNullableTimestamp)(e&&e.expires,"cookie.expires"),secure:(0,r.toNullableBool)(e&&e.secure,"cookie.secure"),httpOnly:(0,r.toNullableBool)(e&&e.httpOnly,"cookie.httpOnly"),sameSite:t,maxAge:(0,r.toNullableDouble)(e&&e.maxAge,"cookie.maxAge")}}},1705:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toNullableTimestamp=t.toNullableString=t.toRpcString=t.toNullableDouble=t.toNullableBool=void 0;const r=n(725),o=n(9168);t.toNullableBool=function(e,t){if("boolean"==typeof e)return{value:e};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'boolean' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toNullableDouble=function(e,t){if("number"==typeof e)return{value:e};if("string"==typeof e&&!isNaN(Number(e)))return{value:parseFloat(e)};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'number' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toRpcString=function(e,t){if("string"==typeof e)return e;if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'string' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`);return""},t.toNullableString=function(e,t){if("string"==typeof e)return{value:e};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'string' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toNullableTimestamp=function(e,t){if((0,o.isDefined)(e))try{const t="number"==typeof e?e:e.getTime();if(t&&t>=0)return{value:{seconds:Math.round(t/1e3)}}}catch(n){throw new r.AzFuncSystemError(`A 'number' or 'Date' input was expected instead of a '${typeof e}'. Cannot parse value of '${t}'.`)}}},4454:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcTypedData=void 0,t.toRpcTypedData=function(e){return null==e?e:"string"==typeof e?{string:e}:Buffer.isBuffer(e)?{bytes:e}:ArrayBuffer.isView(e)?{bytes:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}:e instanceof ArrayBuffer?{bytes:new Uint8Array(e)}:"number"==typeof e?Number.isInteger(e)?{int:e}:{double:e}:{json:JSON.stringify(e)}}},725:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isError=t.trySetErrorMessage=t.ensureErrorType=t.ReadOnlyError=t.AzFuncRangeError=t.AzFuncTypeError=t.AzFuncSystemError=void 0;class n extends Error{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncSystemError=n;class r extends TypeError{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncTypeError=r;class o extends RangeError{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncRangeError=o,t.ReadOnlyError=class extends r{constructor(e){super(`Cannot assign to read only property '${e}'`)}},t.ensureErrorType=function(e){if(e instanceof Error)return e;{let t;return t=null==e?"Unknown error":"string"==typeof e?e:"object"==typeof e?JSON.stringify(e):String(e),new Error(t)}},t.trySetErrorMessage=function(e,t){try{e.message=t}catch(e){}},t.isError=function(e){return null!=e}},7531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppStartContext=void 0;const r=n(5789);class o extends r.HookContext{}t.AppStartContext=o},4586:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppTerminateContext=void 0;const r=n(5789);class o extends r.HookContext{}t.AppTerminateContext=o},5789:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.HookContext=void 0;const s=n(725),a=n(9168);t.HookContext=class{constructor(e){var t,n;r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(n=i(this,r,"f")).hookData)&&void 0!==t||(n.hookData={})}get hookData(){return(0,a.nonNullProp)(i(this,r,"f"),"hookData")}set hookData(e){throw new s.ReadOnlyError("hookData")}},r=new WeakMap},9463:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationHookContext=void 0;const s=n(725),a=n(8157),c=n(9168),u=n(5789);class l extends u.HookContext{constructor(e){var t,n,s,c;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(s=i(this,r,"f")).inputs)&&void 0!==t||(s.inputs=[]),null!==(n=(c=i(this,r,"f")).invocationContext)&&void 0!==n||(c.invocationContext=new a.InvocationContext)}get invocationContext(){return(0,c.nonNullProp)(i(this,r,"f"),"invocationContext")}set invocationContext(e){throw new s.ReadOnlyError("invocationContext")}get inputs(){return(0,c.nonNullProp)(i(this,r,"f"),"inputs")}set inputs(e){i(this,r,"f").inputs=e}}t.InvocationHookContext=l,r=new WeakMap},5407:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.LogHookContext=void 0;const s=n(725),a=n(9168),c=n(5789);class u extends c.HookContext{constructor(e){var t,n,s,a,c,u;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(a=i(this,r,"f")).level)&&void 0!==t||(a.level="information"),null!==(n=(c=i(this,r,"f")).message)&&void 0!==n||(c.message="unknown"),null!==(s=(u=i(this,r,"f")).category)&&void 0!==s||(u.category="user")}get level(){return(0,a.nonNullProp)(i(this,r,"f"),"level")}set level(e){i(this,r,"f").level=e}get message(){return(0,a.nonNullProp)(i(this,r,"f"),"message")}set message(e){i(this,r,"f").message=e}get category(){return(0,a.nonNullProp)(i(this,r,"f"),"category")}set category(e){throw new s.ReadOnlyError("category")}get invocationContext(){return i(this,r,"f").invocationContext}set invocationContext(e){throw new s.ReadOnlyError("invocationContext")}}t.LogHookContext=u,r=new WeakMap},7508:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.PostInvocationContext=void 0;const s=n(9463);class a extends s.InvocationHookContext{constructor(e){super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f")}get result(){return i(this,r,"f").result}set result(e){i(this,r,"f").result=e}get error(){return i(this,r,"f").error}set error(e){i(this,r,"f").error=e}}t.PostInvocationContext=a,r=new WeakMap},8561:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.PreInvocationContext=void 0;const s=n(9168),a=n(9463);class c extends a.InvocationHookContext{constructor(e){var t,n;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(n=i(this,r,"f")).functionCallback)&&void 0!==t||(n.functionCallback=()=>{})}get functionHandler(){return(0,s.nonNullProp)(i(this,r,"f"),"functionCallback")}set functionHandler(e){i(this,r,"f").functionCallback=e}}t.PreInvocationContext=c,r=new WeakMap},6765:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.log=t.postInvocation=t.preInvocation=t.appTerminate=t.appStart=void 0;const r=n(725),o=n(1898),i=n(3476),s=n(7531),a=n(4586),c=n(5407),u=n(7508),l=n(8561);function f(e,t){const n=(0,i.tryGetCoreApiLazy)();return n?n.registerHook(e,t):(console.warn(`WARNING: Skipping call to register ${e} hook because the "@azure/functions" package is in test mode.`),new o.Disposable((()=>{console.warn(`WARNING: Skipping call to dispose ${e} hook because the "@azure/functions" package is in test mode.`)})))}t.appStart=function(e){return f("appStart",(t=>e(new s.AppStartContext(t))))},t.appTerminate=function(e){return f("appTerminate",(t=>e(new a.AppTerminateContext(t))))},t.preInvocation=function(e){return f("preInvocation",(t=>e(new l.PreInvocationContext(t))))},t.postInvocation=function(e){return f("postInvocation",(t=>e(new u.PostInvocationContext(t))))},t.log=function(e){try{return f("log",(t=>e(new c.LogHookContext(t))))}catch(e){const t=(0,r.ensureErrorType)(e);throw"RangeError"===t.name&&t.isAzureFunctionsSystemError?new r.AzFuncSystemError("Log hooks require Azure Functions Host v4.34 or higher."):e}}},7992:function(e,t,n){var r,o,i,s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},a=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},c=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},u=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createStreamRequest=t.HttpRequest=void 0;const l=n(3978),f=n(9551),p=n(5138),d=n(679),h=n(725),v=n(9168),y=n(8529);class g{constructor(e){var t,n,s;r.set(this,void 0),o.set(this,void 0),i.set(this,void 0),a(this,i,e,"f");let u=e.undiciRequest;if(!u){const r=(0,v.nonNullProp)(e,"url");let o;(null===(t=e.body)||void 0===t?void 0:t.bytes)?o=Buffer.from(null===(n=e.body)||void 0===n?void 0:n.bytes):(null===(s=e.body)||void 0===s?void 0:s.string)&&(o=e.body.string),u=new l.Request(r,{body:o,method:(0,v.nonNullProp)(e,"method"),headers:(0,p.fromNullableMapping)(e.nullableHeaders,e.headers)})}a(this,o,u,"f"),e.nullableQuery||e.query?this.query=new f.URLSearchParams((0,p.fromNullableMapping)(e.nullableQuery,e.query)):this.query=new URL(c(this,o,"f").url).searchParams,this.params=(0,p.fromNullableMapping)(e.nullableParams,e.params)}get url(){return c(this,o,"f").url}get method(){return c(this,o,"f").method}get headers(){return c(this,o,"f").headers}get user(){return void 0===c(this,r,"f")&&a(this,r,(0,y.extractHttpUserFromHeaders)(this.headers),"f"),c(this,r,"f")}get body(){return c(this,o,"f").body}get bodyUsed(){return c(this,o,"f").bodyUsed}arrayBuffer(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").arrayBuffer()}))}blob(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").blob()}))}formData(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").formData()}))}json(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").json()}))}text(){return s(this,void 0,void 0,(function*(){return c(this,o,"f").text()}))}clone(){const e=structuredClone(c(this,i,"f"));return e.undiciRequest=c(this,o,"f").clone(),new g(e)}}t.HttpRequest=g,r=new WeakMap,o=new WeakMap,i=new WeakMap,t.createStreamRequest=function(e,t){var n;const r="x-forwarded-host",o="x-forwarded-proto",i=e.headers[r],s=e.headers[o];if("string"!=typeof i||"string"!=typeof s)throw new h.AzFuncSystemError(`Expected headers "${r}" and "${o}" to be set.`);const a=`${s}://${i}${(0,v.nonNullProp)(e,"url")}`;let c;const f=null===(n=e.method)||void 0===n?void 0:n.toLowerCase();"get"!==f&&"head"!==f&&(c=e);const{Query:p,Headers:y}=t,m=u(t,["Query","Headers"]);let b;const w=(0,d.fromRpcTypedData)(y);"object"==typeof w&&(0,v.isDefined)(w)&&(b=w);const x=new l.Request(a,{body:c,duplex:"half",method:(0,v.nonNullProp)(e,"method"),headers:b}),P={};for(const[e,t]of Object.entries(m))(0,v.isDefined)(t.string)&&(P[e]=t.string);return new g({undiciRequest:x,params:P})}},8950:function(e,t,n){var r,o,i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpResponse=void 0;const c=n(3978),u=n(9168);class l{constructor(e){var t;if(r.set(this,void 0),o.set(this,void 0),null!=e||(e={}),s(this,o,e,"f"),e.undiciResponse)s(this,r,e.undiciResponse,"f");else{const t={status:e.status,headers:e.headers};(0,u.isDefined)(e.jsonBody)?s(this,r,c.Response.json(e.jsonBody,t),"f"):s(this,r,new c.Response(e.body,t),"f")}this.cookies=null!==(t=e.cookies)&&void 0!==t?t:[],this.enableContentNegotiation=!!e.enableContentNegotiation}get status(){return a(this,r,"f").status}get headers(){return a(this,r,"f").headers}get body(){return a(this,r,"f").body}get bodyUsed(){return a(this,r,"f").bodyUsed}arrayBuffer(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").arrayBuffer()}))}blob(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").blob()}))}formData(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").formData()}))}json(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").json()}))}text(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").text()}))}clone(){const e=structuredClone(a(this,o,"f"));return e.undiciResponse=a(this,r,"f").clone(),new l(e)}}t.HttpResponse=l,r=new WeakMap,o=new WeakMap},8529:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extractHttpUserFromHeaders=void 0;const r=n(9168);t.extractHttpUserFromHeaders=function(e){let t=null;const n=e.get("x-ms-client-principal");if(n){const o=JSON.parse(Buffer.from(n,"base64").toString("utf-8"));t=o.identityProvider?{type:"StaticWebApps",id:o.userId,username:o.userDetails,identityProvider:o.identityProvider,claimsPrincipalData:o}:{type:"AppService",id:(0,r.nonNullValue)(e.get("x-ms-client-principal-id"),"user-id"),username:(0,r.nonNullValue)(e.get("x-ms-client-principal-name"),"user-name"),identityProvider:(0,r.nonNullValue)(e.get("x-ms-client-principal-idp"),"user-idp"),claimsPrincipalData:o}}return t}},2337:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupHttpProxy=t.sendProxyResponse=t.waitForProxyRequest=void 0;const i=n(5096),s=n(4735),a=n(1630),c=n(725),u=n(9168),l=n(4893),f={},p={},d=new s.EventEmitter;t.waitForProxyRequest=function(e){return r(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{const r=f[e];r?(t(r),delete f[e]):d.once(e,(()=>{const n=f[e];n&&(t(n),delete f[e])}))}))}))};const h="x-ms-invocation-id";t.sendProxyResponse=function(e,t){var n,s;return r(this,void 0,void 0,(function*(){const r=(0,u.nonNullProp)(p,e);delete p[e];for(const[e,n]of t.headers.entries())r.setHeader(e,n);if(r.setHeader(h,e),r.statusCode=t.status,t.cookies.length>0&&function(e,t){const n=e.cookies.map((e=>{let t;switch(e.sameSite){case"Lax":t="lax";break;case"None":t="none";break;case"Strict":t="strict";break;default:t=e.sameSite}return(0,i.serialize)(e.name,e.value,{domain:e.domain,path:e.path,expires:"number"==typeof e.expires?new Date(e.expires):e.expires,secure:e.secure,httpOnly:e.httpOnly,sameSite:t,maxAge:e.maxAge})}));t.setHeader("Set-Cookie",n)}(t,r),t.body)try{for(var a,c=o(t.body.values());!(a=yield c.next()).done;){const e=a.value;r.write(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(s=c.return)&&(yield s.call(c))}finally{if(n)throw n.error}}r.end()}))},t.setupHttpProxy=function(){return r(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const n=a.createServer();n.on("request",((e,t)=>{const n=e.headers[h];"string"==typeof n?(f[n]=e,p[n]=t,d.emit(n)):(0,l.workerSystemLog)("error",`Http proxy request missing header ${h}`)})),n.on("error",(e=>{e=(0,c.ensureErrorType)(e),(0,l.workerSystemLog)("error",`Http proxy error: ${e.stack||e.message}`)})),n.listen((()=>{const r=n.address();null!==r&&"object"==typeof r?e(`http://localhost:${r.port}/`):t(new c.AzFuncSystemError("Unexpected server address during http proxy setup"))})),n.on("close",(()=>{(0,l.workerSystemLog)("information","Http proxy closing")}))}))}))}},8156:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SqlChangeOperation=t.Disposable=t.trigger=t.output=t.InvocationContext=t.input=t.HttpResponse=t.HttpRequest=t.PreInvocationContext=t.PostInvocationContext=t.LogHookContext=t.InvocationHookContext=t.HookContext=t.AppTerminateContext=t.AppStartContext=t.app=void 0,t.app=n(1859);var r=n(7531);Object.defineProperty(t,"AppStartContext",{enumerable:!0,get:function(){return r.AppStartContext}});var o=n(4586);Object.defineProperty(t,"AppTerminateContext",{enumerable:!0,get:function(){return o.AppTerminateContext}});var i=n(5789);Object.defineProperty(t,"HookContext",{enumerable:!0,get:function(){return i.HookContext}});var s=n(9463);Object.defineProperty(t,"InvocationHookContext",{enumerable:!0,get:function(){return s.InvocationHookContext}});var a=n(5407);Object.defineProperty(t,"LogHookContext",{enumerable:!0,get:function(){return a.LogHookContext}});var c=n(7508);Object.defineProperty(t,"PostInvocationContext",{enumerable:!0,get:function(){return c.PostInvocationContext}});var u=n(8561);Object.defineProperty(t,"PreInvocationContext",{enumerable:!0,get:function(){return u.PreInvocationContext}});var l=n(7992);Object.defineProperty(t,"HttpRequest",{enumerable:!0,get:function(){return l.HttpRequest}});var f=n(8950);Object.defineProperty(t,"HttpResponse",{enumerable:!0,get:function(){return f.HttpResponse}}),t.input=n(4788);var p=n(8157);Object.defineProperty(t,"InvocationContext",{enumerable:!0,get:function(){return p.InvocationContext}}),t.output=n(811),t.trigger=n(2888);var d,h=n(1898);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return h.Disposable}}),(d=t.SqlChangeOperation||(t.SqlChangeOperation={}))[d.Insert=0]="Insert",d[d.Update=1]="Update",d[d.Delete=2]="Delete"},4788:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.cosmosDB=t.table=t.storageBlob=void 0;const r=n(6693);function o(e){return(0,r.addBindingName)(e,"Input")}t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blob"}))},t.table=function(e){return o(Object.assign(Object.assign({},e),{type:"table"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDB"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sql"}))},t.generic=function(e){return o(e)}},811:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.table=t.storageBlob=t.http=void 0;const r=n(6693);function o(e){return(0,r.addBindingName)(e,"Output")}t.http=function(e){return o(Object.assign(Object.assign({},e),{type:"http"}))},t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blob"}))},t.table=function(e){return o(Object.assign(Object.assign({},e),{type:"table"}))},t.storageQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"queue"}))},t.serviceBusQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBus"}))},t.serviceBusTopic=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBus"}))},t.eventHub=function(e){return o(Object.assign(Object.assign({},e),{type:"eventHub"}))},t.eventGrid=function(e){return o(Object.assign(Object.assign({},e),{type:"eventGrid"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDB"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sql"}))},t.generic=function(e){return o(e)}},337:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.capabilities=t.enableHttpStream=t.lockSetup=void 0;const r=n(725),o=n(9168),i=n(3476),s=n(4893);let a=!1;t.lockSetup=function(){a=!0},t.enableHttpStream=!1,t.capabilities={},t.setup=function(e){if(a)throw new r.AzFuncSystemError("Setup options can't be changed after app startup has finished.");if(e.enableHttpStream){const e=(0,i.tryGetCoreApiLazy)();if(e&&!e.log)throw new r.AzFuncSystemError("HTTP streaming requires Azure Functions Host v4.28 or higher.")}if((0,o.isDefined)(e.enableHttpStream)&&(t.enableHttpStream=e.enableHttpStream),e.capabilities)for(let[n,r]of Object.entries(e.capabilities))(0,o.isDefined)(r)&&(r=String(r),(0,s.workerSystemLog)("debug",`Capability ${n} set to ${r}.`),t.capabilities[n]=r);t.enableHttpStream&&(0,s.workerSystemLog)("debug","HTTP streaming enabled.")}},2888:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.warmup=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.storageBlob=t.timer=t.http=void 0;const r=n(6693);function o(e){return(0,r.addBindingName)(e,"Trigger")}t.http=function(e){return o(Object.assign(Object.assign({},e),{authLevel:e.authLevel||"anonymous",methods:e.methods||["GET","POST"],type:"httpTrigger"}))},t.timer=function(e){return o(Object.assign(Object.assign({},e),{type:"timerTrigger"}))},t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blobTrigger"}))},t.storageQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"queueTrigger"}))},t.serviceBusQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBusTrigger"}))},t.serviceBusTopic=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBusTrigger"}))},t.eventHub=function(e){return o(Object.assign(Object.assign({},e),{type:"eventHubTrigger"}))},t.eventGrid=function(e){return o(Object.assign(Object.assign({},e),{type:"eventGridTrigger"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDBTrigger"}))},t.warmup=function(e){return o(Object.assign(Object.assign({},e),{type:"warmupTrigger"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sqlTrigger"}))},t.generic=function(e){return o(e)}},1898:function(e,t){var n,r=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;class i{constructor(e){n.set(this,void 0),r(this,n,e,"f")}static from(...e){let t=e;return new i((function(){if(t){for(const e of t)e&&"function"==typeof e.dispose&&e.dispose();t=void 0}}))}dispose(){"function"==typeof o(this,n,"f")&&(o(this,n,"f").call(this),r(this,n,void 0,"f"))}}t.Disposable=i,n=new WeakMap},5396:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fallbackLogHandler=void 0,t.fallbackLogHandler=function(e,...t){switch(e){case"trace":console.trace(...t);break;case"debug":console.debug(...t);break;case"information":console.info(...t);break;case"warning":console.warn(...t);break;case"critical":case"error":console.error(...t);break;default:console.log(...t)}}},4169:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getStringHash=t.getRandomHexString=void 0;const r=n(5511);t.getRandomHexString=function(e=10){return r.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)},t.getStringHash=function(e,t=10){return r.createHash("sha256").update(e).digest("hex").slice(0,t)}},9898:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTimerTrigger=t.isHttpTrigger=t.isTrigger=void 0,t.isTrigger=function(e){return!!e&&/trigger$/i.test(e)},t.isHttpTrigger=function(e){return"httptrigger"===(null==e?void 0:e.toLowerCase())},t.isTimerTrigger=function(e){return"timertrigger"===(null==e?void 0:e.toLowerCase())}},9168:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.copyPropIfDefined=t.nonNullValue=t.nonNullProp=void 0;const r=n(725);function o(e,t){if(null==e)throw new r.AzFuncSystemError("Internal error: Expected value to be neither null nor undefined"+(t?`: ${t}`:""));return e}t.nonNullProp=function(e,t){return o(e[t],t)},t.nonNullValue=o,t.copyPropIfDefined=function(e,t,n){null!==e[n]&&void 0!==e[n]&&(t[n]=e[n])},t.isDefined=function(e){return null!=e}},3476:(e,t,n)=>{let r;Object.defineProperty(t,"__esModule",{value:!0}),t.tryGetCoreApiLazy=void 0,t.tryGetCoreApiLazy=function(){if(void 0===r)try{r=n(8789)}catch(e){r=null}return r}},4893:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.workerSystemLog=void 0;const r=n(8354),o=n(5396),i=n(3476);t.workerSystemLog=function(e,...t){const n=(0,i.tryGetCoreApiLazy)();n&&n.log?n.log(e,"system",(0,r.format)(...t)):(0,o.fallbackLogHandler)(e,...t)}},8789:e=>{e.exports=require("@azure/functions-core")},5096:e=>{e.exports=require("cookie")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},1630:e=>{e.exports=require("http")},3978:e=>{e.exports=require("undici")},9551:e=>{e.exports=require("url")},8354:e=>{e.exports=require("util")}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(8156);module.exports=n})();
//# sourceMappingURL=azure-functions.min.js.map
{
"name": "@azure/functions",
"version": "4.5.0",
"version": "4.5.1",
"description": "Microsoft Azure Functions NodeJS Framework",

@@ -28,4 +28,3 @@ "keywords": [

"LICENSE",
"README.md",
"_manifest"
"README.md"
],

@@ -32,0 +31,0 @@ "engines": {

@@ -5,7 +5,5 @@ # Azure Functions Node.js Programming Model

|---|---|---|---|
|v4.x (default)|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/Azure%2520Functions/145/v4.x)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=145&branchName=v4.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/Azure%2520Functions/146/v4.x?compact_message)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=146&branchName=v4.x)|GA|20, 18|
|v3.x|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/Azure%2520Functions/145/v3.x)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=145&branchName=v3.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/Azure%2520Functions/146/v3.x?compact_message)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=146&branchName=v3.x)|GA|20, 18, 16, 14|
|v4.x (default)|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/514/v4.x)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v4.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/public/514/v4.x?compact_message)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v4.x)|GA|20, 18|
|v3.x|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/public/514/v3.x)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v3.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/public/514/v3.x?compact_message)](https://azfunc.visualstudio.com/public/_build/latest?definitionId=514&branchName=v3.x)|GA|20, 18|
> _**Version 4 is Generally Available! 🎉✨ Read our [blog post](https://aka.ms/AzFuncNodeV4) and let us know what you think by reacting or commenting on our [GA discussion thread](https://aka.ms/AzFuncNodeV4Discussion)**_
## Install

@@ -12,0 +10,0 @@

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.
export const version = '4.5.0';
export const version = '4.5.1';
export const returnBindingKey = '$return';

@@ -12,2 +12,9 @@ // Copyright (c) .NET Foundation. All rights reserved.

export interface ValidatedError extends Error, Partial<AzFuncError> {
/**
* Use `trySetErrorMessage` to set the error message
*/
readonly message: string;
}
export class AzFuncSystemError extends Error {

@@ -31,18 +38,4 @@ isAzureFunctionsSystemError = true;

export function ensureErrorType(err: unknown): Error & Partial<AzFuncError> {
export function ensureErrorType(err: unknown): ValidatedError {
if (err instanceof Error) {
const writable = Object.getOwnPropertyDescriptor(err, 'message')?.writable;
if (!writable) {
// The motivation for this branch can be found in the below issue:
// https://github.com/Azure/azure-functions-nodejs-library/issues/205
let readableMessage = err.message;
Object.defineProperty(err, 'message', {
get() {
return readableMessage;
},
set(val: string) {
readableMessage = val;
},
});
}
return err;

@@ -64,2 +57,10 @@ } else {

export function trySetErrorMessage(err: Error, message: string): void {
try {
err.message = message;
} catch {
// If we can't set the message, we'll keep the error as is
}
}
/**

@@ -66,0 +67,0 @@ * This is mostly for callbacks where `null` or `undefined` indicates there is no error

@@ -156,5 +156,4 @@ // Copyright (c) .NET Foundation. All rights reserved.

for (const [key, rpcValue] of Object.entries(rpcParams)) {
const value = fromRpcTypedData(rpcValue);
if (typeof value === 'string') {
params[key] = value;
if (isDefined(rpcValue.string)) {
params[key] = rpcValue.string;
}

@@ -161,0 +160,0 @@ }

@@ -9,2 +9,3 @@ // Copyright (c) .NET Foundation. All rights reserved.

export { InvocationHookContext } from './hooks/InvocationHookContext';
export { LogHookContext } from './hooks/LogHookContext';
export { PostInvocationContext } from './hooks/PostInvocationContext';

@@ -11,0 +12,0 @@ export { PreInvocationContext } from './hooks/PreInvocationContext';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc