1 | (()=>{"use strict";var e={313:function(e,t){var n,r,o,i=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},s=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,t.InvocationContext=class{constructor(e){var t,r,o,s;n.set(this,void 0),e=e||{};const l="unknown";this.invocationId=e.invocationId||l,this.functionName=e.functionName||l,this.extraInputs=new a,this.extraOutputs=new u,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:l,type:l},return:null===(r=e.options)||void 0===r?void 0:r.return,extraInputs:(null===(o=e.options)||void 0===o?void 0:o.extraInputs)||[],extraOutputs:(null===(s=e.options)||void 0===s?void 0:s.extraOutputs)||[]},i(this,n,e.logHandler||c,"f")}log(...e){s(this,n,"f").call(this,"information",...e)}trace(...e){s(this,n,"f").call(this,"trace",...e)}debug(...e){s(this,n,"f").call(this,"debug",...e)}info(...e){s(this,n,"f").call(this,"information",...e)}warn(...e){s(this,n,"f").call(this,"warning",...e)}error(...e){s(this,n,"f").call(this,"error",...e)}},n=new WeakMap;class a{constructor(){r.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return s(this,r,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;s(this,r,"f")[n]=t}}r=new WeakMap;class u{constructor(){o.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return s(this,o,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;s(this,o,"f")[n]=t}}function c(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)}}o=new WeakMap},62:function(e,t,n){var r,o,i,s,a,u,c,l,f,p,d=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((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(764),g=n(601),b=n(168),m=n(130),w=n(243),x=n(408),j=n(788),P=n(186),O=n(828),C=n(313),T=n(674),_=n(557);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),u.set(this,void 0),h(this,i,e,"f"),h(this,s,(0,_.nonNullProp)(e.metadata,"name"),"f"),h(this,a,(0,_.nonNullProp)(e.metadata,"bindings"),"f");const t=(0,_.nonNullValue)(Object.values(v(this,a,"f")).find((e=>(0,T.isTrigger)(e.type))),"triggerBinding");h(this,u,(0,_.nonNullProp)(t,"type"),"f")}getArguments(){return d(this,void 0,void 0,(function*(){const e=v(this,i,"f").request,t=new C.InvocationContext({invocationId:(0,_.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,m.fromRpcRetryContext)(e.retryContext),traceContext:(0,m.fromRpcTraceContext)(e.traceContext),triggerMetadata:(0,w.fromRpcTriggerMetadata)(e.triggerMetadata,v(this,u,"f")),options:(0,b.fromRpcBindings)(v(this,a,"f"))}),n=[];if(e.inputData)for(const r of e.inputData){const e=(0,_.nonNullProp)(r,"name");let o=(0,x.fromRpcTypedData)(r.data);const i=v(this,a,"f")[e].type;(0,T.isTimerTrigger)(i)&&(o=(0,j.toCamelCaseValue)(o)),(0,T.isTrigger)(i)?n.push(o):t.extraInputs.set(e,o)}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",c).call(this,s,t),o=!0;else{const t=yield v(this,r,"m",c).call(this,s,e.extraOutputs.get(i));(0,_.isDefined)(t)&&n.outputData.push({name:i,data:t})}return o||(0,T.isHttpTrigger)(v(this,u,"f"))||(n.returnValue=(0,O.toRpcTypedData)(t)),n}))}},o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,u=new WeakMap,r=new WeakSet,c=function(e,t){var n;return d(this,void 0,void 0,(function*(){return"http"===(null===(n=e.type)||void 0===n?void 0:n.toLowerCase())?(0,P.toRpcHttp)(t):(0,O.toRpcTypedData)(t)}))},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)}},109:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addBindingName=t.InvocationContext=t.HttpResponse=t.HttpRequest=void 0;var r=n(726);Object.defineProperty(t,"HttpRequest",{enumerable:!0,get:function(){return r.HttpRequest}});var o=n(681);Object.defineProperty(t,"HttpResponse",{enumerable:!0,get:function(){return o.HttpResponse}});var i=n(313);Object.defineProperty(t,"InvocationContext",{enumerable:!0,get:function(){return i.InvocationContext}});const s={};t.addBindingName=function(e,t){if(!e.name){let n=e.type;n.toLowerCase().endsWith(t.toLowerCase())||(n+=t);let r=s[n]||0;r+=1,s[n]=r,e.name=n+r.toString()}return e}},752: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.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.hook=void 0;const o=n(601),i=n(133),s=n(62),a=n(854),u=n(892),c=n(674),l=n(736);t.hook=n(689);class f{constructor(){this.name="@azure/functions",this.version=o.version}getInvocationModel(e){return new s.InvocationModel(e)}}let p=!1;function d(e,t){const n="function"==typeof e?{handler:e}:e;return n.methods=[t],n}function h(e,t){const{handler:n,return:o,trigger:i,extraInputs:s,extraOutputs:a}=e,u=r(e,["handler","return","trigger","extraInputs","extraOutputs"]);return{trigger:null!=i?i:t(u),return:o,extraInputs:s,extraOutputs:a,handler:n}}function v(e,t){t.return||(t.return=a.http({})),y(e,h(t,u.http))}function y(e,t){p||function(){const e=(0,l.tryGetCoreApiLazy)();e?e.setProgrammingModel(new f):console.warn('WARNING: Failed to detect the Azure Functions runtime. Switching "@azure/functions" package to test mode - not all features are supported.'),p=!0}();const n={},r=t.trigger;if(n[r.name]=Object.assign(Object.assign({},r),{direction:"in",type:(0,c.isTrigger)(r.type)?r.type:r.type+"Trigger"}),t.extraInputs)for(const e of t.extraInputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"in"});if(t.return&&(n[o.returnBindingKey]=Object.assign(Object.assign({},t.return),{direction:"out"})),t.extraOutputs)for(const e of t.extraOutputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"out"});let s;t.retry&&(s=Object.assign(Object.assign({},t.retry),{retryStrategy:t.retry.strategy,delayInterval:(0,i.toRpcDuration)(t.retry.delayInterval,"retry.delayInterval"),maximumInterval:(0,i.toRpcDuration)(t.retry.maximumInterval,"retry.maximumInterval"),minimumInterval:(0,i.toRpcDuration)(t.retry.minimumInterval,"retry.minimumInterval")}));const a=(0,l.tryGetCoreApiLazy)();a?a.registerFunction({name:e,bindings:n,retryOptions:s},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){v(e,d(t,"GET"))},t.put=function(e,t){v(e,d(t,"PUT"))},t.post=function(e,t){v(e,d(t,"POST"))},t.patch=function(e,t){v(e,d(t,"PATCH"))},t.deleteRequest=function(e,t){v(e,d(t,"DELETE"))},t.http=v,t.timer=function(e,t){y(e,h(t,u.timer))},t.storageBlob=function(e,t){y(e,h(t,u.storageBlob))},t.storageQueue=function(e,t){y(e,h(t,u.storageQueue))},t.serviceBusQueue=function(e,t){y(e,h(t,u.serviceBusQueue))},t.serviceBusTopic=function(e,t){y(e,h(t,u.serviceBusTopic))},t.eventHub=function(e,t){y(e,h(t,u.eventHub))},t.eventGrid=function(e,t){y(e,h(t,u.eventGrid))},t.cosmosDB=function(e,t){y(e,h(t,u.cosmosDB))},t.warmup=function(e,t){y(e,h(t,u.warmup))},t.generic=y},601:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.returnBindingKey=t.version=void 0,t.version="4.1.0",t.returnBindingKey="$return"},168:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcBindings=void 0;const r=n(601),o=n(674),i=n(557);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=[],u=[];for(const[c,l]of Object.entries((0,i.nonNullValue)(e,"bindings")))(0,o.isTrigger)(l.type)?t=s(c,l):c===r.returnBindingKey?n=s(c,l):"in"===l.direction?a.push(s(c,l)):"out"===l.direction&&u.push(s(c,l));return{trigger:(0,i.nonNullValue)(t,"trigger"),return:n,extraInputs:a,extraOutputs:u}}},130:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTraceContext=t.fromRpcRetryContext=void 0;const r=n(557);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}}},691:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromNullableMapping=void 0,t.fromNullableMapping=function(e,t){let n={};if(e&&Object.keys(e).length>0)for(const t in e)n[t]=e[t].value||"";else t&&Object.keys(t).length>0&&(n=t);return n}},243:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTriggerMetadata=void 0;const r=n(674),o=n(408),i=n(788);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}}},408:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTypedData=void 0;const r=n(726),o=n(557);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}},788:(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},133:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcDuration=void 0;const r=n(758),o=n(557);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}'.`)}}},186: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{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcHttp=void 0;const o=n(758),i=n(681),s=n(518),a=n(828);t.toRpcHttp=function(e){return r(this,void 0,void 0,(function*(){if(null==e)return e;if("object"!=typeof e)throw new o.AzFuncSystemError('The HTTP response must be an object with optional properties "body", "status", "headers", and "cookies".');const t=e instanceof i.HttpResponse?e:new i.HttpResponse(e),n={};n.statusCode=t.status.toString(),n.headers={};for(const[e,r]of t.headers.entries())n.headers[e]=r;n.cookies=[];for(const e of t.cookies)n.cookies.push((0,s.toRpcHttpCookie)(e));n.enableContentNegotiation=t.enableContentNegotiation;const r=yield t.arrayBuffer();return n.body=(0,a.toRpcTypedData)(r),{http:n}}))}},518:(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(758),o=n(557);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}'.`)}}},828:(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)}}},758:(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){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.isError=function(e){return null!=e}},869:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppStartContext=void 0;const r=n(13);class o extends r.HookContext{}t.AppStartContext=o},229:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppTerminateContext=void 0;const r=n(13);class o extends r.HookContext{}t.AppTerminateContext=o},13: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(758),a=n(557);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},884: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(758),a=n(313),u=n(557),c=n(13);class l extends c.HookContext{constructor(e){var t,n,s,u;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=(u=i(this,r,"f")).invocationContext)&&void 0!==n||(u.invocationContext=new a.InvocationContext)}get invocationContext(){return(0,u.nonNullProp)(i(this,r,"f"),"invocationContext")}set invocationContext(e){throw new s.ReadOnlyError("invocationContext")}get inputs(){return(0,u.nonNullProp)(i(this,r,"f"),"inputs")}set inputs(e){i(this,r,"f").inputs=e}}t.InvocationHookContext=l,r=new WeakMap},390: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(884);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},225: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(557),a=n(884);class u 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=u,r=new WeakMap},689:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.postInvocation=t.preInvocation=t.appTerminate=t.appStart=void 0;const r=n(657),o=n(736),i=n(869),s=n(229),a=n(390),u=n(225);function c(e,t){const n=(0,o.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 r.Disposable((()=>{console.warn(`WARNING: Skipping call to dispose ${e} hook because the "@azure/functions" package is in test mode.`)})))}t.appStart=function(e){return c("appStart",(t=>e(new i.AppStartContext(t))))},t.appTerminate=function(e){return c("appTerminate",(t=>e(new s.AppTerminateContext(t))))},t.preInvocation=function(e){return c("preInvocation",(t=>e(new u.PreInvocationContext(t))))},t.postInvocation=function(e){return c("postInvocation",(t=>e(new a.PostInvocationContext(t))))}},726: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{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((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},u=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.HttpRequest=void 0;const c=n(122),l=n(360),f=n(691),p=n(557),d=n(21);t.HttpRequest=class{constructor(e){var t,n,s;r.set(this,void 0),o.set(this,void 0),i.set(this,void 0);const d=(0,p.nonNullProp)(e,"url");(null===(t=e.body)||void 0===t?void 0:t.bytes)?a(this,i,Buffer.from(null===(n=e.body)||void 0===n?void 0:n.bytes),"f"):(null===(s=e.body)||void 0===s?void 0:s.string)&&a(this,i,e.body.string,"f"),a(this,o,new c.Request(d,{body:u(this,i,"f"),method:(0,p.nonNullProp)(e,"method"),headers:(0,f.fromNullableMapping)(e.nullableHeaders,e.headers)}),"f"),this.query=new l.URLSearchParams((0,f.fromNullableMapping)(e.nullableQuery,e.query)),this.params=(0,f.fromNullableMapping)(e.nullableParams,e.params)}get url(){return u(this,o,"f").url}get method(){return u(this,o,"f").method}get headers(){return u(this,o,"f").headers}get user(){return void 0===u(this,r,"f")&&a(this,r,(0,d.extractHttpUserFromHeaders)(this.headers),"f"),u(this,r,"f")}get body(){return u(this,o,"f").body}get bodyUsed(){return u(this,o,"f").bodyUsed}arrayBuffer(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").arrayBuffer()}))}blob(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").blob()}))}formData(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").formData()}))}json(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").json()}))}text(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").text()}))}},r=new WeakMap,o=new WeakMap,i=new WeakMap},681:function(e,t,n){var r,o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=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},s=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 a=n(122),u=n(557);t.HttpResponse=class{constructor(e){r.set(this,void 0);const t={status:null==e?void 0:e.status,headers:null==e?void 0:e.headers};(0,u.isDefined)(null==e?void 0:e.jsonBody)?i(this,r,a.Response.json(null==e?void 0:e.jsonBody,t),"f"):i(this,r,new a.Response(null==e?void 0:e.body,t),"f"),this.cookies=(null==e?void 0:e.cookies)||[],this.enableContentNegotiation=!!(null==e?void 0:e.enableContentNegotiation)}get status(){return s(this,r,"f").status}get headers(){return s(this,r,"f").headers}get body(){return s(this,r,"f").body}get bodyUsed(){return s(this,r,"f").bodyUsed}arrayBuffer(){return o(this,void 0,void 0,(function*(){return s(this,r,"f").arrayBuffer()}))}blob(){return o(this,void 0,void 0,(function*(){return s(this,r,"f").blob()}))}formData(){return o(this,void 0,void 0,(function*(){return s(this,r,"f").formData()}))}json(){return o(this,void 0,void 0,(function*(){return s(this,r,"f").json()}))}text(){return o(this,void 0,void 0,(function*(){return s(this,r,"f").text()}))}},r=new WeakMap},21:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extractHttpUserFromHeaders=void 0;const r=n(557);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}},489:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.sql=t.cosmosDB=t.table=t.storageBlob=void 0;const r=n(109);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)}},854:(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(109);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)}},892:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=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(109);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.generic=function(e){return o(e)}},657: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},674:(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())}},557:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.copyPropIfDefined=t.nonNullValue=t.nonNullProp=void 0;const r=n(758);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}},736:(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(605)}catch(e){r=null}return r}},605:e=>{e.exports=require("@azure/functions-core")},122:e=>{e.exports=require("undici")},360:e=>{e.exports=require("url")},764:e=>{e.exports=require("util")}},t={};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}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=e.trigger=e.output=e.InvocationContext=e.input=e.HttpResponse=e.HttpRequest=e.PreInvocationContext=e.PostInvocationContext=e.InvocationHookContext=e.HookContext=e.AppTerminateContext=e.AppStartContext=e.app=void 0,e.app=n(752);var t=n(869);Object.defineProperty(e,"AppStartContext",{enumerable:!0,get:function(){return t.AppStartContext}});var o=n(229);Object.defineProperty(e,"AppTerminateContext",{enumerable:!0,get:function(){return o.AppTerminateContext}});var i=n(13);Object.defineProperty(e,"HookContext",{enumerable:!0,get:function(){return i.HookContext}});var s=n(884);Object.defineProperty(e,"InvocationHookContext",{enumerable:!0,get:function(){return s.InvocationHookContext}});var a=n(390);Object.defineProperty(e,"PostInvocationContext",{enumerable:!0,get:function(){return a.PostInvocationContext}});var u=n(225);Object.defineProperty(e,"PreInvocationContext",{enumerable:!0,get:function(){return u.PreInvocationContext}});var c=n(726);Object.defineProperty(e,"HttpRequest",{enumerable:!0,get:function(){return c.HttpRequest}});var l=n(681);Object.defineProperty(e,"HttpResponse",{enumerable:!0,get:function(){return l.HttpResponse}}),e.input=n(489);var f=n(313);Object.defineProperty(e,"InvocationContext",{enumerable:!0,get:function(){return f.InvocationContext}}),e.output=n(854),e.trigger=n(892);var p=n(657);Object.defineProperty(e,"Disposable",{enumerable:!0,get:function(){return p.Disposable}})})(),module.exports=r})();
|