postman-sandbox
Version:
Sandbox for Postman Scripts to run in Node.js or browser
1 lines • 2.32 MB
JavaScript
module.exports=c=>c(null,"if(\"undefined\"!=typeof process){const e=[\"binding\",\"_linkedBinding\",\"dlopen\",\"getBuiltinModule\",\"report\"];for(const t of e)delete process[t]}\"function\"==typeof require&&(globalThis._nodeRequires={buffer:require(\"buffer\")},require=null),require=function e(t,n,r){function a(o,s){if(!n[o]){if(!t[o]){var c=\"function\"==typeof require&&require;if(!s&&c)return c(o,!0);if(i)return i(o,!0);var u=new Error(\"Cannot find module '\"+o+\"'\");throw u.code=\"MODULE_NOT_FOUND\",u}var l=n[o]={exports:{}};t[o][0].call(l.exports,(function(e){return a(t[o][1][e]||e)}),l,l.exports,e,t,n,r)}return n[o].exports}for(var i=\"function\"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}({1:[function(e,t,n){var r=e(\"teleport-javascript\"),a=Array.prototype.slice,i=[\"log\",\"warn\",\"debug\",\"info\",\"error\",\"clear\"];function o(e,t){if(\"function\"==typeof t){const e=t.constructor&&t.constructor.name?t.constructor.name:\"Function\";return t.name?`[${e}: ${t.name}]`:`[${e}]`}return t instanceof WeakMap?\"[WeakMap]\":t instanceof WeakSet?\"[WeakSet]\":t instanceof ArrayBuffer?`[ArrayBuffer { byteLength: ${t.byteLength} }]`:t}t.exports=function PostmanConsole(e,t,n){const s=function(i){const s=a.call(arguments,1);n&&n[i].apply(n,s),e.dispatch(\"execution.console\",t,i,r.stringify(s,o))};i.forEach((t=>{this[t]=s.bind(e,t)}))}},{\"teleport-javascript\":561}],2:[function(e,t,n){const r=e(\"@postman/tough-cookie\").CookieJar,a=e(\"@postman/tough-cookie\").Cookie,i=e(\"postman-collection\").Cookie,o=e(\"postman-collection\").CookieList,s=e(\"postman-collection\").Url,c=\"function\",u=\"object\",l=\"string\",p=function(e){if(e)return a.fromJSON({key:e.name||e.key,value:e.value,expires:e.expires,maxAge:e.maxAge,domain:e.domain,path:e.path,secure:e.secure,httpOnly:e.httpOnly,hostOnly:e.hostOnly,extensions:e.extensions})},d=function(e){if(e)return new i({name:e.key,value:e.value,expires:\"Infinity\"===e.expires?null:e.expires,maxAge:e.maxAge,domain:e.domain,path:e.path,secure:e.secure,httpOnly:e.httpOnly,hostOnly:e.hostOnly,extensions:e.extensions})},h=function(e){return s.isUrl(e)?e:e&&typeof e===l?new s(e):null},f=function(e,t,n){if(typeof e===c)return t?e(t instanceof Error?t:new Error(t)):void e(null,n)},m=function(e,t,n){const r=()=>new Promise(((t,n)=>{e((function(e,r){if(e)return n(e instanceof Error?e:new Error(e));t(r)}))}));if(void 0===t)return r();if(typeof t!==c&&n)throw new TypeError(\"callback needs to be a function\");r().then((e=>{f(t,null,e)})).catch((e=>{f(t,e)}))},g=function(e,t,n,r){e.getCookies(t,(function(e,t){var a,i;if(e)return r(e);if(!t||!t.length)return r(null,null);for(a=0,i=t.length;a<i;a++)if(t[a].key===n)return r(null,t[a]);r(null,null)}))};t.exports=class PostmanCookieJar{constructor(e){this.store=e,this.jar=new r(e,{rejectPublicSuffixes:!1,looseMode:!0})}get(e,t,n){return m((n=>{if(!(e=h(e)))throw new TypeError(\"CookieJar.get() requires a valid url\");if(typeof t!==l)throw new TypeError(\"CookieJar.get() requires cookie name to be a string\");g(this.jar,e.toString(!0),t,(function(e,t){return e||!t?n(e,null):(t=d(t),n(null,t.valueOf()))}))}),n,!0)}getAll(e,t,n){return typeof t!==c||n||(n=t,t={}),void 0!==t||n||(t={}),m((n=>{if(!(e=h(e)))throw new TypeError(\"CookieJar.getAll() requires a valid url\");if(typeof t!==u)throw new TypeError(\"CookieJar.getAll() requires options to be an object\");t={http:!Object.hasOwn(t,\"http\")||Boolean(t.http),secure:Object.hasOwn(t,\"secure\")?Boolean(t.secure):void 0},this.jar.getCookies(e.toString(!0),t,(function(e,t){if(e)return n(e);n(null,new o(null,t&&t.map(d)))}))}),n,!0)}set(e,t,n,r){return typeof n!==c||r||(r=n,n=null),m((r=>{if(!(e=h(e)))throw new TypeError(\"CookieJar.set() requires a valid url\");var a;if(t&&n)a=p({name:t,value:n});else if(typeof t===u)a=p(t);else{if(typeof t!==l)throw new TypeError(\"CookieJar.set() requires a valid set cookie arguments\");a=t}this.jar.setCookie(a,e.toString(!0),(function(e,t){if(e)return r(e);r(null,d(t))}))}),r)}unset(e,t,n){return m((n=>{if(!(e=h(e)))throw new TypeError(\"CookieJar.unset() requires a valid url\");if(typeof t!==l)throw new TypeError(\"CookieJar.unset() requires cookie name to be a string\");var r=this.store;g(this.jar,e.toString(!0),t,(function(e,t){if(e||!t)return n(e);r.removeCookie(t.domain,t.path,t.key,(function(e){n(e)}))}))}),n)}clear(e,t){return m((t=>{if(!(e=h(e)))throw new TypeError(\"CookieJar.clear() requires a valid url\");var n=this.store;this.jar.getCookies(e.toString(!0),(function(e,r){if(e||!r)return t(e);!function(e,t,n){if(!n&&(n=function(){}),!Array.isArray(e)||!t)return n();var r=0,a=e.length,i=function(o){if(o||r>=a)return n(o);try{t.call(e,e[r++],i)}catch(s){return n(s)}};if(!a)return n();i()}(r,(function(e,t){n.removeCookie(e.domain,e.path,e.key,t)}),t)}))}),t)}}},{\"@postman/tough-cookie\":183,\"postman-collection\":\"postman-collection\"}],3:[function(e,t,n){const r=e(\"lodash\"),a=e(\"@postman/tough-cookie\").Store,i=e(\"@postman/tough-cookie\").Cookie,o=Array.prototype.slice;class PostmanCookieStore extends a{constructor(e,t,n){super(),this.id=e,this.emitter=t,this.timers=n}}PostmanCookieStore.prototype.synchronous=!1,[\"findCookie\",\"findCookies\",\"putCookie\",\"updateCookie\",\"removeCookie\",\"removeCookies\",\"removeAllCookies\",\"getAllCookies\"].forEach((function(e){PostmanCookieStore.prototype[e]=function(){const t=\"execution.cookies.\"+this.id;let n,s,c;n=o.call(arguments),n.length=r.get(a.prototype,[e,\"length\"],0),c=n.pop(),s=this.timers.setEvent((function(e,t){if(\"function\"!=typeof c)throw new TypeError(\"callback is not a function\");return e||!t?c(e):Array.isArray(t)?c(e,t.map((function(e){return i.fromJSON(e)}))):void c(e,i.fromJSON(t))})),this.timers.wrapped.setTimeout((()=>{this.emitter.dispatch(t,s,\"store\",e,n)}))}})),t.exports=PostmanCookieStore},{\"@postman/tough-cookie\":183,lodash:\"lodash\"}],4:[function(e,t,n){async function*r(e){for(const t of e)yield t}function a(e){const t=e&&Array.isArray(e.rows)?e.rows:[],n={columns:e&&e.columns||[],rows:r(t)};return e&&e.staleDatasources&&(n.staleDatasources=e.staleDatasources),n}t.exports={Datasets:class{constructor(e,t,n){this._bridge=t,this._timers=n,this._event=`execution.datasets.${e}`,this._handler=(e,...t)=>{this._timers.clearEvent(e,...t)},this._bridge.on(this._event,this._handler)}exec(...e){return new Promise(((t,n)=>{const r=this._timers.setEvent(((e,...r)=>{if(e)return n(e instanceof Error?e:new Error(e.message||e));t(...r)}));this._bridge.dispatch(this._event,r,...e)}))}dispose(){this._bridge.off(this._event,this._handler)}},getDatasetsInterface:e=>function(t){return{executeView:async(n,r)=>a(await e(\"executeView\",t,n,r)),executeQuery:async(n,r)=>a(await e(\"executeQuery\",t,n,r))}}}},{}],5:[function(e,t,n){const{isNonLegacySandbox:r}=e(\"./non-legacy-codemarkers\"),a=e(\"lodash\"),i=e(\"./postman-legacy-interface\");t.exports=function(t,n,o,s,c,u,l,p){if(!n||!a.isString(n))return c.terminate();t.reset(),r(n)||p.disableLegacyAPIs?i.teardown(t):i.setup(t,o,s),t.import({Buffer:e(\"buffer\").Buffer,File:e(\"buffer\").File,console:s,pm:u,setTimeout:c.setTimeout,setInterval:c.setInterval,setImmediate:c.setImmediate,clearTimeout:c.clearTimeout,clearInterval:c.clearInterval,clearImmediate:c.clearImmediate}),t.exec(n,{async:!0},(function(e){o.return.async=c.queueLength()>0,i.finish(t,u,l),c.wrapped.setImmediate((function(){if(o.return.async)return e&&c.error(e);c.terminate(e)}))}))}},{\"./non-legacy-codemarkers\":8,\"./postman-legacy-interface\":13,buffer:\"buffer\",lodash:\"lodash\"}],6:[function(e,t,n){const r=e(\"lodash\"),a=e(\"chai\"),i=e(\"ajv\"),o=e(\"uniscope\"),s=e(\"postman-collection\"),c=s.Event,u=e(\"./execution\"),l=e(\"./console\"),p=e(\"./timers\"),d=e(\"./pmapi\"),h=e(\"./cookie-store\"),f=e(\"./pm-require\"),{Vault:m,getVaultInterface:g}=e(\"./vault\"),{Datasets:y,getDatasetsInterface:v}=e(\"./datasets\"),{isNonLegacySandbox:b,getNonLegacyCodeMarker:x}=e(\"./non-legacy-codemarkers\"),w=[\"_variables\",\"environment\",\"collectionVariables\",\"globals\"],k=e(\"./execute-context\");function _(t){return new Promise(((n,r)=>{const a={exports:{}},i=o.create({eval:!0,ignore:[\"require\"],block:[\"bridge\"]});i.import({Buffer:e(\"buffer\").Buffer,module:a}),i.exec(t,(e=>e?r(e):n(a?.exports||{})))}))}t.exports=function(t,n){const j=o.create({eval:!0,ignore:[\"require\"],block:[\"bridge\"]});let S={},A={},E=e=>A[e]||A._default||null;t.once(\"initialize\",(async n=>{S=n||{};const{template:o,templates:c,chaiPlugin:u}=S,l=c||(o?{_default:o}:{}),p=Object.keys(l),d=p.map((e=>_(l[e])));if(!c&&!o&&!u)return a.use(e(\"chai-postman\")(s,r,i)),t.dispatch(\"initialize\");d.push(u?_(u):Promise.resolve(null));try{const e=await Promise.all(d),n=[],i=e.pop();for(let t=0;t<e.length;t++){const a=e[t];A[p[t]]=a,r.isFunction(a.chaiPlugin)&&n.push(a.chaiPlugin)}if(r.isFunction(i))a.use(i(A));else if(1===n.length)a.use(n[0]);else if(n.length>1)throw new Error(\"sandbox: multiple chai plugins are not supported\");t.dispatch(\"initialize\")}catch(h){return t.dispatch(\"initialize\",h)}})),t.on(\"execute\",(function(e,a,i,o){if(!e||!r.isString(e))return t.dispatch(\"error\",new Error(\"sandbox: execution identifier parameter(s) missing\"));if(S.templates&&(!o.templateName||!r.isString(o.templateName)))return t.dispatch(\"error\",new Error(\"sandbox: template name parameter is missing from options\"));!o&&(o={}),!i&&(i={}),a=new c(a);const _=\"execution.result.\"+e,A=\"execution.request.\"+e,C=\"execution.run_collection_request.\"+e,T=\"execution.error.\"+e,P=\"execution.abort.\"+e,D=\"execution.response.\"+e,O=\"execution.run_collection_request_response.\"+e,M=\"execution.cookies.\"+e,N=\"execution.assertion.\"+e,B=\"execution.skipRequest.\"+e,R=(e=>{if(\"string\"!=typeof e)return;const t=`;(async()=>{;\\n ${e}\\n ;})().then(__exitscope).catch(__exitscope);`;return b(e)?`${x()}${t}`:t})(a.script?.toSource()),L=E(o.templateName),I=new u(e,a,i,{...o,protocolMetadata:L}),F=[...S.disabledAPIs||[],...o.disabledAPIs||[]],z=function(e){!Array.isArray(e)&&(e=[e]),t.dispatch(N,o.cursor,e),t.dispatch(\"execution.assertion\",o.cursor,e)},q=function(e){t.dispatch(T,o.cursor,e),t.dispatch(\"execution.error\",o.cursor,e)};let H,U,G,$,W=!1;I.return.async=!1,U=new p(null,(function(e){e&&q(e)}),(function(){I.return.async=!0}),(function(e,n){function r(){G.dispose(),$.dispose(),t.off(P),t.off(D),t.off(O),t.off(M),t.off(\"uncaughtException\",q),I.response&&delete I.response,t.dispatch(_,e||null,I)}H&&(H=U.wrapped.clearTimeout(H)),U&&(U.seal(),U.clearAll()),e&&q(e),!0!==n&&(W?r():U.wrapped.setImmediate(r))})),r.isFinite(o.timeout)&&(H=U.wrapped.setTimeout((function(){U.terminate(new Error(\"sandbox: \"+(I.return.async?\"asynchronous\":\"synchronous\")+\" script execution timeout\"))}),o.timeout)),t.on(P,(function(){U.terminate(null,!0)})),t.on(D,(function(e,t,n,r){U.clearEvent(e,t,n,r)})),t.on(O,(function(e,t,n,a){const{variableMutations:i={},responseType:o}=a||{};w.forEach((function(e){let t=I[e],n=i[e];t&&n&&n.length&&r.isFunction(t.applyMutation)&&n.forEach((function(e){new s.MutationTracker(e).applyOn(t)}))})),U.clearEvent(e,t,n,{responseType:o})})),t.on(M,(function(e,t,n){U.clearEvent(e,t,n)})),t.on(\"uncaughtException\",q),o.resolvedPackages||F.push(\"require\"),G=new m(e,t,U),$=new y(e,t,U),k(j,R,I,new l(t,o.cursor,o.debug&&n.console),U,new d(I,(function(n,r){const a=U.setEvent(r);t.dispatch(A,o.cursor,e,a,n)}),(function(){if(void 0!==o.allowSkipRequest&&!o.allowSkipRequest)throw new TypeError(\"pm.execution.skipRequest is not a function\");if(void 0===o.allowSkipRequest&&(!I||\"prerequest\"!==I.target))throw new TypeError(\"pm.execution.skipRequest is not a function\");W=!0,t.dispatch(B,o.cursor),U.terminate(null)}),z,new h(e,t,U),g(G.exec.bind(G)),v($.exec.bind($)),(function(n,r,a){const i=U.setEvent(a),s={};w.forEach((function(e){s[e]=I[e].values})),t.dispatch(C,o.cursor,e,i,n,r,s)}),f(o.resolvedPackages,j),{disabledAPIs:F,getProtocolMetadata:E}),z,{disableLegacyAPIs:o.disableLegacyAPIs??S.disableLegacyAPIs})}))}},{\"./console\":1,\"./cookie-store\":3,\"./datasets\":4,\"./execute-context\":5,\"./execution\":7,\"./non-legacy-codemarkers\":8,\"./pm-require\":10,\"./pmapi\":12,\"./timers\":15,\"./vault\":16,ajv:\"ajv\",buffer:\"buffer\",chai:\"chai\",\"chai-postman\":248,lodash:\"lodash\",\"postman-collection\":\"postman-collection\",uniscope:563}],7:[function(e,t,n){const r=e(\"lodash\"),a=e(\"postman-collection\"),i=\"request\",o=\"script\",s=\"data\",c=\"response\",u={test:!0,prerequest:!0},l={test:!0},p=[\"_variables\",\"environment\",\"collectionVariables\",\"globals\"],d={autoCompact:!0};t.exports=class{constructor(e,t,n,h){if(this.id=e,this.target=t.listen||o,this.legacy=h.legacy||{},this.cursor=r.isObject(h.cursor)?h.cursor:{},this.data=r.get(n,s,{}),this.cookies=new a.CookieList(null,n.cookies),p.forEach((e=>{this[e]=a.VariableScope.isVariableScope(n[e])?n[e]:new a.VariableScope(n[e]),this[e].enableTracking(d)})),h.protocolMetadata&&h.protocolMetadata.initializeExecution){const{request:e,response:t,message:r}=h.protocolMetadata.initializeExecution(this.target,n)||{};this.request=e,this.response=t,this.message=r}else(u[this.target]||r.has(n,i))&&(this.request=a.Request.isRequest(n.request)?n.request:new a.Request(n.request)),(l[this.target]||r.has(n,c))&&(this.response=a.Response.isResponse(n.response)?n.response:new a.Response(n.response));this.return={}}toJSON(){return r.mapValues(this,(function(e){return r.isFunction(e&&e.toJSON)?e.toJSON():e}))}}},{lodash:\"lodash\",\"postman-collection\":\"postman-collection\"}],8:[function(e,t,n){const r={'\"use sandbox2\";':!0,\"'use sandbox2';\":!0};t.exports={isNonLegacySandbox:e=>r[e.substr(0,15)],getNonLegacyCodeMarker:()=>Object.keys(r)[0]}},{}],9:[function(e,t,n){t.exports={listener:e=>function(t){this.dispatch(e,t)}}},{}],10:[function(e,t,n){const{LEGACY_GLOBS:r}=e(\"./postman-legacy-interface\"),a=\"__module_obj\",i=[\"((exports, module) => {\\n\",`\\n})(${a}.exports, ${a});`],o=/^[^:]+:[^:]+$/,s=e=>o.test(e);class PostmanRequireStore{constructor(e){if(!e)throw new Error(\"File cache is required\");this.fileCache=e}hasFile(e){return Boolean(this.getFile(e))}getFile(e){return this.fileCache[e]}getResolvedPath(e){if(this.hasFile(e))return e}getFileData(e){return this.hasFile(e)&&this.getFile(e).data}hasError(e){return this.hasFile(e)&&Boolean(this.getFile(e).error)}getFileError(e){return this.hasError(e)&&this.getFile(e).error}}t.exports=function createPostmanRequire(e,t){const n=new PostmanRequireStore(e||{}),o={};return function(e){const c=n.getResolvedPath(e);if(!c)throw new Error(`Cannot find package '${e}'`);if(n.hasError(c))throw new Error(`Error while loading package '${e}': ${n.getFileError(c)}`);if(o[c])return o[c].exports;const u=n.getFileData(c),l={id:c,exports:{}};o[l.id]=l;const p=i[0]+u+i[1];return t.import({[a]:l}),t.exec(p,{async:!0,block:s(e)?r.concat(\"pm\"):r},(t=>{if(t)throw new Error(`Error in package '${e}': ${t.message?t.message:t}`)})),t.unset(a),l.exports}}},{\"./postman-legacy-interface\":13}],11:[function(e,t,n){t.exports=function(e,t){var n=0,r=function(e,t){return{name:String(e),async:!1,skipped:Boolean(t),passed:!0,error:null,index:n++}},a=function(e,t){e.error=t,e.passed=!1};e.test=function(n,i){var o=r(n,!1);if(\"function\"!=typeof i)return t(o),e;if(i.length)try{o.async=!0,i((function(e){o.error&&!1===o.passed||(e&&a(o,e),t(o))}))}catch(s){a(o,s),t(o)}else{try{i()}catch(s){a(o,s)}t(o)}return e},e.test.skip=function(n){return t(r(n,!0)),e},e.test.index=function(){return n}}},{}],12:[function(e,t,n){const r=e(\"lodash\"),a=e(\"postman-collection\"),i=e(\"./cookie-jar\"),o=a.VariableScope,s=a.Request,c=a.Response,u=a.CookieList,l=e(\"chai\"),p=function(e,t,n=[]){var a,i={writable:!1};for(a in t)!r.includes(n,a)&&Object.hasOwn(t,a)&&void 0!==t[a]&&(i.value=t[a],Object.defineProperty(e,a,i));return e},d=e(\"./pmapi-setup-runner\");function Postman(e,t,n,a,h,f,m,g,y,v={}){let b=new o;b.syncVariablesFrom(e.data),e._variables.addLayer(b.values),e._variables.addLayer(e.environment.values),e._variables.addLayer(e.collectionVariables.values),e._variables.addLayer(e.globals.values),e.cookies&&(e.cookies.jar=function(){return new i(h)}),p(this,{info:p({},{eventName:e.target,iteration:e.cursor.iteration,iterationCount:e.cursor.cycles,requestName:e.legacy._itemName,requestId:e.legacy._itemId}),vault:f,datasets:m,globals:e.globals,environment:e.environment,collectionVariables:e.collectionVariables,variables:e._variables,iterationData:b,request:e.request,response:e.response,message:e.message,cookies:e.cookies,visualizer:{set(t,n,r){if(\"string\"!=typeof t)throw new Error(\"Invalid template. Template must be of type string, found \"+typeof t);if(n&&\"object\"!=typeof n)throw new Error(\"Invalid data. Data must be an object, found \"+typeof n);if(r&&\"object\"!=typeof r)throw new Error(\"Invalid options. Options must be an object, found \"+typeof r);e.return.visualizer={template:t,data:n,options:r}},clear(){e.return.visualizer=void 0}},sendRequest:function(e,n){let a;const i=this,o=()=>new Promise((function(n,r){e?t(s.isRequest(e)?e:new s(e),(function(e,t,i){if(i&&!u.isCookieList(i.cookies)&&(i.cookies=new u({},i.cookies)),a=i,e)return r(e);n(c.isResponse(t)?t:new c(t))})):r(new Error(\"sendrequest: nothing to request\"))}));return r.isFunction(n)?(o().then((e=>{n.call(i,null,e,a)})).catch((e=>{n.call(i,e)})),i):o()},execution:p({},{skipRequest:n,location:p(e.legacy._itemPath||[],{current:e.legacy._eventItemName}),setNextRequest:function(t){e.return&&(e.return.nextRequest=t)},runRequest:function(e,t){return new Promise((function(n,r){e?g(e,t||{},(function(e,t,a){if(e)return r(e);if(null===t)return n(null);const i=a&&a.responseType?v.getProtocolMetadata(a.responseType)?.Response:c;if(!i)return n(t);n(i.isResponse(t)?t:new i(t))})):r(new Error(\"runRequest: collection request id not provided\"))}))}},(v.disabledAPIs||[]).filter((function(e){return e.startsWith(\"execution.\")})).map((function(e){return e.split(\"execution.\").pop()}))),require:function(e){return y(e)}},v.disabledAPIs),d(this,a),this.response&&Object.defineProperty(this.response,\"to\",{get(){return l.expect(this).to}}),this.request&&Object.defineProperty(this.request,\"to\",{get(){return l.expect(this).to}}),b=null}Postman.prototype.expect=l.expect,t.exports=Postman},{\"./cookie-jar\":2,\"./pmapi-setup-runner\":11,chai:\"chai\",lodash:\"lodash\",\"postman-collection\":\"postman-collection\"}],13:[function(e,t,n){const r=e(\"lodash\"),a={JSON:e(\"liquid-json\"),_:e(\"lodash3\").noConflict(),CryptoJS:e(\"crypto-js\"),tv4:e(\"tv4\"),xml2Json:e(\"./xml2Json\"),Backbone:e(\"backbone\"),cheerio:e(\"cheerio\")},i=[\"tests\",\"globals\",\"environment\",\"data\",\"request\",\"responseCookies\",\"responseHeaders\",\"responseTime\",\"responseCode\",\"responseBody\",\"iteration\",\"postman\",\"_\",\"CryptoJS\",\"tv4\",\"xml2Json\",\"Backbone\",\"cheerio\"],o={tests:'\"pm.test()\"',globals:'\"pm.globals\"',environment:'\"pm.environment\"',data:'\"pm.iterationData\"',request:'\"pm.request\"',responseCookies:'\"pm.cookies\"',responseHeaders:'\"pm.response.headers\"',responseTime:'\"pm.response.responseTime\"',responseCode:'\"pm.response.code\"',responseBody:'\"pm.response.text()\"',iteration:'\"pm.info.iteration\"',_:\"\\\"require('lodash')\\\"\",CryptoJS:'global \"crypto\" object',tv4:\"\\\"require('ajv')\\\"\",xml2Json:\"\\\"require('xml2js')\\\"\",cheerio:\"\\\"require('cheerio')\\\"\",\"postman.setNextRequest\":'\"pm.execution.setNextRequest()\"',\"postman.setEnvironmentVariable\":'\"pm.environment.set()\"',\"postman.getEnvironmentVariable\":'\"pm.environment.get()\"',\"postman.clearEnvironmentVariables\":'\"pm.environment.clear()\"',\"postman.clearEnvironmentVariable\":'\"pm.environment.unset()\"',\"postman.setGlobalVariable\":'\"pm.globals.set()\"',\"postman.getGlobalVariable\":'\"pm.globals.get()\"',\"postman.clearGlobalVariables\":'\"pm.globals.clear()\"',\"postman.clearGlobalVariable\":'\"pm.globals.unset()\"',\"postman.getResponseCookie\":'\"pm.cookies.get()\"',\"postman.getResponseHeader\":'\"pm.response.headers.get()\"'},s=\"function\",c=\"raw\",u=\"urlencoded\",l=\"formdata\",p=\"file\";function d(e,t,n){t.has(e)||(t.add(e),o[e]?n.warn(`Using \"${e}\" is deprecated. Use ${o[e]} instead.`):i.includes(e)&&n.warn(`Using \"${e}\" is deprecated.`))}class PostmanLegacyInterface{constructor(e,t){this.__execution=e,this.__environment=t.environment,this.__globals=t.globals}setEnvironmentVariable(e,t){return!1!==t&&!t||typeof(t&&t.toString)!==s||(t=t.toString()),this.__environment[e]=t,this.__execution.environment.set(e,t)}getEnvironmentVariable(e){return this.__execution.environment.get(e)}clearEnvironmentVariables(){for(var e in this.__environment)Object.hasOwn(this.__environment,e)&&delete this.__environment[e];return this.__execution.environment.clear()}clearEnvironmentVariable(e){return e&&delete this.__environment[e],this.__execution.environment.unset(e)}setGlobalVariable(e,t){return!1!==t&&!t||typeof(t&&t.toString)!==s||(t=t.toString()),this.__globals[e]=t,this.__execution.globals.set(e,t)}getGlobalVariable(e){return this.__execution.globals.get(e)}clearGlobalVariables(){for(var e in this.__globals)Object.hasOwn(this.__globals,e)&&delete this.__globals[e];return this.__execution.globals.clear()}clearGlobalVariable(e){return e&&delete this.__globals[e],this.__execution.globals.unset(e)}setNextRequest(e){this.__execution.return&&(this.__execution.return.nextRequest=e)}}class PostmanLegacyTestInterface extends PostmanLegacyInterface{getResponseCookie(e){return this.__execution.cookies?this.__execution.cookies.one(String(e)):void 0}getResponseHeader(e){var t=this.__execution.response&&this.__execution.response.headers&&this.__execution.response.headers.one(e);return t?t.value:void 0}}t.exports={setup(e,t,n){var o,s,h=r.assign({},a);h.tests={},h.globals=t.globals.syncVariablesTo(),h.environment=t.environment.syncVariablesTo(),h.data=t.data||(t.data={}),h.request=t.request?{id:t.legacy?t.legacy._itemId:void 0,name:t.legacy?t.legacy._itemName:void 0,description:t.request.description?t.request.description.toString():void 0,headers:t.request.headers.toObject(!0,!1,!0,!0),method:t.request.method,url:t.request.url.toString(),data:(o=t.request,s=function(e){var t,n,a=r.get(e,\"body.mode\"),i=r.get(e,\"body\");if(i&&!i.isEmpty())return t=i[a],r.isFunction(t&&t.all)&&(t=t.all()),a===c?n={body:t}:a===u?n={form:r.reduce(t,(function(e,t){return t.disabled||(e[t.key]?r.isArray(e[t.key])?e[t.key].push(t.value):e[t.key]=[e[t.key],t.value]:e[t.key]=t.value),e}),{})}:e.body.mode===l?n={formData:r.reduce(t,(function(e,t){return t.disabled||(e[t.key]?r.isArray(e[t.key])?e[t.key].push(t.value):e[t.key]=[e[t.key],t.value]:e[t.key]=t.value),e}),{})}:e.body.mode===p&&(n={body:r.get(e,\"body.file.content\")}),n}(o),s&&(s.form||s.formData||s.body)||{})}:{},t.response&&(h.responseCookies=t.cookies||[],h.responseHeaders={},t.response&&t.response.headers&&t.response.headers.each((function(e){e&&!e.disabled&&(h.responseHeaders[e.key]=e.value)})),h.responseTime=t.response?t.response.responseTime:NaN,h.responseCode=t.response&&r.isFunction(t.response.details)?r.clone(t.response.details()):{code:NaN,name:\"\",details:\"\"},h.responseBody=(()=>{if(t.response&&!(t.response.responseSize>52428800))return t.response.text()})()),h.iteration=r.isObject(t.cursor)?t.cursor.iteration:0;const f=new(t.response?PostmanLegacyTestInterface:PostmanLegacyInterface)(t,h),m=new Set;e.__is_deprecation_warning_enabled=!0,h.postman=new Proxy(f,{get:(t,r)=>(e.__is_deprecation_warning_enabled&&d(`postman.${r}`,m,n),t[r])}),i.forEach((t=>{h[t]&&[\"object\",\"function\"].includes(typeof h[t])&&(h[t]=new Proxy(h[t],{set(r,a,i){e.__is_deprecation_warning_enabled&&d(t,m,n),r[a]=i},get:(r,a)=>(\"postman\"!==t&&e.__is_deprecation_warning_enabled&&d(t,m,n),r[a]),apply:(r,a,i)=>(e.__is_deprecation_warning_enabled&&d(t,m,n),r.apply(a,i))}))})),e.import(h),h=null,e.__postman_legacy_setup=!0},teardown(e){if(e.__postman_legacy_setup){for(var t=0,n=i.length;t<n;t++)e.unset(i[t]);e.__postman_legacy_setup=!1}},finish(e,t,n){e.__postman_legacy_setup&&(e.__is_deprecation_warning_enabled=!1,function(e,t,n){var a=e._imports&&e._imports.tests,i=t.test.index();r.isEmpty(a)||n(r.map(a,(function(e,t){var n=String(t),r=Boolean(e),a=null;return r||((a=new Error(\"expected \"+String(e)+\" to be truthy\")).name=\"AssertionError\"),{name:n,skipped:!1,passed:r,error:a,index:i++}})))}(e,t,n))},LEGACY_GLOBS:i}},{\"./xml2Json\":17,backbone:\"backbone\",cheerio:\"cheerio\",\"crypto-js\":\"crypto-js\",\"liquid-json\":\"json\",lodash:\"lodash\",lodash3:411,tv4:\"tv4\"}],14:[function(e,t,n){try{Error&&(Error.prototype.toJSON=function(){return{type:\"Error\",name:this.name,message:this.message}})}catch(o){}const{Request:r,Response:a}=e(\"postman-collection\");try{r.prototype.toJSON=(i=r.prototype.toJSON,function(){var e,t=this.to;return delete this.to,e=i.apply(this,arguments),this.to=t,e}),a.prototype.toJSON=function(e){return function(){var t,n=this.to;return delete this.to,t=e.apply(this,arguments),this.to=n,t}}(a.prototype.toJSON)}catch(o){}var i},{\"postman-collection\":\"postman-collection\"}],15:[function(e,t,n){const r=\"function\",a=e(\"lodash\"),i=[\"Timeout\",\"Interval\",\"Immediate\",\"Event\"],o={Interval:!0},s={Event:!0},c=Array.prototype.slice,u=i.reduce((function(e,t){var n=new Function(`return typeof set${t} === 'function'`)(),r=new Function(`return typeof clear${t} === 'function'`)();return n&&(e[`set${t}`]=new Function(\"_setFn\",`return function set${t} (fn, ms) { return _setFn(fn, ms); }`)(this[`set${t}`])),r&&(e[`clear${t}`]=new Function(\"_clearFn\",`return function clear${t} (id) { return _clearFn(id); }`)(this[`clear${t}`])),e}),{});t.exports=function(e,t,n,l){var p,d=a.cloneDeep(e||u),h={},f=0,m=0,g=!1;typeof d.setImmediate!==r&&(d.setImmediate=function(e){return d.setTimeout(e,0)},d.clearImmediate=function(e){return d.clearTimeout(e)}),typeof d.setEvent!==r&&function(){var e={},t=0;d.setEvent=function(n){var r=++t;return e[r]=n,r},d.clearEvent=function(t){var n=e[t];delete e[t],typeof n===r&&n.apply(h,c.call(arguments,1))},d.clearAllEvents=function(){Object.keys(e).forEach((function(t){delete e[t]}))}}(),p=function(e,t){e&&(m+=e),0===m&&p.started&&d.setImmediate((function(){0===m&&p.started&&(!t&&!g&&typeof l===r&&l(),p.started=!1)})),m>0&&!p.started&&(!t&&typeof n===r&&n(),p.started=!0)},i.forEach(function(e){var n={};this[\"set\"+e]=function(a){if(!g&&typeof a===r){var i=++f,u=c.call(arguments);return u[0]=function(){try{a.apply(h,s[e]?arguments:null)}catch(r){t&&t(r)}s[e]||o[e]?p():(p(-1),delete n[i])},n[i]=d[\"set\"+e].apply(this,u),u=null,p(1),i}},this[\"clear\"+e]=function(r){var a,i=n[r];if(!g&&i){(a=c.call(arguments))[0]=i,delete n[r];try{d[\"clear\"+e].apply(h,a)}catch(o){t(o)}p(-1),a=i=null}},typeof d[\"clearAll\"+e+\"s\"]===r?this[\"clearAll\"+e+\"s\"]=function(){d[\"clearAll\"+e+\"s\"](),Object.keys(n).forEach((function(){p(-1,!0)}))}:this[\"clearAll\"+e+\"s\"]=function(){Object.keys(n).forEach((function(t){p(-1,!0),d[\"clear\"+e](n[t])}))}}.bind(this)),this.queueLength=function(){return m},this.wrapped=d,this.clearAll=function(){i.forEach(function(e){this[\"clearAll\"+e+\"s\"]()}.bind(this))},this.seal=function(){g=!0},this.error=function(e){return t.call(h,e)},this.terminate=function(){return this.seal(),this.clearAll(),l.apply(h,arguments)}}},{lodash:\"lodash\"}],16:[function(e,t,n){t.exports={Vault:class{constructor(e,t,n){this._bridge=t,this._timers=n,this._event=`execution.vault.${e}`,this._handler=(e,...t)=>{this._timers.clearEvent(e,...t)},this._bridge.on(this._event,this._handler)}exec(...e){return new Promise(((t,n)=>{const r=this._timers.setEvent(((e,...r)=>{if(e)return n(e instanceof Error?e:new Error(e.message||e));t(...r)}));this._bridge.dispatch(this._event,r,...e)}))}dispose(){this._bridge.off(this._event,this._handler)}},getVaultInterface:e=>({get:t=>e(\"get\",t),set:(t,n)=>e(\"set\",t,n),unset:t=>e(\"unset\",t)})}},{}],17:[function(e,t,n){const r=e(\"xml2js\"),a={explicitArray:!1,async:!1,trim:!0,mergeAttrs:!1};t.exports=function(e){var t={};return r.parseString(e,a,(function(e,n){t=n})),t}},{xml2js:\"xml2js\"}],18:[function(e,t,n){e(\"./timers\"),e(\"buffer\"),function(){var t=this,n=e(\"uniscope/lib/allowed-globals\").concat([\"require\",\"eval\",\"console\",\"bridge\",\"__uvm_emit\",\"__uvm_setTimeout\"]),r=function(e){-1===n.indexOf(e)&&delete t[e]};do{Object.getOwnPropertyNames(t).forEach(r),t=Object.getPrototypeOf(t)}while(null!==Object.getPrototypeOf(t));Object.defineProperty(Error,\"prepareStackTrace\",{value:function(e,t){let n=`Error: ${e&&e.message}`;for(let r=0;r<(t&&t.length);r++)n+=`\\n at ${t[r]}`;return n},configurable:!1,enumerable:!1,writable:!1})}(),e(\"./purse\"),bridge.on(\"ping\",e(\"./ping\").listener(\"pong\")),e(\"./execute\")(bridge,{console:\"undefined\"!=typeof console?console:null,window:\"undefined\"!=typeof window?window:null}),bridge=void 0,delete bridge},{\"./execute\":6,\"./ping\":9,\"./purse\":14,\"./timers\":15,buffer:\"buffer\",\"uniscope/lib/allowed-globals\":564}],19:[function(e,t,n){const r=function(){throw new Error(\"Not implemented\")};t.exports=function(e){return{Buffer:e.Buffer,SlowBuffer:e.SlowBuffer,INSPECT_MAX_BYTES:e.INSPECT_MAX_BYTES,kMaxLength:e.kMaxLength,kStringMaxLength:e.kStringMaxLength,constants:e.constants,File:e.File,Blob:e.Blob,atob:e.atob,btoa:e.btoa,isAscii:r,isUtf8:r,resolveObjectURL:r,transcode:r}}},{}],20:[function(e,t,n){const r=function(){throw new Error(\"Not implemented\")};t.exports=function(e){function t(){return\"number\"==typeof arguments[0]?e.alloc(...arguments):e.from(...arguments)}return Object.setPrototypeOf(t,e),t.poolSize=e.poolSize,Object.defineProperty(t,Symbol.hasInstance,{value:function(t){return t instanceof e}}),t.from=function(){return e.from(...arguments)},t.copyBytesFrom=r,t.of=r,t.alloc=function(){return e.alloc(...arguments)},t.allocUnsafe=function(){return e.allocUnsafe(...arguments)},t.allocUnsafeSlow=function(){return e.allocUnsafeSlow(...arguments)},t.isBuffer=function(){return e.isBuffer(...arguments)},t.compare=function(){return e.compare(...arguments)},t.isEncoding=function(){return e.isEncoding(...arguments)},t.concat=function(){return e.concat(...arguments)},t.byteLength=function(){return e.byteLength(...arguments)},t}},{}],21:[function(e,t,n){(function(e){(function(){!function(){var t,n=Object,r=Array,a=RegExp,i=Date,o=String,s=Number,c=Math,u=n.prototype.toString,l=void 0!==e?e:this,p={},d=n.defineProperty&&n.defineProperties,h=\"Array,Boolean,Date,Function,Number,String,RegExp\".split(\",\");h.forEach((function(e){l[e]||(l[e]=Function(\"return \"+e)())}));var f,m,g=_(h[0]),y=_(h[1]),v=_(h[2]),b=_(h[3]),x=_(h[4]),w=_(h[5]),k=_(h[6]);function _(e){var t,n;return/String|Number|Boolean/.test(e)&&(t=e.toLowerCase()),n=\"Array\"===e&&r.isArray||function(n){return!(!t||typeof n!==t)||j(n)===\"[object \"+e+\"]\"},p[e]=n,n}function j(e){return u.call(e)}function S(e){e.SugarMethods||(T(e,\"SugarMethods\",{}),A(e,!1,!1,{extend:function(t,n,r){A(e,!1!==r,n,t)},sugarRestore:function(){return C(e,arguments,(function(e,t,n){T(e,t,n.method)}))},sugarRevert:function(){return C(e,arguments,(function(e,t,n){n.existed?T(e,t,n.original):delete e[t]}))}}))}function A(e,t,n,r){var a=t?e.prototype:e;S(e),I(r,(function(r,i){var o,s,c,u=a[r],l=L(a,r);\"function\"==typeof n&&(o=a[r],s=i,c=n,i=function(){return(!o||!0!==c&&c.apply(this,arguments)?s:o).apply(this,arguments)}),!1===n&&a[r]||T(a,r,i),e.SugarMethods[r]={instance:t,method:i,original:u,existed:l}}))}function E(e,t,n,r,a){var i={};(r=w(r)?r.split(\",\"):r).forEach((function(e,t){a(i,e,t)})),A(e,t,n,i)}function C(e,t,n){var r=0===t.length,a=P(t),i=!1;return I(e.SugarMethods,(function(t,o){(r||a.indexOf(t)>-1)&&(i=!0,n(o.instance?e.prototype:e,t,o))})),i}function T(e,t,r){d?n.defineProperty(e,t,{value:r,configurable:!0,enumerable:!1,writable:!0}):e[t]=r}function P(e,t){var n,r,a=[];for(n=0,r=e.length;n<r;n++)a.push(e[n]),t&&t.call(e,e[n],n);return a}function D(e,t,n){P(r.prototype.concat.apply([],r.prototype.slice.call(e,n||0)),t)}function O(e){if(!e||!e.call)throw new TypeError(\"Callback is not callable\")}function M(e){return e!==t}function N(e){return e===t}function B(e){return e&&\"object\"==typeof e}function R(e){return!!e&&\"[object Object]\"===j(e)&&\"hasOwnProperty\"in e}function L(e,t){return n.hasOwnProperty.call(e,t)}function I(e,t){var n;for(n in e)if(L(e,n)&&!1===t.call(e,n,e[n],e))break}function F(e,t){return I(t,(function(n){e[n]=t[n]})),e}function z(e){F(this,e)}function q(e,t,n,r){for(var a=[],i=parseInt(e),o=r<0;!o&&i<=t||o&&i>=t;)a.push(i),n&&n.call(this,i),i+=r||1;return a}function H(e,t,n){var r=c[n||\"round\"],a=c.pow(10,c.abs(t||0));return t<0&&(a=1/a),r(e*a)/a}function U(e,t){return H(e,t,\"ceil\")}function G(e,t){return H(e,t,\"floor\")}function $(e,t,n,r){var a=c.abs(e).toString(r||10);return a=V(t-a.replace(/\\.\\d+/,\"\").length,\"0\")+a,(n||e<0)&&(a=(e<0?\"-\":\"+\")+a),a}function W(e){if(e>=11&&e<=13)return\"th\";switch(e%10){case 1:return\"st\";case 2:return\"nd\";case 3:return\"rd\";default:return\"th\"}}function V(e,t){return r(c.max(0,M(e)?e:1)+1).join(t||\"\")}function K(e,t){var n=e.toString().match(/[^/]*$/)[0];return t&&(n=(n+t).split(\"\").sort().join(\"\").replace(/([gimy])\\1+/g,\"$1\")),n}function J(e){return w(e)||(e=o(e)),e.replace(/([\\\\/'*+?|()\\[\\]{}.^$])/g,\"\\\\$1\")}function Y(e,t){var r,a,i,s,c,l,p,d,h=typeof e;if(\"string\"===h)return e;if(i=u.call(e),r=R(e),a=\"[object Array]\"===i,null!=e&&r||a){if(t||(t=[]),t.length>1)for(p=t.length;p--;)if(t[p]===e)return\"CYC\";for(t.push(e),s=o(e.constructor),p=0,d=(c=a?e:n.keys(e).sort()).length;p<d;p++)s+=(l=a?p:c[p])+Y(e[l],t);t.pop()}else s=1/e==-1/0?\"-0\":o(e&&e.valueOf?e.valueOf():e);return h+i+s}function X(e,t){return Z(e)&&Z(t)?Y(e)===Y(t):e===t}function Z(e){var t=j(e);return/^\\[object Date|Array|String|Number|RegExp|Boolean|Arguments\\]$/.test(t)||R(e)}function Q(e,t,n){var r,a=[],i=e.length,o=!1!==t[t.length-1];return P(t,(function(t){if(y(t))return!1;o&&(t%=i)<0&&(t=i+t),r=n?e.charAt(t)||\"\":e[t],a.push(r)})),a.length<2?a[0]:a}function ee(e,t){E(t,!0,!1,e,(function(e,t){e[t+(\"equal\"===t?\"s\":\"\")]=function(){return n[t].apply(null,[this].concat(P(arguments)))}}))}function te(e,t,n,r){var a,i,o=e.length,s=-1==r,c=s?o-1:0,u=(a=n,i=c,isNaN(a)?i:parseInt(0|a));for(u<0&&(u=o+u),(!s&&u<0||s&&u>=o)&&(u=c);s&&u>=0||!s&&u<o;){if(e[u]===t)return u;u+=r}return-1}function ne(e,t,n,r){var a,i,o=e.length,s=0,c=M(n);if(O(t),0==o&&!c)throw new TypeError(\"Reduce called on empty array with no initial value\");for(c?a=n:(a=e[r?o-1:s],s++);s<o;)(i=r?o-s-1:s)in e&&(a=t(a,e[i],i,e)),s++;return a}function re(e){if(0===e.length)throw new TypeError(\"First argument must be defined\")}function ae(e,t,n,r){var i=!0;return e===t||(k(t)&&w(e)?a(t).test(e):b(t)?t.apply(n,r):R(t)&&B(e)?(I(t,(function(r,a){ae(e[r],t[r],n,[e[r],e])||(i=!1)})),i):X(e,t))}function ie(e,t,n,r){return N(t)?e:b(t)?t.apply(n,r||[]):b(e[t])?e[t].call(e):e[t]}function oe(e,t,n,r){var a,i,o;for(n<0&&(n=e.length+n),o=isNaN(n)?0:n,a=!0===r?e.length+o:e.length;o<a;){if(!((i=o%e.length)in e))return se(e,t,o,r);if(!1===t.call(e,e[i],i,e))break;o++}}function se(e,t,n,r){var a,i=[];for(a in e)ce(e,a)&&a>=n&&i.push(parseInt(a));return i.sort().each((function(n){return t.call(e,e[n],n,e)})),e}function ce(e,t){return t in e&&function(e){return e>>>0}(t)==t&&4294967295!=t}function ue(e,t,n,r,a){var i,o;return oe(e,(function(e,n,r){if(ae(e,t,r,[e,n,r]))return i=e,o=n,!1}),n,r),a?o:i}function le(e,t){var n,r=[],a={};return oe(e,(function(i,o){n=t?ie(i,t,e,[i,o,e]):i,me(a,n)||r.push(i)})),r}function pe(e,t,n){var r=[],a={};return t.each((function(e){me(a,e)})),e.each((function(e){var t=Y(e),i=!Z(e);fe(a,t,e,i)!=n&&(!function(e,t,n,r){var a,i=0;if(r)for(a=e[t];i<a.length;)a[i]===n?a.splice(i,1):i+=1;else delete e[t]}(a,t,e,i),r.push(e))})),r}function de(e,t,n){t=t||1/0,n=n||0;var r=[];return oe(e,(function(e){g(e)&&n<t?r=r.concat(de(e,t,n+1)):r.push(e)})),r}function he(e){var t=[];return P(e,(function(e){t=t.concat(e)})),t}function fe(e,t,n,r){var a=t in e;return r&&(e[t]||(e[t]=[]),a=-1!==e[t].indexOf(n)),a}function me(e,t){var n=Y(t),r=!Z(t),a=fe(e,n,t,r);return r?e[n].push(t):e[n]=t,a}function ge(e,t,n,r){var a,i=[],o=\"max\"===n,s=\"min\"===n,c=Array.isArray(e);return I(e,(function(n){var r=e[n],u=ie(r,t,e,c?[r,parseInt(n),e]:[]);if(N(u))throw new TypeError(\"Cannot compare with undefined\");u===a?i.push(r):(N(a)||o&&u>a||s&&u<a)&&(i=[r],a=u)})),c||(i=de(i,1)),r?i:i[0]}function ye(e){return r[ke]&&(e=e.toLowerCase()),e.replace(r[we],\"\")}function ve(e,t){var n=e.charAt(t);return(r[_e]||{})[n]||n}function be(e){var t=r[xe];return e?t.indexOf(e):null}z.prototype.constructor=n,S(n),I(h,(function(e,t){S(l[t])})),A(n,!1,!1,{keys:function(e){var t=[];if(!B(e)&&!k(e)&&!b(e))throw new TypeError(\"Object required\");return I(e,(function(e,n){t.push(e)})),t}}),A(r,!1,!1,{isArray:function(e){return g(e)}}),A(r,!0,!1,{every:function(e,t){var n=this.length,r=0;for(re(arguments);r<n;){if(r in this&&!e.call(t,this[r],r,this))return!1;r++}return!0},some:function(e,t){var n=this.length,r=0;for(re(arguments);r<n;){if(r in this&&e.call(t,this[r],r,this))return!0;r++}return!1},map:function(e,t){var n=this.length,r=0,a=new Array(n);for(re(arguments);r<n;)r in this&&(a[r]=e.call(t,this[r],r,this)),r++;return a},filter:function(e,t){var n=this.length,r=0,a=[];for(re(arguments);r<n;)r in this&&e.call(t,this[r],r,this)&&a.push(this[r]),r++;return a},indexOf:function(e,t){return w(this)?this.indexOf(e,t):te(this,e,t,1)},lastIndexOf:function(e,t){return w(this)?this.lastIndexOf(e,t):te(this,e,t,-1)},forEach:function(e,t){var n=this.length,r=0;for(O(e);r<n;)r in this&&e.call(t,this[r],r,this),r++},reduce:function(e,t){return ne(this,e,t)},reduceRight:function(e,t){return ne(this,e,t,!0)}}),A(Function,!0,!1,{bind:function(e){var t,n=this,r=P(arguments).slice(1);if(!b(this))throw new TypeError(\"Function.prototype.bind called on a non-function\");return t=function(){return n.apply(n.prototype&&this instanceof n?this:e,r.concat(P(arguments)))},t.prototype=this.prototype,t}}),A(i,!1,!1,{now:function(){return(new i).getTime()}}),function(){var e=\"\\t\\n\\v\\f\\r \\u2028\\u2029 \\ufeff\".match(/^\\s+$/);try{o.prototype.trim.call([1])}catch(t){e=!1}A(o,!0,!e,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(a(\"^[\\t\\n\\v\\f\\r \\u2028\\u2029 \\ufeff]+\"),\"\")},trimRight:function(){return this.replace(a(\"[\\t\\n\\v\\f\\r \\u2028\\u2029 \\ufeff]+$\"),\"\")}})}(),f=new i(i.UTC(1999,11,31)),m=f.toISOString&&\"1999-12-31T00:00:00.000Z\"===f.toISOString(),E(i,!0,!m,\"toISOString,toJSON\",(function(e,t){e[t]=function(){return $(this.getUTCFullYear(),4)+\"-\"+$(this.getUTCMonth()+1,2)+\"-\"+$(this.getUTCDate(),2)+\"T\"+$(this.getUTCHours(),2)+\":\"+$(this.getUTCMinutes(),2)+\":\"+$(this.getUTCSeconds(),2)+\".\"+$(this.getUTCMilliseconds(),3)+\"Z\"}}));var xe=\"AlphanumericSortOrder\",we=\"AlphanumericSortIgnore\",ke=\"AlphanumericSortIgnoreCase\",_e=\"AlphanumericSortEquivalents\";function je(e){return e&&e.valueOf&&(e=e.valueOf()),n.keys(e)}function Se(e,t){E(n,!1,!1,e,(function(e,n){e[n]=function(e,a,i){var o,s=je(e);return o=r.prototype[n].call(s,(function(n){return t?ie(e[n],a,e,[n,e[n],e]):ae(e[n],a,e,[n,e[n],e])}),i),g(o)&&(o=o.reduce((function(t,n,r){return t[n]=e[n],t}),{})),o}})),ee(e,z)}A(r,!1,!1,{create:function(){var e,t=[];return P(arguments,(function(n){if(B(n))try{(e=r.prototype.slice.call(n,0)).length>0&&(n=e)}catch(a){}t=t.concat(n)})),t}}),A(r,!0,!1,{find:function(e,t,n){return ue(this,e,t,n)},findAll:function(e,t,n){var r=[];return oe(this,(function(t,n,a){ae(t,e,a,[t,n,a])&&r.push(t)}),t,n),r},findIndex:function(e,t,n){var r=ue(this,e,t,n,!0);return N(r)?-1:r},count:function(e){return N(e)?this.length:this.findAll(e).length},removeAt:function(e,t){var n,r;if(N(e))return this;for(N(t)&&(t=e),n=0,r=t-e;n<=r;n++)this.splice(e,1);return this},include:function(e,t){return this.clone().add(e,t)},exclude:function(){return r.prototype.remove.apply(this.clone(),arguments)},clone:function(){return F([],this)},unique:function(e){return le(this,e)},flatten:function(e){return de(this,e)},union:function(){return le(this.concat(he(arguments)))},intersect:function(){return pe(this,he(arguments),!1)},subtract:function(e){return pe(this,he(arguments),!0)},at:function(){return Q(this,arguments)},first:function(e){return N(e)?this[0]:(e<0&&(e=0),this.slice(0,e))},last:function(e){if(N(e))return this[this.length-1];var t=this.length-e<0?0:this.length-e;return this.slice(t)},from:function(e){return this.slice(e)},to:function(e){return N(e)&&(e=this.length),this.slice(0,e)},min:function(e,t){return ge(this,e,\"min\",t)},max:function(e,t){return ge(this,e,\"max\",t)},least:function(e,t){return ge(this.groupBy.apply(this,[e]),\"length\",\"min\",t)},most:function(e,t){return ge(this.groupBy.apply(this,[e]),\"length\",\"max\",t)},sum:function(e){var t=e?this.map(e):this;return t.length>0?t.reduce((function(e,t){return e+t})):0},average:function(e){var t=e?this.map(e):this;return t.length>0?t.sum()/t.length:0},inGroups:function(e,t){var n=arguments.length>1,r=this,a=[],i=U(this.length/e);return q(0,e-1,(function(e){var o=e*i,s=r.slice(o,o+i);n&&s.length<i&&q(1,i-s.length,(function(){s=s.add(t)})),a.push(s)})),a},inGroupsOf:function(e,t){var n,r=[],a=this.length,i=this;return 0===a||0===e?i:(N(e)&&(e=1),N(t)&&(t=null),q(0,U(a/e)-1,(function(a){for(n=i.slice(e*a,e*a+e);n.length<e;)n.push(t);r.push(n)})),r)},isEmpty:function(){return 0==this.compact().length},sortBy:function(e,t){var n=this.clone();return n.sort((function(r,a){var i,o,s;return i=ie(r,e,n,[r]),o=ie(a,e,n,[a]),s=w(i)&&w(o)?function(e,t){var n,r,a,i,o,s,c=0,u=0;e=ye(e),t=ye(t);do{a=ve(e,c),i=ve(t,c),n=be(a),r=be(i),-1!==n&&-1!==r||(n=e.charCodeAt(c)||null,r=t.charCodeAt(c)||null),(o=a!==e.charAt(c))!=(s=i!==t.charAt(c))&&0===u&&(u=o-s),c+=1}while(null!=n&&null!=r&&n===r);return n===r?u:n<r?-1:1}(i,o):i<o?-1:i>o?1:0,s*(t?-1:1)})),n},randomize:function(){for(var e,t,n=this.concat(),r=n.length;r;)e=c.random()*r|0,t=n[--r],n[r]=n[e],n[e]=t;return n},zip:function(){var e=P(arguments);return this.map((function(t,n){return[t].concat(e.map((function(e){return n in e?e[n]:null})))}))},sample:function(e){var t=this.randomize();return arguments.length>0?t.slice(0,e):t[0]},each:function(e,t,n){return oe(this,e,t,n),this},add:function(e,t){return x(s(t))&&!isNaN(t)||(t=this.length),r.prototype.splice.apply(this,[t,0].concat(e)),this},remove:function(){var e,t=this;return P(arguments,(function(n){for(e=0;e<t.length;)ae(t[e],n,t,[t[e],e,t])?t.splice(e,1):e++})),t},compact:function(e){var t=[];return oe(this,(function(n,r){g(n)?t.push(n.compact()):e&&n?t.push(n):e||null==n||n.valueOf()!=n.valueOf()||t.push(n)})),t},groupBy:function(e,t){var n,r=this,a={};return oe(r,(function(t,i){n=ie(t,e,r,[t,i,r]),a[n]||(a[n]=[]),a[n].push(t)})),t&&I(a,t),a},none:function(){return!this.any.apply(this,arguments)}}),A(r,!0,!1,{all:r.prototype.every,any:r.prototype.some,insert:r.prototype.add}),A(n,!1,!1,{map:function(e,t){return je(e).reduce((function(n,r){return n[r]=ie(e[r],t,e,[r,e[r],e]),n}),{})},reduce:function(e){var t=je(e).map((function(t){return e[t]}));return t.reduce.apply(t,P(arguments).slice(1))},each:function(e,t){return O(t),I(e,t),e},size:function(e){return je(e).length}});var Ae,Ee,Ce=\"any,all,none,count,find,findAll,isEmpty\".split(\",\"),Te=\"sum,average,min,max,least,most\".split(\",\"),Pe=\"map,reduce,size\".split(\",\"),De=Ce.concat(Te).concat(Pe);E(r,!0,(function(){var e=arguments;return e.length>0&&!b(e[0])}),\"map,every,all,some,any,none,filter\",(function(e,t){e[t]=function(e){return this[t]((function(n,r){return\"map\"===t?ie(n,e,this,[n,r,this]):ae(n,e,this,[n,r,this])}))}})),function(){r[xe]=\"AÁÀÂÃĄBCĆČÇDĎÐEÉÈĚÊËĘFGĞHıIÍÌİÎÏJKLŁMNŃŇÑOÓÒÔPQRŘSŚŠŞTŤUÚÙŮÛÜVWXYÝZŹŻŽÞÆŒØÕÅÄÖ\".split(\"\").map((function(e){return e+e.toLowerCase()})).join(\"\");var e={};oe(\"AÁÀÂÃÄ,CÇ,EÉÈÊË,IÍÌİÎÏ,OÓÒÔÕÖ,Sß,UÚÙÛÜ\".split(\",\"),(function(t){var n=t.charAt(0);oe(t.slice(1).split(\"\"),(function(t){e[t]=n,e[t.toLowerCase()]=n.toLowerCase()}))})),r[ke]=!0,r[_e]=e}(),Se(Ce),Se(Te,!0),ee(Pe,z);var Oe,Me,Ne,Be,Re,Le,Ie=[\"ampm\",\"hour\",\"minute\",\"second\",\"ampm\",\"utc\",\"offset_sign\",\"offset_hours\",\"offset_minutes\",\"ampm\"],Fe=\"(?:[,.]\\\\d+)?\",ze=\"[0-5]\\\\d\"+Fe,qe=\"({t})?\\\\s*(\"+(\"\\\\d{1,2}\"+Fe)+\")(?:{h}(\"+ze+\")?{m}(?::?(\"+ze+\"){s})?\\\\s*(?:({t})|(Z)|(?:([+-])(\\\\d{2,2})(?::?(\\\\d{2,2}))?)?)?|\\\\s*({t}))\",He=\"〇一二三四五六七八九十百千万\",Ue=\"0123456789\",Ge={},$e=[],We=[{token:\"f{1,4}|ms|milliseconds\",format:function(e){return ut(e,\"Milliseconds\")}},{token:\"ss?|seconds\",format:function(e,t){return ut(e,\"Seconds\")}},{token:\"mm?|minutes\",format:function(e,t){return ut(e,\"Minutes\")}},{token:\"hh?|hours|12hr\",format:function(e){return function(e){var t=ut(e,\"Hours\");return 0===t?12:t-12*G(t/13)}(e)}},{token:\"HH?|24hr\",format:function(e){return ut(e,\"Hours\")}},{token:\"dd?|date|day\",format:function(e){return ut(e,\"Date\")}},{token:\"dow|weekday\",word:!0,format:function(e,t,n,r){var a=ut(e,\"Day\");return t.weekdays[a+7*(n-1)]}},{token:\"MM?\",format:function(e){return ut(e,\"Month\")+1}},{token:\"mon|month\",word:!0,format:function(e,t,n,r){var a=ut(e,\"Month\");return t.months[a+12*(n-1)]}},{token:\"y{2,4}|year\",format:function(e){return ut(e,\"FullYear\")}},{token:\"[Tt]{1,2}\",format:function(e,t,n,r){if(0==t.ampm.length)return\"\";var a=ut(e,\"Hours\"),i=t.ampm[G(a/12)];return 1===r.length&&(i=i.slice(0,1)),\"T\"===r.slice(0,1)&&(i=i.toUpperCase()),i}},{token:\"z{1,4}|tz|timezone\",text:!0,format:function(e,t,n,r){var a=e.getUTCOffset();return\"z\"!=r&&\"zz\"!=r||(a=a.replace(/(\\d{2})(\\d{2})/,(function(e,t,n){return $(t,r.length)}))),a}},{token:\"iso(tz|timezone)\",format:function(e){return e.getUTCOffset(!0)}},{token:\"ord\",format:function(e){var t=ut(e,\"Date\");return t+W(t)}}],Ve=[{unit:\"year\",method:\"FullYear\",ambiguous:!0,multiplier:function(e){return 24*(365+(e?e.isLeapYear()?1:0:.25))*60*60*1e3}},{unit:\"month\",method:\"Month\",ambiguous:!0,multiplier:function(e,t){var n,r=30.4375;return e&&t<=(n=e.daysInMonth()).days()&&(r=n),24*r*60*60*1e3},error:.919},{unit:\"week\",method:\"ISOWeek\",multiplier:function(){return 6048e5}},{unit:\"day\",method:\"Date\",ambiguous:!0,multiplier:function(){return 864e5}},{unit:\"hour\",method:\"Hours\",multiplier:function(){return 36e5}},{unit:\"minute\",method:\"Minutes\",multiplier:function(){return 6e4}},{unit:\"second\",method:\"Seconds\",multiplier:function(){return 1e3}},{unit:\"millisecond\",method:\"Milliseconds\",multiplier:function(){return 1}}],Ke={};function Je(e){F(this,e),this.compiledFormats=$e.concat()}function Ye(e,t){var n;if(w(e)||(e=\"\"),n=Ke[e]||Ke[e.slice(0,2)],!1===t&&!n)throw new Error(\"Invalid locale.\");return n||Ee}function Xe(e,t,n,r){e.compiledFormats.unshift({variant:r,locale:e,reg:a(\"^\"+t+\"$\",\"i\"),to:n})}function Ze(e){return e.slice(0,1).toUpperCase()+e.slice(1)}function Qe(e){return e.filter((function(e){return!!e})).join(\"|\")}function et(e,t){var n;return R(e[0])?e:x(e[0])&&!x(e[1])?[e[0]]:w(e[0])&&t?[tt(e[0]),e[1]]:(n={},Me.forEach((function(t,r){n[t.unit]=e[r]})),[n])}function tt(e,t){var n={};return match=e.match(/^(\\d+)?\\s?(\\w+?)s?$/i),match&&(N(t)&&(t=parseInt(match[1])||1),n[match[2].toLowerCase()]=t),n}function nt(e){return function(e){return e.replace(Oe,(function(e,t,n){var r,a,i=0,o=1;return t?e:(n.split(\"\").reverse().forEach((function(e){var t=Ge[e],n=t>9;n?(r&&(i+=o),o*=t/(a||1),a=t):(!1===r&&(o*=10),i+=o*t),r=n})),r&&(i+=o),i)}))}(e=e.trim().replace(/^just (?=now)|\\.+$/i,\"\"))}function rt(e,t,n,r){var a,o,s,c,u,l,p,d,h,f=new i,m=!1;return f.utc(r),v(e)?f.utc(e.isUTC()).setTime(e.getTime()):x(e)?f.setTime(e):R(e)?(f.set(e,!0),c=e):w(e)&&(a=Ye(t),e=nt(e),a&&I(a.getFormats(),(function(n,r){var g,y=e.match(r.reg);if(y)return o=(s=r).locale,c=function(e,t){var n,r,a={};return t.forEach((function(t,i){N(n=e[i+1])||\"\"===n||(\"year\"===t&&(a.yearAsString=n.replace(/'/,\"\")),r=parseFloat(n.replace(/'/,\"\").replace(/,/,\".\")),a[t]=isNaN(r)?n.toLowerCase():r)})),a}(y,s.to),c.utc&&f.utc(),o.cachedFormat=s,c.timestamp?(c=c.timestamp,!1):(s.variant&&!w(c.month)&&(w(c.date)||a.hasVariant(t))&&(d=c.month,c.month=c.date,c.date=d),c.year&&2===c.yearAsString.length&&(c.year=(g=c.year,100*H(ut(new i,\"FullYear\")/100)-100*H(g/100)+g)),c.month&&(c.month=o.getMonth(c.month),c.shift&&!c.unit&&(c.unit=o.units[7])),c.weekday&&c.date?delete c.weekday:c.weekday&&(c.weekday=o.getWeekday(c.weekday),c.shift&&!c.unit&&(c.unit=o.units[5])),c.day&&(d=o.modifiersByName[c.day])?(c.day=d.value,f.reset(),m=!0):c.day&&(l=o.getWeekday(c.day))>-1&&(delete c.day,c.num&&c.month?(h=function(){var e=f.getWeekday();f.setWeekday(7*(c.num-1)+(e>l?l+7:l))},c.day=1):c.weekday=l),c.date&&!x(c.date)&&(c.date=o.getNumericDate(c.date)),o.matchPM(c.ampm)&&c.hour<12?c.hour+=12:o.matchAM(c.ampm)&&12===c.hour&&(c.hour=0),(\"offset_hours\"in c||\"offset_minutes\"in c)&&(f.utc(),c.offset_minutes=c.offset_minutes||0,c.offset_minutes+=60*c.offset_hours,\"-\"===c.offset_sign&&(c.offset_minutes*=-1),c.minute-=c.offset_minutes),c.unit&&(m=!0,p=o.getNumber(c.num),u=o.getEnglishUnit(c.unit),(c.shift||c.edge)&&(p*=(d=o.modifiersByName[c.shift])?d.value:0,\"month\"===u&&M(c.date)&&(f.set({day:c.date},!0),delete c.date),\"year\"===u&&M(c.month)&&(f.set({month:c.month,day:c.date},!0),delete c.month,delete c.date)),c.sign&&(d=o.modifiersByName[c.sign])&&(p*=d.value),M(c.weekday)&&(f.set({weekday:c.weekday},!0),delete c.weekday),c[u]=(c[u]||0)+p),\"-\"===c.year_sign&&(c.year*=-1),Ne.slice(1,4).forEach((function(e,t){var